317 |
|
simError(); |
318 |
|
} |
319 |
|
} else { |
320 |
< |
if (simParams_->haveSwitchingRadius()) { |
321 |
< |
map<string, CutoffMethod>::const_iterator it; |
322 |
< |
string theMeth; |
323 |
< |
for (it = stringToCutoffMethod.begin(); |
324 |
< |
it != stringToCutoffMethod.end(); ++it) { |
325 |
< |
if (it->second == cutoffMethod_) { |
326 |
< |
theMeth = it->first; |
327 |
< |
break; |
320 |
> |
if (mdFileVersion > 1) { |
321 |
> |
// throw an error if we define a switching radius and don't need one. |
322 |
> |
// older file versions should not do this. |
323 |
> |
if (simParams_->haveSwitchingRadius()) { |
324 |
> |
map<string, CutoffMethod>::const_iterator it; |
325 |
> |
string theMeth; |
326 |
> |
for (it = stringToCutoffMethod.begin(); |
327 |
> |
it != stringToCutoffMethod.end(); ++it) { |
328 |
> |
if (it->second == cutoffMethod_) { |
329 |
> |
theMeth = it->first; |
330 |
> |
break; |
331 |
> |
} |
332 |
|
} |
333 |
+ |
sprintf(painCave.errMsg, |
334 |
+ |
"ForceManager::setupCutoffs: the cutoffMethod (%s)\n" |
335 |
+ |
"\tis not set to SWITCHED, so switchingRadius value\n" |
336 |
+ |
"\twill be ignored for this simulation\n", theMeth.c_str()); |
337 |
+ |
painCave.isFatal = 0; |
338 |
+ |
painCave.severity = OPENMD_WARNING; |
339 |
+ |
simError(); |
340 |
|
} |
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(); |
341 |
|
} |
338 |
– |
|
342 |
|
rSwitch_ = rCut_; |
343 |
|
} |
344 |
|
|