--- branches/development/src/nonbonded/LJ.cpp 2010/10/03 22:18:59 1505 +++ branches/development/src/nonbonded/LJ.cpp 2011/04/27 18:38:15 1549 @@ -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()) { @@ -285,9 +284,8 @@ namespace OpenMD { 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 {