Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(ommp_electrostatics_type), | intent(inout) | :: | eel |
subroutine thole_init(eel)
! This routine compute the thole factors and stores
! them in a vector. TODO add reference
! TODO in AMOEBA should be read from FF
use mod_constants, only: OMMP_VERBOSE_LOW, eps_rp
implicit none
type(ommp_electrostatics_type), intent(inout) :: eel
integer(ip) :: i, j
eel%thole = 0.0_rp
do i = 1, eel%pol_atoms
j = eel%polar_mm(i)
eel%thole(j) = eel%pol(i) ** (1.0_rp/6.0_rp)
end do
if(.not. eel%amoeba) then
if(eel%thole_scale > eps_rp) then
eel%thole = eel%thole * sqrt(eel%thole_scale)
else
call fatal_error("Scale factor for Thole damping should be &
&greater than 0.0 when non-AMOEBA FF are used")
end if
else
if(eel%thole_scale > eps_rp) then
call ommp_message("Scale factor set for thole damping is &
&ignored because AMOEBA FF is used", OMMP_VERBOSE_LOW)
end if
end if
end subroutine thole_init