65 |
|
oldPos = new double[3*integrableObjects.size()]; |
66 |
|
oldVel = new double[3*integrableObjects.size()]; |
67 |
|
oldJi = new double[3*integrableObjects.size()]; |
68 |
– |
#ifdef IS_MPI |
69 |
– |
Nparticles = mpiSim->getTotAtoms(); |
70 |
– |
#else |
71 |
– |
Nparticles = theInfo->n_atoms; |
72 |
– |
#endif |
68 |
|
|
69 |
|
} |
70 |
|
|
351 |
|
} |
352 |
|
|
353 |
|
// We need NkBT a lot, so just set it here: This is the RAW number |
354 |
< |
// of particles, so no subtraction or addition of constraints or |
354 |
> |
// of integrableObjects, so no subtraction or addition of constraints or |
355 |
|
// orientational degrees of freedom: |
356 |
|
|
357 |
< |
NkBT = (double)Nparticles * kB * targetTemp; |
357 |
> |
NkBT = (double)(info->getTotIntegrableObjects()) * kB * targetTemp; |
358 |
|
|
359 |
|
// fkBT is used because the thermostat operates on more degrees of freedom |
360 |
|
// than the barostat (when there are particles with orientational degrees |
361 |
< |
// of freedom). ndf = 3 * (n_atoms + n_oriented -1) - n_constraint - nZcons |
361 |
> |
// of freedom). |
362 |
|
|
363 |
< |
fkBT = (double)info->ndf * kB * targetTemp; |
363 |
> |
fkBT = (double)(info->getNDF()) * kB * targetTemp; |
364 |
|
|
365 |
|
tt2 = tauThermostat * tauThermostat; |
366 |
|
tb2 = tauBarostat * tauBarostat; |