--- trunk/OOPSE/libmdtools/calc_sticky_pair.F90 2003/07/17 20:38:11 636 +++ trunk/OOPSE/libmdtools/calc_sticky_pair.F90 2004/01/05 22:49:14 898 @@ -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.16 2004-01-05 22:49:14 chuckv Exp $, $Date: 2004-01-05 22:49:14 $, $Name: not supported by cvs2svn $, $Revision: 1.16 $ module sticky_pair @@ -90,9 +90,9 @@ contains real (kind=dp), intent(inout) :: rij, r2 real (kind=dp), dimension(3), intent(in) :: d real (kind=dp) :: pot - real (kind=dp), dimension(9,getNlocal()) :: A - real (kind=dp), dimension(3,getNlocal()) :: f - real (kind=dp), dimension(3,getNlocal()) :: t + real (kind=dp), dimension(9,nLocal) :: A + real (kind=dp), dimension(3,nLocal) :: f + real (kind=dp), dimension(3,nLocal) :: t logical, intent(in) :: do_pot, do_stress real (kind=dp) :: xi, yi, zi, xj, yj, zj, xi2, yi2, zi2, xj2, yj2, zj2 @@ -111,12 +111,13 @@ 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 @@ -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