--- trunk/OOPSE/libmdtools/calc_sticky_pair.F90 2003/07/17 20:38:11 636 +++ trunk/OOPSE/libmdtools/calc_sticky_pair.F90 2003/10/29 20:41:39 843 @@ -9,7 +9,7 @@ !! @author Matthew Meineke !! @author Christopher Fennel !! @author J. Daniel Gezelter -!! @version $Id: calc_sticky_pair.F90,v 1.12 2003-07-17 20:38:11 gezelter Exp $, $Date: 2003-07-17 20:38:11 $, $Name: not supported by cvs2svn $, $Revision: 1.12 $ +!! @version $Id: calc_sticky_pair.F90,v 1.15 2003-10-29 20:41:38 mmeineke Exp $, $Date: 2003-10-29 20:41:38 $, $Name: not supported by cvs2svn $, $Revision: 1.15 $ module sticky_pair @@ -111,13 +111,14 @@ contains real (kind=dp) :: rijtest, rjitest real (kind=dp) :: radcomxi, radcomyi, radcomzi real (kind=dp) :: radcomxj, radcomyj, radcomzj - + integer :: id1, id2 if (.not.sticky_initialized) then write(*,*) 'Sticky forces not initialized!' return endif + if ( rij .LE. SSD_rbig ) then r3 = r2*rij @@ -346,8 +347,17 @@ contains #endif if (do_stress) then - if (molMembershipList(atom1) .ne. molMembershipList(atom2)) then + +#ifdef IS_MPI + id1 = tagRow(atom1) + id2 = tagColumn(atom2) +#else + id1 = atom1 + id2 = atom2 +#endif + if (molMembershipList(id1) .ne. molMembershipList(id2)) then + ! because the d vector is the rj - ri vector, and ! because fxradial, fyradial, and fzradial are the ! (positive) force on atom i (negative on atom j) we need