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

Comparing branches/development/src/nonbonded/Sticky.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 186 | Line 186 | namespace OpenMD {
186     * idat structure.
187     */
188    
189 <  void Sticky::calcForce(InteractionData idat) {
189 >  void Sticky::calcForce(InteractionData &idat) {
190    
191      if (!initialized_) initialize();
192      
# Line 343 | Line 343 | namespace OpenMD {
343            dspdr = 0.0;
344          }
345          
346 <        idat.vpair += 0.5*(v0*s*w + v0p*sp*wp);
347 <        idat.pot += 0.5*(v0*s*w + v0p*sp*wp)*idat.sw;
346 >        idat.vpair[2] += 0.5*(v0*s*w + v0p*sp*wp);
347 >        idat.pot[2] += 0.5*(v0*s*w + v0p*sp*wp)*idat.sw;
348          
349          // do the torques first since they are easy:
350          // remember that these are still in the body-fixed axes

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines