--- branches/development/src/nonbonded/LJ.cpp 2010/12/31 18:31:56 1535 +++ branches/development/src/nonbonded/LJ.cpp 2011/01/05 14:49:05 1536 @@ -240,7 +240,7 @@ namespace OpenMD { } } - void LJ::calcForce(InteractionData idat) { + void LJ::calcForce(InteractionData &idat) { if (!initialized_) initialize(); @@ -280,14 +280,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; }