ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/calc_sticky_pair.F90
(Generate patch)

Comparing trunk/OOPSE/libmdtools/calc_sticky_pair.F90 (file contents):
Revision 534 by mmeineke, Tue May 13 21:23:41 2003 UTC vs.
Revision 611 by gezelter, Tue Jul 15 17:10:50 2003 UTC

# Line 9 | Line 9
9   !! @author Matthew Meineke
10   !! @author Christopher Fennel
11   !! @author J. Daniel Gezelter
12 < !! @version $Id: calc_sticky_pair.F90,v 1.9 2003-05-13 21:23:41 mmeineke Exp $, $Date: 2003-05-13 21:23:41 $, $Name: not supported by cvs2svn $, $Revision: 1.9 $
12 > !! @version $Id: calc_sticky_pair.F90,v 1.10 2003-07-15 17:10:50 gezelter Exp $, $Date: 2003-07-15 17:10:50 $, $Name: not supported by cvs2svn $, $Revision: 1.10 $
13  
14   module sticky_pair
15  
# Line 332 | Line 332 | contains
332  
333         if (do_stress) then          
334            if (molMembershipList(atom1) .ne. molMembershipList(atom2)) then
335 <             tau_Temp(1) = tau_Temp(1) + fxradial * d(1)
336 <             tau_Temp(2) = tau_Temp(2) + fxradial * d(2)
337 <             tau_Temp(3) = tau_Temp(3) + fxradial * d(3)
338 <             tau_Temp(4) = tau_Temp(4) + fyradial * d(1)
339 <             tau_Temp(5) = tau_Temp(5) + fyradial * d(2)
340 <             tau_Temp(6) = tau_Temp(6) + fyradial * d(3)
341 <             tau_Temp(7) = tau_Temp(7) + fzradial * d(1)
342 <             tau_Temp(8) = tau_Temp(8) + fzradial * d(2)
343 <             tau_Temp(9) = tau_Temp(9) + fzradial * d(3)
335 >
336 >             ! because the d vector is the rj - ri vector, and
337 >             ! because fxradial, fyradial, and fzradial are the
338 >             ! (positive) force on atom i (negative on atom j) we need
339 >             ! a negative sign here:
340 >
341 >             tau_Temp(1) = tau_Temp(1) - d(1) * fxradial
342 >             tau_Temp(2) = tau_Temp(2) - d(1) * fyradial
343 >             tau_Temp(3) = tau_Temp(3) - d(1) * fzradial
344 >             tau_Temp(4) = tau_Temp(4) - d(2) * fxradial
345 >             tau_Temp(5) = tau_Temp(5) - d(2) * fyradial
346 >             tau_Temp(6) = tau_Temp(6) - d(2) * fzradial
347 >             tau_Temp(7) = tau_Temp(7) - d(3) * fxradial
348 >             tau_Temp(8) = tau_Temp(8) - d(3) * fyradial
349 >             tau_Temp(9) = tau_Temp(9) - d(3) * fzradial
350 >
351               virial_Temp = virial_Temp + (tau_Temp(1) + tau_Temp(5) + tau_Temp(9))
352            endif
353         endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines