38#include "../base/base_uses.f90"
44 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .false.
46 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'eri_mme_integrate'
72 hab, o1, o2, G_count, R_count, normalize, potential, pot_par)
74 INTEGER,
INTENT(IN) :: la_min, la_max, lb_min, lb_max
75 REAL(kind=
dp),
INTENT(IN) :: zeta, zetb
76 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: rab
77 REAL(kind=
dp),
DIMENSION(:, :),
INTENT(INOUT) :: hab
78 INTEGER,
INTENT(IN) :: o1, o2
79 INTEGER,
INTENT(INOUT),
OPTIONAL :: g_count, r_count
80 LOGICAL,
INTENT(IN),
OPTIONAL :: normalize
81 INTEGER,
INTENT(IN),
OPTIONAL :: potential
82 REAL(kind=
dp),
INTENT(IN),
OPTIONAL :: pot_par
84 REAL(kind=
dp),
PARAMETER :: rel_prec = 1.0e-02_dp
86 INTEGER :: ax, ay, az, bx, by, bz, grid, i_aw, &
87 i_xyz, ico, jco, l_max, la, lb, n_aw
88 INTEGER(KIND=int_8),
DIMENSION(2) :: n_sum_3d
89 INTEGER(KIND=int_8),
DIMENSION(2, 3) :: n_sum_1d
90 INTEGER,
DIMENSION(3) :: la_xyz, lb_xyz
91 LOGICAL :: do_g_sum, exact, is_ortho, norm
92 REAL(kind=
dp) :: alpha_g, alpha_r, cutoff, g_rad, g_res, &
93 imm, inv_lgth, ixyz, lgth, max_error, &
94 prefac, r_rad, r_res, vol
95 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: s_g_1, s_g_2, s_g_no, s_g_no_h
96 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: s_g
97 REAL(kind=
dp),
DIMENSION(3) :: g_bounds, r_bounds
98 REAL(kind=
dp),
DIMENSION(3, 3) :: h_inv, hmat
99 REAL(kind=
dp),
DIMENSION(:),
POINTER :: aw
101 cpassert(param%is_valid)
104 CALL eri_mme_2c_get_rads(la_max, lb_max, zeta, zetb, 0.0_dp, param%G_min, param%R_min, param%sum_precision, &
116 IF (
PRESENT(normalize))
THEN
122 l_max = la_max + lb_max
124 IF (
PRESENT(potential))
THEN
133 is_ortho = param%is_ortho
137 ALLOCATE (s_g(0:l_max, 3, n_aw))
140 IF (param%debug)
THEN
141 ALLOCATE (s_g_1(0:l_max))
142 ALLOCATE (s_g_2(0:l_max))
145 ALLOCATE (s_g_no(
ncoset(l_max)))
147 ALLOCATE (s_g_no_h(
ncoset(l_max)))
151 alpha_g = 0.25_dp/zeta + 0.25_dp/zetb
153 g_res = 0.5_dp*param%G_min
154 r_res = 0.5_dp*param%R_min
156 g_rad =
exp_radius(l_max, alpha_g, rel_prec*param%sum_precision, 1.0_dp, epsabs=g_res)
158 CALL pgf_sum_2c_gspace_3d(s_g_no, l_max, -rab, alpha_g, h_inv, g_bounds, g_rad, vol, potential, pot_par)
164 zeta, zetb, aw(i_aw), param%sum_precision, n_sum_1d, n_sum_3d, &
165 g_bounds, g_rad, r_bounds, r_rad)
166 alpha_g = aw(i_aw) + 0.25_dp/zeta + 0.25_dp/zetb
167 alpha_r = 0.25_dp/alpha_g
173 lgth = abs(hmat(i_xyz, i_xyz))
174 inv_lgth = abs(h_inv(i_xyz, i_xyz))
177 do_g_sum = n_sum_1d(1, i_xyz) < n_sum_1d(2, i_xyz)
181 IF (
PRESENT(g_count)) g_count = g_count + 1
184 IF (
PRESENT(r_count)) r_count = r_count + 1
187 IF (param%debug)
THEN
191 max_error = maxval(abs(s_g_1 - s_g_2)/(0.5_dp*(abs(s_g_1) + abs(s_g_2)) + 1.0_dp))
193 cpassert(max_error <= param%debug_delta)
199 do_g_sum = n_sum_3d(1) < n_sum_3d(2)
203 IF (
PRESENT(g_count)) g_count = g_count + 1
206 IF (
PRESENT(r_count)) r_count = r_count + 1
208 s_g_no(:) = s_g_no(:) + aw(n_aw + i_aw)*s_g_no_h
214 prefac = sqrt(1.0_dp/(zeta*zetb))
218 CALL get_l(jco, lb, bx, by, bz)
219 lb_xyz = [bx, by, bz]
221 CALL get_l(ico, la, ax, ay, az)
222 la_xyz = [ax, ay, az]
228 ixyz = ixyz*s_g(la_xyz(i_xyz) + lb_xyz(i_xyz), i_xyz, i_aw)*prefac
230 imm = imm + aw(n_aw + i_aw)*ixyz
233 imm = s_g_no(
coset(ax + bx, ay + by, az + bz))*prefac**3
235 IF (la + lb == 0 .AND. .NOT. exact)
THEN
236 imm = imm - sum(aw(n_aw + 1:2*n_aw))*prefac**3/vol
241 hab(o1 + ico, o2 + jco) = imm*4.0_dp*
pi**4/((2.0_dp*zeta)**la*(-2.0_dp*zetb)**lb)
275 SUBROUTINE eri_mme_3c_integrate(param, la_min, la_max, lb_min, lb_max, lc_min, lc_max, zeta, zetb, zetc, RA, RB, RC, &
276 habc, o1, o2, o3, GG_count, GR_count, RR_count)
278 INTEGER,
INTENT(IN) :: la_min, la_max, lb_min, lb_max, lc_min, &
280 REAL(kind=
dp),
INTENT(IN) :: zeta, zetb, zetc
281 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: ra, rb, rc
282 REAL(kind=
dp),
DIMENSION(:, :, :),
INTENT(INOUT) :: habc
283 INTEGER,
INTENT(IN) :: o1, o2, o3
284 INTEGER,
INTENT(INOUT),
OPTIONAL :: gg_count, gr_count, rr_count
286 cpassert(param%is_valid)
287 IF (param%is_ortho)
THEN
288 CALL eri_mme_3c_integrate_ortho(param, la_min, la_max, lb_min, lb_max, lc_min, lc_max, zeta, zetb, zetc, ra, rb, rc, &
289 habc, o1, o2, o3, rr_count)
292 CALL eri_mme_3c_integrate_nonortho(param, la_min, la_max, lb_min, lb_max, lc_min, lc_max, zeta, zetb, zetc, ra, rb, rc, &
293 habc, o1, o2, o3, gg_count, gr_count, rr_count)
319 SUBROUTINE eri_mme_3c_integrate_ortho(param, la_min, la_max, lb_min, lb_max, lc_min, lc_max, zeta, zetb, zetc, RA, RB, RC, &
320 habc, o1, o2, o3, RR_count)
322 INTEGER,
INTENT(IN) :: la_min, la_max, lb_min, lb_max, lc_min, &
324 REAL(kind=
dp),
INTENT(IN) :: zeta, zetb, zetc
325 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: ra, rb, rc
326 REAL(kind=
dp),
DIMENSION(:, :, :),
INTENT(INOUT) :: habc
327 INTEGER,
INTENT(IN) :: o1, o2, o3
328 INTEGER,
INTENT(INOUT),
OPTIONAL :: rr_count
330 INTEGER :: grid, i_aw, lmax_0, n_aw
331 INTEGER(KIND=int_8),
DIMENSION(3) :: n_sum_3d
332 INTEGER(KIND=int_8),
DIMENSION(3, 3) :: n_sum_1d
333 REAL(kind=
dp) :: alpha_r_0, cutoff, g_res, lgth, prefac, &
335 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: s_g_0
336 REAL(kind=
dp),
ALLOCATABLE, &
337 DIMENSION(:, :, :, :, :) :: s_g
338 REAL(kind=
dp),
DIMENSION(2) :: r_rads_3
339 REAL(kind=
dp),
DIMENSION(2, 3) :: r_bounds_3
340 REAL(kind=
dp),
DIMENSION(3) :: g_rads_1, r_rads_2
341 REAL(kind=
dp),
DIMENSION(3, 3) :: g_bounds_1, h_inv, hmat, r_bounds_2
342 REAL(kind=
dp),
DIMENSION(:),
POINTER :: aw
346 CALL eri_mme_3c_get_rads(la_max, lb_max, lc_max, zeta, zetb, zetc, 0.0_dp, param%G_min, param%R_min, &
347 param%sum_precision, g_rads_1=g_rads_1)
349 cutoff = (min(g_rads_1(1), g_rads_1(2) + g_rads_1(3)))**2/2
356 n_aw = param%minimax_grid(grid)%n_minimax
357 aw => param%minimax_grid(grid)%minimax_aw
365 prefac = (zeta*zetb*zetc)**(-1.5_dp)*
pi**(11.0_dp/2.0_dp)*4.0_dp
368 g_res = 0.5_dp*param%G_min
369 r_res = 0.5_dp*param%R_min
371 ALLOCATE (s_g(n_aw, 3, 0:la_max, 0:lb_max, 0:lc_max))
374 IF (lc_min == 0)
THEN
375 ALLOCATE (s_g_0(0:la_max + lb_max, 3))
377 alpha_r_0 = zeta*zetb/(zeta + zetb)
378 lmax_0 = la_max + lb_max
379 r_rad_0 =
exp_radius(lmax_0, alpha_r_0, param%sum_precision, 1.0_dp, epsabs=r_res)
381 lgth = abs(hmat(1, 1))
383 lgth = abs(hmat(2, 2))
385 lgth = abs(hmat(3, 3))
390 CALL eri_mme_3c_get_bounds(hmat, h_inv, vol, .true., param%G_min, param%R_min, la_max, lb_max, lc_max, &
391 zeta, zetb, zetc, aw(i_aw), param%sum_precision, n_sum_1d, n_sum_3d, &
392 g_bounds_1, g_rads_1, r_bounds_2, r_rads_2, r_bounds_3, r_rads_3)
393 CALL pgf_sum_3c_1d(s_g(i_aw, 1, :, :, :), ra(1), rb(1), rc(1), &
394 zeta, zetb, zetc, aw(i_aw), abs(hmat(1, 1)), &
397 CALL pgf_sum_3c_1d(s_g(i_aw, 2, :, :, :), ra(2), rb(2), rc(2), &
398 zeta, zetb, zetc, aw(i_aw), abs(hmat(2, 2)), &
401 CALL pgf_sum_3c_1d(s_g(i_aw, 3, :, :, :), ra(3), rb(3), rc(3), &
402 zeta, zetb, zetc, aw(i_aw), abs(hmat(3, 3)), &
405 IF (
PRESENT(rr_count)) rr_count = rr_count + 3
408 CALL eri_mme_3c_collect_ortho(vol, la_min, la_max, lb_min, lb_max, lc_min, lc_max, &
409 zeta, zetb, zetc, n_aw, aw, s_g, s_g_0, prefac, habc, o1, o2, o3)
411 END SUBROUTINE eri_mme_3c_integrate_ortho
436 SUBROUTINE eri_mme_3c_integrate_nonortho(param, la_min, la_max, lb_min, lb_max, lc_min, lc_max, zeta, zetb, zetc, RA, RB, RC, &
437 habc, o1, o2, o3, GG_count, GR_count, RR_count)
440 INTEGER,
INTENT(IN) :: la_min, la_max, lb_min, lb_max, lc_min, &
442 REAL(kind=
dp),
INTENT(IN) :: zeta, zetb, zetc
443 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: ra, rb, rc
444 REAL(kind=
dp),
DIMENSION(:, :, :),
INTENT(INOUT) :: habc
445 INTEGER,
INTENT(IN) :: o1, o2, o3
446 INTEGER,
INTENT(INOUT),
OPTIONAL :: gg_count, gr_count, rr_count
448 INTEGER :: ax, ay, az, bx, by, bz, cx, cy, cz, &
449 grid, i_aw, ico, ir, jco, kco, la, lb, &
450 lc, lmax_0, method, n_aw, nresults, &
452 INTEGER(KIND=int_8),
DIMENSION(3) :: n_sum_3d
453 INTEGER(KIND=int_8),
DIMENSION(3, 3) :: n_sum_1d
454 LOGICAL :: db_sum1, db_sum2, db_sum3, do_g_sum_0
455 REAL(kind=
dp) :: alpha_g_0, alpha_r_0, cutoff, g_rad_0, &
456 g_res, max_error, max_result, &
457 min_result, prefac, r_rad_0, r_res, vol
458 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: results_no, s_g_0_no
459 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: s_g_no, s_g_no_1, s_g_no_2, s_g_no_3, &
461 REAL(kind=
dp),
DIMENSION(2) :: r_rads_3
462 REAL(kind=
dp),
DIMENSION(2, 3) :: r_bounds_3
463 REAL(kind=
dp),
DIMENSION(3) :: g_bound_0, g_rads_1, r_0, r_bound_0, &
465 REAL(kind=
dp),
DIMENSION(3, 3) :: g_bounds_1, h_inv, hmat, r_bounds_2
466 REAL(kind=
dp),
DIMENSION(:),
POINTER :: aw
468 cpassert(param%is_valid)
472 CALL eri_mme_3c_get_rads(la_max, lb_max, lc_max, zeta, zetb, zetc, 0.0_dp, param%G_min, param%R_min, &
473 param%sum_precision, g_rads_1=g_rads_1)
475 cutoff = (min(g_rads_1(1), g_rads_1(2) + g_rads_1(3)))**2/2
482 n_aw = param%minimax_grid(grid)%n_minimax
483 aw => param%minimax_grid(grid)%minimax_aw
491 prefac = (zeta*zetb*zetc)**(-1.5_dp)*
pi**(11.0_dp/2.0_dp)*4.0_dp
493 IF (param%debug)
THEN
500 g_res = 0.5_dp*param%G_min
501 r_res = 0.5_dp*param%R_min
505 s_g_no(:, :, :) = 0.0_dp
506 IF (param%debug)
THEN
507 s_g_no_1(:, :, :) = -1.0_dp
508 s_g_no_2(:, :, :) = -1.0_dp
509 s_g_no_3(:, :, :) = -1.0_dp
514 IF (lc_min == 0)
THEN
515 ALLOCATE (s_g_0_no(
ncoset(la_max + lb_max)))
516 alpha_g_0 = 0.25_dp/zetb + 0.25_dp/zeta
517 alpha_r_0 = 0.25_dp/alpha_g_0
518 lmax_0 = la_max + lb_max
520 g_rad_0 =
exp_radius(lmax_0, alpha_g_0, param%sum_precision, 1.0_dp, epsabs=g_res)
521 r_rad_0 =
exp_radius(lmax_0, alpha_r_0, param%sum_precision, 1.0_dp, epsabs=r_res)
524 do_g_sum_0 = product(2*r_bound_0 + 1) > product(2*g_bound_0 + 1)
533 CALL eri_mme_3c_get_bounds(hmat, h_inv, vol, .false., param%G_min, param%R_min, la_max, lb_max, lc_max, &
534 zeta, zetb, zetc, aw(i_aw), param%sum_precision, n_sum_1d, n_sum_3d, &
535 g_bounds_1, g_rads_1, r_bounds_2, r_rads_2, r_bounds_3, r_rads_3)
536 sum_method = minloc(n_sum_3d, dim=1)
538 CALL pgf_sum_3c_3d(s_g_no_h, la_max, lb_max, lc_max, ra, rb, rc, &
539 zeta, zetb, zetc, aw(i_aw), hmat, h_inv, vol, &
540 g_bounds_1, r_bounds_2, r_bounds_3, &
541 g_rads_1, r_rads_2, r_rads_3, &
542 method=sum_method, method_out=method)
543 s_g_no(:, :, :) = s_g_no(:, :, :) + aw(n_aw + i_aw)*s_g_no_h(:, :, :)
547 IF (
PRESENT(gg_count)) gg_count = gg_count + 1
549 IF (
PRESENT(gr_count)) gr_count = gr_count + 1
551 IF (
PRESENT(rr_count)) rr_count = rr_count + 1
553 CALL cp_abort(__location__, &
554 "Only 1, 2, 3 are supported as method "// &
555 "for eri_mme_3c_integrate_nonortho")
558 IF (param%debug)
THEN
562 db_sum1 = (n_sum_3d(1)) < int(param%debug_nsum, kind=
int_8)
563 db_sum2 = (n_sum_3d(2)) < int(param%debug_nsum, kind=
int_8)
564 db_sum3 = (n_sum_3d(3)) < int(param%debug_nsum, kind=
int_8)
566 IF (param%unit_nr > 0)
THEN
567 WRITE (param%unit_nr, *)
"ERI_MME DEBUG | number of summands (GG / GR / RR)", n_sum_3d
568 WRITE (param%unit_nr, *)
"ERI_MME DEBUG | sum methods to be compared (GG / GR / RR)", db_sum1, db_sum2, db_sum3
571 s_g_no_1(:, :, :) = 0.0_dp
572 s_g_no_2(:, :, :) = 0.0_dp
573 s_g_no_3(:, :, :) = 0.0_dp
576 CALL pgf_sum_3c_3d(s_g_no_1, la_max, lb_max, lc_max, ra, rb, rc, &
577 zeta, zetb, zetc, aw(i_aw), hmat, h_inv, vol, &
578 g_bounds_1, r_bounds_2, r_bounds_3, &
579 g_rads_1, r_rads_2, r_rads_3, &
581 nresults = nresults + 1
585 CALL pgf_sum_3c_3d(s_g_no_2, la_max, lb_max, lc_max, ra, rb, rc, &
586 zeta, zetb, zetc, aw(i_aw), hmat, h_inv, vol, &
587 g_bounds_1, r_bounds_2, r_bounds_3, &
588 g_rads_1, r_rads_2, r_rads_3, &
590 nresults = nresults + 1
594 CALL pgf_sum_3c_3d(s_g_no_3, la_max, lb_max, lc_max, ra, rb, rc, &
595 zeta, zetb, zetc, aw(i_aw), hmat, h_inv, vol, &
596 g_bounds_1, r_bounds_2, r_bounds_3, &
597 g_rads_1, r_rads_2, r_rads_3, &
599 nresults = nresults + 1
603 ALLOCATE (results_no(nresults))
606 CALL get_l(kco, lc, cx, cy, cz)
608 CALL get_l(jco, lb, bx, by, bz)
610 CALL get_l(ico, la, ax, ay, az)
616 results_no(ir) = s_g_no_1(ico, jco, kco)
621 results_no(ir) = s_g_no_2(ico, jco, kco)
626 results_no(ir) = s_g_no_3(ico, jco, kco)
629 max_result = maxval(results_no)
630 min_result = minval(results_no)
631 IF (nresults > 0) max_error = max(max_error, &
632 (max_result - min_result)/(0.5_dp*(abs(max_result) + abs(min_result)) + 1.0_dp))
637 cpassert(max_error <= param%debug_delta)
638 DEALLOCATE (results_no)
644 CALL eri_mme_3c_collect_nonortho(vol, la_min, la_max, lb_min, lb_max, lc_min, lc_max, &
645 zeta, zetb, zetc, n_aw, aw, s_g_no, s_g_0_no, prefac, habc, o1, o2, o3)
647 END SUBROUTINE eri_mme_3c_integrate_nonortho
671 SUBROUTINE eri_mme_3c_collect_ortho(vol, la_min, la_max, lb_min, lb_max, lc_min, lc_max, &
672 zeta, zetb, zetc, n_aw, aw, S_G, S_G_0, prefac, habc, o1, o2, o3)
673 REAL(kind=
dp),
INTENT(IN) :: vol
674 INTEGER,
INTENT(IN) :: la_min, la_max, lb_min, lb_max, lc_min, &
676 REAL(kind=
dp),
INTENT(IN) :: zeta, zetb, zetc
677 INTEGER,
INTENT(IN) :: n_aw
678 REAL(kind=
dp),
DIMENSION(2*n_aw),
INTENT(IN) :: aw
679 REAL(kind=
dp),
DIMENSION(:, :, 0:, 0:, 0:), &
681 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :), &
683 REAL(kind=
dp),
INTENT(IN) :: prefac
684 REAL(kind=
dp),
DIMENSION(:, :, :),
INTENT(INOUT) :: habc
685 INTEGER,
INTENT(IN) :: o1, o2, o3
687 INTEGER :: ax, ay, az, bx, by, bz, cx, cy, cz, ico, &
688 jco, kco, la, la_prev, lb, lb_prev, &
690 REAL(kind=
dp) :: imm, ixyz_0, mone_lb, resc_a, &
691 resc_a_init, resc_b, resc_b_init, &
695 resc_a_init = (2.0_dp*zeta)**la_min
696 resc_b_init = (2.0_dp*zetb)**lb_min
697 resc_c_init = (2.0_dp*zetc)**lc_min
702 CALL get_l(kco, lc, cx, cy, cz)
703 IF (lc_prev < lc) resc_c = resc_c*(2.0_dp*zetc)
708 CALL get_l(jco, lb, bx, by, bz)
709 mone_lb = (-1.0_dp)**lb
710 IF (lb_prev < lb) resc_b = resc_b*(2.0_dp*zetb)
715 CALL get_l(ico, la, ax, ay, az)
717 IF (la_prev < la) resc_a = resc_a*(2.0_dp*zeta)
720 ixyz_0 = s_g_0(ax + bx, 1)* &
725 imm = sum(aw(n_aw + 1:2*n_aw)*( &
726 s_g(1:n_aw, 1, ax, bx, cx)* &
727 s_g(1:n_aw, 2, ay, by, cy)* &
728 s_g(1:n_aw, 3, az, bz, cz)) - ixyz_0)
731 habc(o1 + ico, o2 + jco, o3 + kco) = imm*prefac/(resc_a*resc_b*resc_c)
739 END SUBROUTINE eri_mme_3c_collect_ortho
763 PURE SUBROUTINE eri_mme_3c_collect_nonortho(vol, la_min, la_max, lb_min, lb_max, lc_min, lc_max, &
764 zeta, zetb, zetc, n_aw, aw, S_G, S_G_0, prefac, habc, o1, o2, o3)
765 REAL(kind=
dp),
INTENT(IN) :: vol
766 INTEGER,
INTENT(IN) :: la_min, la_max, lb_min, lb_max, lc_min, &
768 REAL(kind=
dp),
INTENT(IN) :: zeta, zetb, zetc
769 INTEGER,
INTENT(IN) :: n_aw
770 REAL(kind=
dp),
DIMENSION(2*n_aw),
INTENT(IN) :: aw
771 REAL(kind=
dp),
DIMENSION(:, :, :),
INTENT(IN) :: s_g
772 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:), &
774 REAL(kind=
dp),
INTENT(IN) :: prefac
775 REAL(kind=
dp),
DIMENSION(:, :, :),
INTENT(INOUT) :: habc
776 INTEGER,
INTENT(IN) :: o1, o2, o3
778 INTEGER :: ax, ay, az, bx, by, bz, cx, cy, cz, ico, &
779 ijco, jco, kco, la, la_prev, lb, &
781 REAL(kind=
dp) :: imm, mone_lb, resc_a, resc_a_init, &
782 resc_b, resc_b_init, resc_c, &
786 resc_a_init = (2.0_dp*zeta)**la_min
787 resc_b_init = (2.0_dp*zetb)**lb_min
788 resc_c_init = (2.0_dp*zetc)**lc_min
793 CALL get_l(kco, lc, cx, cy, cz)
794 IF (lc_prev < lc) resc_c = resc_c*(2.0_dp*zetc)
799 CALL get_l(jco, lb, bx, by, bz)
800 mone_lb = (-1.0_dp)**lb
801 IF (lb_prev < lb) resc_b = resc_b*(2.0_dp*zetb)
806 CALL get_l(ico, la, ax, ay, az)
808 IF (la_prev < la) resc_a = resc_a*(2.0_dp*zeta)
810 imm = s_g(ico, jco, kco)
812 ijco =
coset(ax + bx, ay + by, az + bz)
813 imm = s_g(ico, jco, kco) - sum(aw(n_aw + 1:2*n_aw))*s_g_0(ijco)/vol*mone_lb
817 habc(o1 + ico, o2 + jco, o3 + kco) = imm*prefac/(resc_a*resc_b*resc_c)
825 END SUBROUTINE eri_mme_3c_collect_nonortho
All kind of helpful little routines.
real(kind=dp) function, public exp_radius(l, alpha, threshold, prefactor, epsabs, epsrel, rlow)
The radius of a primitive Gaussian function for a given threshold is calculated. g(r) = prefactor*r**...
Methods related to properties of Hermite and Cartesian Gaussian functions.
pure real(kind=dp) function, public hermite_gauss_norm(zet, l)
Norm of 1d Hermite-Gauss functions.
Minimax-Ewald (MME) method for calculating 2-center and 3-center electron repulsion integrals (ERI) o...
subroutine, public eri_mme_3c_integrate(param, la_min, la_max, lb_min, lb_max, lc_min, lc_max, zeta, zetb, zetc, ra, rb, rc, habc, o1, o2, o3, gg_count, gr_count, rr_count)
Low-level integration routine for 3-center ERIs.
subroutine, public eri_mme_2c_integrate(param, la_min, la_max, lb_min, lb_max, zeta, zetb, rab, hab, o1, o2, g_count, r_count, normalize, potential, pot_par)
Low-level integration routine for 2-center ERIs.
Ewald sums to represent integrals in direct and reciprocal lattice.
pure subroutine, public pgf_sum_2c_gspace_1d(s_g, r, alpha, inv_lgth, g_c)
Compute Ewald-like sum for 2-center ERIs in G space in 1 dimension S_G(l, alpha) = (-i)^l*inv_lgth*su...
subroutine, public eri_mme_2c_get_bounds(hmat, h_inv, vol, is_ortho, g_min, r_min, la_max, lb_max, zeta, zetb, a_mm, sum_precision, n_sum_1d, n_sum_3d, g_bounds, g_rad, r_bounds, r_rad)
Get summation bounds for 2c integrals.
pure elemental subroutine, public get_l(lco, l, lx, ly, lz)
...
subroutine, public pgf_sum_3c_3d(s_g, la_max, lb_max, lc_max, ra, rb, rc, zeta, zetb, zetc, a_mm, hmat, h_inv, vol, g_bounds_1, r_bounds_2, r_bounds_3, g_rads_1, r_rads_2, r_rads_3, method, method_out, order)
As pgf_sum_3c_1d but 3d sum required for non-orthorhombic cells.
pure subroutine, public pgf_sum_2c_rspace_3d(s_r, l_max, r, alpha, hmat, h_inv, r_c, r_rad)
As pgf_sum_2c_rspace_1d but 3d sum required for non-orthorhombic cells.
pure subroutine, public pgf_sum_2c_gspace_3d(s_g, l_max, r, alpha, h_inv, g_c, g_rad, vol, potential, pot_par)
As pgf_sum_2c_gspace_1d but 3d sum required for non-orthorhombic cells.
subroutine, public eri_mme_3c_get_rads(la_max, lb_max, lc_max, zeta, zetb, zetc, a_mm, g_min, r_min, sum_precision, g_rads_1, r_rads_2, r_rads_3)
Get summation radii for 3c integrals.
subroutine, public pgf_sum_3c_1d(s_g, ra, rb, rc, zeta, zetb, zetc, a_mm, lgth, r_bounds_3)
Compute Ewald-like sum for 3-center integrals in 1 dimension S_G(l, m, n, alpha, beta,...
subroutine, public eri_mme_2c_get_rads(la_max, lb_max, zeta, zetb, a_mm, g_min, r_min, sum_precision, g_rad, r_rad)
Get summation radii for 2c integrals.
pure real(kind=dp) function, dimension(3), public ellipsoid_bounds(s_rad, s_to_e)
Compute bounding box for ellipsoid. This is needed in order to find summation bounds for sphere for s...
subroutine, public eri_mme_3c_get_bounds(hmat, h_inv, vol, is_ortho, g_min, r_min, la_max, lb_max, lc_max, zeta, zetb, zetc, a_mm, sum_precision, n_sum_1d, n_sum_3d, g_bounds_1, g_rads_1, r_bounds_2, r_rads_2, r_bounds_3, r_rads_3)
Get summation bounds for 3c integrals.
pure subroutine, public pgf_sum_2c_rspace_1d(s_r, r, alpha, lgth, r_c)
Compute Ewald-like sum for 2-center ERIs in R space in 1 dimension S_R(l, alpha) = SQRT(alpha/pi) sum...
Types and initialization / release routines for Minimax-Ewald method for electron repulsion integrals...
subroutine, public get_minimax_from_cutoff(grids, cutoff, n_minimax, minimax_aw, grid_no)
...
Defines the basic variable types.
integer, parameter, public int_8
integer, parameter, public dp
Definition of mathematical constants and functions.
real(kind=dp), parameter, public pi
real(kind=dp), parameter, public twopi
Provides Cartesian and spherical orbital pointers and indices.
integer, dimension(:), allocatable, public ncoset
integer, dimension(:, :, :), allocatable, public coset