--- branches/development/src/nonbonded/InteractionManager.cpp 2011/06/08 16:05:07 1576 +++ branches/development/src/nonbonded/InteractionManager.cpp 2011/06/21 06:34:35 1586 @@ -67,6 +67,7 @@ namespace OpenMD { eam_->setForceField(forceField_); sc_->setForceField(forceField_); morse_->setForceField(forceField_); + electrostatic_->setSimInfo(info_); electrostatic_->setForceField(forceField_); maw_->setForceField(forceField_); @@ -241,24 +242,26 @@ namespace OpenMD { } - // make sure every pair of atom types in this simulation has a - // non-bonded interaction: + // Make sure every pair of atom types in this simulation has a + // non-bonded interaction. If not, just inform the user. set simTypes = info_->getSimulatedAtomTypes(); set::iterator it, jt; + for (it = simTypes.begin(); it != simTypes.end(); ++it) { atype1 = (*it); - for (jt = simTypes.begin(); jt != simTypes.end(); ++jt) { + for (jt = it; jt != simTypes.end(); ++jt) { atype2 = (*jt); key = make_pair(atype1, atype2); if (interactions_[key].size() == 0) { sprintf( painCave.errMsg, - "InteractionManager unable to find an appropriate non-bonded\n" - "\tinteraction for atom types %s - %s\n", + "InteractionManager could not find a matching non-bonded\n" + "\tinteraction for atom types %s - %s\n" + "\tProceeding without this interaction.\n", atype1->getName().c_str(), atype2->getName().c_str()); painCave.severity = OPENMD_INFO; - painCave.isFatal = 1; + painCave.isFatal = 0; simError(); } } @@ -266,6 +269,15 @@ namespace OpenMD { initialized_ = true; } + + void InteractionManager::setCutoffRadius(RealType rcut) { + electrostatic_->setCutoffRadius(rcut); + eam_->setCutoffRadius(rcut); + } + + void InteractionManager::setSwitchingRadius(RealType rswitch) { + electrostatic_->setSwitchingRadius(rswitch); + } void InteractionManager::doPrePair(InteractionData idat){ @@ -315,7 +327,7 @@ namespace OpenMD { void InteractionManager::doSkipCorrection(InteractionData idat){ if (!initialized_) initialize(); - + set::iterator it; for (it = interactions_[ idat.atypes ].begin();