| 79 |
|
tauThermostat_ = simParams->getTauThermostat(); |
| 80 |
|
} |
| 81 |
|
|
| 82 |
< |
update(); |
| 82 |
> |
updateSizes(); |
| 83 |
|
} |
| 84 |
|
|
| 85 |
< |
void NVT::doUpdate() { |
| 85 |
> |
void NVT::doUpdateSizes() { |
| 86 |
|
oldVel_.resize(info_->getNIntegrableObjects()); |
| 87 |
< |
oldJi_.resize(info_->getNIntegrableObjects()); |
| 87 |
> |
oldJi_.resize(info_->getNIntegrableObjects()); |
| 88 |
|
} |
| 89 |
|
void NVT::moveA() { |
| 90 |
|
SimInfo::MoleculeIterator i; |
| 137 |
|
|
| 138 |
|
//ji[j] += dt2 * (Tb[j] * PhysicalConstants::energyConvert - ji[j]*chi); |
| 139 |
|
ji += dt2*PhysicalConstants::energyConvert*Tb - dt2*chi *ji; |
| 140 |
< |
rotAlgo->rotate(integrableObject, ji, dt); |
| 140 |
> |
rotAlgo_->rotate(integrableObject, ji, dt); |
| 141 |
|
|
| 142 |
|
integrableObject->setJ(ji); |
| 143 |
|
} |
| 145 |
|
|
| 146 |
|
} |
| 147 |
|
|
| 148 |
< |
rattle->constraintA(); |
| 148 |
> |
flucQ_->moveA(); |
| 149 |
> |
rattle_->constraintA(); |
| 150 |
|
|
| 151 |
|
// Finally, evolve chi a half step (just like a velocity) using |
| 152 |
|
// temperature at time t, not time t+dt/2 |
| 238 |
|
} |
| 239 |
|
} |
| 240 |
|
|
| 241 |
+ |
rattle_->constraintB(); |
| 242 |
|
|
| 241 |
– |
rattle->constraintB(); |
| 242 |
– |
|
| 243 |
|
if (fabs(prevChi - chi) <= chiTolerance_) |
| 244 |
|
break; |
| 245 |
|
|
| 246 |
|
} |
| 247 |
|
|
| 248 |
< |
integralOfChidt += dt2 * chi; |
| 248 |
> |
flucQ_->moveB(); |
| 249 |
|
|
| 250 |
+ |
integralOfChidt += dt2 * chi; |
| 251 |
|
currentSnapshot_->setChi(chi); |
| 252 |
|
currentSnapshot_->setIntegralOfChiDt(integralOfChidt); |
| 253 |
|
} |