--- trunk/OOPSE/libmdtools/do_Forces.F90 2003/03/21 17:42:12 378 +++ trunk/OOPSE/libmdtools/do_Forces.F90 2003/03/21 22:11:50 388 @@ -4,7 +4,7 @@ !! @author Charles F. Vardeman II !! @author Matthew Meineke -!! @version $Id: do_Forces.F90,v 1.1.1.1 2003-03-21 17:42:12 mmeineke Exp $, $Date: 2003-03-21 17:42:12 $, $Name: not supported by cvs2svn $, $Revision: 1.1.1.1 $ +!! @version $Id: do_Forces.F90,v 1.2 2003-03-21 22:11:50 chuckv Exp $, $Date: 2003-03-21 22:11:50 $, $Name: not supported by cvs2svn $, $Revision: 1.2 $ module do_Forces use force_globals @@ -323,10 +323,11 @@ contains inner: do j = i+1, natoms - if (skipThisPair(i,j)) cycle inner - + if (skipThisPair(i,j)) cycle inner + call get_interatomic_vector(q(:,i), q(:,j), d, rijsq) + if (rijsq < rlistsq) then nlist = nlist + 1 @@ -532,12 +533,9 @@ contains call do_dipole_pair(i, j, d, r, rijsq, pot, u_l, f, t, & do_pot, do_stress) - if (FF_uses_RF .and. SimUsesRF()) then - call accumulate_rf(i, j, r, u_l) call rf_correct_forces(i, j, d, r, u_l, f, do_stress) - endif endif @@ -547,7 +545,7 @@ contains call getElementProperty(atypes, me_i, "is_Sticky", is_Sticky_i) call getElementProperty(atypes, me_j, "is_Sticky", is_Sticky_j) - + if ( is_Sticky_i .and. is_Sticky_j ) then call do_sticky_pair(i, j, d, r, rijsq, A, pot, f, t, & do_pot, do_stress) @@ -649,11 +647,11 @@ contains end subroutine zero_work_arrays function skipThisPair(atom1, atom2) result(skip_it) - integer, intent(in) :: atom1 integer, intent(in), optional :: atom2 logical :: skip_it integer :: unique_id_1, unique_id_2 + integer :: me_i,me_j integer :: i skip_it = .false. @@ -671,7 +669,7 @@ contains !! in the normal loop, the atom numbers are unique unique_id_1 = atom1 #endif - + !! We were called with only one atom, so just check the global exclude !! list for this atom if (.not. present(atom2)) then @@ -715,7 +713,7 @@ contains return endif enddo - + do i = 1, nExcludes_local if (excludesLocal(1,i) == unique_id_1) then if (excludesLocal(2,i) == unique_id_2) then