18#include <libint2/libint2_params.h>
19#include <libint2/config.h>
24 USE iso_c_binding,
ONLY: c_associated, &
33 libint2_build, libint2_build_eri, libint2_build_eri1, libint2_cleanup_eri, &
34 libint2_cleanup_eri1, libint2_init_eri, libint2_init_eri1, libint2_static_cleanup, &
35 libint2_static_init, libint_t, libint2_max_am_eri, libint2_init_3eri, libint2_cleanup_3eri, &
36 libint2_init_2eri, libint2_cleanup_2eri, &
37 libint2_build_2eri, libint2_build_3eri, libint2_build_3eri1, libint2_cleanup_3eri1, libint2_init_3eri1, &
38 libint2_build_2eri1, libint2_cleanup_2eri1, libint2_init_2eri1
41#include "./base/base_uses.f90"
56 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'libint_wrapper'
59 INTEGER,
PARAMETER :: libint_max_am = libint2_max_am_eri
61 INTEGER,
PARAMETER :: libint_max_am = 0
66 INTEGER,
PARAMETER :: libint_vrr_classes_size = 2*(libint_max_am) + 1
74 TYPE(libint_t),
DIMENSION(1) :: prv
76 INTEGER :: unused = -1
82 SUBROUTINE cp_libint_set_params_eri_screen(libint, A, B, C, D, P, Q, W, ZetaInv, EtaInv, ZetapEtaInv, Rho, m_max, F)
84 REAL(kind=
dp),
INTENT(IN),
DIMENSION(3) :: a, b, c, d, p, q, w
85 REAL(kind=
dp),
INTENT(IN) :: zetainv, etainv, zetapetainv, rho
86 INTEGER,
INTENT(IN) :: m_max
87 REAL(kind=
dp),
DIMENSION(:) :: f
90 libint%prv(1)%AB_x(1) = a(1) - b(1)
91 libint%prv(1)%AB_y(1) = a(2) - b(2)
92 libint%prv(1)%AB_z(1) = a(3) - b(3)
94 libint%prv(1)%CD_x(1) = c(1) - d(1)
95 libint%prv(1)%CD_y(1) = c(2) - d(2)
96 libint%prv(1)%CD_z(1) = c(3) - d(3)
98 libint%prv(1)%PA_x(1) = p(1) - a(1)
99 libint%prv(1)%PA_y(1) = p(2) - a(2)
100 libint%prv(1)%PA_z(1) = p(3) - a(3)
102 libint%prv(1)%QC_x(1) = q(1) - c(1)
103 libint%prv(1)%QC_y(1) = q(2) - c(2)
104 libint%prv(1)%QC_z(1) = q(3) - c(3)
106 libint%prv(1)%WP_x(1) = w(1) - p(1)
107 libint%prv(1)%WP_y(1) = w(2) - p(2)
108 libint%prv(1)%WP_z(1) = w(3) - p(3)
110 libint%prv(1)%WQ_x(1) = w(1) - q(1)
111 libint%prv(1)%WQ_y(1) = w(2) - q(2)
112 libint%prv(1)%WQ_z(1) = w(3) - q(3)
114 libint%prv(1)%oo2z(1) = 0.5_dp*zetainv
115 libint%prv(1)%oo2e(1) = 0.5_dp*etainv
116 libint%prv(1)%oo2ze(1) = 0.5_dp*zetapetainv
117 libint%prv(1)%roz(1) = rho*zetainv
118 libint%prv(1)%roe(1) = rho*etainv
120#if 4*LIBINT2_MAX_AM_eri > 0 - 1
122 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_0 (1) &
126#if 4*LIBINT2_MAX_AM_eri > 1 - 1
128 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_1 (1) &
132#if 4*LIBINT2_MAX_AM_eri > 2 - 1
134 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_2 (1) &
138#if 4*LIBINT2_MAX_AM_eri > 3 - 1
140 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_3 (1) &
144#if 4*LIBINT2_MAX_AM_eri > 4 - 1
146 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_4 (1) &
150#if 4*LIBINT2_MAX_AM_eri > 5 - 1
152 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_5 (1) &
156#if 4*LIBINT2_MAX_AM_eri > 6 - 1
158 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_6 (1) &
162#if 4*LIBINT2_MAX_AM_eri > 7 - 1
164 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_7 (1) &
168#if 4*LIBINT2_MAX_AM_eri > 8 - 1
170 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_8 (1) &
174#if 4*LIBINT2_MAX_AM_eri > 9 - 1
176 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_9 (1) &
180#if 4*LIBINT2_MAX_AM_eri > 10 - 1
182 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_10 (1) &
186#if 4*LIBINT2_MAX_AM_eri > 11 - 1
188 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_11 (1) &
192#if 4*LIBINT2_MAX_AM_eri > 12 - 1
194 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_12 (1) &
198#if 4*LIBINT2_MAX_AM_eri > 13 - 1
200 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_13 (1) &
204#if 4*LIBINT2_MAX_AM_eri > 14 - 1
206 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_14 (1) &
210#if 4*LIBINT2_MAX_AM_eri > 15 - 1
212 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_15 (1) &
216#if 4*LIBINT2_MAX_AM_eri > 16 - 1
218 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_16 (1) &
222#if 4*LIBINT2_MAX_AM_eri > 17 - 1
224 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_17 (1) &
228#if 4*LIBINT2_MAX_AM_eri > 18 - 1
230 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_18 (1) &
234#if 4*LIBINT2_MAX_AM_eri > 19 - 1
236 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_19 (1) &
240#if 4*LIBINT2_MAX_AM_eri > 20 - 1
242 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_20 (1) &
246#if 4*LIBINT2_MAX_AM_eri > 21 - 1
248 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_21 (1) &
252#if 4*LIBINT2_MAX_AM_eri > 22 - 1
254 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_22 (1) &
258#if 4*LIBINT2_MAX_AM_eri > 23 - 1
260 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_23 (1) &
264#if 4*LIBINT2_MAX_AM_eri > 24 - 1
266 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_24 (1) &
270#if 4*LIBINT2_MAX_AM_eri > 25 - 1
272 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_25 (1) &
276#if 4*LIBINT2_MAX_AM_eri > 26 - 1
278 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_26 (1) &
282#if 4*LIBINT2_MAX_AM_eri > 27 - 1
284 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_27 (1) &
288#if 4*LIBINT2_MAX_AM_eri > 28 - 1
290 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_28 (1) &
294#if 4*LIBINT2_MAX_AM_eri > 29 - 1
296 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_29 (1) &
300#if 4*LIBINT2_MAX_AM_eri > 30 - 1
302 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_30 (1) &
306#if 4*LIBINT2_MAX_AM_eri > 31 - 1
308 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_31 (1) &
324 mark_used(zetapetainv)
329 cpabort(
"This CP2K executable has not been linked against the required library libint.")
334 SUBROUTINE cp_libint_set_params_eri_deriv(libint, A, B, C, D, P, Q, W, zeta_A, zeta_B, zeta_C, zeta_D, &
335 ZetaInv, EtaInv, ZetapEtaInv, Rho, m_max, F)
337 REAL(kind=
dp),
INTENT(IN),
DIMENSION(3) :: a, b, c, d, p, q, w
338 REAL(kind=
dp),
INTENT(IN) :: zeta_a, zeta_b, zeta_c, zeta_d, zetainv, etainv, zetapetainv, rho
340 INTEGER,
INTENT(IN) :: m_max
341 REAL(kind=
dp),
DIMENSION(:) :: f
344 REAL(kind=
dp) :: gammap, gammaq, gammapq, rhop, rhoq
345 libint%prv(1)%AB_x(1) = a(1) - b(1)
346 libint%prv(1)%AB_y(1) = a(2) - b(2)
347 libint%prv(1)%AB_z(1) = a(3) - b(3)
349 libint%prv(1)%CD_x(1) = c(1) - d(1)
350 libint%prv(1)%CD_y(1) = c(2) - d(2)
351 libint%prv(1)%CD_z(1) = c(3) - d(3)
353 libint%prv(1)%PA_x(1) = p(1) - a(1)
354 libint%prv(1)%PA_y(1) = p(2) - a(2)
355 libint%prv(1)%PA_z(1) = p(3) - a(3)
357 libint%prv(1)%PB_x(1) = p(1) - b(1)
358 libint%prv(1)%PB_y(1) = p(2) - b(2)
359 libint%prv(1)%PB_z(1) = p(3) - b(3)
361 libint%prv(1)%QC_x(1) = q(1) - c(1)
362 libint%prv(1)%QC_y(1) = q(2) - c(2)
363 libint%prv(1)%QC_z(1) = q(3) - c(3)
365 libint%prv(1)%WP_x(1) = w(1) - p(1)
366 libint%prv(1)%WP_y(1) = w(2) - p(2)
367 libint%prv(1)%WP_z(1) = w(3) - p(3)
369 libint%prv(1)%WQ_x(1) = w(1) - q(1)
370 libint%prv(1)%WQ_y(1) = w(2) - q(2)
371 libint%prv(1)%WQ_z(1) = w(3) - q(3)
373 libint%prv(1)%two_alpha0_bra(1) = 2.0_dp*zeta_a
374 libint%prv(1)%two_alpha0_ket(1) = 2.0_dp*zeta_b
375 libint%prv(1)%two_alpha1_ket(1) = 2.0_dp*zeta_d
377 gammap = zeta_a + zeta_b
378 gammaq = zeta_c + zeta_d
379 gammapq = gammap*gammaq/(gammap + gammaq)
380 libint%prv(1)%alpha1_rho_over_zeta2(1) = zeta_a*gammapq/(gammap*gammap)
381 libint%prv(1)%alpha2_rho_over_zeta2(1) = zeta_b*gammapq/(gammap*gammap)
382 libint%prv(1)%alpha4_rho_over_eta2(1) = zeta_d*gammapq/(gammaq*gammaq)
383 libint%prv(1)%alpha1_over_zetapluseta(1) = zeta_a/(gammap + gammaq)
384 libint%prv(1)%alpha2_over_zetapluseta(1) = zeta_b/(gammap + gammaq)
385 libint%prv(1)%alpha4_over_zetapluseta(1) = zeta_d/(gammap + gammaq)
387 rhop = zeta_a*zeta_b/gammap
388 rhoq = zeta_c*zeta_d/gammaq
389 libint%prv(1)%rho12_over_alpha1(1) = rhop/zeta_a
391 libint%prv(1)%rho34_over_alpha3(1) = rhoq/zeta_c
393 libint%prv(1)%oo2z(1) = 0.5_dp*zetainv
394 libint%prv(1)%oo2e(1) = 0.5_dp*etainv
395 libint%prv(1)%oo2ze(1) = 0.5_dp*zetapetainv
396 libint%prv(1)%roz(1) = rho*zetainv
397 libint%prv(1)%roe(1) = rho*etainv
399#if 4*LIBINT2_MAX_AM_eri > 0 - 1
401 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_0 (1) &
404#if 4*LIBINT2_MAX_AM_eri > 1 - 1
406 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_1 (1) &
409#if 4*LIBINT2_MAX_AM_eri > 2 - 1
411 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_2 (1) &
414#if 4*LIBINT2_MAX_AM_eri > 3 - 1
416 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_3 (1) &
419#if 4*LIBINT2_MAX_AM_eri > 4 - 1
421 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_4 (1) &
424#if 4*LIBINT2_MAX_AM_eri > 5 - 1
426 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_5 (1) &
429#if 4*LIBINT2_MAX_AM_eri > 6 - 1
431 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_6 (1) &
434#if 4*LIBINT2_MAX_AM_eri > 7 - 1
436 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_7 (1) &
439#if 4*LIBINT2_MAX_AM_eri > 8 - 1
441 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_8 (1) &
444#if 4*LIBINT2_MAX_AM_eri > 9 - 1
446 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_9 (1) &
449#if 4*LIBINT2_MAX_AM_eri > 10 - 1
451 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_10 (1) &
454#if 4*LIBINT2_MAX_AM_eri > 11 - 1
456 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_11 (1) &
459#if 4*LIBINT2_MAX_AM_eri > 12 - 1
461 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_12 (1) &
464#if 4*LIBINT2_MAX_AM_eri > 13 - 1
466 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_13 (1) &
469#if 4*LIBINT2_MAX_AM_eri > 14 - 1
471 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_14 (1) &
474#if 4*LIBINT2_MAX_AM_eri > 15 - 1
476 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_15 (1) &
479#if 4*LIBINT2_MAX_AM_eri > 16 - 1
481 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_16 (1) &
484#if 4*LIBINT2_MAX_AM_eri > 17 - 1
486 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_17 (1) &
489#if 4*LIBINT2_MAX_AM_eri > 18 - 1
491 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_18 (1) &
494#if 4*LIBINT2_MAX_AM_eri > 19 - 1
496 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_19 (1) &
499#if 4*LIBINT2_MAX_AM_eri > 20 - 1
501 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_20 (1) &
504#if 4*LIBINT2_MAX_AM_eri > 21 - 1
506 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_21 (1) &
509#if 4*LIBINT2_MAX_AM_eri > 22 - 1
511 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_22 (1) &
514#if 4*LIBINT2_MAX_AM_eri > 23 - 1
516 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_23 (1) &
519#if 4*LIBINT2_MAX_AM_eri > 24 - 1
521 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_24 (1) &
524#if 4*LIBINT2_MAX_AM_eri > 25 - 1
526 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_25 (1) &
529#if 4*LIBINT2_MAX_AM_eri > 26 - 1
531 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_26 (1) &
534#if 4*LIBINT2_MAX_AM_eri > 27 - 1
536 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_27 (1) &
539#if 4*LIBINT2_MAX_AM_eri > 28 - 1
541 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_28 (1) &
544#if 4*LIBINT2_MAX_AM_eri > 29 - 1
546 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_29 (1) &
549#if 4*LIBINT2_MAX_AM_eri > 30 - 1
551 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_30 (1) &
554#if 4*LIBINT2_MAX_AM_eri > 31 - 1
556 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_31 (1) &
575 mark_used(zetapetainv)
579 cpabort(
"This CP2K executable has not been linked against the required library libint.")
584 SUBROUTINE cp_libint_set_params_eri(libint, A, B, C, D, ZetaInv, EtaInv, ZetapEtaInv, Rho, P, Q, W, m_max, F)
586 REAL(kind=
dp),
INTENT(IN),
DIMENSION(3) :: a, b, c, d, p, q, w
587 REAL(kind=
dp),
INTENT(IN) :: zetainv, etainv, zetapetainv, rho
588 REAL(kind=
dp),
DIMENSION(:) :: f
590 INTEGER,
INTENT(IN) :: m_max
593 libint%prv(1)%AB_x(1) = a(1) - b(1)
594 libint%prv(1)%AB_y(1) = a(2) - b(2)
595 libint%prv(1)%AB_z(1) = a(3) - b(3)
597 libint%prv(1)%CD_x(1) = c(1) - d(1)
598 libint%prv(1)%CD_y(1) = c(2) - d(2)
599 libint%prv(1)%CD_z(1) = c(3) - d(3)
601 libint%prv(1)%PA_x(1) = p(1) - a(1)
602 libint%prv(1)%PA_y(1) = p(2) - a(2)
603 libint%prv(1)%PA_z(1) = p(3) - a(3)
605 libint%prv(1)%QC_x(1) = q(1) - c(1)
606 libint%prv(1)%QC_y(1) = q(2) - c(2)
607 libint%prv(1)%QC_z(1) = q(3) - c(3)
609 libint%prv(1)%WP_x(1) = w(1) - p(1)
610 libint%prv(1)%WP_y(1) = w(2) - p(2)
611 libint%prv(1)%WP_z(1) = w(3) - p(3)
613 libint%prv(1)%WQ_x(1) = w(1) - q(1)
614 libint%prv(1)%WQ_y(1) = w(2) - q(2)
615 libint%prv(1)%WQ_z(1) = w(3) - q(3)
617 libint%prv(1)%oo2z(1) = 0.5_dp*zetainv
618 libint%prv(1)%oo2e(1) = 0.5_dp*etainv
619 libint%prv(1)%oo2ze(1) = 0.5_dp*zetapetainv
620 libint%prv(1)%roz(1) = rho*zetainv
621 libint%prv(1)%roe(1) = rho*etainv
623#if 4*LIBINT2_MAX_AM_eri > 0 - 1
626 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_0 (1) &
629#if 4*LIBINT2_MAX_AM_eri > 1 - 1
632 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_1 (1) &
635#if 4*LIBINT2_MAX_AM_eri > 2 - 1
638 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_2 (1) &
641#if 4*LIBINT2_MAX_AM_eri > 3 - 1
644 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_3 (1) &
647#if 4*LIBINT2_MAX_AM_eri > 4 - 1
650 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_4 (1) &
653#if 4*LIBINT2_MAX_AM_eri > 5 - 1
656 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_5 (1) &
659#if 4*LIBINT2_MAX_AM_eri > 6 - 1
662 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_6 (1) &
665#if 4*LIBINT2_MAX_AM_eri > 7 - 1
668 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_7 (1) &
671#if 4*LIBINT2_MAX_AM_eri > 8 - 1
674 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_8 (1) &
677#if 4*LIBINT2_MAX_AM_eri > 9 - 1
680 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_9 (1) &
683#if 4*LIBINT2_MAX_AM_eri > 10 - 1
686 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_10 (1) &
689#if 4*LIBINT2_MAX_AM_eri > 11 - 1
692 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_11 (1) &
695#if 4*LIBINT2_MAX_AM_eri > 12 - 1
698 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_12 (1) &
701#if 4*LIBINT2_MAX_AM_eri > 13 - 1
704 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_13 (1) &
707#if 4*LIBINT2_MAX_AM_eri > 14 - 1
710 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_14 (1) &
713#if 4*LIBINT2_MAX_AM_eri > 15 - 1
716 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_15 (1) &
719#if 4*LIBINT2_MAX_AM_eri > 16 - 1
722 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_16 (1) &
725#if 4*LIBINT2_MAX_AM_eri > 17 - 1
728 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_17 (1) &
731#if 4*LIBINT2_MAX_AM_eri > 18 - 1
734 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_18 (1) &
737#if 4*LIBINT2_MAX_AM_eri > 19 - 1
740 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_19 (1) &
743#if 4*LIBINT2_MAX_AM_eri > 20 - 1
746 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_20 (1) &
749#if 4*LIBINT2_MAX_AM_eri > 21 - 1
752 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_21 (1) &
755#if 4*LIBINT2_MAX_AM_eri > 22 - 1
758 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_22 (1) &
761#if 4*LIBINT2_MAX_AM_eri > 23 - 1
764 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_23 (1) &
767#if 4*LIBINT2_MAX_AM_eri > 24 - 1
770 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_24 (1) &
773#if 4*LIBINT2_MAX_AM_eri > 25 - 1
776 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_25 (1) &
779#if 4*LIBINT2_MAX_AM_eri > 26 - 1
782 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_26 (1) &
785#if 4*LIBINT2_MAX_AM_eri > 27 - 1
788 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_27 (1) &
791#if 4*LIBINT2_MAX_AM_eri > 28 - 1
794 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_28 (1) &
797#if 4*LIBINT2_MAX_AM_eri > 29 - 1
800 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_29 (1) &
803#if 4*LIBINT2_MAX_AM_eri > 30 - 1
806 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_30 (1) &
809#if 4*LIBINT2_MAX_AM_eri > 31 - 1
812 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_31 (1) &
827 mark_used(zetapetainv)
831 cpabort(
"This CP2K executable has not been linked against the required library libint.")
846 INTEGER,
INTENT(IN) :: n_d, n_c, n_b, n_a
848 REAL(
dp),
DIMENSION(:),
POINTER :: p_work
849 INTEGER :: a_mysize(1)
852 PROCEDURE(libint2_build),
POINTER :: pbuild
854 CALL c_f_procpointer(libint2_build_eri(n_d, n_c, n_b, n_a), pbuild)
857 CALL c_f_pointer(lib%prv(1)%targets(1), p_work, shape=a_mysize)
866 cpabort(
"This CP2K executable has not been linked against the required library libint.")
881 INTEGER,
INTENT(IN) :: n_c, n_b, n_a
883 REAL(
dp),
DIMENSION(:),
POINTER :: p_work
884 INTEGER :: a_mysize(1)
887 CHARACTER(LEN=160) :: error_msg
888 PROCEDURE(libint2_build),
POINTER :: pbuild
889 TYPE(c_funptr) :: build_funptr
891 build_funptr = libint2_build_3eri(n_c, n_b, n_a)
892 IF (.NOT. c_associated(build_funptr))
THEN
893 error_msg =
"LIBINT has no 3-center ERI kernel for (lc,lb,la)=("// &
896 CALL cp_abort(__location__, trim(error_msg))
898 CALL c_f_procpointer(build_funptr, pbuild)
901 CALL c_f_pointer(lib%prv(1)%targets(1), p_work, shape=a_mysize)
909 cpabort(
"This CP2K executable has not been linked against the required library libint.")
924 INTEGER,
INTENT(IN) :: n_c, n_b, n_a
926 INTEGER :: a_mysize(1)
927 REAL(
dp),
DIMENSION(:, :),
POINTER :: p_work
930 REAL(
dp),
DIMENSION(:),
POINTER :: p_work_tmp
931 PROCEDURE(libint2_build),
POINTER :: pbuild
934 CALL c_f_procpointer(libint2_build_3eri1(n_c, n_b, n_a), pbuild)
937 ALLOCATE (p_work(a_mysize(1), 9))
942 CALL c_f_pointer(lib%prv(1)%targets(i), p_work_tmp, shape=a_mysize)
943 p_work(:, i) = p_work_tmp
952 cpabort(
"This CP2K executable has not been linked against the required library libint.")
967 INTEGER,
INTENT(IN) :: n_b, n_a
969 INTEGER :: a_mysize(1)
970 REAL(
dp),
DIMENSION(:, :),
POINTER :: p_work
973 REAL(
dp),
DIMENSION(:),
POINTER :: p_work_tmp
974 PROCEDURE(libint2_build),
POINTER :: pbuild
977 CALL c_f_procpointer(libint2_build_2eri1(n_b, n_a), pbuild)
980 ALLOCATE (p_work(a_mysize(1), 6))
985 CALL c_f_pointer(lib%prv(1)%targets(i), p_work_tmp, shape=a_mysize)
986 p_work(:, i) = p_work_tmp
994 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1009 INTEGER,
INTENT(IN) :: n_b, n_a
1011 REAL(
dp),
DIMENSION(:),
POINTER :: p_work
1012 INTEGER :: a_mysize(1)
1015 PROCEDURE(libint2_build),
POINTER :: pbuild
1017 CALL c_f_procpointer(libint2_build_2eri(n_b, n_a), pbuild)
1018 CALL pbuild(lib%prv)
1020 CALL c_f_pointer(lib%prv(1)%targets(1), p_work, shape=a_mysize)
1027 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1043 INTEGER,
INTENT(IN) :: n_d, n_c, n_b, n_a
1045 REAL(
dp),
DIMENSION(nco(n_a)*nco(n_b)*nco(n_c)*nco &
(n_d), 12) :: work_forces
1046 INTEGER :: a_mysize(1)
1049 REAL(
dp),
DIMENSION(:),
POINTER :: p_work
1051 PROCEDURE(libint2_build),
POINTER :: pbuild
1056 CALL c_f_procpointer(libint2_build_eri1(n_d, n_c, n_b, n_a), pbuild)
1057 CALL pbuild(lib%prv)
1060 IF (k == 4 .OR. k == 5 .OR. k == 6) cycle
1061 CALL c_f_pointer(lib%prv(1)%targets(k), p_work, shape=a_mysize)
1062 DO i = 1, a_mysize(1)
1063 work_forces(i, k) = p_work(i)
1072 mark_used(work_forces)
1074 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1086 get_ssss_f_val = lib%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_0(1)
1090 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1099 CALL libint2_init_eri(lib%prv, max_am, c_null_ptr)
1103 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1109 INTEGER :: contrdepth
1111#if LIBINT_CONTRACTED_INTS
1112 lib%prv(1)%contrdepth = contrdepth
1115 mark_used(contrdepth)
1119 mark_used(contrdepth)
1120 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1129 CALL libint2_init_eri1(lib%prv, max_am, c_null_ptr)
1133 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1141 CALL libint2_init_3eri(lib%prv, max_am, c_null_ptr)
1145 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1153 CALL libint2_init_3eri1(lib%prv, max_am, c_null_ptr)
1157 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1165 CALL libint2_init_2eri1(lib%prv, max_am, c_null_ptr)
1169 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1177 CALL libint2_init_2eri(lib%prv, max_am, c_null_ptr)
1181 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1188 CALL libint2_cleanup_eri(lib%prv)
1191 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1198 CALL libint2_cleanup_eri1(lib%prv)
1201 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1208 CALL libint2_cleanup_3eri(lib%prv)
1211 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1218 CALL libint2_cleanup_3eri1(lib%prv)
1221 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1228 CALL libint2_cleanup_2eri1(lib%prv)
1231 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1238 CALL libint2_cleanup_2eri(lib%prv)
1241 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1247 CALL libint2_static_init()
1249 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1255 CALL libint2_static_cleanup()
1257 cpabort(
"This CP2K executable has not been linked against the required library libint.")
various routines to log and control the output. The idea is that decisions about where to log should ...
Defines the basic variable types.
integer, parameter, public dp
Interface to the Libint-Library or a c++ wrapper.
subroutine, public cp_libint_set_params_eri_deriv(libint, a, b, c, d, p, q, w, zeta_a, zeta_b, zeta_c, zeta_d, zetainv, etainv, zetapetainv, rho, m_max, f)
subroutine, public cp_libint_init_eri1(lib, max_am)
subroutine, public cp_libint_get_eris(n_d, n_c, n_b, n_a, lib, p_work, a_mysize)
...
real(kind=dp) function, public get_ssss_f_val(lib)
subroutine, public cp_libint_get_2eri_derivs(n_b, n_a, lib, p_work, a_mysize)
...
subroutine, public cp_libint_set_params_eri(libint, a, b, c, d, zetainv, etainv, zetapetainv, rho, p, q, w, m_max, f)
integer, parameter, public build_eri_size
subroutine, public cp_libint_get_3eris(n_c, n_b, n_a, lib, p_work, a_mysize)
...
subroutine, public cp_libint_cleanup_3eri1(lib)
subroutine, public cp_libint_get_2eris(n_b, n_a, lib, p_work, a_mysize)
...
integer, parameter, public prim_data_f_size
subroutine, public cp_libint_init_3eri1(lib, max_am)
subroutine, public cp_libint_cleanup_2eri1(lib)
subroutine, public cp_libint_set_params_eri_screen(libint, a, b, c, d, p, q, w, zetainv, etainv, zetapetainv, rho, m_max, f)
subroutine, public cp_libint_init_2eri1(lib, max_am)
subroutine, public cp_libint_get_derivs(n_d, n_c, n_b, n_a, lib, work_forces, a_mysize)
...
integer, parameter, public libint_max_am
subroutine, public cp_libint_cleanup_eri1(lib)
subroutine, public cp_libint_init_2eri(lib, max_am)
subroutine, public cp_libint_get_3eri_derivs(n_c, n_b, n_a, lib, p_work, a_mysize)
...
subroutine, public cp_libint_static_cleanup()
subroutine, public cp_libint_init_3eri(lib, max_am)
integer, parameter, public build_deriv1_eri_size
subroutine, public cp_libint_init_eri(lib, max_am)
subroutine, public cp_libint_cleanup_3eri(lib)
subroutine, public cp_libint_static_init()
subroutine, public cp_libint_cleanup_eri(lib)
subroutine, public cp_libint_set_contrdepth(lib, contrdepth)
integer, parameter, public libderiv_max_am1
subroutine, public cp_libint_cleanup_2eri(lib)
Provides Cartesian and spherical orbital pointers and indices.
integer, dimension(:), allocatable, public nco