--- branches/development/src/nonbonded/MAW.cpp 2010/12/29 19:59:21 1532 +++ branches/development/src/nonbonded/MAW.cpp 2011/04/27 18:38:15 1549 @@ -124,13 +124,12 @@ namespace OpenMD { } } - void MAW::calcForce(InteractionData idat) { + void MAW::calcForce(InteractionData &idat) { if (!initialized_) initialize(); - pair key = make_pair(idat.atype1, idat.atype2); map, MAWInteractionData>::iterator it; - it = MixingMap.find(key); + it = MixingMap.find(idat.atypes); if (it != MixingMap.end()) { MAWInteractionData mixer = (*it).second; @@ -145,7 +144,7 @@ namespace OpenMD { RealType ca1 = mixer.ca1; RealType cb1 = mixer.cb1; - bool j_is_Metal = idat.atype2->isMetal(); + bool j_is_Metal = idat.atypes.second->isMetal(); Vector3d r; RotMat3x3d Atrans; @@ -221,7 +220,7 @@ namespace OpenMD { RealType pot_temp = idat.vdwMult * Vmorse * Vang; idat.vpair += pot_temp; - idat.pot += idat.sw * pot_temp; + idat.pot[0] += idat.sw * pot_temp; Vector3d dVmorsedr = (myDeriv - myDerivC) * Vector3d(x, y, z) / idat.rij; @@ -271,11 +270,10 @@ namespace OpenMD { } - RealType MAW::getSuggestedCutoffRadius(AtomType* at1, AtomType* at2) { + RealType MAW::getSuggestedCutoffRadius(pair atypes) { if (!initialized_) initialize(); - pair key = make_pair(at1, at2); map, MAWInteractionData>::iterator it; - it = MixingMap.find(key); + it = MixingMap.find(atypes); if (it == MixingMap.end()) return 0.0; else {