15#include "./base/base_uses.f90"
23 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'taper_types'
29 LOGICAL :: apply_taper = .false.
30 REAL(kind=
dp) :: r0 = -1.0_dp, rscale = -1.0_dp
45 REAL(kind=
dp),
INTENT(IN) :: rc, range
47 cpassert(.NOT.
ASSOCIATED(taper))
49 IF (range > epsilon(0.0_dp))
THEN
50 taper%apply_taper = .true.
51 cpassert(range > 0.0_dp)
52 taper%r0 = 2.0_dp*rc - 20.0_dp*range
53 taper%rscale = 1.0_dp/range
55 taper%apply_taper = .false.
67 IF (
ASSOCIATED(taper))
THEN
80 REAL(kind=
dp),
INTENT(IN) :: rij
86 IF (taper%apply_taper)
THEN
87 dr = taper%rscale*(rij - taper%r0)
88 ft = 0.5_dp*(1.0_dp - tanh(dr))
100 REAL(kind=
dp),
INTENT(IN) :: rij
106 IF (taper%apply_taper)
THEN
107 dr = taper%rscale*(rij - taper%r0)
108 dft = -0.5_dp*(1.0_dp - tanh(dr)**2)*taper%rscale
Defines the basic variable types.
integer, parameter, public dp
Definition of the semi empirical parameter types.
real(kind=dp) function, public dtaper_eval(taper, rij)
Analytical derivatives for taper function.
subroutine, public taper_create(taper, rc, range)
Creates taper type.
subroutine, public taper_release(taper)
Releases taper type.
real(kind=dp) function, public taper_eval(taper, rij)
Taper functions.