83 |
|
} |
84 |
|
|
85 |
|
void NPT::doUpdate() { |
86 |
< |
VelocityVerletIntegrator::update(); |
86 |
> |
|
87 |
|
oldPos.resize(info_->getNIntegrableObjects()); |
88 |
|
oldVel.resize(info_->getNIntegrableObjects()); |
89 |
|
oldJi.resize(info_->getNIntegrableObjects()); |
90 |
– |
// We need NkBT a lot, so just set it here: This is the RAW number |
91 |
– |
// of integrableObjects, so no subtraction or addition of constraints or |
92 |
– |
// orientational degrees of freedom: |
93 |
– |
NkBT = info_->getNGlobalIntegrableObjects()*OOPSEConstant::kB *targetTemp; |
90 |
|
|
95 |
– |
// fkBT is used because the thermostat operates on more degrees of freedom |
96 |
– |
// than the barostat (when there are particles with orientational degrees |
97 |
– |
// of freedom). |
98 |
– |
fkBT = info_->getNdf()*OOPSEConstant::kB *targetTemp; |
91 |
|
} |
92 |
|
|
93 |
|
void NPT::moveA() { |
103 |
|
Vector3d sc; |
104 |
|
int index; |
105 |
|
|
106 |
< |
Snapshot* currSnapshot = info_->getSnapshotManager()->getCurrentSnapshot(); |
107 |
< |
chi= currSnapshot->getChi(); |
116 |
< |
integralOfChidt = currSnapshot->getIntegralOfChiDt(); |
106 |
> |
chi= currentSnapshot_->getChi(); |
107 |
> |
integralOfChidt = currentSnapshot_->getIntegralOfChiDt(); |
108 |
|
loadEta(); |
109 |
|
|
110 |
|
instaTemp =thermo.getTemperature(); |
199 |
|
|
200 |
|
this->scaleSimBox(); |
201 |
|
|
202 |
< |
currSnapshot->setChi(chi); |
203 |
< |
currSnapshot->setIntegralOfChiDt(integralOfChidt); |
202 |
> |
currentSnapshot_->setChi(chi); |
203 |
> |
currentSnapshot_->setIntegralOfChiDt(integralOfChidt); |
204 |
|
|
205 |
|
saveEta(); |
206 |
|
} |
219 |
|
double mass; |
220 |
|
|
221 |
|
|
222 |
< |
Snapshot* currSnapshot = info_->getSnapshotManager()->getCurrentSnapshot(); |
223 |
< |
chi= currSnapshot->getChi(); |
233 |
< |
integralOfChidt = currSnapshot->getIntegralOfChiDt(); |
222 |
> |
chi= currentSnapshot_->getChi(); |
223 |
> |
integralOfChidt = currentSnapshot_->getIntegralOfChiDt(); |
224 |
|
double oldChi = chi; |
225 |
|
double prevChi; |
226 |
|
|
293 |
|
//calculate integral of chidt |
294 |
|
integralOfChidt += dt2 * chi; |
295 |
|
|
296 |
< |
currSnapshot->setChi(chi); |
297 |
< |
currSnapshot->setIntegralOfChiDt(integralOfChidt); |
296 |
> |
currentSnapshot_->setChi(chi); |
297 |
> |
currentSnapshot_->setIntegralOfChiDt(integralOfChidt); |
298 |
|
|
299 |
|
saveEta(); |
300 |
|
} |