--- branches/development/src/nonbonded/LJ.cpp 2010/10/03 22:18:59 1505 +++ branches/development/src/nonbonded/LJ.cpp 2011/04/08 21:25:19 1545 @@ -240,13 +240,12 @@ namespace OpenMD { } } - void LJ::calcForce(InteractionData idat) { + void LJ::calcForce(InteractionData &idat) { if (!initialized_) initialize(); - pair key = make_pair(idat.atype1, idat.atype2); map, LJInteractionData>::iterator it; - it = MixingMap.find(key); + it = MixingMap.find(idat.atypes); if (it != MixingMap.end()) { @@ -280,14 +279,13 @@ namespace OpenMD { } RealType pot_temp = idat.vdwMult * epsilon * (myPot - myPotC); - idat.vpair += pot_temp; + idat.vpair[0] += pot_temp; RealType dudr = idat.sw * idat.vdwMult * epsilon * (myDeriv - myDerivC)*sigmai; - idat.pot += idat.sw * pot_temp; - idat.f1 = idat.d * dudr / idat.rij; - + idat.pot[0] += idat.sw * pot_temp; + idat.f1 = idat.d * dudr / idat.rij; } return; } @@ -307,11 +305,10 @@ namespace OpenMD { return; } - RealType LJ::getSuggestedCutoffRadius(AtomType* at1, AtomType* at2) { + RealType LJ::getSuggestedCutoffRadius(pair atypes) { if (!initialized_) initialize(); - pair key = make_pair(at1, at2); map, LJInteractionData>::iterator it; - it = MixingMap.find(key); + it = MixingMap.find(atypes); if (it == MixingMap.end()) return 0.0; else {