21#include "./base/base_uses.f90"
27 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_dispersion_types'
36 INTEGER :: pp_type = -1
37 INTEGER :: nl_type = -1
38 CHARACTER(LEN=default_string_length) :: ref_functional =
""
39 REAL(kind=
dp) :: scaling = -1.0_dp
40 REAL(kind=
dp) :: rc_disp = -1.0_dp
41 REAL(kind=
dp) :: rc_d4 = -1.0_dp
42 REAL(kind=
dp) :: rc_cn = -1.0_dp
43 REAL(kind=
dp) :: exp_pre = -1.0_dp
45 LOGICAL :: verbose = .false.
46 CHARACTER(LEN=default_path_length) :: parameter_file_name =
""
47 CHARACTER(LEN=default_path_length) :: kernel_file_name =
""
49 LOGICAL :: ext_charges = .false.
50 REAL(kind=
dp),
DIMENSION(:),
POINTER :: charges => null()
51 REAL(kind=
dp),
DIMENSION(:),
POINTER :: dcharges => null()
54 INTEGER :: max_elem = -1
56 REAL(kind=
dp) :: k1 = -1.0_dp, k2 = -1.0_dp, k3 = -1.0_dp
57 REAL(kind=
dp) :: alp = -1.0_dp
58 REAL(kind=
dp) :: s6 = -1.0_dp, s8 = -1.0_dp, sr6 = -1.0_dp
59 REAL(kind=
dp) :: a1 = -1.0_dp, a2 = -1.0_dp
60 REAL(kind=
dp) :: eps_cn = -1.0_dp
61 LOGICAL :: d4_reference_code = .false.
62 LOGICAL :: d4_debug = .false.
63 LOGICAL :: d3_reference_code = .false.
64 LOGICAL :: d3_scaling_explicit = .false.
65 LOGICAL :: doabc = .false.
66 LOGICAL :: c9cnst = .false.
67 LOGICAL :: lrc = .false.
68 LOGICAL :: srb = .false.
69 REAL(kind=
dp),
DIMENSION(4) :: srb_params = -1.0_dp
70 REAL(kind=
dp) :: s9 = -1.0_dp
72 DIMENSION(:),
POINTER :: sab_vdw => null(), sab_cn => null()
73 REAL(kind=
dp),
DIMENSION(:, :, :, :, :),
POINTER &
75 INTEGER,
DIMENSION(:),
POINTER :: maxci => null()
76 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: r0ab => null()
77 REAL(kind=
dp),
DIMENSION(:),
POINTER :: rcov => null()
78 REAL(kind=
dp),
DIMENSION(:),
POINTER :: eneg => null()
79 REAL(kind=
dp),
DIMENSION(:),
POINTER :: r2r4 => null()
81 REAL(kind=
dp),
DIMENSION(:),
POINTER :: cn => null()
82 TYPE(cn_kind_list),
DIMENSION(:),
POINTER :: cnkind => null()
83 TYPE(cn_atom_list),
DIMENSION(:),
POINTER :: cnlist => null()
85 LOGICAL :: domol = .false.
86 REAL(kind=
dp) :: kgc8 = -1.0_dp
88 REAL(kind=
dp) :: pw_cutoff = -1.0_dp
90 REAL(kind=
dp) :: b_value = -1.0_dp, c_value = -1.0_dp, scale_rvv10 = -1.0_dp
91 INTEGER :: nqs = -1, nr_points = -1
95 REAL(kind=
dp) :: r_max = -1.0_dp, q_cut = -1.0_dp, q_min = -1.0_dp, dk = -1.0_dp
101 REAL(kind=
dp),
DIMENSION(:),
POINTER :: q_mesh => null()
102 REAL(kind=
dp),
DIMENSION(:, :, :),
POINTER &
106 REAL(kind=
dp),
DIMENSION(:, :, :),
POINTER &
107 :: d2phi_dk2 => null()
110 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: d2y_dx2 => null()
111 INTEGER,
DIMENSION(:, :),
POINTER :: d3_exclude_pair => null()
112 INTEGER :: nd3_exclude_pair = -1
117 LOGICAL :: defined = .false.
118 REAL(kind=
dp) :: vdw_radii = -1.0_dp
119 REAL(kind=
dp) :: c6 = -1.0_dp
123 REAL(kind=
dp) :: cnum = -1.0_dp
125 END TYPE cn_kind_list
127 REAL(kind=
dp) :: cnum = -1.0_dp
128 INTEGER :: natom = -1
129 INTEGER,
DIMENSION(:),
POINTER ::
atom => null()
130 END TYPE cn_atom_list
150 IF (
ASSOCIATED(dispersion_env))
THEN
152 IF (
ASSOCIATED(dispersion_env%maxci))
THEN
153 DEALLOCATE (dispersion_env%maxci)
155 IF (
ASSOCIATED(dispersion_env%c6ab))
THEN
156 DEALLOCATE (dispersion_env%c6ab)
158 IF (
ASSOCIATED(dispersion_env%r0ab))
THEN
159 DEALLOCATE (dispersion_env%r0ab)
161 IF (
ASSOCIATED(dispersion_env%rcov))
THEN
162 DEALLOCATE (dispersion_env%rcov)
164 IF (
ASSOCIATED(dispersion_env%eneg))
THEN
165 DEALLOCATE (dispersion_env%eneg)
167 IF (
ASSOCIATED(dispersion_env%r2r4))
THEN
168 DEALLOCATE (dispersion_env%r2r4)
170 IF (
ASSOCIATED(dispersion_env%cn))
THEN
171 DEALLOCATE (dispersion_env%cn)
173 IF (
ASSOCIATED(dispersion_env%cnkind))
THEN
174 DEALLOCATE (dispersion_env%cnkind)
176 IF (
ASSOCIATED(dispersion_env%cnlist))
THEN
177 DO i = 1,
SIZE(dispersion_env%cnlist)
178 DEALLOCATE (dispersion_env%cnlist(i)%atom)
180 DEALLOCATE (dispersion_env%cnlist)
183 IF (
ASSOCIATED(dispersion_env%q_mesh))
THEN
184 DEALLOCATE (dispersion_env%q_mesh)
186 IF (
ASSOCIATED(dispersion_env%kernel))
THEN
187 DEALLOCATE (dispersion_env%kernel)
189 IF (
ASSOCIATED(dispersion_env%d2phi_dk2))
THEN
190 DEALLOCATE (dispersion_env%d2phi_dk2)
192 IF (
ASSOCIATED(dispersion_env%d2y_dx2))
THEN
193 DEALLOCATE (dispersion_env%d2y_dx2)
195 IF (
ASSOCIATED(dispersion_env%d3_exclude_pair))
THEN
196 DEALLOCATE (dispersion_env%d3_exclude_pair)
202 IF (
ASSOCIATED(dispersion_env%charges))
THEN
203 DEALLOCATE (dispersion_env%charges)
205 IF (
ASSOCIATED(dispersion_env%dcharges))
THEN
206 DEALLOCATE (dispersion_env%dcharges)
209 DEALLOCATE (dispersion_env)
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
integer, parameter, public default_path_length
Definition of disperson types for DFT calculations.
integer, parameter, public dftd2_pp
integer, parameter, public dftd4_pp
subroutine, public qs_dispersion_release(dispersion_env)
...
integer, parameter, public dftd3_pp
Define the neighbor list data types and the corresponding functionality.
subroutine, public release_neighbor_list_sets(nlists)
releases an array of neighbor_list_sets