48 |
|
|
49 |
|
namespace OpenMD { |
50 |
|
|
51 |
< |
LJ::LJ() : name_("LJ"), initialized_(false), shiftedPot_(false), |
52 |
< |
shiftedFrc_(false), forceField_(NULL) {} |
51 |
> |
LJ::LJ() : name_("LJ"), initialized_(false), forceField_(NULL) {} |
52 |
|
|
53 |
|
LJParam LJ::getLJParam(AtomType* atomType) { |
54 |
|
|
264 |
|
|
265 |
|
getLJfunc(ros, myPot, myDeriv); |
266 |
|
|
267 |
< |
if (shiftedPot_) { |
267 |
> |
if (idat.shiftedPot) { |
268 |
|
rcos = *(idat.rcut) * sigmai; |
269 |
|
getLJfunc(rcos, myPotC, myDerivC); |
270 |
|
myDerivC = 0.0; |
271 |
< |
} else if (LJ::shiftedFrc_) { |
271 |
> |
} else if (idat.shiftedForce) { |
272 |
|
rcos = *(idat.rcut) * sigmai; |
273 |
|
getLJfunc(rcos, myPotC, myDerivC); |
274 |
|
myPotC = myPotC + myDerivC * (*(idat.rij) - *(idat.rcut)) * sigmai; |
282 |
|
|
283 |
|
RealType dudr = *(idat.sw) * *(idat.vdwMult) * epsilon * (myDeriv - |
284 |
|
myDerivC)*sigmai; |
285 |
+ |
|
286 |
|
(*(idat.pot))[VANDERWAALS_FAMILY] += *(idat.sw) * pot_temp; |
287 |
|
*(idat.f1) = *(idat.d) * dudr / *(idat.rij); |
288 |
|
} |