307 |
|
end function getDipoleMoment |
308 |
|
|
309 |
|
subroutine doElectrostaticPair(atom1, atom2, d, rij, r2, sw, & |
310 |
< |
vpair, fpair, pot, eFrame, f, t, do_pot) |
310 |
> |
vpair, fpair, pot, eFrame, f, t, do_pot, corrMethod) |
311 |
|
|
312 |
|
logical, intent(in) :: do_pot |
313 |
|
|
314 |
|
integer, intent(in) :: atom1, atom2 |
315 |
|
integer :: localError |
316 |
+ |
integer, intent(in) :: corrMethod |
317 |
|
|
318 |
|
real(kind=dp), intent(in) :: rij, r2, sw |
319 |
|
real(kind=dp), intent(in), dimension(3) :: d |
333 |
|
logical :: i_is_Charge, i_is_Dipole, i_is_SplitDipole, i_is_Quadrupole |
334 |
|
logical :: j_is_Charge, j_is_Dipole, j_is_SplitDipole, j_is_Quadrupole |
335 |
|
logical :: i_is_Tap, j_is_Tap |
336 |
+ |
logical :: use_damped_wolf, use_undamped_wolf |
337 |
|
integer :: me1, me2, id1, id2 |
338 |
|
real (kind=dp) :: q_i, q_j, mu_i, mu_j, d_i, d_j |
339 |
|
real (kind=dp) :: qxx_i, qyy_i, qzz_i |
347 |
|
real (kind=dp) :: xhat, yhat, zhat |
348 |
|
real (kind=dp) :: dudx, dudy, dudz |
349 |
|
real (kind=dp) :: scale, sc2, bigR, switcher, dswitcher |
350 |
+ |
|
351 |
+ |
use_damped_wolf = .false. |
352 |
+ |
use_undamped_wolf = .false. |
353 |
+ |
if (corrMethod .eq. 1) then |
354 |
+ |
use_undamped_wolf = .true. |
355 |
+ |
elseif (corrMethod .eq. 2) then |
356 |
+ |
use_damped_wolf = .true. |
357 |
+ |
endif |
358 |
|
|
359 |
|
if (.not.allocated(ElectrostaticMap)) then |
360 |
|
call handleError("electrostatic", "no ElectrostaticMap was present before first call of do_electrostatic_pair!") |