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) &
127#if 4*LIBINT2_MAX_AM_eri > 1 - 1
129 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_1 (1) &
134#if 4*LIBINT2_MAX_AM_eri > 2 - 1
136 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_2 (1) &
141#if 4*LIBINT2_MAX_AM_eri > 3 - 1
143 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_3 (1) &
148#if 4*LIBINT2_MAX_AM_eri > 4 - 1
150 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_4 (1) &
155#if 4*LIBINT2_MAX_AM_eri > 5 - 1
157 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_5 (1) &
162#if 4*LIBINT2_MAX_AM_eri > 6 - 1
164 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_6 (1) &
169#if 4*LIBINT2_MAX_AM_eri > 7 - 1
171 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_7 (1) &
176#if 4*LIBINT2_MAX_AM_eri > 8 - 1
178 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_8 (1) &
183#if 4*LIBINT2_MAX_AM_eri > 9 - 1
185 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_9 (1) &
190#if 4*LIBINT2_MAX_AM_eri > 10 - 1
191 IF (10 <= m_max)
THEN
192 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_10 (1) &
197#if 4*LIBINT2_MAX_AM_eri > 11 - 1
198 IF (11 <= m_max)
THEN
199 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_11 (1) &
204#if 4*LIBINT2_MAX_AM_eri > 12 - 1
205 IF (12 <= m_max)
THEN
206 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_12 (1) &
211#if 4*LIBINT2_MAX_AM_eri > 13 - 1
212 IF (13 <= m_max)
THEN
213 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_13 (1) &
218#if 4*LIBINT2_MAX_AM_eri > 14 - 1
219 IF (14 <= m_max)
THEN
220 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_14 (1) &
225#if 4*LIBINT2_MAX_AM_eri > 15 - 1
226 IF (15 <= m_max)
THEN
227 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_15 (1) &
232#if 4*LIBINT2_MAX_AM_eri > 16 - 1
233 IF (16 <= m_max)
THEN
234 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_16 (1) &
239#if 4*LIBINT2_MAX_AM_eri > 17 - 1
240 IF (17 <= m_max)
THEN
241 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_17 (1) &
246#if 4*LIBINT2_MAX_AM_eri > 18 - 1
247 IF (18 <= m_max)
THEN
248 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_18 (1) &
253#if 4*LIBINT2_MAX_AM_eri > 19 - 1
254 IF (19 <= m_max)
THEN
255 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_19 (1) &
260#if 4*LIBINT2_MAX_AM_eri > 20 - 1
261 IF (20 <= m_max)
THEN
262 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_20 (1) &
267#if 4*LIBINT2_MAX_AM_eri > 21 - 1
268 IF (21 <= m_max)
THEN
269 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_21 (1) &
274#if 4*LIBINT2_MAX_AM_eri > 22 - 1
275 IF (22 <= m_max)
THEN
276 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_22 (1) &
281#if 4*LIBINT2_MAX_AM_eri > 23 - 1
282 IF (23 <= m_max)
THEN
283 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_23 (1) &
288#if 4*LIBINT2_MAX_AM_eri > 24 - 1
289 IF (24 <= m_max)
THEN
290 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_24 (1) &
295#if 4*LIBINT2_MAX_AM_eri > 25 - 1
296 IF (25 <= m_max)
THEN
297 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_25 (1) &
302#if 4*LIBINT2_MAX_AM_eri > 26 - 1
303 IF (26 <= m_max)
THEN
304 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_26 (1) &
309#if 4*LIBINT2_MAX_AM_eri > 27 - 1
310 IF (27 <= m_max)
THEN
311 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_27 (1) &
316#if 4*LIBINT2_MAX_AM_eri > 28 - 1
317 IF (28 <= m_max)
THEN
318 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_28 (1) &
323#if 4*LIBINT2_MAX_AM_eri > 29 - 1
324 IF (29 <= m_max)
THEN
325 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_29 (1) &
330#if 4*LIBINT2_MAX_AM_eri > 30 - 1
331 IF (30 <= m_max)
THEN
332 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_30 (1) &
337#if 4*LIBINT2_MAX_AM_eri > 31 - 1
338 IF (31 <= m_max)
THEN
339 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_31 (1) &
356 mark_used(zetapetainv)
361 cpabort(
"This CP2K executable has not been linked against the required library libint.")
366 SUBROUTINE cp_libint_set_params_eri_deriv(libint, A, B, C, D, P, Q, W, zeta_A, zeta_B, zeta_C, zeta_D, &
367 ZetaInv, EtaInv, ZetapEtaInv, Rho, m_max, F)
369 REAL(kind=
dp),
INTENT(IN),
DIMENSION(3) :: a, b, c, d, p, q, w
370 REAL(kind=
dp),
INTENT(IN) :: zeta_a, zeta_b, zeta_c, zeta_d, zetainv, etainv, zetapetainv, rho
372 INTEGER,
INTENT(IN) :: m_max
373 REAL(kind=
dp),
DIMENSION(:) :: f
376 REAL(kind=
dp) :: gammap, gammaq, gammapq, rhop, rhoq
377 libint%prv(1)%AB_x(1) = a(1) - b(1)
378 libint%prv(1)%AB_y(1) = a(2) - b(2)
379 libint%prv(1)%AB_z(1) = a(3) - b(3)
381 libint%prv(1)%CD_x(1) = c(1) - d(1)
382 libint%prv(1)%CD_y(1) = c(2) - d(2)
383 libint%prv(1)%CD_z(1) = c(3) - d(3)
385 libint%prv(1)%PA_x(1) = p(1) - a(1)
386 libint%prv(1)%PA_y(1) = p(2) - a(2)
387 libint%prv(1)%PA_z(1) = p(3) - a(3)
389 libint%prv(1)%PB_x(1) = p(1) - b(1)
390 libint%prv(1)%PB_y(1) = p(2) - b(2)
391 libint%prv(1)%PB_z(1) = p(3) - b(3)
393 libint%prv(1)%QC_x(1) = q(1) - c(1)
394 libint%prv(1)%QC_y(1) = q(2) - c(2)
395 libint%prv(1)%QC_z(1) = q(3) - c(3)
397 libint%prv(1)%WP_x(1) = w(1) - p(1)
398 libint%prv(1)%WP_y(1) = w(2) - p(2)
399 libint%prv(1)%WP_z(1) = w(3) - p(3)
401 libint%prv(1)%WQ_x(1) = w(1) - q(1)
402 libint%prv(1)%WQ_y(1) = w(2) - q(2)
403 libint%prv(1)%WQ_z(1) = w(3) - q(3)
405 libint%prv(1)%two_alpha0_bra(1) = 2.0_dp*zeta_a
406 libint%prv(1)%two_alpha0_ket(1) = 2.0_dp*zeta_b
407 libint%prv(1)%two_alpha1_ket(1) = 2.0_dp*zeta_d
409 gammap = zeta_a + zeta_b
410 gammaq = zeta_c + zeta_d
411 gammapq = gammap*gammaq/(gammap + gammaq)
412 libint%prv(1)%alpha1_rho_over_zeta2(1) = zeta_a*gammapq/(gammap*gammap)
413 libint%prv(1)%alpha2_rho_over_zeta2(1) = zeta_b*gammapq/(gammap*gammap)
414 libint%prv(1)%alpha4_rho_over_eta2(1) = zeta_d*gammapq/(gammaq*gammaq)
415 libint%prv(1)%alpha1_over_zetapluseta(1) = zeta_a/(gammap + gammaq)
416 libint%prv(1)%alpha2_over_zetapluseta(1) = zeta_b/(gammap + gammaq)
417 libint%prv(1)%alpha4_over_zetapluseta(1) = zeta_d/(gammap + gammaq)
419 rhop = zeta_a*zeta_b/gammap
420 rhoq = zeta_c*zeta_d/gammaq
421 libint%prv(1)%rho12_over_alpha1(1) = rhop/zeta_a
423 libint%prv(1)%rho34_over_alpha3(1) = rhoq/zeta_c
425 libint%prv(1)%oo2z(1) = 0.5_dp*zetainv
426 libint%prv(1)%oo2e(1) = 0.5_dp*etainv
427 libint%prv(1)%oo2ze(1) = 0.5_dp*zetapetainv
428 libint%prv(1)%roz(1) = rho*zetainv
429 libint%prv(1)%roe(1) = rho*etainv
431#if 4*LIBINT2_MAX_AM_eri > 0 - 1
433 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_0 (1) &
437#if 4*LIBINT2_MAX_AM_eri > 1 - 1
439 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_1 (1) &
443#if 4*LIBINT2_MAX_AM_eri > 2 - 1
445 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_2 (1) &
449#if 4*LIBINT2_MAX_AM_eri > 3 - 1
451 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_3 (1) &
455#if 4*LIBINT2_MAX_AM_eri > 4 - 1
457 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_4 (1) &
461#if 4*LIBINT2_MAX_AM_eri > 5 - 1
463 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_5 (1) &
467#if 4*LIBINT2_MAX_AM_eri > 6 - 1
469 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_6 (1) &
473#if 4*LIBINT2_MAX_AM_eri > 7 - 1
475 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_7 (1) &
479#if 4*LIBINT2_MAX_AM_eri > 8 - 1
481 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_8 (1) &
485#if 4*LIBINT2_MAX_AM_eri > 9 - 1
487 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_9 (1) &
491#if 4*LIBINT2_MAX_AM_eri > 10 - 1
492 IF (10 <= m_max)
THEN
493 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_10 (1) &
497#if 4*LIBINT2_MAX_AM_eri > 11 - 1
498 IF (11 <= m_max)
THEN
499 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_11 (1) &
503#if 4*LIBINT2_MAX_AM_eri > 12 - 1
504 IF (12 <= m_max)
THEN
505 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_12 (1) &
509#if 4*LIBINT2_MAX_AM_eri > 13 - 1
510 IF (13 <= m_max)
THEN
511 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_13 (1) &
515#if 4*LIBINT2_MAX_AM_eri > 14 - 1
516 IF (14 <= m_max)
THEN
517 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_14 (1) &
521#if 4*LIBINT2_MAX_AM_eri > 15 - 1
522 IF (15 <= m_max)
THEN
523 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_15 (1) &
527#if 4*LIBINT2_MAX_AM_eri > 16 - 1
528 IF (16 <= m_max)
THEN
529 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_16 (1) &
533#if 4*LIBINT2_MAX_AM_eri > 17 - 1
534 IF (17 <= m_max)
THEN
535 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_17 (1) &
539#if 4*LIBINT2_MAX_AM_eri > 18 - 1
540 IF (18 <= m_max)
THEN
541 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_18 (1) &
545#if 4*LIBINT2_MAX_AM_eri > 19 - 1
546 IF (19 <= m_max)
THEN
547 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_19 (1) &
551#if 4*LIBINT2_MAX_AM_eri > 20 - 1
552 IF (20 <= m_max)
THEN
553 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_20 (1) &
557#if 4*LIBINT2_MAX_AM_eri > 21 - 1
558 IF (21 <= m_max)
THEN
559 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_21 (1) &
563#if 4*LIBINT2_MAX_AM_eri > 22 - 1
564 IF (22 <= m_max)
THEN
565 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_22 (1) &
569#if 4*LIBINT2_MAX_AM_eri > 23 - 1
570 IF (23 <= m_max)
THEN
571 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_23 (1) &
575#if 4*LIBINT2_MAX_AM_eri > 24 - 1
576 IF (24 <= m_max)
THEN
577 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_24 (1) &
581#if 4*LIBINT2_MAX_AM_eri > 25 - 1
582 IF (25 <= m_max)
THEN
583 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_25 (1) &
587#if 4*LIBINT2_MAX_AM_eri > 26 - 1
588 IF (26 <= m_max)
THEN
589 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_26 (1) &
593#if 4*LIBINT2_MAX_AM_eri > 27 - 1
594 IF (27 <= m_max)
THEN
595 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_27 (1) &
599#if 4*LIBINT2_MAX_AM_eri > 28 - 1
600 IF (28 <= m_max)
THEN
601 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_28 (1) &
605#if 4*LIBINT2_MAX_AM_eri > 29 - 1
606 IF (29 <= m_max)
THEN
607 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_29 (1) &
611#if 4*LIBINT2_MAX_AM_eri > 30 - 1
612 IF (30 <= m_max)
THEN
613 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_30 (1) &
617#if 4*LIBINT2_MAX_AM_eri > 31 - 1
618 IF (31 <= m_max)
THEN
619 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_31 (1) &
639 mark_used(zetapetainv)
643 cpabort(
"This CP2K executable has not been linked against the required library libint.")
648 SUBROUTINE cp_libint_set_params_eri(libint, A, B, C, D, ZetaInv, EtaInv, ZetapEtaInv, Rho, P, Q, W, m_max, F)
650 REAL(kind=
dp),
INTENT(IN),
DIMENSION(3) :: a, b, c, d, p, q, w
651 REAL(kind=
dp),
INTENT(IN) :: zetainv, etainv, zetapetainv, rho
652 REAL(kind=
dp),
DIMENSION(:) :: f
654 INTEGER,
INTENT(IN) :: m_max
657 libint%prv(1)%AB_x(1) = a(1) - b(1)
658 libint%prv(1)%AB_y(1) = a(2) - b(2)
659 libint%prv(1)%AB_z(1) = a(3) - b(3)
661 libint%prv(1)%CD_x(1) = c(1) - d(1)
662 libint%prv(1)%CD_y(1) = c(2) - d(2)
663 libint%prv(1)%CD_z(1) = c(3) - d(3)
665 libint%prv(1)%PA_x(1) = p(1) - a(1)
666 libint%prv(1)%PA_y(1) = p(2) - a(2)
667 libint%prv(1)%PA_z(1) = p(3) - a(3)
669 libint%prv(1)%QC_x(1) = q(1) - c(1)
670 libint%prv(1)%QC_y(1) = q(2) - c(2)
671 libint%prv(1)%QC_z(1) = q(3) - c(3)
673 libint%prv(1)%WP_x(1) = w(1) - p(1)
674 libint%prv(1)%WP_y(1) = w(2) - p(2)
675 libint%prv(1)%WP_z(1) = w(3) - p(3)
677 libint%prv(1)%WQ_x(1) = w(1) - q(1)
678 libint%prv(1)%WQ_y(1) = w(2) - q(2)
679 libint%prv(1)%WQ_z(1) = w(3) - q(3)
681 libint%prv(1)%oo2z(1) = 0.5_dp*zetainv
682 libint%prv(1)%oo2e(1) = 0.5_dp*etainv
683 libint%prv(1)%oo2ze(1) = 0.5_dp*zetapetainv
684 libint%prv(1)%roz(1) = rho*zetainv
685 libint%prv(1)%roe(1) = rho*etainv
687#if 4*LIBINT2_MAX_AM_eri > 0 - 1
690 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_0 (1) &
694#if 4*LIBINT2_MAX_AM_eri > 1 - 1
697 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_1 (1) &
701#if 4*LIBINT2_MAX_AM_eri > 2 - 1
704 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_2 (1) &
708#if 4*LIBINT2_MAX_AM_eri > 3 - 1
711 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_3 (1) &
715#if 4*LIBINT2_MAX_AM_eri > 4 - 1
718 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_4 (1) &
722#if 4*LIBINT2_MAX_AM_eri > 5 - 1
725 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_5 (1) &
729#if 4*LIBINT2_MAX_AM_eri > 6 - 1
732 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_6 (1) &
736#if 4*LIBINT2_MAX_AM_eri > 7 - 1
739 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_7 (1) &
743#if 4*LIBINT2_MAX_AM_eri > 8 - 1
746 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_8 (1) &
750#if 4*LIBINT2_MAX_AM_eri > 9 - 1
753 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_9 (1) &
757#if 4*LIBINT2_MAX_AM_eri > 10 - 1
759 IF (10 <= m_max)
THEN
760 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_10 (1) &
764#if 4*LIBINT2_MAX_AM_eri > 11 - 1
766 IF (11 <= m_max)
THEN
767 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_11 (1) &
771#if 4*LIBINT2_MAX_AM_eri > 12 - 1
773 IF (12 <= m_max)
THEN
774 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_12 (1) &
778#if 4*LIBINT2_MAX_AM_eri > 13 - 1
780 IF (13 <= m_max)
THEN
781 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_13 (1) &
785#if 4*LIBINT2_MAX_AM_eri > 14 - 1
787 IF (14 <= m_max)
THEN
788 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_14 (1) &
792#if 4*LIBINT2_MAX_AM_eri > 15 - 1
794 IF (15 <= m_max)
THEN
795 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_15 (1) &
799#if 4*LIBINT2_MAX_AM_eri > 16 - 1
801 IF (16 <= m_max)
THEN
802 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_16 (1) &
806#if 4*LIBINT2_MAX_AM_eri > 17 - 1
808 IF (17 <= m_max)
THEN
809 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_17 (1) &
813#if 4*LIBINT2_MAX_AM_eri > 18 - 1
815 IF (18 <= m_max)
THEN
816 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_18 (1) &
820#if 4*LIBINT2_MAX_AM_eri > 19 - 1
822 IF (19 <= m_max)
THEN
823 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_19 (1) &
827#if 4*LIBINT2_MAX_AM_eri > 20 - 1
829 IF (20 <= m_max)
THEN
830 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_20 (1) &
834#if 4*LIBINT2_MAX_AM_eri > 21 - 1
836 IF (21 <= m_max)
THEN
837 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_21 (1) &
841#if 4*LIBINT2_MAX_AM_eri > 22 - 1
843 IF (22 <= m_max)
THEN
844 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_22 (1) &
848#if 4*LIBINT2_MAX_AM_eri > 23 - 1
850 IF (23 <= m_max)
THEN
851 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_23 (1) &
855#if 4*LIBINT2_MAX_AM_eri > 24 - 1
857 IF (24 <= m_max)
THEN
858 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_24 (1) &
862#if 4*LIBINT2_MAX_AM_eri > 25 - 1
864 IF (25 <= m_max)
THEN
865 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_25 (1) &
869#if 4*LIBINT2_MAX_AM_eri > 26 - 1
871 IF (26 <= m_max)
THEN
872 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_26 (1) &
876#if 4*LIBINT2_MAX_AM_eri > 27 - 1
878 IF (27 <= m_max)
THEN
879 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_27 (1) &
883#if 4*LIBINT2_MAX_AM_eri > 28 - 1
885 IF (28 <= m_max)
THEN
886 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_28 (1) &
890#if 4*LIBINT2_MAX_AM_eri > 29 - 1
892 IF (29 <= m_max)
THEN
893 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_29 (1) &
897#if 4*LIBINT2_MAX_AM_eri > 30 - 1
899 IF (30 <= m_max)
THEN
900 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_30 (1) &
904#if 4*LIBINT2_MAX_AM_eri > 31 - 1
906 IF (31 <= m_max)
THEN
907 libint%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_31 (1) &
923 mark_used(zetapetainv)
927 cpabort(
"This CP2K executable has not been linked against the required library libint.")
942 INTEGER,
INTENT(IN) :: n_d, n_c, n_b, n_a
944 REAL(
dp),
DIMENSION(:),
POINTER :: p_work
945 INTEGER :: a_mysize(1)
948 PROCEDURE(libint2_build),
POINTER :: pbuild
950 CALL c_f_procpointer(libint2_build_eri(n_d, n_c, n_b, n_a), pbuild)
953 CALL c_f_pointer(lib%prv(1)%targets(1), p_work, shape=a_mysize)
962 cpabort(
"This CP2K executable has not been linked against the required library libint.")
977 INTEGER,
INTENT(IN) :: n_c, n_b, n_a
979 REAL(
dp),
DIMENSION(:),
POINTER :: p_work
980 INTEGER :: a_mysize(1)
983 CHARACTER(LEN=160) :: error_msg
984 PROCEDURE(libint2_build),
POINTER :: pbuild
985 TYPE(c_funptr) :: build_funptr
987 build_funptr = libint2_build_3eri(n_c, n_b, n_a)
988 IF (.NOT. c_associated(build_funptr))
THEN
989 error_msg =
"LIBINT has no 3-center ERI kernel for (lc,lb,la)=("// &
992 CALL cp_abort(__location__, trim(error_msg))
994 CALL c_f_procpointer(build_funptr, pbuild)
997 CALL c_f_pointer(lib%prv(1)%targets(1), p_work, shape=a_mysize)
1005 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1020 INTEGER,
INTENT(IN) :: n_c, n_b, n_a
1022 INTEGER :: a_mysize(1)
1023 REAL(
dp),
DIMENSION(:, :),
POINTER :: p_work
1026 REAL(
dp),
DIMENSION(:),
POINTER :: p_work_tmp
1027 PROCEDURE(libint2_build),
POINTER :: pbuild
1030 CALL c_f_procpointer(libint2_build_3eri1(n_c, n_b, n_a), pbuild)
1031 CALL pbuild(lib%prv)
1033 ALLOCATE (p_work(a_mysize(1), 9))
1037 NULLIFY (p_work_tmp)
1038 CALL c_f_pointer(lib%prv(1)%targets(i), p_work_tmp, shape=a_mysize)
1039 p_work(:, i) = p_work_tmp
1048 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1063 INTEGER,
INTENT(IN) :: n_b, n_a
1065 INTEGER :: a_mysize(1)
1066 REAL(
dp),
DIMENSION(:, :),
POINTER :: p_work
1069 REAL(
dp),
DIMENSION(:),
POINTER :: p_work_tmp
1070 PROCEDURE(libint2_build),
POINTER :: pbuild
1073 CALL c_f_procpointer(libint2_build_2eri1(n_b, n_a), pbuild)
1074 CALL pbuild(lib%prv)
1076 ALLOCATE (p_work(a_mysize(1), 6))
1080 NULLIFY (p_work_tmp)
1081 CALL c_f_pointer(lib%prv(1)%targets(i), p_work_tmp, shape=a_mysize)
1082 p_work(:, i) = p_work_tmp
1090 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1105 INTEGER,
INTENT(IN) :: n_b, n_a
1107 REAL(
dp),
DIMENSION(:),
POINTER :: p_work
1108 INTEGER :: a_mysize(1)
1111 PROCEDURE(libint2_build),
POINTER :: pbuild
1113 CALL c_f_procpointer(libint2_build_2eri(n_b, n_a), pbuild)
1114 CALL pbuild(lib%prv)
1116 CALL c_f_pointer(lib%prv(1)%targets(1), p_work, shape=a_mysize)
1123 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1139 INTEGER,
INTENT(IN) :: n_d, n_c, n_b, n_a
1141 REAL(
dp),
DIMENSION(nco(n_a)*nco(n_b)*nco(n_c)*nco &
(n_d), 12) :: work_forces
1142 INTEGER :: a_mysize(1)
1145 REAL(
dp),
DIMENSION(:),
POINTER :: p_work
1147 PROCEDURE(libint2_build),
POINTER :: pbuild
1152 CALL c_f_procpointer(libint2_build_eri1(n_d, n_c, n_b, n_a), pbuild)
1153 CALL pbuild(lib%prv)
1156 IF (k == 4 .OR. k == 5 .OR. k == 6) cycle
1157 CALL c_f_pointer(lib%prv(1)%targets(k), p_work, shape=a_mysize)
1158 DO i = 1, a_mysize(1)
1159 work_forces(i, k) = p_work(i)
1168 mark_used(work_forces)
1170 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1182 get_ssss_f_val = lib%prv(1)%f_aB_s___0__s___1___TwoPRep_s___0__s___1___Ab__up_0(1)
1186 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1195 CALL libint2_init_eri(lib%prv, max_am, c_null_ptr)
1199 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1205 INTEGER :: contrdepth
1207#if LIBINT_CONTRACTED_INTS
1208 lib%prv(1)%contrdepth = contrdepth
1211 mark_used(contrdepth)
1215 mark_used(contrdepth)
1216 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1225 CALL libint2_init_eri1(lib%prv, max_am, c_null_ptr)
1229 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1237 CALL libint2_init_3eri(lib%prv, max_am, c_null_ptr)
1241 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1249 CALL libint2_init_3eri1(lib%prv, max_am, c_null_ptr)
1253 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1261 CALL libint2_init_2eri1(lib%prv, max_am, c_null_ptr)
1265 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1273 CALL libint2_init_2eri(lib%prv, max_am, c_null_ptr)
1277 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1284 CALL libint2_cleanup_eri(lib%prv)
1287 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1294 CALL libint2_cleanup_eri1(lib%prv)
1297 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1304 CALL libint2_cleanup_3eri(lib%prv)
1307 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1314 CALL libint2_cleanup_3eri1(lib%prv)
1317 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1324 CALL libint2_cleanup_2eri1(lib%prv)
1327 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1334 CALL libint2_cleanup_2eri(lib%prv)
1337 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1343 CALL libint2_static_init()
1345 cpabort(
"This CP2K executable has not been linked against the required library libint.")
1351 CALL libint2_static_cleanup()
1353 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