--- trunk/OOPSE/libmdtools/do_Forces.F90 2004/01/13 23:01:43 941 +++ trunk/OOPSE/libmdtools/do_Forces.F90 2004/01/15 04:33:24 946 @@ -4,7 +4,7 @@ !! @author Charles F. Vardeman II !! @author Matthew Meineke -!! @version $Id: do_Forces.F90,v 1.46 2004-01-13 23:01:43 gezelter Exp $, $Date: 2004-01-13 23:01:43 $, $Name: not supported by cvs2svn $, $Revision: 1.46 $ +!! @version $Id: do_Forces.F90,v 1.47 2004-01-15 04:33:24 gezelter Exp $, $Date: 2004-01-15 04:33:24 $, $Name: not supported by cvs2svn $, $Revision: 1.47 $ module do_Forces use force_globals @@ -886,38 +886,37 @@ contains real ( kind = dp ), intent(inout) :: rijsq real ( kind = dp ) :: r real ( kind = dp ), intent(inout) :: d(3) - logical :: is_LJ_i, is_LJ_j - logical :: is_DP_i, is_DP_j - logical :: is_GB_i, is_GB_j - logical :: is_EAM_i,is_EAM_j - logical :: is_Sticky_i, is_Sticky_j integer :: me_i, me_j - integer :: propPack_i - integer :: propPack_j + r = sqrt(rijsq) #ifdef IS_MPI if (tagRow(i) .eq. tagColumn(j)) then write(0,*) 'do_pair is doing', i , j, tagRow(i), tagColumn(j) endif - me_i = atid_row(i) me_j = atid_col(j) - #else - me_i = atid(i) me_j = atid(j) - #endif if (FF_uses_LJ .and. SIM_uses_LJ) then - - if ( PropertyMap(me_i)%is_LJ .and. PropertyMap(me_j)%is_LJ ) & - call do_lj_pair(i, j, d, r, rijsq, pot, f, do_pot, do_stress) - + + if ( PropertyMap(me_i)%is_LJ .and. PropertyMap(me_j)%is_LJ ) then + call do_lj_pair(i, j, d, r, rijsq, pot, f, do_pot, do_stress) + endif + endif - + + if (FF_uses_charges .and. SIM_uses_charges) then + + if (PropertyMap(me_i)%is_Charge .and. PropertyMap(me_j)%is_Charge) then + call do_charge_pair(i, j, d, r, rijsq, pot, f, do_pot, do_stress) + endif + + endif + if (FF_uses_dipoles .and. SIM_uses_dipoles) then if ( PropertyMap(me_i)%is_DP .and. PropertyMap(me_j)%is_DP) then @@ -926,9 +925,9 @@ contains if (FF_uses_RF .and. SIM_uses_RF) then call accumulate_rf(i, j, r, u_l) call rf_correct_forces(i, j, d, r, u_l, f, do_stress) - endif - + endif endif + endif if (FF_uses_Sticky .and. SIM_uses_sticky) then @@ -937,6 +936,7 @@ contains call do_sticky_pair(i, j, d, r, rijsq, A, pot, f, t, & do_pot, do_stress) endif + endif @@ -948,16 +948,14 @@ contains endif endif - - - - if (FF_uses_EAM .and. SIM_uses_EAM) then - - if ( PropertyMap(me_i)%is_EAM .and. PropertyMap(me_j)%is_EAM) then - call do_eam_pair(i, j, d, r, rijsq, pot, f, do_pot, do_stress) - endif - - endif + + if (FF_uses_EAM .and. SIM_uses_EAM) then + + if ( PropertyMap(me_i)%is_EAM .and. PropertyMap(me_j)%is_EAM) then + call do_eam_pair(i, j, d, r, rijsq, pot, f, do_pot, do_stress) + endif + + endif end subroutine do_pair