ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/nonbonded/LJ.cpp
(Generate patch)

Comparing branches/development/src/nonbonded/LJ.cpp (file contents):
Revision 1582 by gezelter, Tue Jun 14 20:41:44 2011 UTC vs.
Revision 1583 by gezelter, Thu Jun 16 22:00:08 2011 UTC

# Line 48 | Line 48 | namespace OpenMD {
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      
# Line 265 | Line 264 | namespace OpenMD {
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;
# Line 283 | Line 282 | namespace OpenMD {
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      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines