| 118 |
|
tt2 = tauThermostat * tauThermostat; |
| 119 |
|
tb2 = tauBarostat * tauBarostat; |
| 120 |
|
|
| 121 |
< |
update(); |
| 121 |
> |
updateSizes(); |
| 122 |
|
} |
| 123 |
|
|
| 124 |
|
NPT::~NPT() { |
| 125 |
|
} |
| 126 |
|
|
| 127 |
< |
void NPT::doUpdate() { |
| 127 |
> |
void NPT::doUpdateSizes() { |
| 128 |
|
|
| 129 |
|
oldPos.resize(info_->getNIntegrableObjects()); |
| 130 |
|
oldVel.resize(info_->getNIntegrableObjects()); |
| 189 |
|
//ji[j] += dt2 * (Tb[j] * PhysicalConstants::energyConvert - ji[j]*chi); |
| 190 |
|
ji += dt2*PhysicalConstants::energyConvert * Tb - dt2*chi* ji; |
| 191 |
|
|
| 192 |
< |
rotAlgo->rotate(integrableObject, ji, dt); |
| 192 |
> |
rotAlgo_->rotate(integrableObject, ji, dt); |
| 193 |
|
|
| 194 |
|
integrableObject->setJ(ji); |
| 195 |
|
} |
| 205 |
|
//calculate the integral of chidt |
| 206 |
|
integralOfChidt += dt2 * chi; |
| 207 |
|
|
| 208 |
+ |
flucQ_->moveA(); |
| 209 |
+ |
|
| 210 |
+ |
|
| 211 |
|
index = 0; |
| 212 |
|
for (mol = info_->beginMolecule(i); mol != NULL; mol = info_->nextMolecule(i)) { |
| 213 |
|
for (integrableObject = mol->beginIntegrableObject(j); integrableObject != NULL; |
| 236 |
|
} |
| 237 |
|
} |
| 238 |
|
|
| 239 |
< |
rattle->constraintA(); |
| 239 |
> |
rattle_->constraintA(); |
| 240 |
|
} |
| 241 |
|
|
| 242 |
|
// Scale the box after all the positions have been moved: |
| 277 |
|
integrableObject = mol->nextIntegrableObject(j)) { |
| 278 |
|
|
| 279 |
|
oldVel[index] = integrableObject->getVel(); |
| 280 |
< |
oldJi[index] = integrableObject->getJ(); |
| 280 |
> |
|
| 281 |
> |
if (integrableObject->isDirectional()) |
| 282 |
> |
oldJi[index] = integrableObject->getJ(); |
| 283 |
> |
|
| 284 |
|
++index; |
| 285 |
|
} |
| 286 |
|
} |
| 330 |
|
} |
| 331 |
|
} |
| 332 |
|
|
| 333 |
< |
rattle->constraintB(); |
| 333 |
> |
rattle_->constraintB(); |
| 334 |
|
|
| 335 |
|
if ((fabs(prevChi - chi) <= chiTolerance) && this->etaConverged()) |
| 336 |
|
break; |
| 342 |
|
currentSnapshot_->setChi(chi); |
| 343 |
|
currentSnapshot_->setIntegralOfChiDt(integralOfChidt); |
| 344 |
|
|
| 345 |
+ |
flucQ_->moveB(); |
| 346 |
|
saveEta(); |
| 347 |
|
} |
| 348 |
|
|