| 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 |
|
|
| 165 |
|
integrableObjects[i]->setPos( pos ); |
| 166 |
|
} |
| 167 |
|
|
| 168 |
< |
if (nConstrained){ |
| 174 |
< |
constrainA(); |
| 175 |
< |
} |
| 168 |
> |
rattle->doRattleA(); |
| 169 |
|
} |
| 170 |
|
|
| 171 |
|
|
| 245 |
|
} |
| 246 |
|
} |
| 247 |
|
|
| 248 |
< |
if (nConstrained){ |
| 256 |
< |
constrainB(); |
| 257 |
< |
} |
| 248 |
> |
rattle->doRattleB(); |
| 249 |
|
|
| 250 |
|
if ( this->chiConverged() && this->etaConverged() ) break; |
| 251 |
|
} |
| 347 |
|
} |
| 348 |
|
|
| 349 |
|
// We need NkBT a lot, so just set it here: This is the RAW number |
| 350 |
< |
// of particles, so no subtraction or addition of constraints or |
| 350 |
> |
// of integrableObjects, so no subtraction or addition of constraints or |
| 351 |
|
// orientational degrees of freedom: |
| 352 |
|
|
| 353 |
< |
NkBT = (double)Nparticles * kB * targetTemp; |
| 353 |
> |
NkBT = (double)(info->getTotIntegrableObjects()) * kB * targetTemp; |
| 354 |
|
|
| 355 |
|
// fkBT is used because the thermostat operates on more degrees of freedom |
| 356 |
|
// than the barostat (when there are particles with orientational degrees |
| 357 |
< |
// of freedom). ndf = 3 * (n_atoms + n_oriented -1) - n_constraint - nZcons |
| 357 |
> |
// of freedom). |
| 358 |
|
|
| 359 |
< |
fkBT = (double)info->ndf * kB * targetTemp; |
| 359 |
> |
fkBT = (double)(info->getNDF()) * kB * targetTemp; |
| 360 |
|
|
| 361 |
|
tt2 = tauThermostat * tauThermostat; |
| 362 |
|
tb2 = tauBarostat * tauBarostat; |