28#include "./base/base_uses.f90"
42 TYPE(cp_libint_t) :: lib_2c
44 LOGICAL :: initialized_2c = .false.
45 LOGICAL :: initialized_3c = .false.
58 INTEGER,
INTENT(IN),
OPTIONAL :: max_am_2c, max_am_3c
60 IF (
PRESENT(max_am_2c))
THEN
68 cpabort(
"Requested two-center Coulomb library is not implemented")
70 context%initialized_2c = .true.
73 IF (
PRESENT(max_am_3c))
THEN
81 cpabort(
"Requested three-center Coulomb library is not implemented")
83 context%initialized_3c = .true.
94 IF (context%initialized_2c)
THEN
101 cpabort(
"Requested two-center Coulomb library is not implemented")
103 context%initialized_2c = .false.
106 IF (context%initialized_3c)
THEN
113 cpabort(
"Requested three-center Coulomb library is not implemented")
115 context%initialized_3c = .false.
137 SUBROUTINE compute_coulomb_2c(context, la_min, la_max, lb_min, lb_max, npgfa, npgfb, zeta, zetb, rpgfa, rpgfb, &
138 ra, rb, hab, potential_parameter)
140 INTEGER,
INTENT(IN) :: la_min, la_max, lb_min, lb_max, npgfa, &
142 REAL(
dp),
DIMENSION(npgfa),
INTENT(IN) :: zeta
143 REAL(
dp),
DIMENSION(npgfb),
INTENT(IN) :: zetb
144 REAL(
dp),
DIMENSION(npgfa),
INTENT(IN) :: rpgfa
145 REAL(
dp),
DIMENSION(npgfb),
INTENT(IN) :: rpgfb
146 REAL(
dp),
DIMENSION(3),
INTENT(IN) :: ra, rb
147 REAL(
dp),
DIMENSION(:, :),
INTENT(INOUT) :: hab
150 INTEGER :: ncoa, ncob
152 REAL(
dp),
ALLOCATABLE,
DIMENSION(:) :: f_work
153 REAL(
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: v_work
155 ncoa = npgfa*
ncoset(la_max)
156 ncob = npgfb*
ncoset(lb_max)
157 rab2 = (ra(1) - rb(1))**2 + (ra(2) - rb(2))**2 + (ra(3) - rb(3))**2
161 cpassert(context%initialized_2c)
162 CALL eri_2center(hab, la_min, la_max, npgfa, zeta, rpgfa, ra, &
163 lb_min, lb_max, npgfb, zetb, rpgfb, rb, sqrt(rab2), context%lib_2c, potential_parameter)
165 ALLOCATE (f_work(0:la_max + lb_max + 2))
166 ALLOCATE (v_work(ncoa, ncob, la_max + lb_max + 1))
168 CALL coulomb2(la_max, npgfa, zeta, rpgfa, la_min, lb_max, npgfb, zetb, rpgfb, lb_min, &
169 rb - ra, rab2, hab, v_work, f_work, screening=.false.)
171 DEALLOCATE (v_work, f_work)
173 cpabort(
"Requested two-center Coulomb library is not implemented")
201 SUBROUTINE compute_coulomb_3c(context, la_min, la_max, lb_min, lb_max, lc_min, lc_max, npgfa, npgfb, npgfc, &
202 zeta, zetb, zetc, rpgfa, rpgfb, rpgfc, ra, rb, rc, habc, potential_parameter)
204 INTEGER,
INTENT(IN) :: la_min, la_max, lb_min, lb_max, lc_min, &
205 lc_max, npgfa, npgfb, npgfc
206 REAL(
dp),
DIMENSION(npgfa),
INTENT(IN) :: zeta
207 REAL(
dp),
DIMENSION(npgfb),
INTENT(IN) :: zetb
208 REAL(
dp),
DIMENSION(npgfc),
INTENT(IN) :: zetc
209 REAL(
dp),
DIMENSION(npgfa),
INTENT(IN) :: rpgfa
210 REAL(
dp),
DIMENSION(npgfb),
INTENT(IN) :: rpgfb
211 REAL(
dp),
DIMENSION(npgfc),
INTENT(IN) :: rpgfc
212 REAL(
dp),
DIMENSION(3),
INTENT(IN) :: ra, rb, rc
213 REAL(
dp),
DIMENSION(:, :, :),
INTENT(INOUT) :: habc
216 INTEGER :: kpgf, nc_end, nc_start, ncoa, ncob, ncoc
217 REAL(
dp) :: rab2, rac2, rbc2
218 REAL(
dp),
ALLOCATABLE,
DIMENSION(:) :: f_work, gccc, rpgfa_work, rpgfb_work, &
220 REAL(
dp),
ALLOCATABLE,
DIMENSION(:, :) :: vabc
221 REAL(
dp),
ALLOCATABLE,
DIMENSION(:, :, :, :) :: v_work
223 ncoa = npgfa*
ncoset(la_max)
224 ncob = npgfb*
ncoset(lb_max)
226 rab2 = (rb(1) - ra(1))**2 + (rb(2) - ra(2))**2 + (rb(3) - ra(3))**2
227 rac2 = (rc(1) - ra(1))**2 + (rc(2) - ra(2))**2 + (rc(3) - ra(3))**2
228 rbc2 = (rc(1) - rb(1))**2 + (rc(2) - rb(2))**2 + (rc(3) - rb(3))**2
232 cpassert(context%initialized_3c)
233 CALL eri_3center(habc, la_min, la_max, npgfa, zeta, rpgfa, ra, &
234 lb_min, lb_max, npgfb, zetb, rpgfb, rb, &
235 lc_min, lc_max, npgfc, zetc, rpgfc, rc, &
236 sqrt(rab2), sqrt(rac2), sqrt(rbc2), context%lib_3c, potential_parameter)
238 ALLOCATE (f_work(0:la_max + lb_max + lc_max + 2))
240 ALLOCATE (v_work(ncoa, ncob, ncoc, la_max + lb_max + lc_max + 1))
241 v_work(:, :, :, :) = 0.0_dp
244 ALLOCATE (rpgfa_work(npgfa))
245 ALLOCATE (rpgfb_work(npgfb))
246 ALLOCATE (rpgfc_work(npgfc))
247 rpgfa_work(:) = 1.0e10_dp
248 rpgfb_work(:) = 1.0e10_dp
249 rpgfc_work(:) = 1.0e10_dp
250 ALLOCATE (gccc(ncoc))
252 ALLOCATE (vabc(ncoa, ncob))
258 nc_start = (kpgf - 1)*ncoc +
ncoset(lc_min - 1) + 1
261 CALL coulomb3(la_max, npgfa, zeta(:), rpgfa_work(:), la_min, &
262 lb_max, npgfb, zetb(:), rpgfb_work(:), lb_min, &
263 lc_max, zetc(kpgf), rpgfc_work(kpgf), lc_min, &
264 gccc, rb - ra, rab2, rc - ra, rac2, rbc2, &
265 vabc, habc(:, :, nc_start:nc_end), v_work, f_work)
268 DEALLOCATE (v_work, f_work, rpgfa_work, rpgfb_work, rpgfc_work, gccc, vabc)
270 cpabort(
"Requested three-center Coulomb library is not implemented")
Calculation of Coulomb integrals over Cartesian Gaussian-type functions (electron repulsion integrals...
subroutine, public coulomb2(la_max, npgfa, zeta, rpgfa, la_min, lc_max, npgfc, zetc, rpgfc, lc_min, rac, rac2, vac, v, f, screening)
Calculation of the primitive two-center Coulomb integrals over Cartesian Gaussian-type functions.
subroutine, public coulomb3(la_max, npgfa, zeta, rpgfa, la_min, lb_max, npgfb, zetb, rpgfb, lb_min, lc_max, zetc, rpgfc, lc_min, gccc, rab, rab2, rac, rac2, rbc2, vabc, int_abc, v, f, maxder, vabc_plus)
Calculation of the primitive three-center Coulomb integrals over Cartesian Gaussian-type functions (e...
Common interface for two- and three-center Coulomb integrals.
subroutine, public coulomb_integral_cleanup(context)
Release the engines initialized in a Coulomb integral context.
subroutine, public compute_coulomb_3c(context, la_min, la_max, lb_min, lb_max, lc_min, lc_max, npgfa, npgfb, npgfc, zeta, zetb, zetc, rpgfa, rpgfb, rpgfc, ra, rb, rc, habc, potential_parameter)
Evaluate one uncontracted three-center Coulomb integral block.
subroutine, public coulomb_integral_init(context, max_am_2c, max_am_3c)
Initialize the engines needed by the requested Coulomb integral operations.
subroutine, public compute_coulomb_2c(context, la_min, la_max, lb_min, lb_max, npgfa, npgfb, zeta, zetb, rpgfa, rpgfb, ra, rb, hab, potential_parameter)
Evaluate one uncontracted two-center Coulomb integral block.
Library choices for electronic integral APIs.
type(integral_library_type), save, public active_integral_library
integer, parameter, public library_native
integer, parameter, public library_libint
Defines the basic variable types.
integer, parameter, public dp
2- and 3-center electron repulsion integral routines based on libint2 Currently available operators: ...
subroutine, public eri_2center(int_ab, la_min, la_max, npgfa, zeta, rpgfa, ra, lb_min, lb_max, npgfb, zetb, rpgfb, rb, dab, lib, potential_parameter)
Computes the 2-center electron repulsion integrals (a|b) for a given set of cartesian gaussian orbita...
subroutine, public eri_3center(int_abc, la_min, la_max, npgfa, zeta, rpgfa, ra, lb_min, lb_max, npgfb, zetb, rpgfb, rb, lc_min, lc_max, npgfc, zetc, rpgfc, rc, dab, dac, dbc, lib, potential_parameter, int_abc_ext)
Computes the 3-center electron repulsion integrals (ab|c) for a given set of cartesian gaussian orbit...
Interface to the Libint-Library or a c++ wrapper.
subroutine, public cp_libint_init_2eri(lib, max_am)
subroutine, public cp_libint_init_3eri(lib, max_am)
subroutine, public cp_libint_cleanup_3eri(lib)
subroutine, public cp_libint_set_contrdepth(lib, contrdepth)
subroutine, public cp_libint_cleanup_2eri(lib)
Provides Cartesian and spherical orbital pointers and indices.
integer, dimension(:), allocatable, public ncoset