(git:374b731)
Loading...
Searching...
No Matches
generic_os_integrals.F
Go to the documentation of this file.
1!--------------------------------------------------------------------------------------------------!
2! CP2K: A general program to perform molecular dynamics simulations !
3! Copyright 2000-2024 CP2K developers group <https://cp2k.org> !
4! !
5! SPDX-License-Identifier: GPL-2.0-or-later !
6!--------------------------------------------------------------------------------------------------!
7
8! **************************************************************************************************
9!> \brief Calculation of contracted, spherical Gaussian integrals using the (OS) integral
10!> scheme. Routines for the following two-center integrals:
11!> i) (a|O(r12)|b) where O(r12) is the overlap, coulomb operator etc.
12!> ii) (aba) and (abb) s-overlaps
13!> \par History
14!> created [06.2015]
15!> 05.2019: Added truncated coulomb operator (A. Bussy)
16!> \author Dorothea Golze
17! **************************************************************************************************
24 USE ai_operators_r12, ONLY: ab_sint_os,&
28 cps_verf2,&
32 USE ai_overlap, ONLY: overlap_aab,&
35 USE ai_overlap_aabb, ONLY: overlap_aabb
47 USE kinds, ONLY: dp
48 USE orbital_pointers, ONLY: ncoset
49#include "./base/base_uses.f90"
50
51 IMPLICIT NONE
52
53 PRIVATE
54
55! **************************************************************************************************
56
57 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'generic_os_integrals'
58
61
62CONTAINS
63
64! **************************************************************************************************
65!> \brief Calcululates the two-center integrals of the type (a|O(r12)|b) using the OS scheme
66!> \param r12_operator the integral operator, which depends on r12=|r1-r2|
67!> \param vab integral matrix of spherical contracted Gaussian functions
68!> \param dvab derivative of the integrals
69!> \param rab distance vector between center A and B
70!> \param fba basis at center A
71!> \param fbb basis at center B
72!> \param omega parameter in the operator
73!> \param r_cutoff the cutoff in case of truncated coulomb operator
74!> \param calculate_forces ...
75! **************************************************************************************************
76 SUBROUTINE int_operators_r12_ab_os(r12_operator, vab, dvab, rab, fba, fbb, omega, r_cutoff, &
77 calculate_forces)
78
79 INTEGER, INTENT(IN) :: r12_operator
80 REAL(kind=dp), DIMENSION(:, :), INTENT(INOUT) :: vab
81 REAL(kind=dp), DIMENSION(:, :, :), INTENT(INOUT), &
82 OPTIONAL :: dvab
83 REAL(kind=dp), DIMENSION(3), INTENT(IN) :: rab
84 TYPE(gto_basis_set_type), POINTER :: fba, fbb
85 REAL(kind=dp), INTENT(IN), OPTIONAL :: omega, r_cutoff
86 LOGICAL, INTENT(IN) :: calculate_forces
87
88 CHARACTER(LEN=*), PARAMETER :: routinen = 'int_operators_r12_ab_os'
89
90 INTEGER :: handle
91 REAL(kind=dp) :: my_omega, my_r_cutoff
92
93 PROCEDURE(ab_sint_os), POINTER :: cps_operator2
94
95 NULLIFY (cps_operator2)
96 CALL timeset(routinen, handle)
97
98 my_omega = 1.0_dp
99 my_r_cutoff = 1.0_dp
100
101 SELECT CASE (r12_operator)
102 CASE (operator_coulomb)
103 cps_operator2 => cps_coulomb2
104 CASE (operator_verf)
105 cps_operator2 => cps_verf2
106 IF (PRESENT(omega)) my_omega = omega
107 CASE (operator_verfc)
108 cps_operator2 => cps_verfc2
109 IF (PRESENT(omega)) my_omega = omega
110 CASE (operator_vgauss)
111 cps_operator2 => cps_vgauss2
112 IF (PRESENT(omega)) my_omega = omega
113 CASE (operator_gauss)
114 cps_operator2 => cps_gauss2
115 IF (PRESENT(omega)) my_omega = omega
116 CASE (operator_truncated)
117 cps_operator2 => cps_truncated2
118 IF (PRESENT(r_cutoff)) my_r_cutoff = r_cutoff
119 CASE DEFAULT
120 cpabort("Operator not available")
121 END SELECT
122
123 CALL int_operator_ab_os_low(cps_operator2, vab, dvab, rab, fba, fbb, my_omega, my_r_cutoff, &
124 calculate_forces)
125
126 CALL timestop(handle)
127
128 END SUBROUTINE int_operators_r12_ab_os
129
130! **************************************************************************************************
131!> \brief calculate integrals (a|O(r12)|b)
132!> \param cps_operator2 procedure pointer for the respective operator.
133!> \param vab integral matrix of spherical contracted Gaussian functions
134!> \param dvab derivative of the integrals
135!> \param rab distance vector between center A and B
136!> \param fba basis at center A
137!> \param fbb basis at center B
138!> \param omega parameter in the operator
139!> \param r_cutoff ...
140!> \param calculate_forces ...
141! **************************************************************************************************
142 SUBROUTINE int_operator_ab_os_low(cps_operator2, vab, dvab, rab, fba, fbb, omega, r_cutoff, &
143 calculate_forces)
144
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
150 TYPE(gto_basis_set_type), POINTER :: fba, fbb
151 REAL(kind=dp), INTENT(IN) :: omega, r_cutoff
152 LOGICAL, INTENT(IN) :: calculate_forces
153
154 CHARACTER(LEN=*), PARAMETER :: routinen = 'int_operator_ab_os_low'
155
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, &
161 npgfb, nsgfa, nsgfb
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
167
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)
171
172 ! basis ikind
173 first_sgfa => fba%first_sgf
174 la_max => fba%lmax
175 la_min => fba%lmin
176 npgfa => fba%npgf
177 nseta = fba%nset
178 nsgfa => fba%nsgf_set
179 sphi_a => fba%sphi
180 zeta => fba%zet
181 ! basis jkind
182 first_sgfb => fbb%first_sgf
183 lb_max => fbb%lmax
184 lb_min => fbb%lmin
185 npgfb => fbb%npgf
186 nsetb = fbb%nset
187 nsgfb => fbb%nsgf_set
188 sphi_b => fbb%sphi
189 zetb => fbb%zet
190
191 CALL get_gto_basis_set(fba, maxco=maxcoa, maxl=maxla)
192 CALL get_gto_basis_set(fbb, maxco=maxcob, maxl=maxlb)
193 maxco = max(maxcoa, maxcob)
194 IF (calculate_forces) THEN
195 maxl = max(maxla + 1, maxlb)
196 ELSE
197 maxl = max(maxla, maxlb)
198 END IF
199 lds = ncoset(maxl)
200
201 rab2 = sum(rab*rab)
202 dab = sqrt(rab2)
203
204 vab = 0.0_dp
205 IF (calculate_forces) dvab = 0.0_dp
206
207 DO iset = 1, nseta
208
209 ncoa = npgfa(iset)*ncoset(la_max(iset))
210 ncoap = npgfa(iset)*ncoset(la_max(iset) + 1)
211 sgfa = first_sgfa(1, iset)
212
213 DO jset = 1, nsetb
214
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
220
221 ! calculate integrals
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))
225 devab = 0._dp
226 vwork = 0.0_dp
227 vac = 0.0_dp
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))
233 DO i = 1, 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))
236 END DO
237
238 ELSE
239 ALLOCATE (vwork(ncoa, ncob, la_max(iset) + lb_max(jset) + 1), &
240 vac(ncoa, ncob), vac_plus(ncoap, ncobp), devab(ncoa, ncob, 3))
241 vwork = 0.0_dp
242 vac = 0.0_dp
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)
246 END IF
247
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)
251 END DO
252 END DO
253
254 CALL timestop(handle)
255
256 END SUBROUTINE int_operator_ab_os_low
257
258! **************************************************************************************************
259!> \brief calculate overlap integrals (a,b)
260!> \param sab integral (a,b)
261!> \param dsab derivative of sab with respect to A
262!> \param rab distance vector between center A and B
263!> \param fba basis at center A
264!> \param fbb basis at center B
265!> \param calculate_forces ...
266!> \param debug integrals are debugged by recursive routines if requested
267!> \param dmax maximal deviation between integrals when debugging
268! **************************************************************************************************
269 SUBROUTINE int_overlap_ab_os(sab, dsab, rab, fba, fbb, calculate_forces, debug, dmax)
270
271 REAL(kind=dp), DIMENSION(:, :), INTENT(INOUT) :: sab
272 REAL(kind=dp), DIMENSION(:, :, :), INTENT(INOUT), &
273 OPTIONAL :: dsab
274 REAL(kind=dp), DIMENSION(3), INTENT(IN) :: rab
275 TYPE(gto_basis_set_type), POINTER :: fba, fbb
276 LOGICAL, INTENT(IN) :: calculate_forces, debug
277 REAL(kind=dp), INTENT(INOUT) :: dmax
278
279 CHARACTER(LEN=*), PARAMETER :: routinen = 'int_overlap_ab_os'
280
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, &
285 npgfb, nsgfa, nsgfb
286 INTEGER, DIMENSION(:, :), POINTER :: first_sgfa, first_sgfb
287 LOGICAL :: failure
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
293
294 failure = .false.
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)
298
299 ! basis ikind
300 first_sgfa => fba%first_sgf
301 la_max => fba%lmax
302 la_min => fba%lmin
303 npgfa => fba%npgf
304 nseta = fba%nset
305 nsgfa => fba%nsgf_set
306 rpgfa => fba%pgf_radius
307 set_radius_a => fba%set_radius
308 scon_a => fba%scon
309 zeta => fba%zet
310 ! basis jkind
311 first_sgfb => fbb%first_sgf
312 lb_max => fbb%lmax
313 lb_min => fbb%lmin
314 npgfb => fbb%npgf
315 nsetb = fbb%nset
316 nsgfb => fbb%nsgf_set
317 rpgfb => fbb%pgf_radius
318 set_radius_b => fbb%set_radius
319 scon_b => fbb%scon
320 zetb => fbb%zet
321
322 CALL get_gto_basis_set(fba, maxco=maxcoa, maxl=maxla)
323 CALL get_gto_basis_set(fbb, maxco=maxcob, maxl=maxlb)
324 maxco = max(maxcoa, maxcob)
325 maxl = max(maxla, maxlb)
326 ALLOCATE (sint(maxco, maxco))
327 ALLOCATE (dsint(maxco, maxco, 3))
328
329 dab = sqrt(sum(rab**2))
330
331 sab = 0.0_dp
332 IF (calculate_forces) THEN
333 IF (PRESENT(dsab)) dsab = 0.0_dp
334 END IF
335
336 DO iset = 1, nseta
337
338 ncoa = npgfa(iset)*(ncoset(la_max(iset)) - ncoset(la_min(iset) - 1))
339 sgfa = first_sgfa(1, iset)
340
341 DO jset = 1, nsetb
342
343 IF (set_radius_a(iset) + set_radius_b(jset) < dab) cycle
344
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
349
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), &
353 rab, sint, dsint)
354 ELSE
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), &
357 rab, sint)
358
359 END IF
360
361 ! debug if requested
362 IF (debug) THEN
363 ra = 0.0_dp
364 rb = rab
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), &
367 ra, rb, sint, dmax)
368 END IF
369
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
373 DO i = 1, 3
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))
376 END DO
377 END IF
378 END DO
379 END DO
380
381 DEALLOCATE (sint, dsint)
382
383 CALL timestop(handle)
384
385 END SUBROUTINE int_overlap_ab_os
386
387! **************************************************************************************************
388!> \brief calculate integrals (a|(r-Ra)^(2m)|b)
389!> \param sab integral (a|(r-Ra)^(2m)|b)
390!> \param dsab derivative of sab with respect to A
391!> \param rab distance vector between center A and B
392!> \param fba fba basis at center A
393!> \param fbb fbb basis at center B
394!> \param m exponent m in operator (r-Ra)^(2m)
395!> \param calculate_forces ...
396! **************************************************************************************************
397 SUBROUTINE int_ra2m_ab_os(sab, dsab, rab, fba, fbb, m, calculate_forces)
398
399 REAL(kind=dp), DIMENSION(:, :), INTENT(INOUT) :: sab
400 REAL(kind=dp), DIMENSION(:, :, :), INTENT(INOUT), &
401 OPTIONAL :: dsab
402 REAL(kind=dp), DIMENSION(3), INTENT(IN) :: rab
403 TYPE(gto_basis_set_type), POINTER :: fba, fbb
404 INTEGER, INTENT(IN) :: m
405 LOGICAL, INTENT(IN) :: calculate_forces
406
407 CHARACTER(LEN=*), PARAMETER :: routinen = 'int_ra2m_ab_os'
408
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, &
413 npgfb, nsgfa, nsgfb
414 INTEGER, DIMENSION(:, :), POINTER :: first_sgfa, first_sgfb
415 LOGICAL :: failure
416 REAL(kind=dp) :: dab
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
420
421 failure = .false.
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)
425
426 ! basis ikind
427 first_sgfa => fba%first_sgf
428 la_max => fba%lmax
429 la_min => fba%lmin
430 npgfa => fba%npgf
431 nseta = fba%nset
432 nsgfa => fba%nsgf_set
433 scon_a => fba%scon
434 zeta => fba%zet
435 ! basis jkind
436 first_sgfb => fbb%first_sgf
437 lb_max => fbb%lmax
438 lb_min => fbb%lmin
439 npgfb => fbb%npgf
440 nsetb = fbb%nset
441 nsgfb => fbb%nsgf_set
442 scon_b => fbb%scon
443 zetb => fbb%zet
444
445 CALL get_gto_basis_set(fba, maxco=maxcoa, maxl=maxla)
446 CALL get_gto_basis_set(fbb, maxco=maxcob, maxl=maxlb)
447 maxco = max(maxcoa, maxcob)
448 maxl = max(maxla, maxlb)
449 ALLOCATE (sint(maxco, maxco))
450 ALLOCATE (dsint(maxco, maxco, 3))
451
452 dab = sqrt(sum(rab**2))
453
454 sab = 0.0_dp
455 IF (calculate_forces) THEN
456 IF (PRESENT(dsab)) dsab = 0.0_dp
457 END IF
458
459 DO iset = 1, nseta
460
461 ncoa = npgfa(iset)*(ncoset(la_max(iset)) - ncoset(la_min(iset) - 1))
462 sgfa = first_sgfa(1, iset)
463
464 DO jset = 1, nsetb
465
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
470
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)
474
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
478 DO i = 1, 3
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))
481 END DO
482 END IF
483 END DO
484 END DO
485
486 DEALLOCATE (sint, dsint)
487
488 CALL timestop(handle)
489
490 END SUBROUTINE int_ra2m_ab_os
491
492! **************************************************************************************************
493!> \brief calculate integrals (a,b,fa)
494!> \param abaint integral (a,b,fa)
495!> \param dabdaint derivative of abaint with respect to A
496!> \param rab distance vector between center A and B
497!> \param oba orbital basis at center A
498!> \param obb orbital basis at center B
499!> \param fba auxiliary basis set at center A
500!> \param calculate_forces ...
501!> \param debug integrals are debugged by recursive routines if requested
502!> \param dmax maximal deviation between integrals when debugging
503! **************************************************************************************************
504 SUBROUTINE int_overlap_aba_os(abaint, dabdaint, rab, oba, obb, fba, &
505 calculate_forces, debug, dmax)
506
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
511 TYPE(gto_basis_set_type), POINTER :: oba, obb, fba
512 LOGICAL, INTENT(IN) :: calculate_forces, debug
513 REAL(kind=dp), INTENT(INOUT) :: dmax
514
515 CHARACTER(LEN=*), PARAMETER :: routinen = 'int_overlap_aba_os'
516
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, &
522 nsgfb, nsgfca
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
531
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, &
537 zeta, zetb, zetca)
538
539 ! basis ikind
540 first_sgfa => oba%first_sgf
541 la_max => oba%lmax
542 la_min => oba%lmin
543 npgfa => oba%npgf
544 nseta = oba%nset
545 nsgfa => oba%nsgf_set
546 rpgfa => oba%pgf_radius
547 set_radius_a => oba%set_radius
548 scon_a => oba%scon
549 zeta => oba%zet
550 ! basis jkind
551 first_sgfb => obb%first_sgf
552 lb_max => obb%lmax
553 lb_min => obb%lmin
554 npgfb => obb%npgf
555 nsetb = obb%nset
556 nsgfb => obb%nsgf_set
557 rpgfb => obb%pgf_radius
558 set_radius_b => obb%set_radius
559 scon_b => obb%scon
560 zetb => obb%zet
561
562 ! basis RI A
563 first_sgfca => fba%first_sgf
564 lca_max => fba%lmax
565 lca_min => fba%lmin
566 npgfca => fba%npgf
567 nsetca = fba%nset
568 nsgfca => fba%nsgf_set
569 rpgfca => fba%pgf_radius
570 set_radius_ca => fba%set_radius
571 scon_ca => fba%scon
572 zetca => fba%zet
573
574 dab = sqrt(sum(rab**2))
575
576 abaint = 0.0_dp
577 IF (calculate_forces) THEN
578 IF (PRESENT(dabdaint)) dabdaint = 0.0_dp
579 END IF
580
581 DO iset = 1, nseta
582
583 ncoa = npgfa(iset)*(ncoset(la_max(iset)) - ncoset(la_min(iset) - 1))
584 sgfa = first_sgfa(1, iset)
585
586 DO jset = 1, nsetb
587
588 IF (set_radius_a(iset) + set_radius_b(jset) < dab) cycle
589
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
594
595 ! calculate integrals abaint and derivative [d(a,b,a)/dA] dabdaint if requested
596 rac = 0._dp
597 dac = 0._dp
598 rbc = -rab
599 dbc = dab
600
601 DO kaset = 1, nsetca
602
603 IF (set_radius_b(jset) + set_radius_ca(kaset) < dab) cycle
604
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))
610 ! integrals
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)
617
618 DO i = 1, 3
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))
622 END DO
623
624 DEALLOCATE (sdaba)
625 ELSE
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), &
629 rab, saba=saba)
630
631 END IF
632 ! debug if requested
633 IF (debug) THEN
634 ra = 0.0_dp
635 rb = rab
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)
640 END IF
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))
644 DEALLOCATE (saba)
645 END IF
646 END DO
647 END DO
648 END DO
649
650 CALL timestop(handle)
651
652 END SUBROUTINE int_overlap_aba_os
653
654! **************************************************************************************************
655!> \brief calculate integrals (a,b,fb)
656!> \param abbint integral (a,b,fb)
657!> \param dabbint derivative of abbint with respect to A
658!> \param rab distance vector between center A and B
659!> \param oba orbital basis at center A
660!> \param obb orbital basis at center B
661!> \param fbb auxiliary basis set at center B
662!> \param calculate_forces ...
663!> \param debug integrals are debugged by recursive routines if requested
664!> \param dmax maximal deviation between integrals when debugging
665! **************************************************************************************************
666 SUBROUTINE int_overlap_abb_os(abbint, dabbint, rab, oba, obb, fbb, calculate_forces, debug, dmax)
667
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
672 TYPE(gto_basis_set_type), POINTER :: oba, obb, fbb
673 LOGICAL, INTENT(IN) :: calculate_forces, debug
674 REAL(kind=dp), INTENT(INOUT) :: dmax
675
676 CHARACTER(LEN=*), PARAMETER :: routinen = 'int_overlap_abb_os'
677
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, &
683 nsgfb, nsgfcb
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
692
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, &
698 zeta, zetb, zetcb)
699
700 ! basis ikind
701 first_sgfa => oba%first_sgf
702 la_max => oba%lmax
703 la_min => oba%lmin
704 npgfa => oba%npgf
705 nseta = oba%nset
706 nsgfa => oba%nsgf_set
707 rpgfa => oba%pgf_radius
708 set_radius_a => oba%set_radius
709 scon_a => oba%scon
710 zeta => oba%zet
711 ! basis jkind
712 first_sgfb => obb%first_sgf
713 lb_max => obb%lmax
714 lb_min => obb%lmin
715 npgfb => obb%npgf
716 nsetb = obb%nset
717 nsgfb => obb%nsgf_set
718 rpgfb => obb%pgf_radius
719 set_radius_b => obb%set_radius
720 scon_b => obb%scon
721 zetb => obb%zet
722
723 ! basis RI B
724 first_sgfcb => fbb%first_sgf
725 lcb_max => fbb%lmax
726 lcb_min => fbb%lmin
727 npgfcb => fbb%npgf
728 nsetcb = fbb%nset
729 nsgfcb => fbb%nsgf_set
730 rpgfcb => fbb%pgf_radius
731 set_radius_cb => fbb%set_radius
732 scon_cb => fbb%scon
733 zetcb => fbb%zet
734
735 dab = sqrt(sum(rab**2))
736
737 abbint = 0.0_dp
738 IF (calculate_forces) THEN
739 IF (PRESENT(dabbint)) dabbint = 0.0_dp
740 END IF
741
742 DO iset = 1, nseta
743
744 ncoa = npgfa(iset)*(ncoset(la_max(iset)) - ncoset(la_min(iset) - 1))
745 sgfa = first_sgfa(1, iset)
746
747 DO jset = 1, nsetb
748
749 IF (set_radius_a(iset) + set_radius_b(jset) < dab) cycle
750
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
755
756 ! calculate integrals abbint and derivative [d(a,b,b)/dA] dabbint if requested
757 rac = rab
758 dac = dab
759 rbc = 0._dp
760 dbc = 0._dp
761
762 DO kbset = 1, nsetcb
763
764 IF (set_radius_a(iset) + set_radius_cb(kbset) < dab) cycle
765
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), &
776 rab, sabb, sdabb)
777
778 DO i = 1, 3
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))
782 END DO
783 DEALLOCATE (sdabb)
784 ELSE
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), &
788 rab, sabb)
789 END IF
790 ! debug if requested
791 IF (debug) THEN
792 ra = 0.0_dp
793 rb = rab
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)
798 END IF
799
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))
803 DEALLOCATE (sabb)
804 END IF
805 END DO
806
807 END DO
808 END DO
809
810 CALL timestop(handle)
811
812 END SUBROUTINE int_overlap_abb_os
813
814! **************************************************************************************************
815!> \brief calculate overlap integrals (aa,bb)
816!> \param saabb integral (aa,bb)
817!> \param oba orbital basis at center A
818!> \param obb orbital basis at center B
819!> \param rab ...
820!> \param debug integrals are debugged by recursive routines if requested
821!> \param dmax maximal deviation between integrals when debugging
822! **************************************************************************************************
823 SUBROUTINE int_overlap_aabb_os(saabb, oba, obb, rab, debug, dmax)
824
825 REAL(kind=dp), DIMENSION(:, :, :, :), POINTER :: saabb
826 TYPE(gto_basis_set_type), POINTER :: oba, obb
827 REAL(kind=dp), DIMENSION(3), INTENT(IN) :: rab
828 LOGICAL, INTENT(IN) :: debug
829 REAL(kind=dp), INTENT(INOUT) :: dmax
830
831 CHARACTER(LEN=*), PARAMETER :: routinen = 'int_overlap_aabb_os'
832
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, &
837 npgfb, nsgfa, nsgfb
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
845
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)
850
851 ! basis ikind
852 first_sgfa => oba%first_sgf
853 la_max => oba%lmax
854 la_min => oba%lmin
855 npgfa => oba%npgf
856 nseta = oba%nset
857 nsgfa => oba%nsgf_set
858 rpgfa => oba%pgf_radius
859 set_radius_a => oba%set_radius
860 sphi_a => oba%sphi
861 zeta => oba%zet
862 ! basis jkind
863 first_sgfb => obb%first_sgf
864 lb_max => obb%lmax
865 lb_min => obb%lmin
866 npgfb => obb%npgf
867 nsetb = obb%nset
868 nsgfb => obb%nsgf_set
869 rpgfb => obb%pgf_radius
870 set_radius_b => obb%set_radius
871 sphi_b => obb%sphi
872 zetb => obb%zet
873
874 CALL get_gto_basis_set(oba, maxco=maxcoa, maxl=maxla)
875 CALL get_gto_basis_set(obb, maxco=maxcob, maxl=maxlb)
876 maxco = max(maxcoa, maxcob)
877 maxla = 2*maxla
878 maxlb = 2*maxlb
879 maxl = max(maxla, maxlb)
880 lds = ncoset(maxl)
881 ALLOCATE (sint(maxco, maxco, maxco, maxco))
882 ALLOCATE (swork(lds, lds))
883 sint = 0._dp
884 swork = 0._dp
885
886 dab = sqrt(sum(rab**2))
887
888 DO iset = 1, nseta
889
890 ncoa1 = npgfa(iset)*ncoset(la_max(iset))
891 sgfa1 = first_sgfa(1, iset)
892 m1 = sgfa1 + nsgfa(iset) - 1
893
894 DO jset = iset, nseta
895
896 ncoa2 = npgfa(jset)*ncoset(la_max(jset))
897 sgfa2 = first_sgfa(1, jset)
898 m2 = sgfa2 + nsgfa(jset) - 1
899
900 DO kset = 1, nsetb
901
902 ncob1 = npgfb(kset)*ncoset(lb_max(kset))
903 sgfb1 = first_sgfb(1, kset)
904 m3 = sgfb1 + nsgfb(kset) - 1
905
906 DO lset = kset, nsetb
907
908 ncob2 = npgfb(lset)*ncoset(lb_max(lset))
909 sgfb2 = first_sgfb(1, lset)
910 m4 = sgfb2 + nsgfb(lset) - 1
911
912 ! check if sets are identical to spare some integral evaluation
913 asets_equal = .false.
914 IF (iset == jset) asets_equal = .true.
915 bsets_equal = .false.
916 IF (kset == lset) bsets_equal = .true.
917 ! calculate integrals
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)
923 ! debug if requested
924 IF (debug) THEN
925 ra = 0.0_dp
926 rb = rab
927 CALL overlap_aabb_test(la_max(iset), la_min(iset), npgfa(iset), zeta(:, iset), &
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), &
931 ra, rb, sint, dmax)
932 END IF
933
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))
937
938 ! account for the fact that some integrals are alike
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)
946 END DO
947 END DO
948 END DO
949 END DO
950
951 END DO
952 END DO
953 END DO
954 END DO
955
956 DEALLOCATE (sint, swork)
957
958 CALL timestop(handle)
959
960 END SUBROUTINE int_overlap_aabb_os
961
962END MODULE generic_os_integrals
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.
Definition ai_overlap.F:18
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....
Definition ai_overlap.F:680
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.
Definition ai_overlap.F:967
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)
...
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.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
Provides Cartesian and spherical orbital pointers and indices.
integer, dimension(:), allocatable, public ncoset