25#include "./base/base_uses.f90"
29 LOGICAL,
PARAMETER,
PRIVATE :: debug_this_module = .false.
30 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'semi_empirical_expns3_methods'
48 INTEGER,
INTENT(IN) :: method_id
50 INTEGER :: i, itype, j, nkinds
54 IF (se_control%do_ewald_r3)
THEN
56 nkinds =
SIZE(qs_kind_set)
59 check = .NOT.
ASSOCIATED(sepi%expns3_int)
61 ALLOCATE (sepi%expns3_int(nkinds))
63 NULLIFY (sepi%expns3_int(j)%expns3)
73 CALL setup_c3_coeff(sepi, sepj, i, j, itype)
94 SUBROUTINE setup_c3_coeff(sepi, sepj, ikind, jkind, itype)
96 INTEGER,
INTENT(IN) :: ikind, jkind, itype
98 INTEGER :: i, ij, j, kl, kr, li, lk
99 REAL(kind=
dp) :: core_core, e1b(9), e2a(9), r, zi, zj
109 core_core =
ijkl_low_3(sepi, sepj, ij, ij, 0, 0, 0, 0, -1, r, itype,
coeff_int_3)*zi*zj
113 e1b(1) =
ijkl_low_3(sepi, sepj, kl, ij, 0, 0, 0, 0, 2, r, itype,
coeff_int_3)*zj
114 IF (sepi%natorb > 1)
THEN
116 e1b(2) =
ijkl_low_3(sepi, sepj, kl, ij, 1, 1, 0, 0, 2, r, itype,
coeff_int_3)*zj
118 e1b(3) =
ijkl_low_3(sepi, sepj, kl, ij, 1, 1, 0, 0, 2, r, itype,
coeff_int_3)*zj
120 e1b(4) =
ijkl_low_3(sepi, sepj, kl, ij, 1, 1, 0, 0, 2, r, itype,
coeff_int_3)*zj
122 cpassert(e1b(2) == e1b(3))
123 cpassert(e1b(3) == e1b(4))
126 e1b(5) =
ijkl_low_3(sepi, sepj, kl, ij, 2, 2, 0, 0, 2, r, itype,
coeff_int_3)*zj
128 e1b(6) =
ijkl_low_3(sepi, sepj, kl, ij, 2, 2, 0, 0, 2, r, itype,
coeff_int_3)*zj
130 e1b(7) =
ijkl_low_3(sepi, sepj, kl, ij, 2, 2, 0, 0, 2, r, itype,
coeff_int_3)*zj
132 e1b(8) =
ijkl_low_3(sepi, sepj, kl, ij, 2, 2, 0, 0, 2, r, itype,
coeff_int_3)*zj
134 e1b(9) =
ijkl_low_3(sepi, sepj, kl, ij, 2, 2, 0, 0, 2, r, itype,
coeff_int_3)*zj
136 cpassert(e1b(5) == e1b(6))
137 cpassert(e1b(6) == e1b(7))
138 cpassert(e1b(7) == e1b(8))
139 cpassert(e1b(8) == e1b(9))
145 e2a(1) =
ijkl_low_3(sepi, sepj, ij, kl, 0, 0, 0, 0, 1, r, itype,
coeff_int_3)*zi
146 IF (sepj%natorb > 1)
THEN
148 e2a(2) =
ijkl_low_3(sepi, sepj, ij, kl, 0, 0, 1, 1, 1, r, itype,
coeff_int_3)*zi
150 e2a(3) =
ijkl_low_3(sepi, sepj, ij, kl, 0, 0, 1, 1, 1, r, itype,
coeff_int_3)*zi
152 e2a(4) =
ijkl_low_3(sepi, sepj, ij, kl, 0, 0, 1, 1, 1, r, itype,
coeff_int_3)*zi
154 cpassert(e2a(2) == e2a(3))
155 cpassert(e2a(3) == e2a(4))
158 e2a(5) =
ijkl_low_3(sepi, sepj, ij, kl, 0, 0, 2, 2, 1, r, itype,
coeff_int_3)*zi
160 e2a(6) =
ijkl_low_3(sepi, sepj, ij, kl, 0, 0, 2, 2, 1, r, itype,
coeff_int_3)*zi
162 e2a(7) =
ijkl_low_3(sepi, sepj, ij, kl, 0, 0, 2, 2, 1, r, itype,
coeff_int_3)*zi
164 e2a(8) =
ijkl_low_3(sepi, sepj, ij, kl, 0, 0, 2, 2, 1, r, itype,
coeff_int_3)*zi
166 e2a(9) =
ijkl_low_3(sepi, sepj, ij, kl, 0, 0, 2, 2, 1, r, itype,
coeff_int_3)*zi
168 cpassert(e2a(5) == e2a(6))
169 cpassert(e2a(6) == e2a(7))
170 cpassert(e2a(7) == e2a(8))
171 cpassert(e2a(8) == e2a(9))
176 sepi%expns3_int(jkind)%expns3%core_core = core_core
177 sepi%expns3_int(jkind)%expns3%e1b(1:sepi%natorb) = e1b(1:sepi%natorb)
178 sepi%expns3_int(jkind)%expns3%e2a(1:sepj%natorb) = e2a(1:sepj%natorb)
180 sepj%expns3_int(ikind)%expns3%core_core = core_core
181 sepj%expns3_int(ikind)%expns3%e1b(1:sepj%natorb) = e2a(1:sepj%natorb)
182 sepj%expns3_int(ikind)%expns3%e2a(1:sepi%natorb) = e1b(1:sepi%natorb)
186 DO i = 1, sepi%natorb
189 DO j = 1, sepj%natorb
193 sepi%expns3_int(jkind)%expns3%w(kr) = &
194 ijkl_low_3(sepi, sepj, ij, kl, li, li, lk, lk, 0, r,
do_method_undef,
coeff_int_3)
200 DO i = 1, sepj%natorb
203 DO j = 1, sepi%natorb
207 sepj%expns3_int(ikind)%expns3%w(kr) = &
208 ijkl_low_3(sepj, sepi, ij, kl, li, li, lk, lk, 0, r,
do_method_undef,
coeff_int_3)
212 END SUBROUTINE setup_c3_coeff
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
Defines the basic variable types.
integer, parameter, public dp
Define the quickstep kind type and their sub types.
subroutine, public get_qs_kind(qs_kind, basis_set, basis_type, ncgf, nsgf, all_potential, tnadd_potential, gth_potential, sgp_potential, upf_potential, se_parameter, dftb_parameter, xtb_parameter, dftb3_param, zatom, zeff, elec_conf, mao, lmax_dftb, alpha_core_charge, ccore_charge, core_charge, core_charge_radius, paw_proj_set, paw_atom, hard_radius, hard0_radius, max_rad_local, covalent_radius, vdw_radius, gpw_type_forced, harmonics, max_iso_not0, max_s_harm, grid_atom, ngrid_ang, ngrid_rad, lmax_rho0, dft_plus_u_atom, l_of_dft_plus_u, n_of_dft_plus_u, u_minus_j, u_of_dft_plus_u, j_of_dft_plus_u, alpha_of_dft_plus_u, beta_of_dft_plus_u, j0_of_dft_plus_u, occupation_of_dft_plus_u, dispersion, bs_occupation, magnetization, no_optimize, addel, laddel, naddel, orbitals, max_scf, eps_scf, smear, u_ramping, u_minus_j_target, eps_u_ramping, init_u_ramping_each_scf, reltmat, ghost, floating, name, element_symbol, pao_basis_size, pao_model_file, pao_potentials, pao_descriptors, nelec)
Get attributes of an atomic kind.
Methods for handling the 1/R^3 residual integral part.
subroutine, public semi_empirical_expns3_setup(qs_kind_set, se_control, method_id)
Setup the quantity necessary to handle the slowly convergent residual integral term 1/R^3.
Definition of the type to handle the 1/R^3 residual integral part.
subroutine, public semi_empirical_expns3_create(expns3)
Allocate semi-empirical 1/R^3 expansion type.
Utilities for evaluating the residual part (1/r^3) of Integrals for semi-empiric methods.
real(kind=dp) function, public coeff_int_3(r, l1, l2, add)
Evaluates the coefficient for the residual Interaction function between two point-charges l1 - Quantu...
real(kind=dp) function, public ijkl_low_3(sepi, sepj, ij, kl, li, lj, lk, ll, ic, r, itype, eval)
Low level general driver for computing residual part of semi-empirical integrals <ij|kl> and their de...
Arrays of parameters used in the semi-empirical calculations \References Everywhere in this module TC...
integer, dimension(9), parameter, public l_index
integer, dimension(9, 9), public indexa
Definition of the semi empirical parameter types.
Working with the semi empirical parameter types.
integer function, public get_se_type(se_method)
Gives back the unique semi_empirical METHOD type.
Provides all information about a quickstep kind.