--- branches/development/src/nonbonded/MAW.cpp 2010/12/29 19:59:21 1532 +++ branches/development/src/nonbonded/MAW.cpp 2011/04/08 21:25:19 1545 @@ -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; @@ -220,8 +219,8 @@ namespace OpenMD { RealType Vang = ca1 * x2 / idat.r2 + cb1 * z / idat.rij + (0.8 - ca1 / 3.0); RealType pot_temp = idat.vdwMult * Vmorse * Vang; - idat.vpair += pot_temp; - idat.pot += idat.sw * pot_temp; + idat.vpair[0] += 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 {