Line data Source code
1 : !--------------------------------------------------------------------------------------------------!
2 : ! CP2K: A general program to perform molecular dynamics simulations !
3 : ! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
4 : ! !
5 : ! SPDX-License-Identifier: MIT !
6 : !--------------------------------------------------------------------------------------------------!
7 :
8 : !
9 : ! libgrpp - a library for the evaluation of integrals over
10 : ! generalized relativistic pseudopotentials.
11 : !
12 : ! Copyright (C) 2021-2023 Alexander Oleynichenko
13 : !
14 :
15 : MODULE libgrpp
16 : USE ISO_C_BINDING, ONLY: C_DOUBLE,&
17 : C_INT32_T
18 :
19 : IMPLICIT NONE
20 :
21 : PRIVATE
22 :
23 : INTEGER(4), PARAMETER :: LIBGRPP_CART_ORDER_DIRAC = 0
24 : INTEGER(4), PARAMETER :: LIBGRPP_CART_ORDER_TURBOMOLE = 1
25 :
26 : INTEGER(4), PARAMETER :: LIBGRPP_NUCLEAR_MODEL_POINT_CHARGE = 0
27 : INTEGER(4), PARAMETER :: LIBGRPP_NUCLEAR_MODEL_CHARGED_BALL = 1
28 : INTEGER(4), PARAMETER :: LIBGRPP_NUCLEAR_MODEL_GAUSSIAN = 2
29 : INTEGER(4), PARAMETER :: LIBGRPP_NUCLEAR_MODEL_FERMI = 3
30 : INTEGER(4), PARAMETER :: LIBGRPP_NUCLEAR_MODEL_FERMI_BUBBLE = 4
31 : INTEGER(4), PARAMETER :: LIBGRPP_NUCLEAR_MODEL_POINT_CHARGE_NUMERICAL = 5
32 :
33 : PUBLIC :: libgrpp_init
34 : PUBLIC :: libgrpp_type1_integrals
35 : PUBLIC :: libgrpp_type1_integrals_gradient
36 : PUBLIC :: libgrpp_type2_integrals
37 : PUBLIC :: libgrpp_type2_integrals_gradient
38 :
39 : INTERFACE
40 :
41 : SUBROUTINE libgrpp_init()
42 : ! no arguments
43 : END SUBROUTINE libgrpp_init
44 :
45 : SUBROUTINE libgrpp_finalize()
46 : ! no arguments
47 : END SUBROUTINE libgrpp_finalize
48 :
49 : SUBROUTINE libgrpp_set_default_parameters()
50 : ! no arguments
51 : END SUBROUTINE libgrpp_set_default_parameters
52 :
53 : SUBROUTINE libgrpp_set_radial_tolerance(tolerance)
54 : REAL(8), INTENT(in) :: tolerance
55 :
56 : END SUBROUTINE libgrpp_set_radial_tolerance
57 :
58 : SUBROUTINE libgrpp_set_angular_screening_tolerance(tolerance)
59 : REAL(8), INTENT(in) :: tolerance
60 :
61 : END SUBROUTINE libgrpp_set_angular_screening_tolerance
62 :
63 : SUBROUTINE libgrpp_set_modified_bessel_tolerance(tolerance)
64 : REAL(8), INTENT(in) :: tolerance
65 :
66 : END SUBROUTINE libgrpp_set_modified_bessel_tolerance
67 :
68 : SUBROUTINE libgrpp_set_cartesian_order(order)
69 : INTEGER(4), INTENT(in) :: order
70 :
71 : END SUBROUTINE libgrpp_set_cartesian_order
72 :
73 : SUBROUTINE libgrpp_type1_integrals( &
74 : origin_A, L_A, num_primitives_A, coeffs_A, alpha_A, &
75 : origin_B, L_B, num_primitives_B, coeffs_B, alpha_B, &
76 : rpp_origin, rpp_num_primitives, rpp_powers, rpp_coeffs, rpp_alpha, &
77 : matrix &
78 : )
79 : ! shell centered on atom A
80 : REAL(8), DIMENSION(*), INTENT(in) :: origin_A
81 : INTEGER(4), INTENT(in) :: L_A, num_primitives_A
82 : REAL(8), INTENT(in) :: coeffs_A(*), alpha_A(*)
83 : REAL(8), DIMENSION(*), INTENT(in) :: origin_B
84 : INTEGER(4), INTENT(in) :: L_B, num_primitives_B
85 : REAL(8), INTENT(in) :: coeffs_B(*), alpha_B(*)
86 : REAL(8), DIMENSION(*), INTENT(in) :: rpp_origin
87 : INTEGER(4), DIMENSION(*), INTENT(in) :: rpp_num_primitives, rpp_powers
88 : REAL(8), DIMENSION(*), INTENT(in) :: rpp_coeffs, rpp_alpha
89 : REAL(8), DIMENSION(*), INTENT(out) :: matrix
90 :
91 : ! shell centered on atom B
92 : ! pseudopotential expansion
93 : ! output: matrix with PP integrals
94 :
95 : END SUBROUTINE libgrpp_type1_integrals
96 :
97 : SUBROUTINE libgrpp_type2_integrals( &
98 : origin_A, L_A, num_primitives_A, coeffs_A, alpha_A, &
99 : origin_B, L_B, num_primitives_B, coeffs_B, alpha_B, &
100 : rpp_origin, rpp_ang_momentum, rpp_num_primitives, rpp_powers, rpp_coeffs, rpp_alpha, &
101 : matrix &
102 : )
103 : ! shell centered on atom A
104 : REAL(8), DIMENSION(*), INTENT(in) :: origin_A
105 : INTEGER(4), INTENT(in) :: L_A, num_primitives_A
106 : REAL(8), INTENT(in) :: coeffs_A(*), alpha_A(*)
107 : REAL(8), DIMENSION(*), INTENT(in) :: origin_B
108 : INTEGER(4), INTENT(in) :: L_B, num_primitives_B
109 : REAL(8), INTENT(in) :: coeffs_B(*), alpha_B(*)
110 : REAL(8), DIMENSION(*), INTENT(in) :: rpp_origin
111 : INTEGER(4), INTENT(in) :: rpp_ang_momentum
112 : INTEGER(4), DIMENSION(*), INTENT(in) :: rpp_num_primitives, rpp_powers
113 : REAL(8), DIMENSION(*), INTENT(in) :: rpp_coeffs, rpp_alpha
114 : REAL(8), DIMENSION(*), INTENT(out) :: matrix
115 :
116 : ! shell centered on atom B
117 : ! pseudopotential expansion
118 : ! output: matrix with PP integrals
119 :
120 : END SUBROUTINE libgrpp_type2_integrals
121 :
122 : SUBROUTINE libgrpp_spin_orbit_integrals( &
123 : origin_A, L_A, num_primitives_A, coeffs_A, alpha_A, &
124 : origin_B, L_B, num_primitives_B, coeffs_B, alpha_B, &
125 : rpp_origin, rpp_ang_momentum, rpp_num_primitives, rpp_powers, rpp_coeffs, rpp_alpha, &
126 : so_x_matrix, so_y_matrix, so_z_matrix &
127 : )
128 : ! shell centered on atom A
129 : REAL(8), DIMENSION(*), INTENT(in) :: origin_A
130 : INTEGER(4), INTENT(in) :: L_A, num_primitives_A
131 : REAL(8), INTENT(in) :: coeffs_A(*), alpha_A(*)
132 : REAL(8), DIMENSION(*), INTENT(in) :: origin_B
133 : INTEGER(4), INTENT(in) :: L_B, num_primitives_B
134 : REAL(8), INTENT(in) :: coeffs_B(*), alpha_B(*)
135 : REAL(8), DIMENSION(*), INTENT(in) :: rpp_origin
136 : INTEGER(4), INTENT(in) :: rpp_ang_momentum
137 : INTEGER(4), DIMENSION(*), INTENT(in) :: rpp_num_primitives, rpp_powers
138 : REAL(8), DIMENSION(*), INTENT(in) :: rpp_coeffs, rpp_alpha
139 : REAL(8), DIMENSION(*), INTENT(out) :: so_x_matrix, so_y_matrix, so_z_matrix
140 :
141 : ! shell centered on atom B
142 : ! pseudopotential expansion
143 : ! output: matrices with PP integrals
144 :
145 : END SUBROUTINE libgrpp_spin_orbit_integrals
146 :
147 : SUBROUTINE libgrpp_type1_integrals_gradient( &
148 : origin_A, L_A, num_primitives_A, coeffs_A, alpha_A, &
149 : origin_B, L_B, num_primitives_B, coeffs_B, alpha_B, &
150 : rpp_origin, rpp_num_primitives, rpp_powers, rpp_coeffs, rpp_alpha, &
151 : point_3d, grad_arep_x, grad_arep_y, grad_arep_z &
152 : )
153 : ! shell centered on atom A
154 : REAL(8), DIMENSION(*), INTENT(in) :: origin_A
155 : INTEGER(4), INTENT(in) :: L_A, num_primitives_A
156 : REAL(8), INTENT(in) :: coeffs_A(*), alpha_A(*)
157 : REAL(8), DIMENSION(*), INTENT(in) :: origin_B
158 : INTEGER(4), INTENT(in) :: L_B, num_primitives_B
159 : REAL(8), INTENT(in) :: coeffs_B(*), alpha_B(*)
160 : REAL(8), DIMENSION(*), INTENT(in) :: rpp_origin
161 : INTEGER(4), DIMENSION(*), INTENT(in) :: rpp_num_primitives, rpp_powers
162 : REAL(8), DIMENSION(*), INTENT(in) :: rpp_coeffs, rpp_alpha, point_3d
163 : REAL(8), DIMENSION(*), INTENT(out) :: grad_arep_x, grad_arep_y, grad_arep_z
164 :
165 : ! shell centered on atom B
166 : ! pseudopotential expansion
167 : ! differentiation wrt the 3d point (x,y,z)
168 : ! output: matrices d<Int>/dx, d<Int>/dy, d<Int>/dZ
169 :
170 : END SUBROUTINE libgrpp_type1_integrals_gradient
171 :
172 : SUBROUTINE libgrpp_type2_integrals_gradient( &
173 : origin_A, L_A, num_primitives_A, coeffs_A, alpha_A, &
174 : origin_B, L_B, num_primitives_B, coeffs_B, alpha_B, &
175 : rpp_origin, rpp_ang_momentum, rpp_num_primitives, rpp_powers, rpp_coeffs, rpp_alpha, &
176 : point_3d, grad_arep_x, grad_arep_y, grad_arep_z &
177 : )
178 : ! shell centered on atom A
179 : REAL(8), DIMENSION(*), INTENT(in) :: origin_A
180 : INTEGER(4), INTENT(in) :: L_A, num_primitives_A
181 : REAL(8), INTENT(in) :: coeffs_A(*), alpha_A(*)
182 : REAL(8), DIMENSION(*), INTENT(in) :: origin_B
183 : INTEGER(4), INTENT(in) :: L_B, num_primitives_B
184 : REAL(8), INTENT(in) :: coeffs_B(*), alpha_B(*)
185 : REAL(8), DIMENSION(*), INTENT(in) :: rpp_origin
186 : INTEGER(4), INTENT(in) :: rpp_ang_momentum
187 : INTEGER(4), DIMENSION(*), INTENT(in) :: rpp_num_primitives, rpp_powers
188 : REAL(8), DIMENSION(*), INTENT(in) :: rpp_coeffs, rpp_alpha, point_3d
189 : REAL(8), DIMENSION(*), INTENT(out) :: grad_arep_x, grad_arep_y, grad_arep_z
190 :
191 : ! shell centered on atom B
192 : ! pseudopotential expansion
193 : ! differentiation wrt the 3d point (x,y,z)
194 : ! output: matrices d<Int>/dx, d<Int>/dy, d<Int>/dZ
195 :
196 : END SUBROUTINE libgrpp_type2_integrals_gradient
197 :
198 : SUBROUTINE libgrpp_spin_orbit_integrals_gradient( &
199 : origin_A, L_A, num_primitives_A, coeffs_A, alpha_A, &
200 : origin_B, L_B, num_primitives_B, coeffs_B, alpha_B, &
201 : rpp_origin, rpp_ang_momentum, rpp_num_primitives, rpp_powers, rpp_coeffs, rpp_alpha, &
202 : point_3d, grad_sox_x, grad_sox_y, grad_sox_z, &
203 : grad_soy_x, grad_soy_y, grad_soy_z, &
204 : grad_soz_x, grad_soz_y, grad_soz_z &
205 : )
206 : ! shell centered on atom A
207 : REAL(8), DIMENSION(*), INTENT(in) :: origin_A
208 : INTEGER(4), INTENT(in) :: L_A, num_primitives_A
209 : REAL(8), INTENT(in) :: coeffs_A(*), alpha_A(*)
210 : REAL(8), DIMENSION(*), INTENT(in) :: origin_B
211 : INTEGER(4), INTENT(in) :: L_B, num_primitives_B
212 : REAL(8), INTENT(in) :: coeffs_B(*), alpha_B(*)
213 : REAL(8), DIMENSION(*), INTENT(in) :: rpp_origin
214 : INTEGER(4), INTENT(in) :: rpp_ang_momentum
215 : INTEGER(4), DIMENSION(*), INTENT(in) :: rpp_num_primitives, rpp_powers
216 : REAL(8), DIMENSION(*), INTENT(in) :: rpp_coeffs, rpp_alpha, point_3d
217 : REAL(8), DIMENSION(*), INTENT(out) :: grad_sox_x, grad_sox_y, grad_sox_z, &
218 : grad_soy_x, grad_soy_y, grad_soy_z, &
219 : grad_soz_x, grad_soz_y, grad_soz_z
220 :
221 : ! shell centered on atom B
222 : ! pseudopotential expansion
223 : ! differentiation wrt the 3d point (x,y,z)
224 : ! output: matrices d<SO_x>/dx, d<SO_x>/dy, d<SO_x>/dZ
225 : ! output: matrices d<SO_y>/dx, d<SO_y>/dy, d<SO_y>/dZ
226 : ! output: matrices d<SO_z>/dx, d<SO_z>/dy, d<SO_z>/dZ
227 :
228 : END SUBROUTINE libgrpp_spin_orbit_integrals_gradient
229 :
230 : END INTERFACE
231 :
232 : CONTAINS
233 :
234 : ! **************************************************************************************************
235 : !> \brief ...
236 : !> \param origin_A ...
237 : !> \param L_A ...
238 : !> \param num_primitives_A ...
239 : !> \param coeffs_A ...
240 : !> \param alpha_A ...
241 : !> \param origin_B ...
242 : !> \param L_B ...
243 : !> \param num_primitives_B ...
244 : !> \param coeffs_B ...
245 : !> \param alpha_B ...
246 : !> \param rpp_origin ...
247 : !> \param num_oc_shells ...
248 : !> \param oc_shells_L ...
249 : !> \param oc_shells_J ...
250 : !> \param rpp_num_primitives ...
251 : !> \param rpp_powers ...
252 : !> \param rpp_coeffs ...
253 : !> \param rpp_alpha ...
254 : !> \param oc_shells_num_primitives ...
255 : !> \param oc_shells_coeffs ...
256 : !> \param oc_shells_alpha ...
257 : !> \param arep_matrix ...
258 : !> \param so_x_matrix ...
259 : !> \param so_y_matrix ...
260 : !> \param so_z_matrix ...
261 : ! **************************************************************************************************
262 0 : SUBROUTINE libgrpp_outercore_potential_integrals( &
263 : origin_A, L_A, num_primitives_A, coeffs_A, alpha_A, &
264 : origin_B, L_B, num_primitives_B, coeffs_B, alpha_B, &
265 : rpp_origin, num_oc_shells, &
266 0 : oc_shells_L, oc_shells_J, rpp_num_primitives, rpp_powers, rpp_coeffs, rpp_alpha, &
267 0 : oc_shells_num_primitives, oc_shells_coeffs, oc_shells_alpha, &
268 : arep_matrix, so_x_matrix, so_y_matrix, so_z_matrix &
269 : )
270 :
271 : ! shell centered on atom A
272 : REAL(8), INTENT(in) :: origin_A(*)
273 : INTEGER(4), INTENT(in) :: L_A, num_primitives_A
274 : REAL(8), INTENT(in) :: coeffs_A(*), alpha_A(*), origin_B(*)
275 : INTEGER(4), INTENT(in) :: L_B, num_primitives_B
276 : REAL(8), INTENT(in) :: coeffs_B(*), alpha_B(*), rpp_origin(*)
277 : INTEGER(4) :: num_oc_shells
278 : INTEGER(4), INTENT(in) :: oc_shells_L(:), oc_shells_J(:), &
279 : rpp_num_primitives(:), rpp_powers(:, :)
280 : REAL(8), INTENT(in) :: rpp_coeffs(:, :), rpp_alpha(:, :)
281 : INTEGER(4) :: oc_shells_num_primitives(:)
282 : REAL(8) :: oc_shells_coeffs(:, :), &
283 : oc_shells_alpha(:, :)
284 : REAL(8), INTENT(out) :: arep_matrix(*), so_x_matrix(*), &
285 : so_y_matrix(*), so_z_matrix(*)
286 :
287 : INTEGER :: i, j, ncart1, ncart2
288 : INTERFACE
289 : SUBROUTINE libgrpp_outercore_potential_integrals_part_1( &
290 : origin_A, L_A, num_primitives_A, coeffs_A, alpha_A, &
291 : origin_B, L_B, num_primitives_B, coeffs_B, alpha_B, &
292 : pot_origin, pot_L, pot_J, pot_num_primitives, pot_powers, pot_coeffs, pot_alpha, &
293 : oc_shell_num_primitives, oc_shell_coeffs, oc_shell_alpha, &
294 : arep_matrix, so_x_matrix, so_y_matrix, so_z_matrix) &
295 : BIND(C, name="libgrpp_outercore_potential_integrals_part_1_")
296 : IMPORT :: C_INT32_T, C_DOUBLE
297 : REAL(kind=C_DOUBLE), DIMENSION(*) :: origin_A
298 : INTEGER(kind=C_INT32_T) :: L_A
299 : INTEGER(kind=C_INT32_T) :: num_primitives_A
300 : REAL(kind=C_DOUBLE), DIMENSION(*) :: coeffs_A
301 : REAL(kind=C_DOUBLE), DIMENSION(*) :: alpha_A
302 : REAL(kind=C_DOUBLE), DIMENSION(*) :: origin_B
303 : INTEGER(kind=C_INT32_T) :: L_B
304 : INTEGER(kind=C_INT32_T) :: num_primitives_B
305 : REAL(kind=C_DOUBLE), DIMENSION(*) :: coeffs_B
306 : REAL(kind=C_DOUBLE), DIMENSION(*) :: alpha_B
307 : REAL(kind=C_DOUBLE), DIMENSION(*) :: pot_origin
308 : INTEGER(kind=C_INT32_T) :: pot_L
309 : INTEGER(kind=C_INT32_T) :: pot_J
310 : INTEGER(kind=C_INT32_T) :: pot_num_primitives
311 : INTEGER(kind=C_INT32_T), DIMENSION(*) :: pot_powers
312 : REAL(kind=C_DOUBLE), DIMENSION(*) :: pot_coeffs
313 : REAL(kind=C_DOUBLE), DIMENSION(*) :: pot_alpha
314 : INTEGER(kind=C_INT32_T) :: oc_shell_num_primitives
315 : REAL(kind=C_DOUBLE), DIMENSION(*) :: oc_shell_coeffs
316 : REAL(kind=C_DOUBLE), DIMENSION(*) :: oc_shell_alpha
317 : REAL(kind=C_DOUBLE), DIMENSION(*) :: arep_matrix
318 : REAL(kind=C_DOUBLE), DIMENSION(*) :: so_x_matrix
319 : REAL(kind=C_DOUBLE), DIMENSION(*) :: so_y_matrix
320 : REAL(kind=C_DOUBLE), DIMENSION(*) :: so_z_matrix
321 : END SUBROUTINE libgrpp_outercore_potential_integrals_part_1
322 : END INTERFACE
323 : INTERFACE
324 : SUBROUTINE libgrpp_outercore_potential_integrals_part_2( &
325 : origin_A, L_A, num_primitives_A, coeffs_A, alpha_A, &
326 : origin_B, L_B, num_primitives_B, coeffs_B, alpha_B, &
327 : pot_origin, oc_shell_1_L, oc_shell_1_J, &
328 : pot1_num_primitives, pot1_powers, pot1_coeffs, pot1_alpha, &
329 : oc_shell_1_num_primitives, oc_shell_1_coeffs, oc_shell_1_alpha, &
330 : oc_shell_2_L, oc_shell_2_J, pot2_num_primitives, pot2_powers, pot2_coeffs, &
331 : pot2_alpha, oc_shell_2_num_primitives, oc_shell_2_coeffs, oc_shell_2_alpha, &
332 : arep_matrix, so_x_matrix, so_y_matrix, so_z_matrix) &
333 : BIND(C, name="libgrpp_outercore_potential_integrals_part_2_")
334 : IMPORT :: C_INT32_T, C_DOUBLE
335 : REAL(kind=C_DOUBLE), DIMENSION(*) :: origin_A
336 : INTEGER(kind=C_INT32_T) :: L_A
337 : INTEGER(kind=C_INT32_T) :: num_primitives_A
338 : REAL(kind=C_DOUBLE), DIMENSION(*) :: coeffs_A
339 : REAL(kind=C_DOUBLE), DIMENSION(*) :: alpha_A
340 : REAL(kind=C_DOUBLE), DIMENSION(*) :: origin_B
341 : INTEGER(kind=C_INT32_T) :: L_B
342 : INTEGER(kind=C_INT32_T) :: num_primitives_B
343 : REAL(kind=C_DOUBLE), DIMENSION(*) :: coeffs_B
344 : REAL(kind=C_DOUBLE), DIMENSION(*) :: alpha_B
345 : REAL(kind=C_DOUBLE), DIMENSION(*) :: pot_origin
346 : INTEGER(kind=C_INT32_T) :: oc_shell_1_L
347 : INTEGER(kind=C_INT32_T) :: oc_shell_1_J
348 : INTEGER(kind=C_INT32_T) :: pot1_num_primitives
349 : INTEGER(kind=C_INT32_T), DIMENSION(*) :: pot1_powers
350 : REAL(kind=C_DOUBLE), DIMENSION(*) :: pot1_coeffs
351 : REAL(kind=C_DOUBLE), DIMENSION(*) :: pot1_alpha
352 : INTEGER(kind=C_INT32_T) :: oc_shell_1_num_primitives
353 : REAL(kind=C_DOUBLE), DIMENSION(*) :: oc_shell_1_coeffs
354 : REAL(kind=C_DOUBLE), DIMENSION(*) :: oc_shell_1_alpha
355 : INTEGER(kind=C_INT32_T) :: oc_shell_2_L
356 : INTEGER(kind=C_INT32_T) :: oc_shell_2_J
357 : INTEGER(kind=C_INT32_T) :: pot2_num_primitives
358 : INTEGER(kind=C_INT32_T), DIMENSION(*) :: pot2_powers
359 : REAL(kind=C_DOUBLE), DIMENSION(*) :: pot2_coeffs
360 : REAL(kind=C_DOUBLE), DIMENSION(*) :: pot2_alpha
361 : INTEGER(kind=C_INT32_T) :: oc_shell_2_num_primitives
362 : REAL(kind=C_DOUBLE), DIMENSION(*) :: oc_shell_2_coeffs
363 : REAL(kind=C_DOUBLE), DIMENSION(*) :: oc_shell_2_alpha
364 : REAL(kind=C_DOUBLE), DIMENSION(*) :: arep_matrix
365 : REAL(kind=C_DOUBLE), DIMENSION(*) :: so_x_matrix
366 : REAL(kind=C_DOUBLE), DIMENSION(*) :: so_y_matrix
367 : REAL(kind=C_DOUBLE), DIMENSION(*) :: so_z_matrix
368 : END SUBROUTINE libgrpp_outercore_potential_integrals_part_2
369 : END INTERFACE
370 :
371 : ! shell centered on atom B
372 : ! pseudopotential expansion
373 : ! outercore shells
374 : ! output: matrices with PP integrals
375 : ! local variables
376 :
377 0 : ncart1 = (L_A + 1)*(L_A + 2)/2
378 0 : ncart2 = (L_B + 1)*(L_B + 2)/2
379 :
380 0 : arep_matrix(1:ncart1*ncart2) = 0.0d0
381 0 : so_x_matrix(1:ncart1*ncart2) = 0.0d0
382 0 : so_y_matrix(1:ncart1*ncart2) = 0.0d0
383 0 : so_z_matrix(1:ncart1*ncart2) = 0.0d0
384 :
385 : ! the first non-local term:
386 : ! \sum_{nlj} U*|nlj><nlj| + |nlj><nlj|*U
387 0 : DO i = 1, num_oc_shells
388 : CALL libgrpp_outercore_potential_integrals_part_1( &
389 : origin_A, L_A, num_primitives_A, coeffs_A, alpha_A, &
390 : origin_B, L_B, num_primitives_B, coeffs_B, alpha_B, &
391 : rpp_origin, oc_shells_L(i), oc_shells_J(i), &
392 : rpp_num_primitives(i), rpp_powers(i, :), rpp_coeffs(i, :), rpp_alpha(i, :), &
393 : oc_shells_num_primitives(i), oc_shells_coeffs(i, :), oc_shells_alpha(i, :), &
394 : arep_matrix, so_x_matrix, so_y_matrix, so_z_matrix &
395 0 : )
396 : END DO
397 :
398 : ! the second non-local term:
399 : ! \sum_{nlj,n'lj} |nlj><nlj| U |n'lj><n'lj|
400 0 : DO i = 1, num_oc_shells
401 0 : DO j = 1, num_oc_shells
402 :
403 : CALL libgrpp_outercore_potential_integrals_part_2( &
404 : origin_A, L_A, num_primitives_A, coeffs_A, alpha_A, &
405 : origin_B, L_B, num_primitives_B, coeffs_B, alpha_B, &
406 : rpp_origin, &
407 : oc_shells_L(i), oc_shells_J(i), &
408 : rpp_num_primitives(i), rpp_powers(i, :), rpp_coeffs(i, :), rpp_alpha(i, :), &
409 : oc_shells_num_primitives(i), oc_shells_coeffs(i, :), oc_shells_alpha(i, :), &
410 : oc_shells_L(j), oc_shells_J(j), &
411 : rpp_num_primitives(j), rpp_powers(j, :), rpp_coeffs(j, :), rpp_alpha(j, :), &
412 : oc_shells_num_primitives(j), oc_shells_coeffs(j, :), oc_shells_alpha(j, :), &
413 : arep_matrix, so_x_matrix, so_y_matrix, so_z_matrix &
414 0 : )
415 :
416 : END DO
417 : END DO
418 :
419 0 : END SUBROUTINE libgrpp_outercore_potential_integrals
420 : END MODULE libgrpp
421 :
|