23 eri4_pgf_product_type,&
34#include "./base/base_uses.f90"
60 SUBROUTINE build_pgf_product_list(list1, list2, product_list, nproducts, &
61 log10_pmax, log10_eps_schwarz, neighbor_cells, &
62 cell, potential_parameter, m_max, do_periodic)
65 TYPE(eri4_pgf_product_type),
ALLOCATABLE, &
66 DIMENSION(:),
INTENT(INOUT) :: product_list
67 INTEGER,
INTENT(OUT) :: nproducts
68 REAL(
dp),
INTENT(IN) :: log10_pmax, log10_eps_schwarz
72 INTEGER,
INTENT(IN) :: m_max
73 LOGICAL,
INTENT(IN) :: do_periodic
75 REAL(
dp),
PARAMETER :: r_cutoff_eps = 1.0e-12_dp
77 INTEGER :: i, j, k, k_max, nimages1, nimages2, &
79 LOGICAL :: has_r_cutoff
80 REAL(
dp) :: c11(3), etainv, min_img_delta, p(3), pgf_max_1, pgf_max_2, pq(3), pq2, q(3), r1, &
81 r2, r_cutoff_sq, r_cutoff_sq_guard, rc(3), rcut_eff, rd(3), rpq2, s1234, s1234a, s1234b, &
82 shift(3), temp(3), temp_cc(3), temp_dd(3), tmp_d(3), zeta_c, zeta_d
84 TYPE(eri4_pgf_product_type) :: product
85 TYPE(eri4_pgf_product_type),
ALLOCATABLE, &
86 DIMENSION(:) :: tmp_product_list
88 nimages1 = list1%nimages
89 nimages2 = list2%nimages
91 IF (nimages1 == 0 .OR. nimages2 == 0)
RETURN
93 etainv = list2%ZetaInv
99 r_cutoff_sq_guard = 0.0_dp
100 SELECT CASE (potential_parameter%potential_type)
102 has_r_cutoff = .true.
103 rcut_eff = potential_parameter%cutoff_radius
105 has_r_cutoff = .true.
106 rcut_eff = potential_parameter%cutoff_radius*2.0_dp
108 has_r_cutoff = .false.
112 p = list1%image_list(i)%P
113 r1 = list1%image_list(i)%R
114 s1234a = list1%image_list(i)%S1234
115 pgf_max_1 = list1%image_list(i)%pgf_max
117 pgf_max_2 = list2%image_list(j)%pgf_max
118 IF (pgf_max_1 + pgf_max_2 + log10_pmax < log10_eps_schwarz) cycle
119 q = list2%image_list(j)%P
120 r2 = list2%image_list(j)%R
121 s1234b = list2%image_list(j)%S1234
122 rc = list2%image_list(j)%ra
123 rd = list2%image_list(j)%rb
125 IF (has_r_cutoff)
THEN
126 r_cutoff_sq = (r1 + r2 + rcut_eff)**2
127 r_cutoff_sq_guard = r_cutoff_sq*(1.0_dp + r_cutoff_eps)
129 k_max =
SIZE(neighbor_cells)
130 IF (do_periodic)
THEN
133 IF (has_r_cutoff .AND. cell%orthorhombic .AND. all(cell%perd == 1) .AND. k_max >= 1)
THEN
134 IF (all(neighbor_cells(1)%cell_r == 0.0_dp))
THEN
135 pq2 = pq(1)**2 + pq(2)**2 + pq(3)**2
136 IF (pq2 > r_cutoff_sq_guard) cycle
138 IF (min_img_delta >= 0.0_dp .AND. pq2 + min_img_delta > r_cutoff_sq_guard) k_max = 1
146 s1234 = exp(s1234a + s1234b)
149 IF (do_periodic)
THEN
150 IF (has_r_cutoff .AND. k_max > 1)
THEN
151 IF ((pq(1) - neighbor_cells(k)%cell_r(1))**2 + &
152 (pq(2) - neighbor_cells(k)%cell_r(2))**2 + &
153 (pq(3) - neighbor_cells(k)%cell_r(3))**2 > r_cutoff_sq_guard) cycle
155 c11 = temp_cc + neighbor_cells(k)%cell_r(:)
156 tmp_d = temp_dd + neighbor_cells(k)%cell_r(:)
161 q = (zeta_c*c11 + zeta_d*tmp_d)*etainv
162 rpq2 = (p(1) - q(1))**2 + (p(2) - q(2))**2 + (p(3) - q(3))**2
163 IF (has_r_cutoff)
THEN
164 IF (rpq2 > r_cutoff_sq) cycle
166 nproducts = nproducts + 1
170 IF (nproducts >
SIZE(product_list))
THEN
176 ALLOCATE (tmp_product_list(
SIZE(product_list)))
177 tmp_product_list(:) = product_list
178 DEALLOCATE (product_list)
179 ALLOCATE (product_list(tmp_i4))
180 product_list(1:
SIZE(tmp_product_list)) = tmp_product_list
181 DEALLOCATE (tmp_product_list)
184 shifted_image%ra = c11
185 shifted_image%rb = tmp_d
188 potential_parameter, product_list(nproducts))
193 END SUBROUTINE build_pgf_product_list
216 SUBROUTINE build_pair_list_pgf(npgfa, npgfb, list, zeta, zetb, screen1, screen2, pgf, R_pgf, &
217 log10_pmax, log10_eps_schwarz, ra, rb, nelements, &
218 neighbor_cells, nimages, do_periodic, cell)
219 INTEGER,
INTENT(IN) :: npgfa, npgfb
221 REAL(
dp),
DIMENSION(1:npgfa),
INTENT(IN) :: zeta
222 REAL(
dp),
DIMENSION(1:npgfb),
INTENT(IN) :: zetb
223 REAL(
dp),
INTENT(IN) :: screen1(2), screen2(2)
225 POINTER :: pgf, r_pgf
226 REAL(
dp),
INTENT(IN) :: log10_pmax, log10_eps_schwarz, ra(3), &
228 INTEGER,
INTENT(OUT) :: nelements
230 INTEGER :: nimages(npgfa*npgfb)
231 LOGICAL,
INTENT(IN) :: do_periodic
234 REAL(
dp),
PARAMETER :: min_img_eps = 1.0e-12_dp
236 INTEGER :: element_counter, i, i_max, ipgf, j, jpgf
237 REAL(
dp) :: ab(3), im_b(3), min_img_delta, pgf_max, &
240 i_max =
SIZE(neighbor_cells)
241 IF (do_periodic)
THEN
242 IF (cell%orthorhombic .AND. screen1(1) <= 0.0_dp .AND. i_max > 1)
THEN
243 IF (all(cell%perd == 1) .AND. all(neighbor_cells(1)%cell_r == 0.0_dp))
THEN
245 rab2 = ab(1)**2 + ab(2)**2 + ab(3)**2
247 IF (min_img_delta >= 0.0_dp)
THEN
248 IF (screen1(1)*rab2 + screen1(2) + screen2(2) + log10_pmax < log10_eps_schwarz)
THEN
252 IF (screen1(1)*(rab2 + min_img_delta)*(1.0_dp - min_img_eps) + &
253 screen1(2) + screen2(2) + log10_pmax < log10_eps_schwarz) i_max = 1
258 i_max = min(i_max, 1)
262 nelements = npgfa*npgfb
264 IF (do_periodic)
THEN
265 im_b = rb + neighbor_cells(i)%cell_r(:)
270 rab2 = ab(1)**2 + ab(2)**2 + ab(3)**2
271 IF (screen1(1)*rab2 + screen1(2) + screen2(2) + log10_pmax < log10_eps_schwarz) cycle
275 element_counter = element_counter + 1
276 pgf_max = pgf(jpgf, ipgf)%x(1)*rab2 + pgf(jpgf, ipgf)%x(2)
277 IF (pgf_max + screen2(2) + log10_pmax < log10_eps_schwarz)
THEN
280 nimages(element_counter) = nimages(element_counter) + 1
281 list(element_counter)%image_list(nimages(element_counter))%pgf_max = pgf_max
283 list(element_counter),
list(element_counter)%image_list(nimages(element_counter)))
284 IF (nimages(element_counter) == 1)
THEN
285 list(element_counter)%ipgf = ipgf
286 list(element_counter)%jpgf = jpgf
289 list(element_counter)%image_list(nimages(element_counter))%R = &
290 max(0.0_dp, r_pgf(jpgf, ipgf)%x(1)*rab2 + r_pgf(jpgf, ipgf)%x(2))
291 list(element_counter)%image_list(nimages(element_counter))%bcell = neighbor_cells(i)%cell
294 nelements = max(nelements, element_counter)
297 list(j)%nimages = nimages(j)
303 IF (
list(j)%nimages == 0) cycle
304 element_counter = element_counter + 1
305 list(element_counter)%nimages =
list(j)%nimages
306 list(element_counter)%zetapzetb =
list(j)%zetapzetb
307 list(element_counter)%ZetaInv =
list(j)%ZetaInv
308 list(element_counter)%zeta =
list(j)%zeta
309 list(element_counter)%zetb =
list(j)%zetb
310 list(element_counter)%ipgf =
list(j)%ipgf
311 list(element_counter)%jpgf =
list(j)%jpgf
312 DO i = 1,
list(j)%nimages
313 list(element_counter)%image_list(i) =
list(j)%image_list(i)
317 nelements = element_counter
319 END SUBROUTINE build_pair_list_pgf
330 REAL(
dp),
DIMENSION(3),
INTENT(IN) :: r
331 REAL(
dp),
DIMENSION(3, 3),
INTENT(IN) :: hmat
334 REAL(
dp),
DIMENSION(3) :: cell_len
336 cell_len = [abs(hmat(1, 1)), abs(hmat(2, 2)), abs(hmat(3, 3))]
337 gap = minval(cell_len*(cell_len - 2.0_dp*abs(r)))
420 SUBROUTINE coulomb4(context, ra, rb, rc, rd, npgfa, npgfb, npgfc, npgfd, &
421 la_min, la_max, lb_min, lb_max, &
422 lc_min, lc_max, ld_min, ld_max, nsgfa, nsgfb, nsgfc, nsgfd, &
423 sphi_a_u1, sphi_a_u2, sphi_a_u3, &
424 sphi_b_u1, sphi_b_u2, sphi_b_u3, &
425 sphi_c_u1, sphi_c_u2, sphi_c_u3, &
426 sphi_d_u1, sphi_d_u2, sphi_d_u3, &
427 zeta, zetb, zetc, zetd, &
428 primitive_integrals, &
429 potential_parameter, neighbor_cells, &
430 screen1, screen2, eps_schwarz, max_contraction_val, &
431 cart_estimate, cell, neris_tmp, log10_pmax, &
432 log10_eps_schwarz, R1_pgf, R2_pgf, pgf1, pgf2, &
433 pgf_list_ij, pgf_list_kl, &
435 nsgfl_a, nsgfl_b, nsgfl_c, &
437 sphi_a_ext, sphi_b_ext, sphi_c_ext, sphi_d_ext, &
438 ee_work, ee_work2, ee_buffer1, ee_buffer2, ee_primitives_tmp, &
439 nimages, do_periodic)
442 REAL(
dp),
INTENT(IN) :: ra(3), rb(3), rc(3), rd(3)
443 INTEGER,
INTENT(IN) :: npgfa, npgfb, npgfc, npgfd, la_min, la_max, lb_min, lb_max, lc_min, &
444 lc_max, ld_min, ld_max, nsgfa, nsgfb, nsgfc, nsgfd, sphi_a_u1, sphi_a_u2, sphi_a_u3, &
445 sphi_b_u1, sphi_b_u2, sphi_b_u3, sphi_c_u1, sphi_c_u2, sphi_c_u3, sphi_d_u1, sphi_d_u2, &
447 REAL(
dp),
DIMENSION(1:npgfa),
INTENT(IN) :: zeta
448 REAL(
dp),
DIMENSION(1:npgfb),
INTENT(IN) :: zetb
449 REAL(
dp),
DIMENSION(1:npgfc),
INTENT(IN) :: zetc
450 REAL(
dp),
DIMENSION(1:npgfd),
INTENT(IN) :: zetd
451 REAL(
dp),
DIMENSION(nsgfa, nsgfb, nsgfc, nsgfd) :: primitive_integrals
454 REAL(
dp),
INTENT(IN) :: screen1(2), screen2(2), eps_schwarz, &
456 REAL(
dp) :: cart_estimate
458 INTEGER(int_8) :: neris_tmp
459 REAL(
dp),
INTENT(IN) :: log10_pmax, log10_eps_schwarz
461 POINTER :: r1_pgf, r2_pgf, pgf1, pgf2
463 TYPE(eri4_pgf_product_type),
ALLOCATABLE, &
464 DIMENSION(:),
INTENT(INOUT) :: pgf_product_list
465 INTEGER,
DIMENSION(0:),
INTENT(IN) :: nsgfl_a, nsgfl_b, nsgfl_c, nsgfl_d
466 REAL(
dp),
INTENT(IN) :: sphi_a_ext(sphi_a_u1, sphi_a_u2, sphi_a_u3), &
467 sphi_b_ext(sphi_b_u1, sphi_b_u2, sphi_b_u3), sphi_c_ext(sphi_c_u1, sphi_c_u2, sphi_c_u3), &
468 sphi_d_ext(sphi_d_u1, sphi_d_u2, sphi_d_u3)
469 REAL(
dp),
DIMENSION(*) :: ee_work, ee_work2, ee_buffer1, &
470 ee_buffer2, ee_primitives_tmp
471 INTEGER,
DIMENSION(*) :: nimages
472 LOGICAL,
INTENT(IN) :: do_periodic
474 INTEGER :: ipgf, jpgf, kpgf, la, lb, lc, ld, list_ij, list_kl, lpgf, max_l, ncoa, ncob, &
475 ncoc, ncod, nelements_ij, nelements_kl, nproducts, nsgfla, nsgflb, nsgflc, nsgfld, nsoa, &
476 nsob, nsoc, nsod, s_offset_a, s_offset_b, s_offset_c, s_offset_d
479 cart_estimate = 0.0_dp
481 primitive_integrals = 0.0_dp
483 CALL build_pair_list_pgf(npgfa, npgfb, pgf_list_ij, zeta, zetb, screen1, screen2, &
484 pgf1, r1_pgf, log10_pmax, log10_eps_schwarz, ra, rb, &
486 neighbor_cells, nimages, do_periodic, cell)
487 IF (nelements_ij == 0)
RETURN
488 CALL build_pair_list_pgf(npgfc, npgfd, pgf_list_kl, zetc, zetd, screen2, screen1, &
489 pgf2, r2_pgf, log10_pmax, log10_eps_schwarz, rc, rd, &
491 neighbor_cells, nimages, do_periodic, cell)
492 IF (nelements_kl == 0)
RETURN
494 max_l = la_max + lb_max + lc_max + ld_max
496 DO list_ij = 1, nelements_ij
497 ipgf = pgf_list_ij(list_ij)%ipgf
498 jpgf = pgf_list_ij(list_ij)%jpgf
500 DO list_kl = 1, nelements_kl
501 kpgf = pgf_list_kl(list_kl)%ipgf
502 lpgf = pgf_list_kl(list_kl)%jpgf
504 CALL build_pgf_product_list(pgf_list_ij(list_ij), pgf_list_kl(list_kl), pgf_product_list, &
505 nproducts, log10_pmax, log10_eps_schwarz, neighbor_cells, cell, &
506 potential_parameter, max_l, do_periodic)
507 IF (nproducts == 0) cycle
510 DO la = la_min, la_max
516 DO lb = lb_min, lb_max
522 DO lc = lc_min, lc_max
528 DO ld = ld_min, ld_max
534 CALL evaluate_eri(context, nproducts, pgf_product_list, &
536 ncoa, ncob, ncoc, ncod, &
537 nsgfa, nsgfb, nsgfc, nsgfd, &
538 primitive_integrals, &
539 max_contraction_val, tmp_max, eps_schwarz, &
541 s_offset_a, s_offset_b, s_offset_c, s_offset_d, &
542 nsgfla, nsgflb, nsgflc, nsgfld, nsoa, nsob, nsoc, nsod, &
543 sphi_a_ext(1, la + 1, ipgf), &
544 sphi_b_ext(1, lb + 1, jpgf), &
545 sphi_c_ext(1, lc + 1, kpgf), &
546 sphi_d_ext(1, ld + 1, lpgf), &
547 ee_work, ee_work2, ee_buffer1, ee_buffer2, ee_primitives_tmp)
548 cart_estimate = max(tmp_max, cart_estimate)
549 s_offset_d = s_offset_d + nsod*nsgfld
551 s_offset_c = s_offset_c + nsoc*nsgflc
553 s_offset_b = s_offset_b + nsob*nsgflb
555 s_offset_a = s_offset_a + nsoa*nsgfla
643 SUBROUTINE forces4(context, ra, rb, rc, rd, npgfa, npgfb, npgfc, npgfd, &
644 la_min, la_max, lb_min, lb_max, &
645 lc_min, lc_max, ld_min, ld_max, nsgfa, nsgfb, nsgfc, nsgfd, &
646 sphi_a_u1, sphi_a_u2, sphi_a_u3, &
647 sphi_b_u1, sphi_b_u2, sphi_b_u3, &
648 sphi_c_u1, sphi_c_u2, sphi_c_u3, &
649 sphi_d_u1, sphi_d_u2, sphi_d_u3, &
650 zeta, zetb, zetc, zetd, &
651 primitive_integrals, &
652 potential_parameter, neighbor_cells, &
653 screen1, screen2, eps_schwarz, max_contraction_val, &
654 cart_estimate, cell, neris_tmp, log10_pmax, &
655 log10_eps_schwarz, R1_pgf, R2_pgf, pgf1, pgf2, &
656 pgf_list_ij, pgf_list_kl, &
658 nsgfl_a, nsgfl_b, nsgfl_c, &
660 sphi_a_ext, sphi_b_ext, sphi_c_ext, sphi_d_ext, &
661 ede_work, ede_work2, ede_work_forces, &
662 ede_buffer1, ede_buffer2, ede_primitives_tmp, &
663 nimages, do_periodic, use_virial, ede_work_virial, &
664 ede_work2_virial, ede_primitives_tmp_virial, primitive_integrals_virial, &
665 cart_estimate_virial)
668 REAL(
dp),
INTENT(IN) :: ra(3), rb(3), rc(3), rd(3)
669 INTEGER,
INTENT(IN) :: npgfa, npgfb, npgfc, npgfd, la_min, la_max, lb_min, lb_max, lc_min, &
670 lc_max, ld_min, ld_max, nsgfa, nsgfb, nsgfc, nsgfd, sphi_a_u1, sphi_a_u2, sphi_a_u3, &
671 sphi_b_u1, sphi_b_u2, sphi_b_u3, sphi_c_u1, sphi_c_u2, sphi_c_u3, sphi_d_u1, sphi_d_u2, &
673 REAL(
dp),
DIMENSION(1:npgfa),
INTENT(IN) :: zeta
674 REAL(
dp),
DIMENSION(1:npgfb),
INTENT(IN) :: zetb
675 REAL(
dp),
DIMENSION(1:npgfc),
INTENT(IN) :: zetc
676 REAL(
dp),
DIMENSION(1:npgfd),
INTENT(IN) :: zetd
678 DIMENSION(nsgfa, nsgfb, nsgfc, nsgfd, 12) :: primitive_integrals
681 REAL(
dp),
INTENT(IN) :: screen1(2), screen2(2), eps_schwarz, &
683 REAL(
dp) :: cart_estimate
685 INTEGER(int_8) :: neris_tmp
686 REAL(
dp),
INTENT(IN) :: log10_pmax, log10_eps_schwarz
688 POINTER :: r1_pgf, r2_pgf, pgf1, pgf2
690 TYPE(eri4_pgf_product_type),
ALLOCATABLE, &
691 DIMENSION(:),
INTENT(INOUT) :: pgf_product_list
692 INTEGER,
DIMENSION(0:),
INTENT(IN) :: nsgfl_a, nsgfl_b, nsgfl_c, nsgfl_d
693 REAL(
dp),
INTENT(IN) :: sphi_a_ext(sphi_a_u1, sphi_a_u2, sphi_a_u3), &
694 sphi_b_ext(sphi_b_u1, sphi_b_u2, sphi_b_u3), sphi_c_ext(sphi_c_u1, sphi_c_u2, sphi_c_u3), &
695 sphi_d_ext(sphi_d_u1, sphi_d_u2, sphi_d_u3)
696 REAL(
dp),
DIMENSION(*) :: ede_work, ede_work2, ede_work_forces, &
697 ede_buffer1, ede_buffer2, &
699 INTEGER,
DIMENSION(*) :: nimages
700 LOGICAL,
INTENT(IN) :: do_periodic, use_virial
701 REAL(
dp),
DIMENSION(*) :: ede_work_virial, ede_work2_virial, &
702 ede_primitives_tmp_virial
704 DIMENSION(nsgfa, nsgfb, nsgfc, nsgfd, 12, 3) :: primitive_integrals_virial
705 REAL(
dp) :: cart_estimate_virial
707 INTEGER :: ipgf, jpgf, kpgf, la, lb, lc, ld, list_ij, list_kl, lpgf, max_l, ncoa, ncob, &
708 ncoc, ncod, nelements_ij, nelements_kl, nproducts, nsgfla, nsgflb, nsgflc, nsgfld, nsoa, &
709 nsob, nsoc, nsod, s_offset_a, s_offset_b, s_offset_c, s_offset_d
710 REAL(
dp) :: tmp_max, tmp_max_virial
712 cart_estimate = 0.0_dp
713 primitive_integrals = 0.0_dp
715 primitive_integrals_virial = 0.0_dp
716 cart_estimate_virial = 0.0_dp
720 CALL build_pair_list_pgf(npgfa, npgfb, pgf_list_ij, zeta, zetb, screen1, screen2, &
721 pgf1, r1_pgf, log10_pmax, log10_eps_schwarz, ra, rb, &
723 neighbor_cells, nimages, do_periodic, cell)
724 IF (nelements_ij == 0)
RETURN
725 CALL build_pair_list_pgf(npgfc, npgfd, pgf_list_kl, zetc, zetd, screen2, screen1, &
726 pgf2, r2_pgf, log10_pmax, log10_eps_schwarz, rc, rd, &
728 neighbor_cells, nimages, do_periodic, cell)
729 IF (nelements_kl == 0)
RETURN
731 max_l = la_max + lb_max + lc_max + ld_max + 1
732 DO list_ij = 1, nelements_ij
733 ipgf = pgf_list_ij(list_ij)%ipgf
734 jpgf = pgf_list_ij(list_ij)%jpgf
736 DO list_kl = 1, nelements_kl
737 kpgf = pgf_list_kl(list_kl)%ipgf
738 lpgf = pgf_list_kl(list_kl)%jpgf
740 CALL build_pgf_product_list(pgf_list_ij(list_ij), pgf_list_kl(list_kl), pgf_product_list, &
741 nproducts, log10_pmax, log10_eps_schwarz, neighbor_cells, cell, &
742 potential_parameter, max_l, do_periodic)
743 IF (nproducts == 0) cycle
745 DO la = la_min, la_max
751 DO lb = lb_min, lb_max
757 DO lc = lc_min, lc_max
763 DO ld = ld_min, ld_max
768 tmp_max_virial = 0.0_dp
771 ncoa, ncob, ncoc, ncod, &
772 nsgfa, nsgfb, nsgfc, nsgfd, &
773 primitive_integrals, &
774 max_contraction_val, tmp_max, eps_schwarz, neris_tmp, &
775 s_offset_a, s_offset_b, s_offset_c, s_offset_d, &
776 nsgfla, nsgflb, nsgflc, nsgfld, nsoa, nsob, nsoc, nsod, &
777 sphi_a_ext(1, la + 1, ipgf), &
778 sphi_b_ext(1, lb + 1, jpgf), &
779 sphi_c_ext(1, lc + 1, kpgf), &
780 sphi_d_ext(1, ld + 1, lpgf), &
781 ede_work, ede_work2, ede_work_forces, &
782 ede_buffer1, ede_buffer2, ede_primitives_tmp, use_virial, &
783 ede_work_virial, ede_work2_virial, ede_primitives_tmp_virial, &
784 primitive_integrals_virial, cell, tmp_max_virial)
785 cart_estimate = max(tmp_max, cart_estimate)
786 IF (use_virial) cart_estimate_virial = max(tmp_max_virial, cart_estimate_virial)
787 s_offset_d = s_offset_d + nsod*nsgfld
789 s_offset_c = s_offset_c + nsoc*nsgflc
791 s_offset_b = s_offset_b + nsob*nsgflb
793 s_offset_a = s_offset_a + nsoa*nsgfla
Handles all functions related to the CELL.
Four-center integral evaluation with an encapsulated Libint backend.
subroutine, public evaluate_deriv_eri(context, nproducts, pgf_product_list, n_a, n_b, n_c, n_d, ncoa, ncob, ncoc, ncod, nsgfa, nsgfb, nsgfc, nsgfd, primitives, max_contraction, tmp_max_all, eps_schwarz, neris, s_offset_a, s_offset_b, s_offset_c, s_offset_d, nl_a, nl_b, nl_c, nl_d, nsoa, nsob, nsoc, nsod, sphi_a, sphi_b, sphi_c, sphi_d, work, work2, work_forces, buffer1, buffer2, primitives_tmp, use_virial, work_virial, work2_virial, primitives_tmp_virial, primitives_virial, cell, tmp_max_all_virial)
Evaluates derivatives of electron repulsion integrals for a primitive quartet.
subroutine, public evaluate_eri(context, nproducts, pgf_product_list, n_a, n_b, n_c, n_d, ncoa, ncob, ncoc, ncod, nsgfa, nsgfb, nsgfc, nsgfd, primitives, max_contraction, tmp_max, eps_schwarz, neris, s_offset_a, s_offset_b, s_offset_c, s_offset_d, nl_a, nl_b, nl_c, nl_d, nsoa, nsob, nsoc, nsod, sphi_a, sphi_b, sphi_c, sphi_d, work, work2, buffer1, buffer2, primitives_tmp)
Evaluate electron repulsion integrals for a primitive quartet.
Prepare and evaluate screened four-center Gaussian integrals and derivatives.
subroutine, public forces4(context, ra, rb, rc, rd, npgfa, npgfb, npgfc, npgfd, la_min, la_max, lb_min, lb_max, lc_min, lc_max, ld_min, ld_max, nsgfa, nsgfb, nsgfc, nsgfd, sphi_a_u1, sphi_a_u2, sphi_a_u3, sphi_b_u1, sphi_b_u2, sphi_b_u3, sphi_c_u1, sphi_c_u2, sphi_c_u3, sphi_d_u1, sphi_d_u2, sphi_d_u3, zeta, zetb, zetc, zetd, primitive_integrals, potential_parameter, neighbor_cells, screen1, screen2, eps_schwarz, max_contraction_val, cart_estimate, cell, neris_tmp, log10_pmax, log10_eps_schwarz, r1_pgf, r2_pgf, pgf1, pgf2, pgf_list_ij, pgf_list_kl, pgf_product_list, nsgfl_a, nsgfl_b, nsgfl_c, nsgfl_d, sphi_a_ext, sphi_b_ext, sphi_c_ext, sphi_d_ext, ede_work, ede_work2, ede_work_forces, ede_buffer1, ede_buffer2, ede_primitives_tmp, nimages, do_periodic, use_virial, ede_work_virial, ede_work2_virial, ede_primitives_tmp_virial, primitive_integrals_virial, cart_estimate_virial)
...
pure real(dp) function, public min_image_gap_sq(r, hmat)
Smallest increase of |r|**2 when r is moved to any other periodic image of an orthorhombic,...
subroutine, public coulomb4(context, ra, rb, rc, rd, npgfa, npgfb, npgfc, npgfd, la_min, la_max, lb_min, lb_max, lc_min, lc_max, ld_min, ld_max, nsgfa, nsgfb, nsgfc, nsgfd, sphi_a_u1, sphi_a_u2, sphi_a_u3, sphi_b_u1, sphi_b_u2, sphi_b_u3, sphi_c_u1, sphi_c_u2, sphi_c_u3, sphi_d_u1, sphi_d_u2, sphi_d_u3, zeta, zetb, zetc, zetd, primitive_integrals, potential_parameter, neighbor_cells, screen1, screen2, eps_schwarz, max_contraction_val, cart_estimate, cell, neris_tmp, log10_pmax, log10_eps_schwarz, r1_pgf, r2_pgf, pgf1, pgf2, pgf_list_ij, pgf_list_kl, pgf_product_list, nsgfl_a, nsgfl_b, nsgfl_c, nsgfl_d, sphi_a_ext, sphi_b_ext, sphi_c_ext, sphi_d_ext, ee_work, ee_work2, ee_buffer1, ee_buffer2, ee_primitives_tmp, nimages, do_periodic)
calculates two-electron integrals of a quartet/shell using the library lib_int in the periodic case
integer, save, public pgf_product_list_size
Gaussian-product geometry and radial seeds shared by four-center evaluation and screening.
subroutine, public prepare_eri4_primitive(product, image_a, image_b, attenuation, pq2, potential_parameter, params)
Complete a prepared quartet for one selected image, including normalized radial seeds.
subroutine, public prepare_eri4_pair(ra, rb, zeta, zetb, rab2, pair, image)
Prepare one Gaussian pair, retaining the caller's image topology and screening metadata.
subroutine, public prepare_eri4_product(pair_a, pair_b, m_max, product)
Prepare the image-independent quartet data once per combination of Gaussian pairs.
Primitive Gaussian pairs and products for four-center integrals. The fixed radial workspace capacity ...
Library choices for electronic integral APIs.
Defines the basic variable types.
integer, parameter, public int_8
integer, parameter, public dp
An array-based list which grows on demand. When the internal array is full, a new array of twice the ...
Provides Cartesian and spherical orbital pointers and indices.
integer, dimension(:), allocatable, public nco
integer, dimension(:), allocatable, public nso
Type defining parameters related to the simulation cell.
Context owning the energy and first-derivative backend workspaces.