4 |
|
|
5 |
|
!! @author Charles F. Vardeman II |
6 |
|
!! @author Matthew Meineke |
7 |
< |
!! @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 $ |
7 |
> |
!! @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 $ |
8 |
|
|
9 |
|
module do_Forces |
10 |
|
use force_globals |
886 |
|
real ( kind = dp ), intent(inout) :: rijsq |
887 |
|
real ( kind = dp ) :: r |
888 |
|
real ( kind = dp ), intent(inout) :: d(3) |
889 |
– |
logical :: is_LJ_i, is_LJ_j |
890 |
– |
logical :: is_DP_i, is_DP_j |
891 |
– |
logical :: is_GB_i, is_GB_j |
892 |
– |
logical :: is_EAM_i,is_EAM_j |
893 |
– |
logical :: is_Sticky_i, is_Sticky_j |
889 |
|
integer :: me_i, me_j |
890 |
< |
integer :: propPack_i |
896 |
< |
integer :: propPack_j |
890 |
> |
|
891 |
|
r = sqrt(rijsq) |
892 |
|
|
893 |
|
#ifdef IS_MPI |
894 |
|
if (tagRow(i) .eq. tagColumn(j)) then |
895 |
|
write(0,*) 'do_pair is doing', i , j, tagRow(i), tagColumn(j) |
896 |
|
endif |
903 |
– |
|
897 |
|
me_i = atid_row(i) |
898 |
|
me_j = atid_col(j) |
906 |
– |
|
899 |
|
#else |
908 |
– |
|
900 |
|
me_i = atid(i) |
901 |
|
me_j = atid(j) |
911 |
– |
|
902 |
|
#endif |
903 |
|
|
904 |
|
if (FF_uses_LJ .and. SIM_uses_LJ) then |
905 |
< |
|
906 |
< |
if ( PropertyMap(me_i)%is_LJ .and. PropertyMap(me_j)%is_LJ ) & |
907 |
< |
call do_lj_pair(i, j, d, r, rijsq, pot, f, do_pot, do_stress) |
908 |
< |
|
905 |
> |
|
906 |
> |
if ( PropertyMap(me_i)%is_LJ .and. PropertyMap(me_j)%is_LJ ) then |
907 |
> |
call do_lj_pair(i, j, d, r, rijsq, pot, f, do_pot, do_stress) |
908 |
> |
endif |
909 |
> |
|
910 |
|
endif |
911 |
< |
|
911 |
> |
|
912 |
> |
if (FF_uses_charges .and. SIM_uses_charges) then |
913 |
> |
|
914 |
> |
if (PropertyMap(me_i)%is_Charge .and. PropertyMap(me_j)%is_Charge) then |
915 |
> |
call do_charge_pair(i, j, d, r, rijsq, pot, f, do_pot, do_stress) |
916 |
> |
endif |
917 |
> |
|
918 |
> |
endif |
919 |
> |
|
920 |
|
if (FF_uses_dipoles .and. SIM_uses_dipoles) then |
921 |
|
|
922 |
|
if ( PropertyMap(me_i)%is_DP .and. PropertyMap(me_j)%is_DP) then |
925 |
|
if (FF_uses_RF .and. SIM_uses_RF) then |
926 |
|
call accumulate_rf(i, j, r, u_l) |
927 |
|
call rf_correct_forces(i, j, d, r, u_l, f, do_stress) |
928 |
< |
endif |
930 |
< |
|
928 |
> |
endif |
929 |
|
endif |
930 |
+ |
|
931 |
|
endif |
932 |
|
|
933 |
|
if (FF_uses_Sticky .and. SIM_uses_sticky) then |
936 |
|
call do_sticky_pair(i, j, d, r, rijsq, A, pot, f, t, & |
937 |
|
do_pot, do_stress) |
938 |
|
endif |
939 |
+ |
|
940 |
|
endif |
941 |
|
|
942 |
|
|
948 |
|
endif |
949 |
|
|
950 |
|
endif |
951 |
< |
|
952 |
< |
|
953 |
< |
|
954 |
< |
if (FF_uses_EAM .and. SIM_uses_EAM) then |
955 |
< |
|
956 |
< |
if ( PropertyMap(me_i)%is_EAM .and. PropertyMap(me_j)%is_EAM) then |
957 |
< |
call do_eam_pair(i, j, d, r, rijsq, pot, f, do_pot, do_stress) |
958 |
< |
endif |
959 |
< |
|
960 |
< |
endif |
951 |
> |
|
952 |
> |
if (FF_uses_EAM .and. SIM_uses_EAM) then |
953 |
> |
|
954 |
> |
if ( PropertyMap(me_i)%is_EAM .and. PropertyMap(me_j)%is_EAM) then |
955 |
> |
call do_eam_pair(i, j, d, r, rijsq, pot, f, do_pot, do_stress) |
956 |
> |
endif |
957 |
> |
|
958 |
> |
endif |
959 |
|
|
960 |
|
end subroutine do_pair |
961 |
|
|