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 1505 by gezelter, Sun Oct 3 22:18:59 2010 UTC vs.
Revision 1536 by gezelter, Wed Jan 5 14:49:05 2011 UTC

# Line 240 | Line 240 | namespace OpenMD {
240      }    
241    }
242  
243 <  void LJ::calcForce(InteractionData idat) {
243 >  void LJ::calcForce(InteractionData &idat) {
244      
245      if (!initialized_) initialize();
246      
# Line 280 | Line 280 | namespace OpenMD {
280        }
281  
282        RealType pot_temp = idat.vdwMult * epsilon * (myPot - myPotC);
283 <      idat.vpair += pot_temp;
283 >      idat.vpair[0] += pot_temp;
284        
285        RealType dudr = idat.sw * idat.vdwMult * epsilon * (myDeriv -
286                                                            myDerivC)*sigmai;
287        
288 <      idat.pot += idat.sw * pot_temp;
289 <      idat.f1 = idat.d * dudr / idat.rij;
290 <      
288 >      idat.pot[0] += idat.sw * pot_temp;
289 >      idat.f1 = idat.d * dudr / idat.rij;      
290      }
291      return;
292    }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines