49 |
|
|
50 |
|
RealType InteractionManager::rCut_ = 0.0; |
51 |
|
RealType InteractionManager::rSwitch_ = 0.0; |
52 |
– |
RealType InteractionManager::skinThickness_ = 0.0; |
53 |
– |
RealType InteractionManager::listRadius_ = 0.0; |
52 |
|
CutoffMethod InteractionManager::cutoffMethod_ = SHIFTED_FORCE; |
53 |
|
SwitchingFunctionType InteractionManager::sft_ = cubic; |
54 |
|
RealType InteractionManager::vdwScale_[4] = {1.0, 0.0, 0.0, 0.0}; |
303 |
|
|
304 |
|
setupCutoffs(); |
305 |
|
setupSwitching(); |
308 |
– |
setupNeighborlists(); |
306 |
|
|
307 |
|
//int ljsp = cutoffMethod_ == SHIFTED_POTENTIAL ? 1 : 0; |
308 |
|
//int ljsf = cutoffMethod_ == SHIFTED_FORCE ? 1 : 0; |
309 |
|
//notifyFortranCutoffs(&rCut_, &rSwitch_, &ljsp, &ljsf); |
313 |
– |
//notifyFortranSkinThickness(&skinThickness_); |
310 |
|
|
311 |
|
initialized_ = true; |
312 |
|
} |
454 |
|
switcher_->setSwitch(rSwitch_, rCut_); |
455 |
|
} |
456 |
|
|
461 |
– |
/** |
462 |
– |
* setupNeighborlists |
463 |
– |
* |
464 |
– |
* If the skinThickness was explicitly set, use that value (but check it) |
465 |
– |
* If the skinThickness was not explicitly set: use 1.0 angstroms |
466 |
– |
*/ |
467 |
– |
void InteractionManager::setupNeighborlists() { |
468 |
– |
|
469 |
– |
Globals* simParams_ = info_->getSimParams(); |
470 |
– |
|
471 |
– |
if (simParams_->haveSkinThickness()) { |
472 |
– |
skinThickness_ = simParams_->getSkinThickness(); |
473 |
– |
} else { |
474 |
– |
skinThickness_ = 1.0; |
475 |
– |
sprintf(painCave.errMsg, |
476 |
– |
"InteractionManager::setupNeighborlists: No value was set for the skinThickness.\n" |
477 |
– |
"\tOpenMD will use a default value of %f Angstroms\n" |
478 |
– |
"\tfor this simulation\n", skinThickness_); |
479 |
– |
painCave.severity = OPENMD_INFO; |
480 |
– |
painCave.isFatal = 0; |
481 |
– |
simError(); |
482 |
– |
} |
483 |
– |
|
484 |
– |
listRadius_ = rCut_ + skinThickness_; |
485 |
– |
} |
486 |
– |
|
487 |
– |
|
457 |
|
void InteractionManager::doPrePair(InteractionData idat){ |
458 |
|
|
459 |
|
if (!initialized_) initialize(); |