36 |
|
* [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). |
37 |
|
* [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). |
38 |
|
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). |
39 |
< |
* [4] Vardeman & Gezelter, in progress (2009). |
39 |
> |
* [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). |
40 |
> |
* [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). |
41 |
|
*/ |
42 |
|
|
43 |
|
/** |
201 |
|
// electrostaticSummationMethod keyword. |
202 |
|
|
203 |
|
if (simParams_->haveElectrostaticSummationMethod()) { |
204 |
< |
std::string myMethod = simParams_->getElectrostaticSummationMethod(); |
204 |
> |
string myMethod = simParams_->getElectrostaticSummationMethod(); |
205 |
|
toUpper(myMethod); |
206 |
|
|
207 |
|
if (myMethod == "SHIFTED_POTENTIAL") { |
256 |
|
stringToCutoffPolicy["MAX"] = MAX; |
257 |
|
stringToCutoffPolicy["TRADITIONAL"] = TRADITIONAL; |
258 |
|
|
259 |
< |
std::string cutPolicy; |
259 |
> |
string cutPolicy; |
260 |
|
if (forceFieldOptions_.haveCutoffPolicy()){ |
261 |
|
cutPolicy = forceFieldOptions_.getCutoffPolicy(); |
262 |
|
}else if (simParams_->haveCutoffPolicy()) { |
318 |
|
simError(); |
319 |
|
} |
320 |
|
} else { |
321 |
< |
if (simParams_->haveSwitchingRadius()) { |
322 |
< |
map<string, CutoffMethod>::const_iterator it; |
323 |
< |
string theMeth; |
324 |
< |
for (it = stringToCutoffMethod.begin(); |
325 |
< |
it != stringToCutoffMethod.end(); ++it) { |
326 |
< |
if (it->second == cutoffMethod_) { |
327 |
< |
theMeth = it->first; |
328 |
< |
break; |
321 |
> |
if (mdFileVersion > 1) { |
322 |
> |
// throw an error if we define a switching radius and don't need one. |
323 |
> |
// older file versions should not do this. |
324 |
> |
if (simParams_->haveSwitchingRadius()) { |
325 |
> |
map<string, CutoffMethod>::const_iterator it; |
326 |
> |
string theMeth; |
327 |
> |
for (it = stringToCutoffMethod.begin(); |
328 |
> |
it != stringToCutoffMethod.end(); ++it) { |
329 |
> |
if (it->second == cutoffMethod_) { |
330 |
> |
theMeth = it->first; |
331 |
> |
break; |
332 |
> |
} |
333 |
|
} |
334 |
+ |
sprintf(painCave.errMsg, |
335 |
+ |
"ForceManager::setupCutoffs: the cutoffMethod (%s)\n" |
336 |
+ |
"\tis not set to SWITCHED, so switchingRadius value\n" |
337 |
+ |
"\twill be ignored for this simulation\n", theMeth.c_str()); |
338 |
+ |
painCave.isFatal = 0; |
339 |
+ |
painCave.severity = OPENMD_WARNING; |
340 |
+ |
simError(); |
341 |
|
} |
330 |
– |
sprintf(painCave.errMsg, |
331 |
– |
"ForceManager::setupCutoffs: the cutoffMethod (%s)\n" |
332 |
– |
"\tis not set to SWITCHED, so switchingRadius value\n" |
333 |
– |
"\twill be ignored for this simulation\n", theMeth.c_str()); |
334 |
– |
painCave.isFatal = 0; |
335 |
– |
painCave.severity = OPENMD_WARNING; |
336 |
– |
simError(); |
342 |
|
} |
338 |
– |
|
343 |
|
rSwitch_ = rCut_; |
344 |
|
} |
345 |
|
|
854 |
|
MPI_Allreduce(tmpTau.getArrayPointer(), tau.getArrayPointer(), |
855 |
|
9, MPI_REALTYPE, MPI_SUM, MPI_COMM_WORLD); |
856 |
|
#endif |
857 |
< |
curSnapshot->statData.setTau(tau); |
857 |
> |
curSnapshot->setTau(tau); |
858 |
|
} |
859 |
|
|
860 |
|
} //end namespace OpenMD |