50 |
|
} |
51 |
|
} |
52 |
|
|
53 |
– |
|
54 |
– |
std::cerr << "building oldVel with \t" << integrableObjects.size() << "\n"; |
53 |
|
oldVel = new double[3*integrableObjects.size()]; |
54 |
|
oldJi = new double[3*integrableObjects.size()]; |
55 |
|
} |
118 |
|
// Finally, evolve chi a half step (just like a velocity) using |
119 |
|
// temperature at time t, not time t+dt/2 |
120 |
|
|
121 |
+ |
//std::cerr << "targetTemp = " << targetTemp << " instTemp = " << instTemp << " tauThermostat = " << tauThermostat << " integral of Chi = " << integralOfChidt << "\n"; |
122 |
+ |
|
123 |
|
chi += dt2 * ( instTemp / targetTemp - 1.0) / (tauThermostat*tauThermostat); |
124 |
|
integralOfChidt += chi*dt2; |
125 |
|
|
220 |
|
|
221 |
|
if (!have_target_temp) { |
222 |
|
sprintf( painCave.errMsg, |
223 |
< |
"NVT error: You can't use the NVT integrator without a targetTemp!\n" |
223 |
> |
"You can't use the NVT integrator without a targetTemp!\n" |
224 |
|
); |
225 |
|
painCave.isFatal = 1; |
226 |
+ |
painCave.severity = OOPSE_ERROR; |
227 |
|
simError(); |
228 |
|
return -1; |
229 |
|
} |
232 |
|
|
233 |
|
if (!have_tau_thermostat) { |
234 |
|
sprintf( painCave.errMsg, |
235 |
< |
"NVT error: If you use the constant temperature\n" |
236 |
< |
" integrator, you must set tauThermostat.\n"); |
235 |
> |
"If you use the constant temperature\n" |
236 |
> |
"\tintegrator, you must set tauThermostat.\n"); |
237 |
> |
painCave.severity = OOPSE_ERROR; |
238 |
|
painCave.isFatal = 1; |
239 |
|
simError(); |
240 |
|
return -1; |
242 |
|
|
243 |
|
if (!have_chi_tolerance) { |
244 |
|
sprintf( painCave.errMsg, |
245 |
< |
"NVT warning: setting chi tolerance to 1e-6\n"); |
245 |
> |
"In NVT integrator: setting chi tolerance to 1e-6\n"); |
246 |
|
chiTolerance = 1e-6; |
247 |
|
have_chi_tolerance = 1; |
248 |
+ |
painCave.severity = OOPSE_INFO; |
249 |
|
painCave.isFatal = 0; |
250 |
|
simError(); |
251 |
|
} |
262 |
|
double thermostat_kinetic; |
263 |
|
double thermostat_potential; |
264 |
|
|
265 |
< |
fkBT = (double)(info->getNDF() ) * kB * targetTemp; |
265 |
> |
fkBT = (double)(info->ndf) * kB * targetTemp; |
266 |
|
|
267 |
|
Energy = tStats->getTotalE(); |
268 |
|
|