--- trunk/src/nonbonded/InteractionManager.cpp 2013/08/19 13:12:00 1929 +++ trunk/src/nonbonded/InteractionManager.cpp 2014/06/11 18:37:56 2005 @@ -116,10 +116,7 @@ namespace OpenMD { set::iterator at; for (at = atypes.begin(); at != atypes.end(); ++at) { - - //for (atype1 = atomTypes->beginType(i1); atype1 != NULL; - // atype1 = atomTypes->nextType(i1)) { - + atype1 = *at; atid1 = atype1->getIdent(); iHash_[atid1].resize(nTypes); @@ -136,30 +133,29 @@ namespace OpenMD { painCave.isFatal = 0; simError(); } - } - - if (atype1->isLennardJones()) { - sHash_[atid1] |= LJ_INTERACTION; - } - if (atype1->isElectrostatic()) { - sHash_[atid1] |= ELECTROSTATIC_INTERACTION; - } - if (atype1->isSticky()) { - sHash_[atid1] |= STICKY_INTERACTION; - } - if (atype1->isStickyPower()) { - sHash_[atid1] |= STICKY_INTERACTION; - } - if (atype1->isEAM()) { - sHash_[atid1] |= EAM_INTERACTION; - } - if (atype1->isSC()) { - sHash_[atid1] |= SC_INTERACTION; - } - if (atype1->isGayBerne()) { - sHash_[atid1] |= GB_INTERACTION; + + if (atype1->isLennardJones()) { + sHash_[atid1] |= LJ_INTERACTION; + } + if (atype1->isElectrostatic()) { + sHash_[atid1] |= ELECTROSTATIC_INTERACTION; + } + if (atype1->isSticky()) { + sHash_[atid1] |= STICKY_INTERACTION; + } + if (atype1->isStickyPower()) { + sHash_[atid1] |= STICKY_INTERACTION; + } + if (atype1->isEAM()) { + sHash_[atid1] |= EAM_INTERACTION; + } + if (atype1->isSC()) { + sHash_[atid1] |= SC_INTERACTION; + } + if (atype1->isGayBerne()) { + sHash_[atid1] |= GB_INTERACTION; + } } - // Now, iterate over all known types and add to the interaction map: map::iterator it1, it2; @@ -375,7 +371,7 @@ namespace OpenMD { atid1 = atype1->getIdent(); for (jt = it; jt != simTypes.end(); ++jt) { atype2 = (*jt); - atid1 = atype1->getIdent(); + atid2 = atype2->getIdent(); if (interactions_[atid1][atid2].size() == 0) { sprintf( painCave.errMsg,