50#include "./base/base_uses.f90"
58 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'generic_os_integrals'
80 INTEGER,
INTENT(IN) :: r12_operator
81 REAL(kind=
dp),
DIMENSION(:, :),
INTENT(INOUT) :: vab
82 REAL(kind=
dp),
DIMENSION(:, :, :),
INTENT(INOUT), &
84 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: rab
86 REAL(kind=
dp),
INTENT(IN),
OPTIONAL :: omega, r_cutoff
87 LOGICAL,
INTENT(IN) :: calculate_forces
89 CHARACTER(LEN=*),
PARAMETER :: routinen =
'int_operators_r12_ab_os'
92 REAL(kind=
dp) :: my_omega, my_r_cutoff
94 PROCEDURE(
ab_sint_os),
POINTER :: cps_operator2
96 NULLIFY (cps_operator2)
97 CALL timeset(routinen, handle)
102 SELECT CASE (r12_operator)
107 IF (
PRESENT(omega)) my_omega = omega
110 IF (
PRESENT(omega)) my_omega = omega
113 IF (
PRESENT(omega)) my_omega = omega
116 IF (
PRESENT(omega)) my_omega = omega
119 IF (
PRESENT(r_cutoff)) my_r_cutoff = r_cutoff
121 cpabort(
"Operator not available")
124 CALL int_operator_ab_os_low(cps_operator2, vab, dvab, rab, fba, fbb, my_omega, my_r_cutoff, &
127 CALL timestop(handle)
143 SUBROUTINE int_operator_ab_os_low(cps_operator2, vab, dvab, rab, fba, fbb, omega, r_cutoff, &
146 PROCEDURE(
ab_sint_os),
POINTER :: cps_operator2
147 REAL(kind=
dp),
DIMENSION(:, :),
INTENT(INOUT) :: vab
148 REAL(kind=
dp),
DIMENSION(:, :, :),
OPTIONAL, &
149 INTENT(INOUT) :: dvab
150 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: rab
152 REAL(kind=
dp),
INTENT(IN) :: omega, r_cutoff
153 LOGICAL,
INTENT(IN) :: calculate_forces
155 CHARACTER(LEN=*),
PARAMETER :: routinen =
'int_operator_ab_os_low'
157 INTEGER :: handle, i, iset, jset, lds, m1, m2, &
158 maxco, maxcoa, maxcob, maxl, maxla, &
159 maxlb, ncoa, ncoap, ncob, ncobp, &
160 nseta, nsetb, sgfa, sgfb
161 INTEGER,
DIMENSION(:),
POINTER :: la_max, la_min, lb_max, lb_min, npgfa, &
163 INTEGER,
DIMENSION(:, :),
POINTER :: first_sgfa, first_sgfb
164 REAL(kind=
dp) :: dab, rab2
165 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: vac, vac_plus
166 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: devab, vwork
167 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: sphi_a, sphi_b, zeta, zetb
169 CALL timeset(routinen, handle)
170 NULLIFY (la_max, la_min, lb_max, lb_min, npgfa, npgfb, nsgfa, nsgfb, &
171 first_sgfa, first_sgfb, sphi_a, sphi_b, zeta, zetb)
174 first_sgfa => fba%first_sgf
179 nsgfa => fba%nsgf_set
183 first_sgfb => fbb%first_sgf
188 nsgfb => fbb%nsgf_set
194 maxco = max(maxcoa, maxcob)
195 IF (calculate_forces)
THEN
196 maxl = max(maxla + 1, maxlb)
198 maxl = max(maxla, maxlb)
206 IF (calculate_forces) dvab = 0.0_dp
210 ncoa = npgfa(iset)*
ncoset(la_max(iset))
211 ncoap = npgfa(iset)*
ncoset(la_max(iset) + 1)
212 sgfa = first_sgfa(1, iset)
216 ncob = npgfb(jset)*
ncoset(lb_max(jset))
217 ncobp = npgfb(jset)*
ncoset(lb_max(jset) + 1)
218 sgfb = first_sgfb(1, jset)
219 m1 = sgfa + nsgfa(iset) - 1
220 m2 = sgfb + nsgfb(jset) - 1
223 IF (calculate_forces)
THEN
224 ALLOCATE (vwork(ncoap, ncobp, la_max(iset) + lb_max(jset) + 3), &
225 vac(ncoa, ncob), vac_plus(ncoap, ncobp), devab(ncoa, ncob, 3))
229 CALL operator2(cps_operator2, la_max(iset) + 1, npgfa(iset), zeta(:, iset), la_min(iset), &
230 lb_max(jset) + 1, npgfb(jset), zetb(:, jset), lb_min(jset), &
231 omega, r_cutoff, rab, rab2, vac, vwork, maxder=1, vac_plus=vac_plus)
233 vac_plus, devab, right=.false., derivative=.true., exponents=zeta(:, iset))
235 CALL ab_contract(dvab(sgfa:m1, sgfb:m2, i), devab(:, :, i), sphi_a(:, sgfa:), &
236 sphi_b(:, sgfb:), ncoa, ncob, nsgfa(iset), nsgfb(jset))
240 ALLOCATE (vwork(ncoa, ncob, la_max(iset) + lb_max(jset) + 1), &
241 vac(ncoa, ncob), vac_plus(ncoap, ncobp), devab(ncoa, ncob, 3))
244 CALL operator2(cps_operator2, la_max(iset), npgfa(iset), zeta(:, iset), la_min(iset), &
245 lb_max(jset), npgfb(jset), zetb(:, jset), lb_min(jset), &
246 omega, r_cutoff, rab, rab2, vac, vwork)
249 CALL ab_contract(vab(sgfa:m1, sgfb:m2), vac(1:ncoa, 1:ncob), sphi_a(:, sgfa:), sphi_b(:, sgfb:), &
250 ncoa, ncob, nsgfa(iset), nsgfb(jset))
251 DEALLOCATE (vwork, vac, vac_plus, devab)
255 CALL timestop(handle)
257 END SUBROUTINE int_operator_ab_os_low
272 REAL(kind=
dp),
DIMENSION(:, :),
INTENT(INOUT) :: sab
273 REAL(kind=
dp),
DIMENSION(:, :, :),
INTENT(INOUT), &
275 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: rab
277 LOGICAL,
INTENT(IN) :: calculate_forces, debug
278 REAL(kind=
dp),
INTENT(INOUT) :: dmax
280 CHARACTER(LEN=*),
PARAMETER :: routinen =
'int_overlap_ab_os'
282 INTEGER :: handle, i, iset, jset, m1, m2, maxco, &
283 maxcoa, maxcob, maxl, maxla, maxlb, &
284 ncoa, ncob, nseta, nsetb, sgfa, sgfb
285 INTEGER,
DIMENSION(:),
POINTER :: la_max, la_min, lb_max, lb_min, npgfa, &
287 INTEGER,
DIMENSION(:, :),
POINTER :: first_sgfa, first_sgfb
289 REAL(kind=
dp) :: dab, ra(3), rb(3)
290 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: sint
291 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: dsint
292 REAL(kind=
dp),
DIMENSION(:),
POINTER :: set_radius_a, set_radius_b
293 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: rpgfa, rpgfb, scon_a, scon_b, zeta, zetb
296 CALL timeset(routinen, handle)
297 NULLIFY (la_max, la_min, lb_max, lb_min, npgfa, npgfb, nsgfa, nsgfb, &
298 first_sgfa, first_sgfb, scon_a, scon_b, zeta, zetb)
301 first_sgfa => fba%first_sgf
306 nsgfa => fba%nsgf_set
307 rpgfa => fba%pgf_radius
308 set_radius_a => fba%set_radius
312 first_sgfb => fbb%first_sgf
317 nsgfb => fbb%nsgf_set
318 rpgfb => fbb%pgf_radius
319 set_radius_b => fbb%set_radius
325 maxco = max(maxcoa, maxcob)
326 maxl = max(maxla, maxlb)
327 ALLOCATE (sint(maxco, maxco))
328 ALLOCATE (dsint(maxco, maxco, 3))
330 dab = sqrt(sum(rab**2))
333 IF (calculate_forces)
THEN
334 IF (
PRESENT(dsab)) dsab = 0.0_dp
339 ncoa = npgfa(iset)*(
ncoset(la_max(iset)) -
ncoset(la_min(iset) - 1))
340 sgfa = first_sgfa(1, iset)
344 IF (set_radius_a(iset) + set_radius_b(jset) < dab) cycle
346 ncob = npgfb(jset)*(
ncoset(lb_max(jset)) -
ncoset(lb_min(jset) - 1))
347 sgfb = first_sgfb(1, jset)
348 m1 = sgfa + nsgfa(iset) - 1
349 m2 = sgfb + nsgfb(jset) - 1
351 IF (calculate_forces)
THEN
352 CALL overlap_ab(la_max(iset), la_min(iset), npgfa(iset), rpgfa(:, iset), zeta(:, iset), &
353 lb_max(jset), lb_min(jset), npgfb(jset), rpgfb(:, jset), zetb(:, jset), &
356 CALL overlap_ab(la_max(iset), la_min(iset), npgfa(iset), rpgfa(:, iset), zeta(:, iset), &
357 lb_max(jset), lb_min(jset), npgfb(jset), rpgfb(:, jset), zetb(:, jset), &
366 CALL overlap_ab_test(la_max(iset), la_min(iset), npgfa(iset), zeta(:, iset), &
367 lb_max(jset), lb_min(jset), npgfb(jset), zetb(:, jset), &
371 CALL ab_contract(sab(sgfa:m1, sgfb:m2), sint(1:ncoa, 1:ncob), scon_a(:, sgfa:), scon_b(:, sgfb:), &
372 ncoa, ncob, nsgfa(iset), nsgfb(jset))
373 IF (calculate_forces)
THEN
375 CALL ab_contract(dsab(sgfa:m1, sgfb:m2, i), dsint(1:ncoa, 1:ncob, i), scon_a(:, sgfa:), &
376 scon_b(:, sgfb:), ncoa, ncob, nsgfa(iset), nsgfb(jset))
382 DEALLOCATE (sint, dsint)
384 CALL timestop(handle)
400 REAL(kind=
dp),
DIMENSION(:, :),
INTENT(INOUT) :: sab
401 REAL(kind=
dp),
DIMENSION(:, :, :),
INTENT(INOUT), &
403 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: rab
405 INTEGER,
INTENT(IN) :: m
406 LOGICAL,
INTENT(IN) :: calculate_forces
408 CHARACTER(LEN=*),
PARAMETER :: routinen =
'int_ra2m_ab_os'
410 INTEGER :: handle, i, iset, jset, m1, m2, maxco, &
411 maxcoa, maxcob, maxl, maxla, maxlb, &
412 ncoa, ncob, nseta, nsetb, sgfa, sgfb
413 INTEGER,
DIMENSION(:),
POINTER :: la_max, la_min, lb_max, lb_min, npgfa, &
415 INTEGER,
DIMENSION(:, :),
POINTER :: first_sgfa, first_sgfb
418 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: sint
419 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: dsint
420 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: scon_a, scon_b, zeta, zetb
423 CALL timeset(routinen, handle)
424 NULLIFY (la_max, la_min, lb_max, lb_min, npgfa, npgfb, nsgfa, nsgfb, &
425 first_sgfa, first_sgfb, scon_a, scon_b, zeta, zetb)
428 first_sgfa => fba%first_sgf
433 nsgfa => fba%nsgf_set
437 first_sgfb => fbb%first_sgf
442 nsgfb => fbb%nsgf_set
448 maxco = max(maxcoa, maxcob)
449 maxl = max(maxla, maxlb)
450 ALLOCATE (sint(maxco, maxco))
451 ALLOCATE (dsint(maxco, maxco, 3))
453 dab = sqrt(sum(rab**2))
456 IF (calculate_forces)
THEN
457 IF (
PRESENT(dsab)) dsab = 0.0_dp
462 ncoa = npgfa(iset)*(
ncoset(la_max(iset)) -
ncoset(la_min(iset) - 1))
463 sgfa = first_sgfa(1, iset)
467 ncob = npgfb(jset)*(
ncoset(lb_max(jset)) -
ncoset(lb_min(jset) - 1))
468 sgfb = first_sgfb(1, jset)
469 m1 = sgfa + nsgfa(iset) - 1
470 m2 = sgfb + nsgfb(jset) - 1
472 CALL operator_ra2m(la_max(iset), la_min(iset), npgfa(iset), zeta(:, iset), &
473 lb_max(jset), lb_min(jset), npgfb(jset), zetb(:, jset), &
474 m, rab, sint, dsint, calculate_forces)
476 CALL ab_contract(sab(sgfa:m1, sgfb:m2), sint, scon_a(:, sgfa:), scon_b(:, sgfb:), &
477 ncoa, ncob, nsgfa(iset), nsgfb(jset))
478 IF (calculate_forces)
THEN
480 CALL ab_contract(dsab(sgfa:m1, sgfb:m2, i), dsint(:, :, i), scon_a(:, sgfa:), &
481 scon_b(:, sgfb:), ncoa, ncob, nsgfa(iset), nsgfb(jset))
487 DEALLOCATE (sint, dsint)
489 CALL timestop(handle)
506 calculate_forces, debug, dmax)
508 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: abaint
509 REAL(kind=
dp),
ALLOCATABLE, &
510 DIMENSION(:, :, :, :),
OPTIONAL :: dabdaint
511 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: rab
513 LOGICAL,
INTENT(IN) :: calculate_forces, debug
514 REAL(kind=
dp),
INTENT(INOUT) :: dmax
516 CHARACTER(LEN=*),
PARAMETER :: routinen =
'int_overlap_aba_os'
518 INTEGER :: handle, i, iset, jset, kaset, m1, m2, &
519 m3, ncoa, ncob, ncoc, nseta, nsetb, &
520 nsetca, sgfa, sgfb, sgfc
521 INTEGER,
DIMENSION(:),
POINTER :: la_max, la_min, lb_max, lb_min, lca_max, &
522 lca_min, npgfa, npgfb, npgfca, nsgfa, &
524 INTEGER,
DIMENSION(:, :),
POINTER :: first_sgfa, first_sgfb, first_sgfca
525 REAL(kind=
dp) :: dab, dac, dbc
526 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: saba
527 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :, :) :: sdaba
528 REAL(kind=
dp),
DIMENSION(3) :: ra, rac, rb, rbc
529 REAL(kind=
dp),
DIMENSION(:),
POINTER :: set_radius_a, set_radius_b, set_radius_ca
530 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: rpgfa, rpgfb, rpgfca, scon_a, scon_b, &
531 scon_ca, zeta, zetb, zetca
533 CALL timeset(routinen, handle)
534 NULLIFY (la_max, la_min, lb_max, lb_min, lca_max, lca_min, npgfa, npgfb, &
535 npgfca, nsgfa, nsgfb, nsgfca)
536 NULLIFY (first_sgfa, first_sgfb, first_sgfca, set_radius_a, set_radius_b, &
537 set_radius_ca, rpgfa, rpgfb, rpgfca, scon_a, scon_b, scon_ca, &
541 first_sgfa => oba%first_sgf
546 nsgfa => oba%nsgf_set
547 rpgfa => oba%pgf_radius
548 set_radius_a => oba%set_radius
552 first_sgfb => obb%first_sgf
557 nsgfb => obb%nsgf_set
558 rpgfb => obb%pgf_radius
559 set_radius_b => obb%set_radius
564 first_sgfca => fba%first_sgf
569 nsgfca => fba%nsgf_set
570 rpgfca => fba%pgf_radius
571 set_radius_ca => fba%set_radius
575 dab = sqrt(sum(rab**2))
578 IF (calculate_forces)
THEN
579 IF (
PRESENT(dabdaint)) dabdaint = 0.0_dp
584 ncoa = npgfa(iset)*(
ncoset(la_max(iset)) -
ncoset(la_min(iset) - 1))
585 sgfa = first_sgfa(1, iset)
589 IF (set_radius_a(iset) + set_radius_b(jset) < dab) cycle
591 ncob = npgfb(jset)*(
ncoset(lb_max(jset)) -
ncoset(lb_min(jset) - 1))
592 sgfb = first_sgfb(1, jset)
593 m1 = sgfa + nsgfa(iset) - 1
594 m2 = sgfb + nsgfb(jset) - 1
604 IF (set_radius_b(jset) + set_radius_ca(kaset) < dab) cycle
606 ncoc = npgfca(kaset)*(
ncoset(lca_max(kaset)) -
ncoset(lca_min(kaset) - 1))
607 sgfc = first_sgfca(1, kaset)
608 m3 = sgfc + nsgfca(kaset) - 1
609 IF (ncoa*ncob*ncoc > 0)
THEN
610 ALLOCATE (saba(ncoa, ncob, ncoc))
612 IF (calculate_forces)
THEN
613 ALLOCATE (sdaba(ncoa, ncob, ncoc, 3))
614 CALL overlap_aab(la_max(iset), la_min(iset), npgfa(iset), rpgfa(:, iset), zeta(:, iset), &
615 lca_max(kaset), lca_min(kaset), npgfca(kaset), rpgfca(:, kaset), zetca(:, kaset), &
616 lb_max(jset), lb_min(jset), npgfb(jset), rpgfb(:, jset), zetb(:, jset), &
617 rab, saba=saba, daba=sdaba)
620 CALL abc_contract(dabdaint(sgfa:m1, sgfb:m2, sgfc:m3, i), sdaba(1:ncoa, 1:ncob, 1:ncoc, i), &
621 scon_a(:, sgfa:), scon_b(:, sgfb:), scon_ca(:, sgfc:), &
622 ncoa, ncob, ncoc, nsgfa(iset), nsgfb(jset), nsgfca(kaset))
627 CALL overlap_aab(la_max(iset), la_min(iset), npgfa(iset), rpgfa(:, iset), zeta(:, iset), &
628 lca_max(kaset), lca_min(kaset), npgfca(kaset), rpgfca(:, kaset), zetca(:, kaset), &
629 lb_max(jset), lb_min(jset), npgfb(jset), rpgfb(:, jset), zetb(:, jset), &
637 CALL overlap_abc_test(la_max(iset), npgfa(iset), zeta(:, iset), la_min(iset), &
638 lb_max(jset), npgfb(jset), zetb(:, jset), lb_min(jset), &
639 lca_max(kaset), npgfca(kaset), zetca(:, kaset), lca_min(kaset), &
640 ra, rb, ra, saba, dmax)
642 CALL abc_contract(abaint(sgfa:m1, sgfb:m2, sgfc:m3), saba(1:ncoa, 1:ncob, 1:ncoc), &
643 scon_a(:, sgfa:), scon_b(:, sgfb:), scon_ca(:, sgfc:), &
644 ncoa, ncob, ncoc, nsgfa(iset), nsgfb(jset), nsgfca(kaset))
651 CALL timestop(handle)
669 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: abbint
670 REAL(kind=
dp),
ALLOCATABLE, &
671 DIMENSION(:, :, :, :),
OPTIONAL :: dabbint
672 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: rab
674 LOGICAL,
INTENT(IN) :: calculate_forces, debug
675 REAL(kind=
dp),
INTENT(INOUT) :: dmax
677 CHARACTER(LEN=*),
PARAMETER :: routinen =
'int_overlap_abb_os'
679 INTEGER :: handle, i, iset, jset, kbset, m1, m2, &
680 m3, ncoa, ncob, ncoc, nseta, nsetb, &
681 nsetcb, sgfa, sgfb, sgfc
682 INTEGER,
DIMENSION(:),
POINTER :: la_max, la_min, lb_max, lb_min, lcb_max, &
683 lcb_min, npgfa, npgfb, npgfcb, nsgfa, &
685 INTEGER,
DIMENSION(:, :),
POINTER :: first_sgfa, first_sgfb, first_sgfcb
686 REAL(kind=
dp) :: dab, dac, dbc
687 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: sabb
688 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :, :) :: sdabb
689 REAL(kind=
dp),
DIMENSION(3) :: ra, rac, rb, rbc
690 REAL(kind=
dp),
DIMENSION(:),
POINTER :: set_radius_a, set_radius_b, set_radius_cb
691 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: rpgfa, rpgfb, rpgfcb, scon_a, scon_b, &
692 scon_cb, zeta, zetb, zetcb
694 CALL timeset(routinen, handle)
695 NULLIFY (la_max, la_min, lb_max, lb_min, lcb_max, lcb_min, npgfa, npgfb, &
696 npgfcb, nsgfa, nsgfb, nsgfcb)
697 NULLIFY (first_sgfa, first_sgfb, first_sgfcb, set_radius_a, set_radius_b, &
698 set_radius_cb, rpgfa, rpgfb, rpgfcb, scon_a, scon_b, scon_cb, &
702 first_sgfa => oba%first_sgf
707 nsgfa => oba%nsgf_set
708 rpgfa => oba%pgf_radius
709 set_radius_a => oba%set_radius
713 first_sgfb => obb%first_sgf
718 nsgfb => obb%nsgf_set
719 rpgfb => obb%pgf_radius
720 set_radius_b => obb%set_radius
725 first_sgfcb => fbb%first_sgf
730 nsgfcb => fbb%nsgf_set
731 rpgfcb => fbb%pgf_radius
732 set_radius_cb => fbb%set_radius
736 dab = sqrt(sum(rab**2))
739 IF (calculate_forces)
THEN
740 IF (
PRESENT(dabbint)) dabbint = 0.0_dp
745 ncoa = npgfa(iset)*(
ncoset(la_max(iset)) -
ncoset(la_min(iset) - 1))
746 sgfa = first_sgfa(1, iset)
750 IF (set_radius_a(iset) + set_radius_b(jset) < dab) cycle
752 ncob = npgfb(jset)*(
ncoset(lb_max(jset)) -
ncoset(lb_min(jset) - 1))
753 sgfb = first_sgfb(1, jset)
754 m1 = sgfa + nsgfa(iset) - 1
755 m2 = sgfb + nsgfb(jset) - 1
765 IF (set_radius_a(iset) + set_radius_cb(kbset) < dab) cycle
767 ncoc = npgfcb(kbset)*(
ncoset(lcb_max(kbset)) -
ncoset(lcb_min(kbset) - 1))
768 sgfc = first_sgfcb(1, kbset)
769 m3 = sgfc + nsgfcb(kbset) - 1
770 IF (ncoa*ncob*ncoc > 0)
THEN
771 ALLOCATE (sabb(ncoa, ncob, ncoc))
772 IF (calculate_forces)
THEN
773 ALLOCATE (sdabb(ncoa, ncob, ncoc, 3))
774 CALL overlap_abb(la_max(iset), la_min(iset), npgfa(iset), rpgfa(:, iset), zeta(:, iset), &
775 lb_max(jset), lb_min(jset), npgfb(jset), rpgfb(:, jset), zetb(:, jset), &
776 lcb_max(kbset), lcb_min(kbset), npgfcb(kbset), rpgfcb(:, kbset), zetcb(:, kbset), &
780 CALL abc_contract(dabbint(sgfa:m1, sgfb:m2, sgfc:m3, i), sdabb(1:ncoa, 1:ncob, 1:ncoc, i), &
781 scon_a(:, sgfa:), scon_b(:, sgfb:), scon_cb(:, sgfc:), &
782 ncoa, ncob, ncoc, nsgfa(iset), nsgfb(jset), nsgfcb(kbset))
786 CALL overlap_abb(la_max(iset), la_min(iset), npgfa(iset), rpgfa(:, iset), zeta(:, iset), &
787 lb_max(jset), lb_min(jset), npgfb(jset), rpgfb(:, jset), zetb(:, jset), &
788 lcb_max(kbset), lcb_min(kbset), npgfcb(kbset), rpgfcb(:, kbset), zetcb(:, kbset), &
795 CALL overlap_abc_test(la_max(iset), npgfa(iset), zeta(:, iset), la_min(iset), &
796 lb_max(jset), npgfb(jset), zetb(:, jset), lb_min(jset), &
797 lcb_max(kbset), npgfcb(kbset), zetcb(:, kbset), lcb_min(kbset), &
798 ra, rb, rb, sabb, dmax)
801 CALL abc_contract(abbint(sgfa:m1, sgfb:m2, sgfc:m3), sabb(1:ncoa, 1:ncob, 1:ncoc), &
802 scon_a(:, sgfa:), scon_b(:, sgfb:), scon_cb(:, sgfc:), &
803 ncoa, ncob, ncoc, nsgfa(iset), nsgfb(jset), nsgfcb(kbset))
811 CALL timestop(handle)
826 REAL(kind=
dp),
DIMENSION(:, :, :, :),
POINTER :: saabb
828 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: rab
829 LOGICAL,
INTENT(IN) :: debug
830 REAL(kind=
dp),
INTENT(INOUT) :: dmax
832 CHARACTER(LEN=*),
PARAMETER :: routinen =
'int_overlap_aabb_os'
834 INTEGER :: handle, iset, isgfa1, jset, jsgfa2, kset, ksgfb1, lset, lsgfb2, m1, m2, m3, m4, &
835 maxcoa, maxcob, ncoa1, ncoa2, ncob1, ncob2, nseta, nsetb, sgfa1, sgfa2, sgfb1, sgfb2
836 INTEGER,
DIMENSION(:),
POINTER :: la_max, la_min, lb_max, lb_min, npgfa, &
838 INTEGER,
DIMENSION(:, :),
POINTER :: first_sgfa, first_sgfb
839 REAL(kind=
dp) :: dab, ra(3), rb(3)
840 REAL(kind=
dp),
ALLOCATABLE,
TARGET :: buffer(:)
841 REAL(kind=
dp),
CONTIGUOUS,
POINTER :: sint(:, :, :, :)
842 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: rpgfa, rpgfb, sphi_a, sphi_b, zeta, zetb
844 CALL timeset(routinen, handle)
845 NULLIFY (la_max, la_min, lb_max, lb_min, npgfa, npgfb, nsgfa, nsgfb, &
846 first_sgfa, first_sgfb, rpgfa, rpgfb, &
847 sphi_a, sphi_b, zeta, zetb)
850 first_sgfa => oba%first_sgf
855 nsgfa => oba%nsgf_set
856 rpgfa => oba%pgf_radius
860 first_sgfb => obb%first_sgf
865 nsgfb => obb%nsgf_set
866 rpgfb => obb%pgf_radius
873 ALLOCATE (buffer(int(maxcoa,
int_8)**2*int(maxcob,
int_8)**2))
875 dab = sqrt(sum(rab**2))
879 ncoa1 = npgfa(iset)*
ncoset(la_max(iset))
880 sgfa1 = first_sgfa(1, iset)
881 m1 = sgfa1 + nsgfa(iset) - 1
883 DO jset = iset, nseta
885 ncoa2 = npgfa(jset)*
ncoset(la_max(jset))
886 sgfa2 = first_sgfa(1, jset)
887 m2 = sgfa2 + nsgfa(jset) - 1
891 ncob1 = npgfb(kset)*
ncoset(lb_max(kset))
892 sgfb1 = first_sgfb(1, kset)
893 m3 = sgfb1 + nsgfb(kset) - 1
895 DO lset = kset, nsetb
897 ncob2 = npgfb(lset)*
ncoset(lb_max(lset))
898 sgfb2 = first_sgfb(1, lset)
899 m4 = sgfb2 + nsgfb(lset) - 1
901 sint(1:ncoa1, 1:ncoa2, 1:ncob1, 1:ncob2) => &
902 buffer(1:int(ncoa1,
int_8)*ncoa2*ncob1*ncob2)
904 CALL overlap_aabb(la_max(iset), la_min(iset), npgfa(iset), rpgfa(:, iset), zeta(:, iset), &
905 la_max(jset), la_min(jset), npgfa(jset), rpgfa(:, jset), zeta(:, jset), &
906 lb_max(kset), lb_min(kset), npgfb(kset), rpgfb(:, kset), zetb(:, kset), &
907 lb_max(lset), lb_min(lset), npgfb(lset), rpgfb(:, lset), zetb(:, lset), &
908 iset == jset, kset == lset, rab, dab, sint)
914 la_max(jset), la_min(jset), npgfa(jset), zeta(:, jset), &
915 lb_max(kset), lb_min(kset), npgfb(kset), zetb(:, kset), &
916 lb_max(lset), lb_min(lset), npgfb(lset), zetb(:, lset), &
920 CALL abcd_contract(saabb(sgfa1:m1, sgfa2:m2, sgfb1:m3, sgfb2:m4), sint, sphi_a(:, sgfa1:), &
921 sphi_a(:, sgfa2:), sphi_b(:, sgfb1:), sphi_b(:, sgfb2:), ncoa1, ncoa2, &
922 ncob1, ncob2, nsgfa(iset), nsgfa(jset), nsgfb(kset), nsgfb(lset))
925 DO isgfa1 = sgfa1, m1
926 DO jsgfa2 = sgfa2, m2
927 DO ksgfb1 = sgfb1, m3
928 DO lsgfb2 = sgfb2, m4
929 saabb(jsgfa2, isgfa1, ksgfb1, lsgfb2) = saabb(isgfa1, jsgfa2, ksgfb1, lsgfb2)
930 saabb(isgfa1, jsgfa2, lsgfb2, ksgfb1) = saabb(isgfa1, jsgfa2, ksgfb1, lsgfb2)
931 saabb(jsgfa2, isgfa1, lsgfb2, ksgfb1) = saabb(isgfa1, jsgfa2, ksgfb1, lsgfb2)
943 CALL timestop(handle)
Interface for the calculation of integrals over s-functions and the s-type auxiliary integrals using ...
Coordinate and basis-center derivative ladders for Cartesian Gaussian integrals. Derivatives act on a...
subroutine, public apply_cartesian_operator(la_max, la_min, npgfa, lb_max, lb_min, npgfb, ab, values, right, derivative, exponents, origin)
Apply a Cartesian operator on either side of a primitive integral block. The input includes one extra...
Contraction of integrals over primitive Cartesian Gaussians based on the contraction matrix sphi whic...
subroutine, public abc_contract(abcint, sabc, sphi_a, sphi_b, sphi_c, ncoa, ncob, ncoc, nsgfa, nsgfb, nsgfc)
contract three-center overlap integrals (a,b,c) and transfer to spherical Gaussians
subroutine, public abcd_contract(abcdint, sabcd, sphi_a, sphi_b, sphi_c, sphi_d, ncoa, ncob, ncoc, ncod, nsgfa, nsgfb, nsgfc, nsgfd)
contract four-center overlap integrals (a,b,c,d) and transfer to spherical Gaussians
subroutine, public ab_contract(abint, sab, sphi_a, sphi_b, ncoa, ncob, nsgfa, nsgfb)
contract overlap integrals (a,b) and transfer to spherical Gaussians
Calculation of integrals over Cartesian Gaussian-type functions for [a|(r-Ra)^(2m)|b] Ra is the posit...
subroutine, public operator_ra2m(la_max, la_min, npgfa, zeta, lb_max, lb_min, npgfb, zetb, m, rab, sab, dsab, calculate_forces)
Calculation of the primitive two-center [a|(r-Ra)^(2m)|b] integrals over Cartesian Gaussian-type func...
Calculation of integrals over Cartesian Gaussian-type functions for different r12 operators: 1/r12,...
subroutine, public cps_verfc2(v, nmax, zetp, zetq, zetw, rho, rac2, omega, r_cutoff)
Calculation of verfc integrals for s-function, i.e, [s|erfc(omega*r12)/r12|s], and the auxiliary inte...
subroutine, public cps_vgauss2(v, nmax, zetp, zetq, zetw, rho, rac2, omega, r_cutoff)
Calculation of vgauss integrals for s-function, i.e, [s|exp(-omega*r12^2)/r12|s], and the auxiliary i...
subroutine, public cps_gauss2(v, nmax, zetp, zetq, zetw, rho, rac2, omega, r_cutoff)
Calculation of gauss integrals for s-function, i.e, [s|exp(-omega*r12^2)|s], and the auxiliary integr...
subroutine, public cps_coulomb2(v, nmax, zetp, zetq, zetw, rho, rac2, omega, r_cutoff)
Calculation of Coulomb integrals for s-function, i.e, [s|1/r12|s], and the auxiliary integrals [s|1/r...
subroutine, public cps_truncated2(v, nmax, zetp, zetq, zetw, rho, rac2, omega, r_cutoff)
Calculation of truncated Coulomb integrals for s-function, i.e, [s|TC|s] where TC = 1/r12 if r12 <= r...
subroutine, public cps_verf2(v, nmax, zetp, zetq, zetw, rho, rac2, omega, r_cutoff)
Calculation of verf integrals for s-function, i.e, [s|erf(omega*r12)/r12|s], and the auxiliary integr...
subroutine, public operator2(cps_operator2, la_max, npgfa, zeta, la_min, lc_max, npgfc, zetc, lc_min, omega, r_cutoff, rac, rac2, vac, v, maxder, vac_plus)
Calculation of the primitive two-center integrals over Cartesian Gaussian-type functions for differen...
Calculation of the overlap integrals over Cartesian Gaussian-type functions.
subroutine, public overlap_aabb(la_max_set1, la_min_set1, npgfa1, rpgfa1, zeta1, la_max_set2, la_min_set2, npgfa2, rpgfa2, zeta2, lb_max_set1, lb_min_set1, npgfb1, rpgfb1, zetb1, lb_max_set2, lb_min_set2, npgfb2, rpgfb2, zetb2, asets_equal, bsets_equal, rab, dab, saabb)
Purpose: Calculation of the two-center overlap integrals [aa|bb] over Cartesian Gaussian-type functio...
Calculation of the overlap integrals over Cartesian Gaussian-type functions.
subroutine, public overlap_ab(la_max, la_min, npgfa, rpgfa, zeta, lb_max, lb_min, npgfb, rpgfb, zetb, rab, sab, dab, ddab, rr_work)
Calculation of the two-center overlap integrals [a|b] over Cartesian Gaussian-type functions....
subroutine, public overlap_aab(la1_max, la1_min, npgfa1, rpgfa1, zeta1, la2_max, la2_min, npgfa2, rpgfa2, zeta2, lb_max, lb_min, npgfb, rpgfb, zetb, rab, saab, daab, saba, daba)
Calculation of the two-center overlap integrals [aa|b] over Cartesian Gaussian-type functions.
subroutine, public overlap_abb(la_max, la_min, npgfa, rpgfa, zeta, lb1_max, lb1_min, npgfb1, rpgfb1, zetb1, lb2_max, lb2_min, npgfb2, rpgfb2, zetb2, rab, sabb, dabb)
Calculation of the two-center overlap integrals [a|bb] over Cartesian Gaussian-type functions.
subroutine, public get_gto_basis_set(gto_basis_set, name, aliases, norm_type, kind_radius, ncgf, nset, nsgf, cgf_symbol, sgf_symbol, norm_cgf, set_radius, lmax, lmin, lx, ly, lz, m, ncgf_set, npgf, nsgf_set, nshell, cphi, pgf_radius, sphi, scon, zet, first_cgf, first_sgf, l, last_cgf, last_sgf, n, gcc, maxco, maxl, maxpgf, maxsgf_set, maxshell, maxso, nco_sum, npgf_sum, nshell_sum, maxder, short_kind_radius, npgf_seg_sum, ccon)
...
constants for the different operators of the 2c-integrals
integer, parameter, public operator_gauss
integer, parameter, public operator_verf
integer, parameter, public operator_truncated
integer, parameter, public operator_vgauss
integer, parameter, public operator_verfc
integer, parameter, public operator_coulomb
Debugs Obara-Saika integral matrices.
subroutine, public overlap_ab_test(la_max, la_min, npgfa, zeta, lb_max, lb_min, npgfb, zetb, ra, rb, sab, dmax)
recursive test routines for integral (a,b)
subroutine, public overlap_abc_test(la_max, npgfa, zeta, la_min, lb_max, npgfb, zetb, lb_min, lc_max, npgfc, zetc, lc_min, ra, rb, rc, sabc, dmax)
recursive test routines for integral (a,b,c)
subroutine, public overlap_aabb_test(la_max1, la_min1, npgfa1, zeta1, la_max2, la_min2, npgfa2, zeta2, lb_max1, lb_min1, npgfb1, zetb1, lb_max2, lb_min2, npgfb2, zetb2, ra, rb, saabb, dmax)
recursive test routines for integral (aa,bb)
Calculation of contracted, spherical Gaussian integrals using the (OS) integral scheme....
subroutine, public int_overlap_aba_os(abaint, dabdaint, rab, oba, obb, fba, calculate_forces, debug, dmax)
calculate integrals (a,b,fa)
subroutine, public int_overlap_ab_os(sab, dsab, rab, fba, fbb, calculate_forces, debug, dmax)
calculate overlap integrals (a,b)
subroutine, public int_overlap_abb_os(abbint, dabbint, rab, oba, obb, fbb, calculate_forces, debug, dmax)
calculate integrals (a,b,fb)
subroutine, public int_operators_r12_ab_os(r12_operator, vab, dvab, rab, fba, fbb, omega, r_cutoff, calculate_forces)
Calcululates the two-center integrals of the type (a|O(r12)|b) using the OS scheme.
subroutine, public int_overlap_aabb_os(saabb, oba, obb, rab, debug, dmax)
calculate overlap integrals (aa,bb)
subroutine, public int_ra2m_ab_os(sab, dsab, rab, fba, fbb, m, calculate_forces)
calculate integrals (a|(r-Ra)^(2m)|b)
Defines the basic variable types.
integer, parameter, public int_8
integer, parameter, public dp
Provides Cartesian and spherical orbital pointers and indices.
integer, dimension(:), allocatable, public ncoset