10 |
|
|
11 |
|
NVT::NVT(SimInfo* info) : VelocityVerletIntegrator(info), chiTolerance_ (1e-6) { |
12 |
|
|
13 |
< |
Globals* globals = info_->getGlobals(); |
13 |
> |
Globals* simParams = info_->getSimParams(); |
14 |
|
|
15 |
< |
if (globals->getUseInitXSstate()) { |
15 |
> |
if (simParams->getUseInitXSstate()) { |
16 |
|
Snapshot* currSnapshot = info_->getSnapshotManager()->getCurrentSnapshot(); |
17 |
|
currSnapshot->setChi(0.0); |
18 |
|
currSnapshot->setIntegralOfChiDt(0.0); |
19 |
|
} |
20 |
|
|
21 |
< |
if (!globals->haveTargetTemp()) { |
21 |
> |
if (!simParams->haveTargetTemp()) { |
22 |
|
sprintf(painCave.errMsg, "You can't use the NVT integrator without a targetTemp_!\n"); |
23 |
|
painCave.isFatal = 1; |
24 |
|
painCave.severity = OOPSE_ERROR; |
25 |
|
simError(); |
26 |
|
} else { |
27 |
< |
targetTemp_ = globals->getTargetTemp(); |
27 |
> |
targetTemp_ = simParams->getTargetTemp(); |
28 |
|
} |
29 |
|
|
30 |
|
// We must set tauThermostat_. |
31 |
|
|
32 |
< |
if (!globals->haveTauThermostat()) { |
32 |
> |
if (!simParams->haveTauThermostat()) { |
33 |
|
sprintf(painCave.errMsg, "If you use the constant temperature\n" |
34 |
|
"\tintegrator, you must set tauThermostat_.\n"); |
35 |
|
|
37 |
|
painCave.isFatal = 1; |
38 |
|
simError(); |
39 |
|
} else { |
40 |
< |
tauThermostat_ = globals->getTauThermostat(); |
40 |
> |
tauThermostat_ = simParams->getTauThermostat(); |
41 |
|
} |
42 |
|
|
43 |
|
update(); |