49#include "./base/base_uses.f90"
57 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'generic_os_integrals'
79 INTEGER,
INTENT(IN) :: r12_operator
80 REAL(kind=
dp),
DIMENSION(:, :),
INTENT(INOUT) :: vab
81 REAL(kind=
dp),
DIMENSION(:, :, :),
INTENT(INOUT), &
83 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: rab
85 REAL(kind=
dp),
INTENT(IN),
OPTIONAL :: omega, r_cutoff
86 LOGICAL,
INTENT(IN) :: calculate_forces
88 CHARACTER(LEN=*),
PARAMETER :: routinen =
'int_operators_r12_ab_os'
91 REAL(kind=
dp) :: my_omega, my_r_cutoff
93 PROCEDURE(
ab_sint_os),
POINTER :: cps_operator2
95 NULLIFY (cps_operator2)
96 CALL timeset(routinen, handle)
101 SELECT CASE (r12_operator)
106 IF (
PRESENT(omega)) my_omega = omega
109 IF (
PRESENT(omega)) my_omega = omega
112 IF (
PRESENT(omega)) my_omega = omega
115 IF (
PRESENT(omega)) my_omega = omega
118 IF (
PRESENT(r_cutoff)) my_r_cutoff = r_cutoff
120 cpabort(
"Operator not available")
123 CALL int_operator_ab_os_low(cps_operator2, vab, dvab, rab, fba, fbb, my_omega, my_r_cutoff, &
126 CALL timestop(handle)
142 SUBROUTINE int_operator_ab_os_low(cps_operator2, vab, dvab, rab, fba, fbb, omega, r_cutoff, &
145 PROCEDURE(
ab_sint_os),
POINTER :: cps_operator2
146 REAL(kind=
dp),
DIMENSION(:, :),
INTENT(INOUT) :: vab
147 REAL(kind=
dp),
DIMENSION(:, :, :),
OPTIONAL, &
148 INTENT(INOUT) :: dvab
149 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: rab
151 REAL(kind=
dp),
INTENT(IN) :: omega, r_cutoff
152 LOGICAL,
INTENT(IN) :: calculate_forces
154 CHARACTER(LEN=*),
PARAMETER :: routinen =
'int_operator_ab_os_low'
156 INTEGER :: handle, i, iset, jset, lds, m1, m2, &
157 maxco, maxcoa, maxcob, maxl, maxla, &
158 maxlb, ncoa, ncoap, ncob, ncobp, &
159 nseta, nsetb, sgfa, sgfb
160 INTEGER,
DIMENSION(:),
POINTER :: la_max, la_min, lb_max, lb_min, npgfa, &
162 INTEGER,
DIMENSION(:, :),
POINTER :: first_sgfa, first_sgfb
163 REAL(kind=
dp) :: dab, rab2
164 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: vac, vac_plus
165 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: devab, vwork
166 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: sphi_a, sphi_b, zeta, zetb
168 CALL timeset(routinen, handle)
169 NULLIFY (la_max, la_min, lb_max, lb_min, npgfa, npgfb, nsgfa, nsgfb, &
170 first_sgfa, first_sgfb, sphi_a, sphi_b, zeta, zetb)
173 first_sgfa => fba%first_sgf
178 nsgfa => fba%nsgf_set
182 first_sgfb => fbb%first_sgf
187 nsgfb => fbb%nsgf_set
193 maxco = max(maxcoa, maxcob)
194 IF (calculate_forces)
THEN
195 maxl = max(maxla + 1, maxlb)
197 maxl = max(maxla, maxlb)
205 IF (calculate_forces) dvab = 0.0_dp
209 ncoa = npgfa(iset)*
ncoset(la_max(iset))
210 ncoap = npgfa(iset)*
ncoset(la_max(iset) + 1)
211 sgfa = first_sgfa(1, iset)
215 ncob = npgfb(jset)*
ncoset(lb_max(jset))
216 ncobp = npgfb(jset)*
ncoset(lb_max(jset) + 1)
217 sgfb = first_sgfb(1, jset)
218 m1 = sgfa + nsgfa(iset) - 1
219 m2 = sgfb + nsgfb(jset) - 1
222 IF (calculate_forces)
THEN
223 ALLOCATE (vwork(ncoap, ncobp, la_max(iset) + lb_max(jset) + 3), &
224 vac(ncoa, ncob), vac_plus(ncoap, ncobp), devab(ncoa, ncob, 3))
228 CALL operator2(cps_operator2, la_max(iset) + 1, npgfa(iset), zeta(:, iset), la_min(iset), &
229 lb_max(jset) + 1, npgfb(jset), zetb(:, jset), lb_min(jset), &
230 omega, r_cutoff, rab, rab2, vac, vwork, maxder=1, vac_plus=vac_plus)
231 CALL dabdr_noscreen(la_max(iset), npgfa(iset), zeta(:, iset), lb_max(jset), npgfb(jset), &
232 vac_plus, devab(:, :, 1), devab(:, :, 2), devab(:, :, 3))
234 CALL ab_contract(dvab(sgfa:m1, sgfb:m2, i), devab(:, :, i), sphi_a(:, sgfa:), &
235 sphi_b(:, sgfb:), ncoa, ncob, nsgfa(iset), nsgfb(jset))
239 ALLOCATE (vwork(ncoa, ncob, la_max(iset) + lb_max(jset) + 1), &
240 vac(ncoa, ncob), vac_plus(ncoap, ncobp), devab(ncoa, ncob, 3))
243 CALL operator2(cps_operator2, la_max(iset), npgfa(iset), zeta(:, iset), la_min(iset), &
244 lb_max(jset), npgfb(jset), zetb(:, jset), lb_min(jset), &
245 omega, r_cutoff, rab, rab2, vac, vwork)
248 CALL ab_contract(vab(sgfa:m1, sgfb:m2), vac(1:ncoa, 1:ncob), sphi_a(:, sgfa:), sphi_b(:, sgfb:), &
249 ncoa, ncob, nsgfa(iset), nsgfb(jset))
250 DEALLOCATE (vwork, vac, vac_plus, devab)
254 CALL timestop(handle)
256 END SUBROUTINE int_operator_ab_os_low
271 REAL(kind=
dp),
DIMENSION(:, :),
INTENT(INOUT) :: sab
272 REAL(kind=
dp),
DIMENSION(:, :, :),
INTENT(INOUT), &
274 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: rab
276 LOGICAL,
INTENT(IN) :: calculate_forces, debug
277 REAL(kind=
dp),
INTENT(INOUT) :: dmax
279 CHARACTER(LEN=*),
PARAMETER :: routinen =
'int_overlap_ab_os'
281 INTEGER :: handle, i, iset, jset, m1, m2, maxco, &
282 maxcoa, maxcob, maxl, maxla, maxlb, &
283 ncoa, ncob, nseta, nsetb, sgfa, sgfb
284 INTEGER,
DIMENSION(:),
POINTER :: la_max, la_min, lb_max, lb_min, npgfa, &
286 INTEGER,
DIMENSION(:, :),
POINTER :: first_sgfa, first_sgfb
288 REAL(kind=
dp) :: dab, ra(3), rb(3)
289 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: sint
290 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: dsint
291 REAL(kind=
dp),
DIMENSION(:),
POINTER :: set_radius_a, set_radius_b
292 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: rpgfa, rpgfb, scon_a, scon_b, zeta, zetb
295 CALL timeset(routinen, handle)
296 NULLIFY (la_max, la_min, lb_max, lb_min, npgfa, npgfb, nsgfa, nsgfb, &
297 first_sgfa, first_sgfb, scon_a, scon_b, zeta, zetb)
300 first_sgfa => fba%first_sgf
305 nsgfa => fba%nsgf_set
306 rpgfa => fba%pgf_radius
307 set_radius_a => fba%set_radius
311 first_sgfb => fbb%first_sgf
316 nsgfb => fbb%nsgf_set
317 rpgfb => fbb%pgf_radius
318 set_radius_b => fbb%set_radius
324 maxco = max(maxcoa, maxcob)
325 maxl = max(maxla, maxlb)
326 ALLOCATE (sint(maxco, maxco))
327 ALLOCATE (dsint(maxco, maxco, 3))
329 dab = sqrt(sum(rab**2))
332 IF (calculate_forces)
THEN
333 IF (
PRESENT(dsab)) dsab = 0.0_dp
338 ncoa = npgfa(iset)*(
ncoset(la_max(iset)) -
ncoset(la_min(iset) - 1))
339 sgfa = first_sgfa(1, iset)
343 IF (set_radius_a(iset) + set_radius_b(jset) < dab) cycle
345 ncob = npgfb(jset)*(
ncoset(lb_max(jset)) -
ncoset(lb_min(jset) - 1))
346 sgfb = first_sgfb(1, jset)
347 m1 = sgfa + nsgfa(iset) - 1
348 m2 = sgfb + nsgfb(jset) - 1
350 IF (calculate_forces)
THEN
351 CALL overlap_ab(la_max(iset), la_min(iset), npgfa(iset), rpgfa(:, iset), zeta(:, iset), &
352 lb_max(jset), lb_min(jset), npgfb(jset), rpgfb(:, jset), zetb(:, jset), &
355 CALL overlap_ab(la_max(iset), la_min(iset), npgfa(iset), rpgfa(:, iset), zeta(:, iset), &
356 lb_max(jset), lb_min(jset), npgfb(jset), rpgfb(:, jset), zetb(:, jset), &
365 CALL overlap_ab_test(la_max(iset), la_min(iset), npgfa(iset), zeta(:, iset), &
366 lb_max(jset), lb_min(jset), npgfb(jset), zetb(:, jset), &
370 CALL ab_contract(sab(sgfa:m1, sgfb:m2), sint(1:ncoa, 1:ncob), scon_a(:, sgfa:), scon_b(:, sgfb:), &
371 ncoa, ncob, nsgfa(iset), nsgfb(jset))
372 IF (calculate_forces)
THEN
374 CALL ab_contract(dsab(sgfa:m1, sgfb:m2, i), dsint(1:ncoa, 1:ncob, i), scon_a(:, sgfa:), &
375 scon_b(:, sgfb:), ncoa, ncob, nsgfa(iset), nsgfb(jset))
381 DEALLOCATE (sint, dsint)
383 CALL timestop(handle)
399 REAL(kind=
dp),
DIMENSION(:, :),
INTENT(INOUT) :: sab
400 REAL(kind=
dp),
DIMENSION(:, :, :),
INTENT(INOUT), &
402 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: rab
404 INTEGER,
INTENT(IN) :: m
405 LOGICAL,
INTENT(IN) :: calculate_forces
407 CHARACTER(LEN=*),
PARAMETER :: routinen =
'int_ra2m_ab_os'
409 INTEGER :: handle, i, iset, jset, m1, m2, maxco, &
410 maxcoa, maxcob, maxl, maxla, maxlb, &
411 ncoa, ncob, nseta, nsetb, sgfa, sgfb
412 INTEGER,
DIMENSION(:),
POINTER :: la_max, la_min, lb_max, lb_min, npgfa, &
414 INTEGER,
DIMENSION(:, :),
POINTER :: first_sgfa, first_sgfb
417 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: sint
418 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: dsint
419 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: scon_a, scon_b, zeta, zetb
422 CALL timeset(routinen, handle)
423 NULLIFY (la_max, la_min, lb_max, lb_min, npgfa, npgfb, nsgfa, nsgfb, &
424 first_sgfa, first_sgfb, scon_a, scon_b, zeta, zetb)
427 first_sgfa => fba%first_sgf
432 nsgfa => fba%nsgf_set
436 first_sgfb => fbb%first_sgf
441 nsgfb => fbb%nsgf_set
447 maxco = max(maxcoa, maxcob)
448 maxl = max(maxla, maxlb)
449 ALLOCATE (sint(maxco, maxco))
450 ALLOCATE (dsint(maxco, maxco, 3))
452 dab = sqrt(sum(rab**2))
455 IF (calculate_forces)
THEN
456 IF (
PRESENT(dsab)) dsab = 0.0_dp
461 ncoa = npgfa(iset)*(
ncoset(la_max(iset)) -
ncoset(la_min(iset) - 1))
462 sgfa = first_sgfa(1, iset)
466 ncob = npgfb(jset)*(
ncoset(lb_max(jset)) -
ncoset(lb_min(jset) - 1))
467 sgfb = first_sgfb(1, jset)
468 m1 = sgfa + nsgfa(iset) - 1
469 m2 = sgfb + nsgfb(jset) - 1
471 CALL operator_ra2m(la_max(iset), la_min(iset), npgfa(iset), zeta(:, iset), &
472 lb_max(jset), lb_min(jset), npgfb(jset), zetb(:, jset), &
473 m, rab, sint, dsint, calculate_forces)
475 CALL ab_contract(sab(sgfa:m1, sgfb:m2), sint, scon_a(:, sgfa:), scon_b(:, sgfb:), &
476 ncoa, ncob, nsgfa(iset), nsgfb(jset))
477 IF (calculate_forces)
THEN
479 CALL ab_contract(dsab(sgfa:m1, sgfb:m2, i), dsint(:, :, i), scon_a(:, sgfa:), &
480 scon_b(:, sgfb:), ncoa, ncob, nsgfa(iset), nsgfb(jset))
486 DEALLOCATE (sint, dsint)
488 CALL timestop(handle)
505 calculate_forces, debug, dmax)
507 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: abaint
508 REAL(kind=
dp),
ALLOCATABLE, &
509 DIMENSION(:, :, :, :),
OPTIONAL :: dabdaint
510 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: rab
512 LOGICAL,
INTENT(IN) :: calculate_forces, debug
513 REAL(kind=
dp),
INTENT(INOUT) :: dmax
515 CHARACTER(LEN=*),
PARAMETER :: routinen =
'int_overlap_aba_os'
517 INTEGER :: handle, i, iset, jset, kaset, m1, m2, &
518 m3, ncoa, ncob, ncoc, nseta, nsetb, &
519 nsetca, sgfa, sgfb, sgfc
520 INTEGER,
DIMENSION(:),
POINTER :: la_max, la_min, lb_max, lb_min, lca_max, &
521 lca_min, npgfa, npgfb, npgfca, nsgfa, &
523 INTEGER,
DIMENSION(:, :),
POINTER :: first_sgfa, first_sgfb, first_sgfca
524 REAL(kind=
dp) :: dab, dac, dbc
525 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: saba
526 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :, :) :: sdaba
527 REAL(kind=
dp),
DIMENSION(3) :: ra, rac, rb, rbc
528 REAL(kind=
dp),
DIMENSION(:),
POINTER :: set_radius_a, set_radius_b, set_radius_ca
529 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: rpgfa, rpgfb, rpgfca, scon_a, scon_b, &
530 scon_ca, zeta, zetb, zetca
532 CALL timeset(routinen, handle)
533 NULLIFY (la_max, la_min, lb_max, lb_min, lca_max, lca_min, npgfa, npgfb, &
534 npgfca, nsgfa, nsgfb, nsgfca)
535 NULLIFY (first_sgfa, first_sgfb, first_sgfca, set_radius_a, set_radius_b, &
536 set_radius_ca, rpgfa, rpgfb, rpgfca, scon_a, scon_b, scon_ca, &
540 first_sgfa => oba%first_sgf
545 nsgfa => oba%nsgf_set
546 rpgfa => oba%pgf_radius
547 set_radius_a => oba%set_radius
551 first_sgfb => obb%first_sgf
556 nsgfb => obb%nsgf_set
557 rpgfb => obb%pgf_radius
558 set_radius_b => obb%set_radius
563 first_sgfca => fba%first_sgf
568 nsgfca => fba%nsgf_set
569 rpgfca => fba%pgf_radius
570 set_radius_ca => fba%set_radius
574 dab = sqrt(sum(rab**2))
577 IF (calculate_forces)
THEN
578 IF (
PRESENT(dabdaint)) dabdaint = 0.0_dp
583 ncoa = npgfa(iset)*(
ncoset(la_max(iset)) -
ncoset(la_min(iset) - 1))
584 sgfa = first_sgfa(1, iset)
588 IF (set_radius_a(iset) + set_radius_b(jset) < dab) cycle
590 ncob = npgfb(jset)*(
ncoset(lb_max(jset)) -
ncoset(lb_min(jset) - 1))
591 sgfb = first_sgfb(1, jset)
592 m1 = sgfa + nsgfa(iset) - 1
593 m2 = sgfb + nsgfb(jset) - 1
603 IF (set_radius_b(jset) + set_radius_ca(kaset) < dab) cycle
605 ncoc = npgfca(kaset)*(
ncoset(lca_max(kaset)) -
ncoset(lca_min(kaset) - 1))
606 sgfc = first_sgfca(1, kaset)
607 m3 = sgfc + nsgfca(kaset) - 1
608 IF (ncoa*ncob*ncoc > 0)
THEN
609 ALLOCATE (saba(ncoa, ncob, ncoc))
611 IF (calculate_forces)
THEN
612 ALLOCATE (sdaba(ncoa, ncob, ncoc, 3))
613 CALL overlap_aab(la_max(iset), la_min(iset), npgfa(iset), rpgfa(:, iset), zeta(:, iset), &
614 lca_max(kaset), lca_min(kaset), npgfca(kaset), rpgfca(:, kaset), zetca(:, kaset), &
615 lb_max(jset), lb_min(jset), npgfb(jset), rpgfb(:, jset), zetb(:, jset), &
616 rab, saba=saba, daba=sdaba)
619 CALL abc_contract(dabdaint(sgfa:m1, sgfb:m2, sgfc:m3, i), sdaba(1:ncoa, 1:ncob, 1:ncoc, i), &
620 scon_a(:, sgfa:), scon_b(:, sgfb:), scon_ca(:, sgfc:), &
621 ncoa, ncob, ncoc, nsgfa(iset), nsgfb(jset), nsgfca(kaset))
626 CALL overlap_aab(la_max(iset), la_min(iset), npgfa(iset), rpgfa(:, iset), zeta(:, iset), &
627 lca_max(kaset), lca_min(kaset), npgfca(kaset), rpgfca(:, kaset), zetca(:, kaset), &
628 lb_max(jset), lb_min(jset), npgfb(jset), rpgfb(:, jset), zetb(:, jset), &
636 CALL overlap_abc_test(la_max(iset), npgfa(iset), zeta(:, iset), la_min(iset), &
637 lb_max(jset), npgfb(jset), zetb(:, jset), lb_min(jset), &
638 lca_max(kaset), npgfca(kaset), zetca(:, kaset), lca_min(kaset), &
639 ra, rb, ra, saba, dmax)
641 CALL abc_contract(abaint(sgfa:m1, sgfb:m2, sgfc:m3), saba(1:ncoa, 1:ncob, 1:ncoc), &
642 scon_a(:, sgfa:), scon_b(:, sgfb:), scon_ca(:, sgfc:), &
643 ncoa, ncob, ncoc, nsgfa(iset), nsgfb(jset), nsgfca(kaset))
650 CALL timestop(handle)
668 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: abbint
669 REAL(kind=
dp),
ALLOCATABLE, &
670 DIMENSION(:, :, :, :),
OPTIONAL :: dabbint
671 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: rab
673 LOGICAL,
INTENT(IN) :: calculate_forces, debug
674 REAL(kind=
dp),
INTENT(INOUT) :: dmax
676 CHARACTER(LEN=*),
PARAMETER :: routinen =
'int_overlap_abb_os'
678 INTEGER :: handle, i, iset, jset, kbset, m1, m2, &
679 m3, ncoa, ncob, ncoc, nseta, nsetb, &
680 nsetcb, sgfa, sgfb, sgfc
681 INTEGER,
DIMENSION(:),
POINTER :: la_max, la_min, lb_max, lb_min, lcb_max, &
682 lcb_min, npgfa, npgfb, npgfcb, nsgfa, &
684 INTEGER,
DIMENSION(:, :),
POINTER :: first_sgfa, first_sgfb, first_sgfcb
685 REAL(kind=
dp) :: dab, dac, dbc
686 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: sabb
687 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :, :) :: sdabb
688 REAL(kind=
dp),
DIMENSION(3) :: ra, rac, rb, rbc
689 REAL(kind=
dp),
DIMENSION(:),
POINTER :: set_radius_a, set_radius_b, set_radius_cb
690 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: rpgfa, rpgfb, rpgfcb, scon_a, scon_b, &
691 scon_cb, zeta, zetb, zetcb
693 CALL timeset(routinen, handle)
694 NULLIFY (la_max, la_min, lb_max, lb_min, lcb_max, lcb_min, npgfa, npgfb, &
695 npgfcb, nsgfa, nsgfb, nsgfcb)
696 NULLIFY (first_sgfa, first_sgfb, first_sgfcb, set_radius_a, set_radius_b, &
697 set_radius_cb, rpgfa, rpgfb, rpgfcb, scon_a, scon_b, scon_cb, &
701 first_sgfa => oba%first_sgf
706 nsgfa => oba%nsgf_set
707 rpgfa => oba%pgf_radius
708 set_radius_a => oba%set_radius
712 first_sgfb => obb%first_sgf
717 nsgfb => obb%nsgf_set
718 rpgfb => obb%pgf_radius
719 set_radius_b => obb%set_radius
724 first_sgfcb => fbb%first_sgf
729 nsgfcb => fbb%nsgf_set
730 rpgfcb => fbb%pgf_radius
731 set_radius_cb => fbb%set_radius
735 dab = sqrt(sum(rab**2))
738 IF (calculate_forces)
THEN
739 IF (
PRESENT(dabbint)) dabbint = 0.0_dp
744 ncoa = npgfa(iset)*(
ncoset(la_max(iset)) -
ncoset(la_min(iset) - 1))
745 sgfa = first_sgfa(1, iset)
749 IF (set_radius_a(iset) + set_radius_b(jset) < dab) cycle
751 ncob = npgfb(jset)*(
ncoset(lb_max(jset)) -
ncoset(lb_min(jset) - 1))
752 sgfb = first_sgfb(1, jset)
753 m1 = sgfa + nsgfa(iset) - 1
754 m2 = sgfb + nsgfb(jset) - 1
764 IF (set_radius_a(iset) + set_radius_cb(kbset) < dab) cycle
766 ncoc = npgfcb(kbset)*(
ncoset(lcb_max(kbset)) -
ncoset(lcb_min(kbset) - 1))
767 sgfc = first_sgfcb(1, kbset)
768 m3 = sgfc + nsgfcb(kbset) - 1
769 IF (ncoa*ncob*ncoc > 0)
THEN
770 ALLOCATE (sabb(ncoa, ncob, ncoc))
771 IF (calculate_forces)
THEN
772 ALLOCATE (sdabb(ncoa, ncob, ncoc, 3))
773 CALL overlap_abb(la_max(iset), la_min(iset), npgfa(iset), rpgfa(:, iset), zeta(:, iset), &
774 lb_max(jset), lb_min(jset), npgfb(jset), rpgfb(:, jset), zetb(:, jset), &
775 lcb_max(kbset), lcb_min(kbset), npgfcb(kbset), rpgfcb(:, kbset), zetcb(:, kbset), &
779 CALL abc_contract(dabbint(sgfa:m1, sgfb:m2, sgfc:m3, i), sdabb(1:ncoa, 1:ncob, 1:ncoc, i), &
780 scon_a(:, sgfa:), scon_b(:, sgfb:), scon_cb(:, sgfc:), &
781 ncoa, ncob, ncoc, nsgfa(iset), nsgfb(jset), nsgfcb(kbset))
785 CALL overlap_abb(la_max(iset), la_min(iset), npgfa(iset), rpgfa(:, iset), zeta(:, iset), &
786 lb_max(jset), lb_min(jset), npgfb(jset), rpgfb(:, jset), zetb(:, jset), &
787 lcb_max(kbset), lcb_min(kbset), npgfcb(kbset), rpgfcb(:, kbset), zetcb(:, kbset), &
794 CALL overlap_abc_test(la_max(iset), npgfa(iset), zeta(:, iset), la_min(iset), &
795 lb_max(jset), npgfb(jset), zetb(:, jset), lb_min(jset), &
796 lcb_max(kbset), npgfcb(kbset), zetcb(:, kbset), lcb_min(kbset), &
797 ra, rb, rb, sabb, dmax)
800 CALL abc_contract(abbint(sgfa:m1, sgfb:m2, sgfc:m3), sabb(1:ncoa, 1:ncob, 1:ncoc), &
801 scon_a(:, sgfa:), scon_b(:, sgfb:), scon_cb(:, sgfc:), &
802 ncoa, ncob, ncoc, nsgfa(iset), nsgfb(jset), nsgfcb(kbset))
810 CALL timestop(handle)
825 REAL(kind=
dp),
DIMENSION(:, :, :, :),
POINTER :: saabb
827 REAL(kind=
dp),
DIMENSION(3),
INTENT(IN) :: rab
828 LOGICAL,
INTENT(IN) :: debug
829 REAL(kind=
dp),
INTENT(INOUT) :: dmax
831 CHARACTER(LEN=*),
PARAMETER :: routinen =
'int_overlap_aabb_os'
833 INTEGER :: handle, iset, isgfa1, jset, jsgfa2, kset, ksgfb1, lds, lset, lsgfb2, m1, m2, m3, &
834 m4, maxco, maxcoa, maxcob, maxl, maxla, maxlb, ncoa1, ncoa2, ncob1, ncob2, nseta, nsetb, &
835 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 LOGICAL :: asets_equal, bsets_equal
840 REAL(kind=
dp) :: dab, ra(3), rb(3)
841 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: swork
842 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :, :) :: sint
843 REAL(kind=
dp),
DIMENSION(:),
POINTER :: set_radius_a, set_radius_b
844 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: rpgfa, rpgfb, sphi_a, sphi_b, zeta, zetb
846 CALL timeset(routinen, handle)
847 NULLIFY (la_max, la_min, lb_max, lb_min, npgfa, npgfb, nsgfa, nsgfb, &
848 first_sgfa, first_sgfb, set_radius_a, set_radius_b, rpgfa, rpgfb, &
849 sphi_a, sphi_b, zeta, zetb)
852 first_sgfa => oba%first_sgf
857 nsgfa => oba%nsgf_set
858 rpgfa => oba%pgf_radius
859 set_radius_a => oba%set_radius
863 first_sgfb => obb%first_sgf
868 nsgfb => obb%nsgf_set
869 rpgfb => obb%pgf_radius
870 set_radius_b => obb%set_radius
876 maxco = max(maxcoa, maxcob)
879 maxl = max(maxla, maxlb)
881 ALLOCATE (sint(maxco, maxco, maxco, maxco))
882 ALLOCATE (swork(lds, lds))
886 dab = sqrt(sum(rab**2))
890 ncoa1 = npgfa(iset)*
ncoset(la_max(iset))
891 sgfa1 = first_sgfa(1, iset)
892 m1 = sgfa1 + nsgfa(iset) - 1
894 DO jset = iset, nseta
896 ncoa2 = npgfa(jset)*
ncoset(la_max(jset))
897 sgfa2 = first_sgfa(1, jset)
898 m2 = sgfa2 + nsgfa(jset) - 1
902 ncob1 = npgfb(kset)*
ncoset(lb_max(kset))
903 sgfb1 = first_sgfb(1, kset)
904 m3 = sgfb1 + nsgfb(kset) - 1
906 DO lset = kset, nsetb
908 ncob2 = npgfb(lset)*
ncoset(lb_max(lset))
909 sgfb2 = first_sgfb(1, lset)
910 m4 = sgfb2 + nsgfb(lset) - 1
913 asets_equal = .false.
914 IF (iset == jset) asets_equal = .true.
915 bsets_equal = .false.
916 IF (kset == lset) bsets_equal = .true.
918 CALL overlap_aabb(la_max(iset), la_min(iset), npgfa(iset), rpgfa(:, iset), zeta(:, iset), &
919 la_max(jset), la_min(jset), npgfa(jset), rpgfa(:, jset), zeta(:, jset), &
920 lb_max(kset), lb_min(kset), npgfb(kset), rpgfb(:, kset), zetb(:, kset), &
921 lb_max(lset), lb_min(lset), npgfb(lset), rpgfb(:, lset), zetb(:, lset), &
922 asets_equal, bsets_equal, rab, dab, sint, swork, lds)
928 la_max(jset), la_min(jset), npgfa(jset), zeta(:, jset), &
929 lb_max(kset), lb_min(kset), npgfb(kset), zetb(:, kset), &
930 lb_max(lset), lb_min(lset), npgfb(lset), zetb(:, lset), &
934 CALL abcd_contract(saabb(sgfa1:m1, sgfa2:m2, sgfb1:m3, sgfb2:m4), sint, sphi_a(:, sgfa1:), &
935 sphi_a(:, sgfa2:), sphi_b(:, sgfb1:), sphi_b(:, sgfb2:), ncoa1, ncoa2, &
936 ncob1, ncob2, nsgfa(iset), nsgfa(jset), nsgfb(kset), nsgfb(lset))
939 DO isgfa1 = sgfa1, m1
940 DO jsgfa2 = sgfa2, m2
941 DO ksgfb1 = sgfb1, m3
942 DO lsgfb2 = sgfb2, m4
943 saabb(jsgfa2, isgfa1, ksgfb1, lsgfb2) = saabb(isgfa1, jsgfa2, ksgfb1, lsgfb2)
944 saabb(isgfa1, jsgfa2, lsgfb2, ksgfb1) = saabb(isgfa1, jsgfa2, ksgfb1, lsgfb2)
945 saabb(jsgfa2, isgfa1, lsgfb2, ksgfb1) = saabb(isgfa1, jsgfa2, ksgfb1, lsgfb2)
956 DEALLOCATE (sint, swork)
958 CALL timestop(handle)
Interface for the calculation of integrals over s-functions and the s-type auxiliary integrals using ...
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
Calculate the first derivative of an integral block.
subroutine, public dabdr_noscreen(la_max, npgfa, zeta, lb_max, npgfb, ab, dabdx, dabdy, dabdz)
Calculate the first derivative of an integral block. This takes the derivative with respect to the at...
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.
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)
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)
...
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 dp
Provides Cartesian and spherical orbital pointers and indices.
integer, dimension(:), allocatable, public ncoset