--- branches/development/src/nonbonded/Sticky.cpp 2010/10/03 22:18:59 1505 +++ branches/development/src/nonbonded/Sticky.cpp 2011/04/08 21:25:19 1545 @@ -186,13 +186,12 @@ namespace OpenMD { * idat structure. */ - void Sticky::calcForce(InteractionData idat) { + void Sticky::calcForce(InteractionData &idat) { if (!initialized_) initialize(); - pair key = make_pair(idat.atype1, idat.atype2); map, StickyInteractionData>::iterator it; - it = MixingMap.find(key); + it = MixingMap.find(idat.atypes); if (it != MixingMap.end()) { StickyInteractionData mixer = (*it).second; @@ -343,8 +342,8 @@ namespace OpenMD { dspdr = 0.0; } - idat.vpair += 0.5*(v0*s*w + v0p*sp*wp); - idat.pot += 0.5*(v0*s*w + v0p*sp*wp)*idat.sw; + idat.vpair[2] += 0.5*(v0*s*w + v0p*sp*wp); + idat.pot[2] += 0.5*(v0*s*w + v0p*sp*wp)*idat.sw; // do the torques first since they are easy: // remember that these are still in the body-fixed axes @@ -378,11 +377,10 @@ namespace OpenMD { return; } - RealType Sticky::getSuggestedCutoffRadius(AtomType* at1, AtomType* at2) { + RealType Sticky::getSuggestedCutoffRadius(pair atypes) { if (!initialized_) initialize(); - pair key = make_pair(at1, at2); map, StickyInteractionData>::iterator it; - it = MixingMap.find(key); + it = MixingMap.find(atypes); if (it == MixingMap.end()) return 0.0; else {