| 52 |
|
thermo(info), |
| 53 |
|
currentSnapshot_(info->getSnapshotManager()->getCurrentSnapshot()) { |
| 54 |
|
|
| 55 |
+ |
|
| 56 |
|
if (info_->usesFluctuatingCharges()) { |
| 57 |
|
if (info_->getNFluctuatingCharges() > 0) { |
| 58 |
|
|
| 59 |
|
hasFlucQ_ = true; |
| 60 |
|
Globals* simParams = info_->getSimParams(); |
| 61 |
+ |
FluctuatingChargeParameters* fqParams = simParams->getFluctuatingChargeParameters(); |
| 62 |
|
|
| 63 |
|
if (simParams->haveDt()) { |
| 64 |
|
dt_ = simParams->getDt(); |
| 75 |
|
currentSnapshot_->setIntegralOfChiElectronicDt(0.0); |
| 76 |
|
} |
| 77 |
|
|
| 78 |
< |
if (!simParams->haveFlucQTargetTemp()) { |
| 78 |
> |
if (!fqParams->haveTargetTemp()) { |
| 79 |
|
sprintf(painCave.errMsg, "You can't use the FluctuatingChargeNVT " |
| 80 |
|
"propagator without a flucQ.targetTemp!\n"); |
| 81 |
|
painCave.isFatal = 1; |
| 82 |
|
painCave.severity = OPENMD_ERROR; |
| 83 |
|
simError(); |
| 84 |
|
} else { |
| 85 |
< |
targetTemp_ = simParams->getFlucQTargetTemp(); |
| 85 |
> |
targetTemp_ = fqParams->getTargetTemp(); |
| 86 |
|
} |
| 87 |
|
|
| 88 |
|
// We must set tauThermostat. |
| 89 |
|
|
| 90 |
< |
if (!simParams->haveFlucQtauThermostat()) { |
| 90 |
> |
if (!fqParams->haveTauThermostat()) { |
| 91 |
|
sprintf(painCave.errMsg, "If you use the FluctuatingChargeNVT\n" |
| 92 |
|
"\tpropagator, you must set flucQ.tauThermostat .\n"); |
| 93 |
|
|
| 95 |
|
painCave.isFatal = 1; |
| 96 |
|
simError(); |
| 97 |
|
} else { |
| 98 |
< |
tauThermostat_ = simParams->getFlucQtauThermostat(); |
| 98 |
> |
tauThermostat_ = fqParams->getTauThermostat(); |
| 99 |
|
} |
| 100 |
|
updateSizes(); |
| 101 |
|
} |