12 |
|
implicit none |
13 |
|
|
14 |
|
PRIVATE |
15 |
< |
real(kind=dp), save :: ecr = 0.0 |
16 |
< |
real(kind=dp), save :: rt = 0.0 |
17 |
< |
real(kind=dp), save :: pre = 0.0 |
18 |
< |
logical, save :: haveCutoffs = .false. |
15 |
> |
|
16 |
> |
real(kind=dp), parameter :: pre = 14.38362_dp |
17 |
|
logical, save :: haveMomentMap = .false. |
18 |
|
|
21 |
– |
public::setCutoffsDipole |
19 |
|
public::do_dipole_pair |
20 |
|
|
21 |
|
type :: MomentList |
25 |
|
type(MomentList), dimension(:),allocatable :: MomentMap |
26 |
|
|
27 |
|
contains |
31 |
– |
|
32 |
– |
subroutine setCutoffsDipole(this_ecr, this_rt) |
33 |
– |
real(kind=dp), intent(in) :: this_ecr, this_rt |
34 |
– |
ecr = this_ecr |
35 |
– |
rt = this_rt |
28 |
|
|
37 |
– |
! pre converts from mu in units of debye to kcal/mol |
38 |
– |
pre = 14.38362_dp |
39 |
– |
|
40 |
– |
haveCutoffs = .true. |
41 |
– |
|
42 |
– |
return |
43 |
– |
end subroutine setCutoffsDipole |
44 |
– |
|
29 |
|
subroutine createMomentMap(status) |
30 |
|
integer :: nAtypes |
31 |
|
integer :: status |
83 |
|
real (kind = dp), dimension(3) :: ul1 |
84 |
|
real (kind = dp), dimension(3) :: ul2 |
85 |
|
|
102 |
– |
if (.not. haveCutoffs) then |
103 |
– |
write(default_error,*) 'Dipole-dipole does not have cutoffs set!' |
104 |
– |
return |
105 |
– |
endif |
106 |
– |
|
86 |
|
if (.not.haveMomentMap) then |
87 |
|
localError = 0 |
88 |
|
call createMomentMap(localError) |
130 |
|
|
131 |
|
vterm = dip2*((u1dotu2/r3) - 3.0d0*(rdotu1*rdotu2/r5)) |
132 |
|
|
133 |
< |
vpair = vpair + vterm*sw |
133 |
> |
vpair = vpair + vterm |
134 |
|
|
135 |
|
if (do_pot) then |
136 |
|
#ifdef IS_MPI |