ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/nonbonded/InteractionManager.cpp
(Generate patch)

Comparing branches/development/src/nonbonded/InteractionManager.cpp (file contents):
Revision 1576 by gezelter, Wed Jun 8 16:05:07 2011 UTC vs.
Revision 1583 by gezelter, Thu Jun 16 22:00:08 2011 UTC

# Line 241 | Line 241 | namespace OpenMD {
241      }
242      
243      
244 <    // make sure every pair of atom types in this simulation has a
245 <    // non-bonded interaction:
244 >    // Make sure every pair of atom types in this simulation has a
245 >    // non-bonded interaction.  If not, just inform the user.
246  
247      set<AtomType*> simTypes = info_->getSimulatedAtomTypes();
248      set<AtomType*>::iterator it, jt;
249 +
250      for (it = simTypes.begin(); it != simTypes.end(); ++it) {
251        atype1 = (*it);
252 <      for (jt = simTypes.begin(); jt != simTypes.end(); ++jt) {
252 >      for (jt = it; jt != simTypes.end(); ++jt) {
253          atype2 = (*jt);
254          key = make_pair(atype1, atype2);
255          
256          if (interactions_[key].size() == 0) {
257            sprintf( painCave.errMsg,
258 <                   "InteractionManager unable to find an appropriate non-bonded\n"
259 <                   "\tinteraction for atom types %s - %s\n",
258 >                   "InteractionManager could not find a matching non-bonded\n"
259 >                   "\tinteraction for atom types %s - %s\n"
260 >                   "\tProceeding without this interaction.\n",
261                     atype1->getName().c_str(), atype2->getName().c_str());
262            painCave.severity = OPENMD_INFO;
263 <          painCave.isFatal = 1;
263 >          painCave.isFatal = 0;
264            simError();
265          }
266        }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines