--- branches/development/src/nonbonded/LJ.cpp 2011/06/09 20:26:29 1579 +++ branches/development/src/nonbonded/LJ.cpp 2011/06/16 22:00:08 1583 @@ -48,8 +48,7 @@ namespace OpenMD { namespace OpenMD { - LJ::LJ() : name_("LJ"), initialized_(false), shiftedPot_(false), - shiftedFrc_(false), forceField_(NULL) {} + LJ::LJ() : name_("LJ"), initialized_(false), forceField_(NULL) {} LJParam LJ::getLJParam(AtomType* atomType) { @@ -261,17 +260,15 @@ namespace OpenMD { RealType myDeriv = 0.0; RealType myDerivC = 0.0; - ros = *(idat.rij) * sigmai; - - cerr << "ros = " << ros << "\n"; + ros = *(idat.rij) * sigmai; getLJfunc(ros, myPot, myDeriv); - if (shiftedPot_) { + if (idat.shiftedPot) { rcos = *(idat.rcut) * sigmai; getLJfunc(rcos, myPotC, myDerivC); myDerivC = 0.0; - } else if (LJ::shiftedFrc_) { + } else if (idat.shiftedForce) { rcos = *(idat.rcut) * sigmai; getLJfunc(rcos, myPotC, myDerivC); myPotC = myPotC + myDerivC * (*(idat.rij) - *(idat.rcut)) * sigmai; @@ -280,17 +277,13 @@ namespace OpenMD { myDerivC = 0.0; } - cerr << "myPot = " << myPot << "\n"; - cerr << "myPotC = " << myPotC << "\n"; - cerr << "epsilon = " << epsilon << "\n"; - cerr << "vdwm = " << *(idat.vdwMult) << "\n"; RealType pot_temp = *(idat.vdwMult) * epsilon * (myPot - myPotC); *(idat.vpair) += pot_temp; RealType dudr = *(idat.sw) * *(idat.vdwMult) * epsilon * (myDeriv - - myDerivC)*sigmai; - - (idat.pot)[VANDERWAALS_FAMILY] += *(idat.sw) * pot_temp; + myDerivC)*sigmai; + + (*(idat.pot))[VANDERWAALS_FAMILY] += *(idat.sw) * pot_temp; *(idat.f1) = *(idat.d) * dudr / *(idat.rij); } return;