(git:3f0d10b)
Loading...
Searching...
No Matches
mp2_ri_libint.F
Go to the documentation of this file.
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: GPL-2.0-or-later !
6!--------------------------------------------------------------------------------------------------!
7
8! **************************************************************************************************
9!> \brief Routines to calculate the 3 and 2 center ERI's needed in the RI
10!> approximation using libint
11!> \par History
12!> 08.2013 created [Mauro Del Ben]
13!> \author Mauro Del Ben
14! **************************************************************************************************
21 USE cell_types, ONLY: cell_type
31 USE cp_fm_types, ONLY: cp_fm_create,&
40 USE hfx_types, ONLY: &
42 hfx_potential_type, hfx_screen_coeff_type, hfx_type, log_zero, pair_set_list_type
45 USE kinds, ONLY: dp,&
46 int_8
48 USE mp2_types, ONLY: mp2_biel_type,&
49 mp2_type,&
51 USE orbital_pointers, ONLY: nco,&
52 ncoset,&
53 nso
57 USE qs_kind_types, ONLY: get_qs_kind,&
61#include "./base/base_uses.f90"
62
63 IMPLICIT NONE
64 PRIVATE
65
67
68 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'mp2_ri_libint'
69
70!***
71
72CONTAINS
73
74! **************************************************************************************************
75!> \brief ...
76!> \param dimen ...
77!> \param RI_dimen ...
78!> \param occupied ...
79!> \param natom ...
80!> \param mp2_biel ...
81!> \param mp2_env ...
82!> \param C ...
83!> \param kind_of ...
84!> \param RI_basis_parameter ...
85!> \param RI_basis_info ...
86!> \param basis_S0 ...
87!> \param RI_index_table ...
88!> \param qs_env ...
89!> \param para_env ...
90!> \param Lai ...
91! **************************************************************************************************
92 SUBROUTINE libint_ri_mp2(dimen, RI_dimen, occupied, natom, mp2_biel, mp2_env, C, &
93 kind_of, &
94 RI_basis_parameter, RI_basis_info, basis_S0, RI_index_table, &
95 qs_env, para_env, &
96 Lai)
97 INTEGER :: dimen, ri_dimen, occupied, natom
98 TYPE(mp2_biel_type) :: mp2_biel
99 TYPE(mp2_type) :: mp2_env
100 REAL(kind=dp), DIMENSION(dimen, dimen) :: c
101 INTEGER, DIMENSION(:) :: kind_of
102 TYPE(hfx_basis_type), DIMENSION(:), POINTER :: ri_basis_parameter
103 TYPE(hfx_basis_info_type) :: ri_basis_info
104 TYPE(hfx_basis_type), DIMENSION(:), POINTER :: basis_s0
105 INTEGER, ALLOCATABLE, DIMENSION(:, :) :: ri_index_table
106 TYPE(qs_environment_type), POINTER :: qs_env
107 TYPE(mp_para_env_type), POINTER :: para_env
108 REAL(kind=dp), ALLOCATABLE, DIMENSION(:, :, :) :: lai
109
110 CHARACTER(LEN=*), PARAMETER :: routinen = 'libint_ri_mp2'
111
112 INTEGER :: handle, nkind
113
114 CALL timeset(routinen, handle)
115
116 ! Get the RI basis set and store in to a nice form
117 IF (.NOT. (ASSOCIATED(ri_basis_parameter))) THEN
118 IF (ALLOCATED(ri_index_table)) DEALLOCATE (ri_index_table)
119 IF (ASSOCIATED(basis_s0)) DEALLOCATE (basis_s0)
120 CALL read_ri_basis_set(qs_env, ri_basis_parameter, ri_basis_info, &
121 natom, nkind, kind_of, ri_index_table, ri_dimen, &
122 basis_s0)
123 END IF
124
125 CALL calc_lai_libint(mp2_env, qs_env, para_env, &
126 mp2_biel, dimen, c, occupied, &
127 ri_basis_parameter, ri_basis_info, ri_index_table, ri_dimen, basis_s0, &
128 lai)
129
130 CALL timestop(handle)
131
132 END SUBROUTINE libint_ri_mp2
133
134! **************************************************************************************************
135!> \brief Read the auxiliary basis set for RI approxiamtion
136!> \param qs_env ...
137!> \param RI_basis_parameter ...
138!> \param RI_basis_info ...
139!> \param natom ...
140!> \param nkind ...
141!> \param kind_of ...
142!> \param RI_index_table ...
143!> \param RI_dimen ...
144!> \param basis_S0 ...
145!> \par History
146!> 08.2013 created [Mauro Del Ben]
147!> \author Mauro Del Ben
148! **************************************************************************************************
149 SUBROUTINE read_ri_basis_set(qs_env, RI_basis_parameter, RI_basis_info, &
150 natom, nkind, kind_of, RI_index_table, RI_dimen, &
151 basis_S0)
152 TYPE(qs_environment_type), POINTER :: qs_env
153 TYPE(hfx_basis_type), DIMENSION(:), POINTER :: ri_basis_parameter
154 TYPE(hfx_basis_info_type) :: ri_basis_info
155 INTEGER :: natom, nkind
156 INTEGER, DIMENSION(:) :: kind_of
157 INTEGER, ALLOCATABLE, DIMENSION(:, :) :: ri_index_table
158 INTEGER :: ri_dimen
159 TYPE(hfx_basis_type), DIMENSION(:), POINTER :: basis_s0
160
161 INTEGER :: co_counter, counter, i, iatom, ikind, ipgf, iset, j, k, la, max_am_kind, &
162 max_coeff, max_nsgfl, max_pgf, max_pgf_kind, max_set, nl_count, nset, nseta, offset_a, &
163 offset_a1, s_offset_nl_a, sgfa, so_counter
164 INTEGER, DIMENSION(:), POINTER :: la_max, la_min, npgfa, nshell
165 INTEGER, DIMENSION(:, :), POINTER :: first_sgfa, nl_a
166 REAL(dp), DIMENSION(:, :), POINTER :: sphi_a
167 TYPE(gto_basis_set_type), POINTER :: orb_basis_a
168 TYPE(qs_kind_type), DIMENSION(:), POINTER :: qs_kind_set
169 TYPE(qs_kind_type), POINTER :: atom_kind
170
171 NULLIFY (ri_basis_parameter)
172
173 NULLIFY (qs_kind_set)
174 CALL get_qs_env(qs_env=qs_env, qs_kind_set=qs_kind_set)
175
176 nkind = SIZE(qs_kind_set, 1)
177 ALLOCATE (ri_basis_parameter(nkind))
178 ALLOCATE (basis_s0(nkind))
179 max_set = 0
180 DO ikind = 1, nkind
181 NULLIFY (atom_kind)
182 atom_kind => qs_kind_set(ikind)
183 ! here we reset the initial RI basis such that we can
184 ! work with non-normalized auxiliary basis functions
185 CALL get_qs_kind(qs_kind=atom_kind, &
186 basis_set=orb_basis_a, basis_type="RI_AUX")
187 IF (.NOT. (ASSOCIATED(orb_basis_a))) THEN
188 cpabort("Initial RI auxiliary basis not specified.")
189 END IF
190 orb_basis_a%gcc = 1.0_dp
191 orb_basis_a%norm_type = 1
192 CALL init_aux_basis_set(orb_basis_a)
193
194 CALL get_qs_kind_set(qs_kind_set=qs_kind_set, &
195 maxsgf=ri_basis_info%max_sgf, &
196 maxnset=ri_basis_info%max_set, &
197 maxlgto=ri_basis_info%max_am, &
198 basis_type="RI_AUX")
199 CALL get_gto_basis_set(gto_basis_set=orb_basis_a, &
200 lmax=ri_basis_parameter(ikind)%lmax, &
201 lmin=ri_basis_parameter(ikind)%lmin, &
202 npgf=ri_basis_parameter(ikind)%npgf, &
203 nset=ri_basis_parameter(ikind)%nset, &
204 zet=ri_basis_parameter(ikind)%zet, &
205 nsgf_set=ri_basis_parameter(ikind)%nsgf, &
206 first_sgf=ri_basis_parameter(ikind)%first_sgf, &
207 sphi=ri_basis_parameter(ikind)%sphi, &
208 nsgf=ri_basis_parameter(ikind)%nsgf_total, &
209 l=ri_basis_parameter(ikind)%nl, &
210 nshell=ri_basis_parameter(ikind)%nshell, &
211 set_radius=ri_basis_parameter(ikind)%set_radius, &
212 pgf_radius=ri_basis_parameter(ikind)%pgf_radius, &
213 kind_radius=ri_basis_parameter(ikind)%kind_radius)
214
215 max_set = max(max_set, ri_basis_parameter(ikind)%nset)
216
217 basis_s0(ikind)%kind_radius = ri_basis_parameter(ikind)%kind_radius
218 basis_s0(ikind)%nset = 1
219 basis_s0(ikind)%nsgf_total = 1
220 ALLOCATE (basis_s0(ikind)%set_radius(1))
221 basis_s0(ikind)%set_radius(1) = ri_basis_parameter(ikind)%kind_radius
222 ALLOCATE (basis_s0(ikind)%lmax(1))
223 basis_s0(ikind)%lmax(1) = 0
224 ALLOCATE (basis_s0(ikind)%lmin(1))
225 basis_s0(ikind)%lmin(1) = 0
226 ALLOCATE (basis_s0(ikind)%npgf(1))
227 basis_s0(ikind)%npgf(1) = 1
228 ALLOCATE (basis_s0(ikind)%nsgf(1))
229 basis_s0(ikind)%nsgf(1) = 1
230 ALLOCATE (basis_s0(ikind)%nshell(1))
231 basis_s0(ikind)%nshell(1) = 1
232 ALLOCATE (basis_s0(ikind)%pgf_radius(1, 1))
233 basis_s0(ikind)%pgf_radius(1, 1) = ri_basis_parameter(ikind)%kind_radius
234 ALLOCATE (basis_s0(ikind)%sphi(1, 1))
235 basis_s0(ikind)%sphi(1, 1) = 1.0_dp
236 ALLOCATE (basis_s0(ikind)%zet(1, 1))
237 basis_s0(ikind)%zet(1, 1) = 0.0_dp
238 ALLOCATE (basis_s0(ikind)%first_sgf(1, 1))
239 basis_s0(ikind)%first_sgf(1, 1) = 1
240 ALLOCATE (basis_s0(ikind)%nl(1, 1))
241 basis_s0(ikind)%nl(1, 1) = 0
242
243 ALLOCATE (basis_s0(ikind)%nsgfl(0:0, 1))
244 basis_s0(ikind)%nsgfl = 1
245 ALLOCATE (basis_s0(ikind)%sphi_ext(1, 0:0, 1, 1))
246 basis_s0(ikind)%sphi_ext(1, 0, 1, 1) = 1.0_dp
247
248 END DO
249 ri_basis_info%max_set = max_set
250
251 DO ikind = 1, nkind
252 ALLOCATE (ri_basis_parameter(ikind)%nsgfl(0:ri_basis_info%max_am, max_set))
253 ri_basis_parameter(ikind)%nsgfl = 0
254 nset = ri_basis_parameter(ikind)%nset
255 nshell => ri_basis_parameter(ikind)%nshell
256 DO iset = 1, nset
257 DO i = 0, ri_basis_info%max_am
258 nl_count = 0
259 DO j = 1, nshell(iset)
260 IF (ri_basis_parameter(ikind)%nl(j, iset) == i) nl_count = nl_count + 1
261 END DO
262 ri_basis_parameter(ikind)%nsgfl(i, iset) = nl_count
263 END DO
264 END DO
265 END DO
266
267 max_nsgfl = 0
268 max_pgf = 0
269 DO ikind = 1, nkind
270 max_coeff = 0
271 max_am_kind = 0
272 max_pgf_kind = 0
273 npgfa => ri_basis_parameter(ikind)%npgf
274 nseta = ri_basis_parameter(ikind)%nset
275 nl_a => ri_basis_parameter(ikind)%nsgfl
276 la_max => ri_basis_parameter(ikind)%lmax
277 la_min => ri_basis_parameter(ikind)%lmin
278 DO iset = 1, nseta
279 max_pgf_kind = max(max_pgf_kind, npgfa(iset))
280 max_pgf = max(max_pgf, npgfa(iset))
281 DO la = la_min(iset), la_max(iset)
282 max_nsgfl = max(max_nsgfl, nl_a(la, iset))
283 max_coeff = max(max_coeff, nso(la)*nl_a(la, iset)*nco(la))
284 max_am_kind = max(max_am_kind, la)
285 END DO
286 END DO
287 ALLOCATE (ri_basis_parameter(ikind)%sphi_ext(max_coeff, 0:max_am_kind, max_pgf_kind, nseta))
288 ri_basis_parameter(ikind)%sphi_ext = 0.0_dp
289 END DO
290
291 DO ikind = 1, nkind
292 sphi_a => ri_basis_parameter(ikind)%sphi
293 nseta = ri_basis_parameter(ikind)%nset
294 la_max => ri_basis_parameter(ikind)%lmax
295 la_min => ri_basis_parameter(ikind)%lmin
296 npgfa => ri_basis_parameter(ikind)%npgf
297 first_sgfa => ri_basis_parameter(ikind)%first_sgf
298 nl_a => ri_basis_parameter(ikind)%nsgfl
299 DO iset = 1, nseta
300 sgfa = first_sgfa(1, iset)
301 DO ipgf = 1, npgfa(iset)
302 offset_a1 = (ipgf - 1)*ncoset(la_max(iset))
303 s_offset_nl_a = 0
304 DO la = la_min(iset), la_max(iset)
305 offset_a = offset_a1 + ncoset(la - 1)
306 co_counter = 0
307 co_counter = co_counter + 1
308 so_counter = 0
309 DO k = sgfa + s_offset_nl_a, sgfa + s_offset_nl_a + nso(la)*nl_a(la, iset) - 1
310 DO i = offset_a + 1, offset_a + nco(la)
311 so_counter = so_counter + 1
312 ri_basis_parameter(ikind)%sphi_ext(so_counter, la, ipgf, iset) = sphi_a(i, k)
313 END DO
314 END DO
315 s_offset_nl_a = s_offset_nl_a + nso(la)*(nl_a(la, iset))
316 END DO
317 END DO
318 END DO
319 END DO
320
321 ALLOCATE (ri_index_table(natom, max_set))
322 ri_index_table = -huge(0)
323 counter = 0
324 ri_dimen = 0
325 DO iatom = 1, natom
326 ikind = kind_of(iatom)
327 nset = ri_basis_parameter(ikind)%nset
328 DO iset = 1, nset
329 ri_index_table(iatom, iset) = counter + 1
330 counter = counter + ri_basis_parameter(ikind)%nsgf(iset)
331 ri_dimen = ri_dimen + ri_basis_parameter(ikind)%nsgf(iset)
332 END DO
333 END DO
334
335 END SUBROUTINE read_ri_basis_set
336
337! **************************************************************************************************
338!> \brief Release the auxiliary basis set for RI approxiamtion (to be used
339!> only in the case of basis optimization)
340!> \param RI_basis_parameter ...
341!> \param basis_S0 ...
342!> \par History
343!> 08.2013 created [Mauro Del Ben]
344!> \author Mauro Del Ben
345! **************************************************************************************************
346 SUBROUTINE release_ri_basis_set(RI_basis_parameter, basis_S0)
347 TYPE(hfx_basis_type), DIMENSION(:), POINTER :: ri_basis_parameter, basis_s0
348
349 INTEGER :: i
350
351! RI basis
352
353 DO i = 1, SIZE(ri_basis_parameter)
354 DEALLOCATE (ri_basis_parameter(i)%nsgfl)
355 DEALLOCATE (ri_basis_parameter(i)%sphi_ext)
356 END DO
357 DEALLOCATE (ri_basis_parameter)
358
359 ! S0 basis
360 DO i = 1, SIZE(basis_s0)
361 DEALLOCATE (basis_s0(i)%set_radius)
362 DEALLOCATE (basis_s0(i)%lmax)
363 DEALLOCATE (basis_s0(i)%lmin)
364 DEALLOCATE (basis_s0(i)%npgf)
365 DEALLOCATE (basis_s0(i)%nsgf)
366 DEALLOCATE (basis_s0(i)%nshell)
367 DEALLOCATE (basis_s0(i)%pgf_radius)
368 DEALLOCATE (basis_s0(i)%sphi)
369 DEALLOCATE (basis_s0(i)%zet)
370 DEALLOCATE (basis_s0(i)%first_sgf)
371 DEALLOCATE (basis_s0(i)%nl)
372 DEALLOCATE (basis_s0(i)%nsgfl)
373 DEALLOCATE (basis_s0(i)%sphi_ext)
374 END DO
375 DEALLOCATE (basis_s0)
376
377 END SUBROUTINE release_ri_basis_set
378
379! **************************************************************************************************
380!> \brief ...
381!> \param mp2_env ...
382!> \param qs_env ...
383!> \param para_env ...
384!> \param mp2_biel ...
385!> \param dimen ...
386!> \param C ...
387!> \param occupied ...
388!> \param RI_basis_parameter ...
389!> \param RI_basis_info ...
390!> \param RI_index_table ...
391!> \param RI_dimen ...
392!> \param basis_S0 ...
393!> \param Lai ...
394!> \par History
395!> 08.2013 created [Mauro Del Ben]
396!> \author Mauro Del Ben
397! **************************************************************************************************
398 SUBROUTINE calc_lai_libint(mp2_env, qs_env, para_env, &
399 mp2_biel, dimen, C, occupied, &
400 RI_basis_parameter, RI_basis_info, RI_index_table, RI_dimen, basis_S0, &
401 Lai)
402
403 TYPE(mp2_type) :: mp2_env
404 TYPE(qs_environment_type), POINTER :: qs_env
405 TYPE(mp_para_env_type), POINTER :: para_env
406 TYPE(mp2_biel_type) :: mp2_biel
407 INTEGER :: dimen
408 REAL(kind=dp), DIMENSION(dimen, dimen) :: c
409 INTEGER :: occupied
410 TYPE(hfx_basis_type), DIMENSION(:), POINTER :: ri_basis_parameter
411 TYPE(hfx_basis_info_type) :: ri_basis_info
412 INTEGER, ALLOCATABLE, DIMENSION(:, :) :: ri_index_table
413 INTEGER :: ri_dimen
414 TYPE(hfx_basis_type), DIMENSION(:), POINTER :: basis_s0
415 REAL(kind=dp), ALLOCATABLE, DIMENSION(:, :, :) :: lai
416
417 CHARACTER(LEN=*), PARAMETER :: routinen = 'calc_lai_libint'
418
419 INTEGER :: counter_l_blocks, handle, i, i_list_kl, i_set_list_kl, i_set_list_kl_start, &
420 i_set_list_kl_stop, iatom, iatom_end, iatom_start, iib, ikind, info_chol, iset, jatom, &
421 jatom_end, jatom_start, jjb, jkind, jset, katom, katom_end, katom_start, kkb, kkind, &
422 kset, kset_start, l_b_i_end, l_b_i_start, l_b_k_end, l_b_k_start, latom, latom_end, &
423 latom_start, lkind, llb, lset, max_pgf, max_set, natom, ncob, nints, nseta, nsetb, nsetc, &
424 nsetd, nsgf_max, nspins, orb_k_end, orb_k_start, orb_l_end, orb_l_start, &
425 primitive_counter, sphi_a_u1, sphi_a_u2, sphi_a_u3, sphi_b_u1, sphi_b_u2, sphi_b_u3
426 INTEGER :: sphi_c_u1, sphi_c_u2, sphi_c_u3, sphi_d_u1, sphi_d_u2, sphi_d_u3, virtual
427 INTEGER(int_8) :: estimate_to_store_int, neris_tmp, &
428 neris_total, nprim_ints
429 INTEGER, ALLOCATABLE, DIMENSION(:) :: kind_of, nimages
430 INTEGER, DIMENSION(:), POINTER :: la_max, la_min, lb_max, lb_min, lc_max, &
431 lc_min, ld_max, ld_min, npgfa, npgfb, &
432 npgfc, npgfd, nsgfa, nsgfb, nsgfc, &
433 nsgfd
434 INTEGER, DIMENSION(:, :), POINTER :: nsgfl_a, nsgfl_b, nsgfl_c, nsgfl_d
435 LOGICAL :: do_periodic
436 LOGICAL, DIMENSION(:, :), POINTER :: shm_atomic_pair_list
437 REAL(kind=dp) :: cartesian_estimate, coeffs_kind_max0, eps_schwarz, ln_10, &
438 log10_eps_schwarz, log10_pmax, max_contraction_val, pmax_atom, pmax_entry, ra(3), rb(3), &
439 rc(3), rd(3)
440 REAL(kind=dp), ALLOCATABLE, DIMENSION(:) :: ee_buffer1, ee_buffer2, &
441 ee_primitives_tmp, ee_work2, &
442 primitive_integrals
443 REAL(kind=dp), ALLOCATABLE, DIMENSION(:, :) :: l_block, l_full_matrix, max_contraction
444 REAL(kind=dp), ALLOCATABLE, DIMENSION(:, :, :) :: bi1, mnrs
445 REAL(kind=dp), DIMENSION(:, :), POINTER :: shm_pmax_block, zeta, zetb, zetc, zetd
446 REAL(kind=dp), DIMENSION(:, :, :), POINTER :: sphi_a_ext_set, sphi_b_ext_set, &
447 sphi_c_ext_set, sphi_d_ext_set
448 REAL(kind=dp), DIMENSION(:, :, :, :), POINTER :: sphi_a_ext, sphi_b_ext, sphi_c_ext, &
449 sphi_d_ext
450 TYPE(cell_type), POINTER :: cell
451 TYPE(cp_blacs_env_type), POINTER :: blacs_env
452 TYPE(cp_fm_struct_type), POINTER :: fm_struct_l
453 TYPE(cp_fm_type) :: fm_matrix_l
454 TYPE(hfx_basis_type), DIMENSION(:), POINTER :: basis_parameter
455 TYPE(hfx_pgf_list), ALLOCATABLE, DIMENSION(:) :: pgf_list_ij, pgf_list_kl
456 TYPE(hfx_potential_type) :: mp2_potential_parameter
457 TYPE(hfx_screen_coeff_type), ALLOCATABLE, &
458 DIMENSION(:, :), TARGET :: radii_pgf_large, screen_coeffs_pgf_large
459 TYPE(hfx_screen_coeff_type), DIMENSION(:, :), &
460 POINTER :: screen_coeffs_kind, tmp_r_1, tmp_r_2, &
461 tmp_screen_pgf1, tmp_screen_pgf2
462 TYPE(hfx_screen_coeff_type), &
463 DIMENSION(:, :, :, :), POINTER :: screen_coeffs_set
464 TYPE(hfx_screen_coeff_type), &
465 DIMENSION(:, :, :, :, :, :), POINTER :: radii_pgf, screen_coeffs_pgf
466 TYPE(hfx_type), POINTER :: actual_x_data
467 TYPE(pair_list_type_mp2) :: list_kl
468 TYPE(pair_set_list_type), ALLOCATABLE, &
469 DIMENSION(:) :: set_list_kl
470 TYPE(particle_type), DIMENSION(:), POINTER :: particle_set
471
472 CALL timeset(routinen, handle)
473
474 ln_10 = log(10.0_dp)
475
476 !! initialize some counters
477 neris_tmp = 0_int_8
478 neris_total = 0_int_8
479 nprim_ints = 0_int_8
480
481 CALL prepare_integral_calc(cell, qs_env, mp2_env, para_env, mp2_potential_parameter, actual_x_data, &
482 do_periodic, basis_parameter, max_set, particle_set, natom, kind_of, &
483 nsgf_max, primitive_integrals, ee_work2, ee_buffer1, ee_buffer2, &
484 ee_primitives_tmp, nspins, max_contraction, max_pgf, pgf_list_ij, &
485 pgf_list_kl, nimages, eps_schwarz, log10_eps_schwarz, &
486 screen_coeffs_set, screen_coeffs_kind, screen_coeffs_pgf, &
487 radii_pgf, ri_basis_parameter, ri_basis_info)
488
489 ALLOCATE (radii_pgf_large(SIZE(radii_pgf, 1), SIZE(radii_pgf, 2)))
490 ALLOCATE (screen_coeffs_pgf_large(SIZE(screen_coeffs_pgf, 1), SIZE(screen_coeffs_pgf, 2)))
491 DO iib = 1, SIZE(radii_pgf, 1)
492 DO jjb = 1, SIZE(radii_pgf, 2)
493 radii_pgf_large(iib, jjb)%x = 100_dp
494 END DO
495 END DO
496 DO iib = 1, SIZE(screen_coeffs_pgf, 1)
497 DO jjb = 1, SIZE(screen_coeffs_pgf, 2)
498 screen_coeffs_pgf_large(iib, jjb)%x = 5000_dp
499 END DO
500 END DO
501 tmp_r_1 => radii_pgf_large(:, :)
502 tmp_r_2 => radii_pgf_large(:, :)
503 tmp_screen_pgf1 => screen_coeffs_pgf_large(:, :)
504 tmp_screen_pgf2 => screen_coeffs_pgf_large(:, :)
505
506 ! start computing the L matrix
507 ALLOCATE (l_full_matrix(ri_dimen, ri_dimen))
508 l_full_matrix = 0.0_dp
509
510 counter_l_blocks = 0
511 DO iatom = 1, natom
512 jatom = iatom
513
514 ikind = kind_of(iatom)
515 jkind = kind_of(jatom)
516 ra = particle_set(iatom)%r(:)
517 rb = particle_set(jatom)%r(:)
518
519 la_max => ri_basis_parameter(ikind)%lmax
520 la_min => ri_basis_parameter(ikind)%lmin
521 npgfa => ri_basis_parameter(ikind)%npgf
522 nseta = ri_basis_parameter(ikind)%nset
523 zeta => ri_basis_parameter(ikind)%zet
524 nsgfa => ri_basis_parameter(ikind)%nsgf
525 sphi_a_ext => ri_basis_parameter(ikind)%sphi_ext(:, :, :, :)
526 nsgfl_a => ri_basis_parameter(ikind)%nsgfl
527 sphi_a_u1 = ubound(sphi_a_ext, 1)
528 sphi_a_u2 = ubound(sphi_a_ext, 2)
529 sphi_a_u3 = ubound(sphi_a_ext, 3)
530
531 lb_max => basis_s0(jkind)%lmax
532 lb_min => basis_s0(jkind)%lmin
533 npgfb => basis_s0(jkind)%npgf
534 nsetb = basis_s0(jkind)%nset
535 zetb => basis_s0(jkind)%zet
536 nsgfb => basis_s0(jkind)%nsgf
537 sphi_b_ext => basis_s0(jkind)%sphi_ext(:, :, :, :)
538 nsgfl_b => basis_s0(jkind)%nsgfl
539 sphi_b_u1 = ubound(sphi_b_ext, 1)
540 sphi_b_u2 = ubound(sphi_b_ext, 2)
541 sphi_b_u3 = ubound(sphi_b_ext, 3)
542
543 DO katom = iatom, natom
544 latom = katom
545
546 kkind = kind_of(katom)
547 lkind = kind_of(latom)
548 rc = particle_set(katom)%r(:)
549 rd = particle_set(latom)%r(:)
550
551 lc_max => ri_basis_parameter(kkind)%lmax
552 lc_min => ri_basis_parameter(kkind)%lmin
553 npgfc => ri_basis_parameter(kkind)%npgf
554 nsetc = ri_basis_parameter(kkind)%nset
555 zetc => ri_basis_parameter(kkind)%zet
556 nsgfc => ri_basis_parameter(kkind)%nsgf
557 sphi_c_ext => ri_basis_parameter(kkind)%sphi_ext(:, :, :, :)
558 nsgfl_c => ri_basis_parameter(kkind)%nsgfl
559 sphi_c_u1 = ubound(sphi_c_ext, 1)
560 sphi_c_u2 = ubound(sphi_c_ext, 2)
561 sphi_c_u3 = ubound(sphi_c_ext, 3)
562
563 ld_max => basis_s0(lkind)%lmax
564 ld_min => basis_s0(lkind)%lmin
565 npgfd => basis_s0(lkind)%npgf
566 nsetd = ri_basis_parameter(lkind)%nset
567 zetd => basis_s0(lkind)%zet
568 nsgfd => basis_s0(lkind)%nsgf
569 sphi_d_ext => basis_s0(lkind)%sphi_ext(:, :, :, :)
570 nsgfl_d => basis_s0(lkind)%nsgfl
571 sphi_d_u1 = ubound(sphi_d_ext, 1)
572 sphi_d_u2 = ubound(sphi_d_ext, 2)
573 sphi_d_u3 = ubound(sphi_d_ext, 3)
574
575 jset = 1
576 lset = 1
577 DO iset = 1, nseta
578
579 ncob = npgfb(jset)*ncoset(lb_max(jset))
580 sphi_a_ext_set => sphi_a_ext(:, :, :, iset)
581 sphi_b_ext_set => sphi_b_ext(:, :, :, jset)
582
583 l_b_i_start = ri_index_table(iatom, iset)
584 l_b_i_end = ri_index_table(iatom, iset) + nsgfa(iset) - 1
585
586 kset_start = 1
587 IF (iatom == katom) kset_start = iset
588 DO kset = kset_start, nsetc
589
590 counter_l_blocks = counter_l_blocks + 1
591 IF (mod(counter_l_blocks, para_env%num_pe) /= para_env%mepos) cycle
592
593 sphi_c_ext_set => sphi_c_ext(:, :, :, kset)
594 sphi_d_ext_set => sphi_d_ext(:, :, :, lset)
595
596 l_b_k_start = ri_index_table(katom, kset)
597 l_b_k_end = ri_index_table(katom, kset) + nsgfc(kset) - 1
598
599 pmax_entry = 0.0_dp
600 log10_pmax = pmax_entry
601 log10_eps_schwarz = log_zero
602
603 max_contraction_val = 1.0000_dp
604
605 ALLOCATE (l_block(nsgfa(iset), nsgfc(kset)))
606
607 CALL coulomb4(actual_x_data%eri4_context, ra, rb, rc, rd, npgfa(iset), npgfb(jset), npgfc(kset), npgfd(lset), &
608 la_min(iset), la_max(iset), lb_min(jset), lb_max(jset), &
609 lc_min(kset), lc_max(kset), ld_min(lset), ld_max(lset), &
610 nsgfa(iset), nsgfb(jset), nsgfc(kset), nsgfd(lset), &
611 sphi_a_u1, sphi_a_u2, sphi_a_u3, &
612 sphi_b_u1, sphi_b_u2, sphi_b_u3, &
613 sphi_c_u1, sphi_c_u2, sphi_c_u3, &
614 sphi_d_u1, sphi_d_u2, sphi_d_u3, &
615 zeta(1:npgfa(iset), iset), zetb(1:npgfb(jset), jset), &
616 zetc(1:npgfc(kset), kset), zetd(1:npgfd(lset), lset), &
617 primitive_integrals, &
618 mp2_potential_parameter, &
619 actual_x_data%neighbor_cells, screen_coeffs_set(1, 1, 1, 1)%x, &
620 screen_coeffs_set(1, 1, 1, 1)%x, eps_schwarz, &
621 max_contraction_val, cartesian_estimate, cell, neris_tmp, &
622 log10_pmax, log10_eps_schwarz, &
623 tmp_r_1, tmp_r_2, tmp_screen_pgf1, tmp_screen_pgf2, &
624 pgf_list_ij, pgf_list_kl, nsgfl_a(:, iset), nsgfl_b(:, jset), &
625 nsgfl_c(:, kset), nsgfl_d(:, lset), &
626 sphi_a_ext_set, &
627 sphi_b_ext_set, &
628 sphi_c_ext_set, &
629 sphi_d_ext_set, &
630 ee_work2, ee_buffer1, ee_buffer2, ee_primitives_tmp, &
631 nimages, do_periodic)
632
633 primitive_counter = 0
634 DO llb = 1, nsgfd(lset)
635 DO kkb = 1, nsgfc(kset)
636 DO jjb = 1, nsgfb(jset)
637 DO iib = 1, nsgfa(iset)
638 primitive_counter = primitive_counter + 1
639 l_block(iib, kkb) = primitive_integrals(primitive_counter)
640 END DO
641 END DO
642 END DO
643 END DO
644
645 l_full_matrix(l_b_i_start:l_b_i_end, l_b_k_start:l_b_k_end) = l_block
646 l_full_matrix(l_b_k_start:l_b_k_end, l_b_i_start:l_b_i_end) = transpose(l_block)
647
648 DEALLOCATE (l_block)
649
650 END DO ! kset
651 END DO ! iset
652
653 END DO !katom
654 END DO !iatom
655
656 ! now create a fm_matrix for the L matrix
657 CALL para_env%sum(l_full_matrix)
658
659 ! create a sub blacs_env
660 NULLIFY (blacs_env)
661 CALL cp_blacs_env_create(blacs_env=blacs_env, para_env=para_env)
662
663 NULLIFY (fm_struct_l)
664 CALL cp_fm_struct_create(fm_struct_l, context=blacs_env, nrow_global=ri_dimen, &
665 ncol_global=ri_dimen, para_env=para_env)
666 CALL cp_fm_create(fm_matrix_l, fm_struct_l, name="fm_matrix_L")
667 CALL cp_fm_struct_release(fm_struct_l)
668 CALL cp_blacs_env_release(blacs_env)
669
670 CALL cp_fm_set_submatrix(fm=fm_matrix_l, new_values=l_full_matrix, start_row=1, start_col=1, &
671 n_rows=ri_dimen, n_cols=ri_dimen)
672
673 info_chol = 0
674 CALL cp_fm_cholesky_decompose(matrix=fm_matrix_l, n=ri_dimen, info_out=info_chol)
675 cpassert(info_chol == 0)
676
677 ! triangual invert
678 CALL cp_fm_triangular_invert(matrix_a=fm_matrix_l, uplo_tr='U')
679
680 ! replicate L matrix to each proc
681 l_full_matrix = 0.0_dp
682 CALL cp_fm_get_submatrix(fm_matrix_l, l_full_matrix, 1, 1, ri_dimen, ri_dimen, .false.)
683 CALL cp_fm_release(fm_matrix_l)
684
685 ! clean lower part
686 DO iib = 1, ri_dimen
687 l_full_matrix(iib + 1:ri_dimen, iib) = 0.0_dp
688 END DO
689
690 ALLOCATE (list_kl%elements(natom**2))
691
692 coeffs_kind_max0 = maxval(screen_coeffs_kind(:, :)%x(2))
693 ALLOCATE (set_list_kl((max_set*natom)**2))
694
695 !! precalculate maximum density matrix elements in blocks
696 actual_x_data%pmax_block = 0.0_dp
697 shm_pmax_block => actual_x_data%pmax_block
698
699 shm_atomic_pair_list => actual_x_data%atomic_pair_list
700
701 iatom_start = 1
702 iatom_end = natom
703 jatom_start = 1
704 jatom_end = natom
705 katom_start = 1
706 katom_end = natom
707 latom_start = 1
708 latom_end = natom
709
710 CALL build_pair_list_mp2(natom, list_kl, set_list_kl, katom_start, katom_end, &
711 latom_start, latom_end, &
712 kind_of, basis_parameter, particle_set, &
713 do_periodic, screen_coeffs_set, screen_coeffs_kind, &
714 coeffs_kind_max0, log10_eps_schwarz, cell, 0.d+00, &
715 shm_atomic_pair_list)
716
717 virtual = dimen - occupied
718
719 ALLOCATE (lai(ri_dimen, virtual, occupied))
720 lai = 0.0_dp
721
722 DO iatom = 1, natom
723 jatom = iatom
724
725 ikind = kind_of(iatom)
726 jkind = kind_of(jatom)
727 ra = particle_set(iatom)%r(:)
728 rb = particle_set(jatom)%r(:)
729
730 la_max => ri_basis_parameter(ikind)%lmax
731 la_min => ri_basis_parameter(ikind)%lmin
732 npgfa => ri_basis_parameter(ikind)%npgf
733 nseta = ri_basis_parameter(ikind)%nset
734 zeta => ri_basis_parameter(ikind)%zet
735 nsgfa => ri_basis_parameter(ikind)%nsgf
736 sphi_a_ext => ri_basis_parameter(ikind)%sphi_ext(:, :, :, :)
737 nsgfl_a => ri_basis_parameter(ikind)%nsgfl
738 sphi_a_u1 = ubound(sphi_a_ext, 1)
739 sphi_a_u2 = ubound(sphi_a_ext, 2)
740 sphi_a_u3 = ubound(sphi_a_ext, 3)
741
742 lb_max => basis_s0(jkind)%lmax
743 lb_min => basis_s0(jkind)%lmin
744 npgfb => basis_s0(jkind)%npgf
745 nsetb = basis_s0(jkind)%nset
746 zetb => basis_s0(jkind)%zet
747 nsgfb => basis_s0(jkind)%nsgf
748 sphi_b_ext => basis_s0(jkind)%sphi_ext(:, :, :, :)
749 nsgfl_b => basis_s0(jkind)%nsgfl
750 sphi_b_u1 = ubound(sphi_b_ext, 1)
751 sphi_b_u2 = ubound(sphi_b_ext, 2)
752 sphi_b_u3 = ubound(sphi_b_ext, 3)
753
754 jset = 1
755 DO iset = 1, nseta
756
757 counter_l_blocks = counter_l_blocks + 1
758 IF (mod(counter_l_blocks, para_env%num_pe) /= para_env%mepos) cycle
759
760 ncob = npgfb(jset)*ncoset(lb_max(jset))
761 sphi_a_ext_set => sphi_a_ext(:, :, :, iset)
762 sphi_b_ext_set => sphi_b_ext(:, :, :, jset)
763
764 l_b_i_start = ri_index_table(iatom, iset)
765 l_b_i_end = ri_index_table(iatom, iset) + nsgfa(iset) - 1
766
767 ALLOCATE (bi1(dimen, dimen, nsgfa(iset)))
768 bi1 = 0.0_dp
769
770 DO i_list_kl = 1, list_kl%n_element
771
772 katom = list_kl%elements(i_list_kl)%pair(1)
773 latom = list_kl%elements(i_list_kl)%pair(2)
774
775 i_set_list_kl_start = list_kl%elements(i_list_kl)%set_bounds(1)
776 i_set_list_kl_stop = list_kl%elements(i_list_kl)%set_bounds(2)
777 kkind = list_kl%elements(i_list_kl)%kind_pair(1)
778 lkind = list_kl%elements(i_list_kl)%kind_pair(2)
779 rc = list_kl%elements(i_list_kl)%r1
780 rd = list_kl%elements(i_list_kl)%r2
781
782 pmax_atom = 0.0_dp
783
784 lc_max => basis_parameter(kkind)%lmax
785 lc_min => basis_parameter(kkind)%lmin
786 npgfc => basis_parameter(kkind)%npgf
787 zetc => basis_parameter(kkind)%zet
788 nsgfc => basis_parameter(kkind)%nsgf
789 sphi_c_ext => basis_parameter(kkind)%sphi_ext(:, :, :, :)
790 nsgfl_c => basis_parameter(kkind)%nsgfl
791 sphi_c_u1 = ubound(sphi_c_ext, 1)
792 sphi_c_u2 = ubound(sphi_c_ext, 2)
793 sphi_c_u3 = ubound(sphi_c_ext, 3)
794
795 ld_max => basis_parameter(lkind)%lmax
796 ld_min => basis_parameter(lkind)%lmin
797 npgfd => basis_parameter(lkind)%npgf
798 zetd => basis_parameter(lkind)%zet
799 nsgfd => basis_parameter(lkind)%nsgf
800 sphi_d_ext => basis_parameter(lkind)%sphi_ext(:, :, :, :)
801 nsgfl_d => basis_parameter(lkind)%nsgfl
802 sphi_d_u1 = ubound(sphi_d_ext, 1)
803 sphi_d_u2 = ubound(sphi_d_ext, 2)
804 sphi_d_u3 = ubound(sphi_d_ext, 3)
805
806 DO i_set_list_kl = i_set_list_kl_start, i_set_list_kl_stop
807 kset = set_list_kl(i_set_list_kl)%pair(1)
808 lset = set_list_kl(i_set_list_kl)%pair(2)
809
810 IF (katom == latom .AND. lset < kset) cycle
811
812 orb_k_start = mp2_biel%index_table(katom, kset)
813 orb_k_end = orb_k_start + nsgfc(kset) - 1
814 orb_l_start = mp2_biel%index_table(latom, lset)
815 orb_l_end = orb_l_start + nsgfd(lset) - 1
816
817 !! get max_vals if we screen on initial density
818 pmax_entry = 0.0_dp
819
820 sphi_c_ext_set => sphi_c_ext(:, :, :, kset)
821 sphi_d_ext_set => sphi_d_ext(:, :, :, lset)
822
823 log10_pmax = pmax_entry
824 log10_eps_schwarz = log_zero
825
826 IF (ALLOCATED(mnrs)) DEALLOCATE (mnrs)
827 ALLOCATE (mnrs(nsgfd(lset), nsgfc(kset), nsgfa(iset)))
828
829 mnrs = 0.0_dp
830
831 max_contraction_val = max_contraction(kset, katom)*max_contraction(lset, latom)
832
833 CALL coulomb4(actual_x_data%eri4_context, ra, rb, rc, rd, npgfa(iset), npgfb(jset), npgfc(kset), npgfd(lset), &
834 la_min(iset), la_max(iset), lb_min(jset), lb_max(jset), &
835 lc_min(kset), lc_max(kset), ld_min(lset), ld_max(lset), &
836 nsgfa(iset), nsgfb(jset), nsgfc(kset), nsgfd(lset), &
837 sphi_a_u1, sphi_a_u2, sphi_a_u3, &
838 sphi_b_u1, sphi_b_u2, sphi_b_u3, &
839 sphi_c_u1, sphi_c_u2, sphi_c_u3, &
840 sphi_d_u1, sphi_d_u2, sphi_d_u3, &
841 zeta(1:npgfa(iset), iset), zetb(1:npgfb(jset), jset), &
842 zetc(1:npgfc(kset), kset), zetd(1:npgfd(lset), lset), &
843 primitive_integrals, &
844 mp2_potential_parameter, &
845 actual_x_data%neighbor_cells, screen_coeffs_set(kset, kset, kkind, kkind)%x, &
846 screen_coeffs_set(kset, kset, kkind, kkind)%x, eps_schwarz, &
847 max_contraction_val, cartesian_estimate, cell, neris_tmp, &
848 log10_pmax, log10_eps_schwarz, &
849 tmp_r_1, tmp_r_2, tmp_screen_pgf1, tmp_screen_pgf2, &
850 pgf_list_ij, pgf_list_kl, nsgfl_a(:, iset), nsgfl_b(:, jset), &
851 nsgfl_c(:, kset), nsgfl_d(:, lset), &
852 sphi_a_ext_set, &
853 sphi_b_ext_set, &
854 sphi_c_ext_set, &
855 sphi_d_ext_set, &
856 ee_work2, ee_buffer1, ee_buffer2, ee_primitives_tmp, &
857 nimages, do_periodic)
858
859 nints = nsgfa(iset)*nsgfb(jset)*nsgfc(kset)*nsgfd(lset)
860 neris_total = neris_total + nints
861 nprim_ints = nprim_ints + neris_tmp
862 IF (cartesian_estimate == 0.0_dp) cartesian_estimate = tiny(cartesian_estimate)
863 estimate_to_store_int = exponent(cartesian_estimate)
864 estimate_to_store_int = max(estimate_to_store_int, -15_int_8)
865 cartesian_estimate = set_exponent(1.0_dp, estimate_to_store_int + 1)
866
867 primitive_counter = 0
868 DO llb = 1, nsgfd(lset)
869 DO kkb = 1, nsgfc(kset)
870 DO jjb = 1, nsgfb(jset)
871 DO iib = 1, nsgfa(iset)
872 primitive_counter = primitive_counter + 1
873 mnrs(llb, kkb, iib) = primitive_integrals(primitive_counter)
874 END DO
875 END DO
876 END DO
877 END DO
878
879 DO iib = 1, nsgfa(iset)
880 bi1(orb_l_start:orb_l_end, orb_k_start:orb_k_end, iib) = mnrs(:, :, iib)
881 bi1(orb_k_start:orb_k_end, orb_l_start:orb_l_end, iib) = transpose(mnrs(:, :, iib))
882 END DO
883
884 END DO ! i_set_list_kl
885 END DO ! i_list_kl
886
887 DO iib = 1, nsgfa(iset)
888 bi1(1:virtual, 1:occupied, iib) = matmul(transpose(c(1:dimen, occupied + 1:dimen)), &
889 matmul(bi1(1:dimen, 1:dimen, iib), c(1:dimen, 1:occupied)))
890 lai(l_b_i_start + iib - 1, 1:virtual, 1:occupied) = bi1(1:virtual, 1:occupied, iib)
891 END DO
892
893 DEALLOCATE (bi1)
894
895 END DO
896 END DO
897
898 CALL para_env%sum(lai)
899
900 DO iib = 1, occupied
901 IF (mod(iib, para_env%num_pe) == para_env%mepos) THEN
902 lai(1:ri_dimen, 1:virtual, iib) = matmul(transpose(l_full_matrix), lai(1:ri_dimen, 1:virtual, iib))
903 ELSE
904 lai(:, :, iib) = 0.0_dp
905 END IF
906 END DO
907
908 CALL para_env%sum(lai)
909
910 DEALLOCATE (set_list_kl)
911
912 DO i = 1, max_pgf**2
913 DEALLOCATE (pgf_list_ij(i)%image_list)
914 DEALLOCATE (pgf_list_kl(i)%image_list)
915 END DO
916
917 DEALLOCATE (pgf_list_ij)
918 DEALLOCATE (pgf_list_kl)
919
920 DEALLOCATE (max_contraction, kind_of)
921
922 DEALLOCATE (ee_work2, ee_buffer1, ee_buffer2, ee_primitives_tmp)
923
924 DEALLOCATE (nimages)
925
926 CALL timestop(handle)
927
928 END SUBROUTINE calc_lai_libint
929
930! **************************************************************************************************
931!> \brief ...
932!> \param cell ...
933!> \param qs_env ...
934!> \param mp2_env ...
935!> \param para_env ...
936!> \param mp2_potential_parameter ...
937!> \param actual_x_data ...
938!> \param do_periodic ...
939!> \param basis_parameter ...
940!> \param max_set ...
941!> \param particle_set ...
942!> \param natom ...
943!> \param kind_of ...
944!> \param nsgf_max ...
945!> \param primitive_integrals ...
946!> \param ee_work2 ...
947!> \param ee_buffer1 ...
948!> \param ee_buffer2 ...
949!> \param ee_primitives_tmp ...
950!> \param nspins ...
951!> \param max_contraction ...
952!> \param max_pgf ...
953!> \param pgf_list_ij ...
954!> \param pgf_list_kl ...
955!> \param nimages ...
956!> \param eps_schwarz ...
957!> \param log10_eps_schwarz ...
958!> \param screen_coeffs_set ...
959!> \param screen_coeffs_kind ...
960!> \param screen_coeffs_pgf ...
961!> \param radii_pgf ...
962!> \param RI_basis_parameter ...
963!> \param RI_basis_info ...
964! **************************************************************************************************
965 SUBROUTINE prepare_integral_calc(cell, qs_env, mp2_env, para_env, mp2_potential_parameter, actual_x_data, &
966 do_periodic, basis_parameter, max_set, particle_set, natom, kind_of, &
967 nsgf_max, primitive_integrals, ee_work2, ee_buffer1, ee_buffer2, &
968 ee_primitives_tmp, nspins, max_contraction, max_pgf, pgf_list_ij, &
969 pgf_list_kl, nimages, eps_schwarz, log10_eps_schwarz, &
970 screen_coeffs_set, screen_coeffs_kind, screen_coeffs_pgf, &
971 radii_pgf, RI_basis_parameter, RI_basis_info)
972
973 TYPE(cell_type), POINTER :: cell
974 TYPE(qs_environment_type), INTENT(IN), POINTER :: qs_env
975 TYPE(mp2_type), INTENT(INOUT) :: mp2_env
976 TYPE(mp_para_env_type), INTENT(IN) :: para_env
977 TYPE(hfx_potential_type), INTENT(OUT) :: mp2_potential_parameter
978 TYPE(hfx_type), POINTER :: actual_x_data
979 LOGICAL, INTENT(OUT) :: do_periodic
980 TYPE(hfx_basis_type), DIMENSION(:), POINTER :: basis_parameter
981 INTEGER, INTENT(OUT) :: max_set
982 TYPE(particle_type), DIMENSION(:), POINTER :: particle_set
983 INTEGER, INTENT(OUT) :: natom
984 INTEGER, ALLOCATABLE, DIMENSION(:), INTENT(OUT) :: kind_of
985 INTEGER, INTENT(OUT) :: nsgf_max
986 REAL(kind=dp), ALLOCATABLE, DIMENSION(:), &
987 INTENT(OUT) :: primitive_integrals, ee_work2, &
988 ee_buffer1, ee_buffer2, &
989 ee_primitives_tmp
990 INTEGER, INTENT(OUT) :: nspins
991 REAL(kind=dp), ALLOCATABLE, DIMENSION(:, :), &
992 INTENT(OUT) :: max_contraction
993 INTEGER, INTENT(OUT) :: max_pgf
994 TYPE(hfx_pgf_list), ALLOCATABLE, DIMENSION(:), &
995 INTENT(OUT) :: pgf_list_ij, pgf_list_kl
996 INTEGER, ALLOCATABLE, DIMENSION(:), INTENT(OUT) :: nimages
997 REAL(kind=dp), INTENT(OUT) :: eps_schwarz, log10_eps_schwarz
998 TYPE(hfx_screen_coeff_type), &
999 DIMENSION(:, :, :, :), POINTER :: screen_coeffs_set
1000 TYPE(hfx_screen_coeff_type), DIMENSION(:, :), &
1001 POINTER :: screen_coeffs_kind
1002 TYPE(hfx_screen_coeff_type), &
1003 DIMENSION(:, :, :, :, :, :), POINTER :: screen_coeffs_pgf, radii_pgf
1004 TYPE(hfx_basis_type), DIMENSION(:), OPTIONAL, &
1005 POINTER :: ri_basis_parameter
1006 TYPE(hfx_basis_info_type), INTENT(IN), OPTIONAL :: ri_basis_info
1007
1008 CHARACTER(LEN=*), PARAMETER :: routinen = 'prepare_integral_calc'
1009
1010 INTEGER :: handle, i_thread, ii, ikind, irep, &
1011 l_max, n_threads, ncos_max, nkind, &
1012 nneighbors
1013 TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set
1014 TYPE(dft_control_type), POINTER :: dft_control
1015 TYPE(hfx_basis_info_type), POINTER :: basis_info
1016 TYPE(hfx_type), POINTER :: shm_master_x_data
1017
1018 CALL timeset(routinen, handle)
1019
1020 NULLIFY (dft_control)
1021
1022 irep = 1
1023
1024 CALL get_qs_env(qs_env, &
1025 atomic_kind_set=atomic_kind_set, &
1026 cell=cell, &
1027 dft_control=dft_control)
1028
1029 !! Calculate l_max used in fgamma , because init_md_ftable is definitely not thread safe
1030 nkind = SIZE(atomic_kind_set, 1)
1031 l_max = 0
1032 DO ikind = 1, nkind
1033 l_max = max(l_max, maxval(qs_env%x_data(1, 1)%basis_parameter(ikind)%lmax))
1034 END DO
1035 IF (PRESENT(ri_basis_parameter)) THEN
1036 DO ikind = 1, nkind
1037 l_max = max(l_max, maxval(ri_basis_parameter(ikind)%lmax))
1038 END DO
1039 END IF
1040 l_max = 4*l_max
1041
1042 CALL r12_fundamentals_init(l_max, mp2_env%potential_parameter, para_env)
1043 IF (mp2_env%potential_parameter%potential_type == do_potential_tshpsc) THEN
1044 mp2_potential_parameter%cutoff_radius = mp2_env%potential_parameter%cutoff_radius/2.0_dp
1045 ELSE IF (mp2_env%potential_parameter%potential_type == do_potential_long) THEN
1046 mp2_potential_parameter%omega = mp2_env%potential_parameter%omega
1047 END IF
1048 mp2_potential_parameter%potential_type = mp2_env%potential_parameter%potential_type
1049
1050 n_threads = 1
1051
1052 i_thread = 0
1053
1054 actual_x_data => qs_env%x_data(irep, i_thread + 1)
1055
1056 shm_master_x_data => qs_env%x_data(irep, 1)
1057
1058 do_periodic = actual_x_data%periodic_parameter%do_periodic
1059
1060 IF (do_periodic) THEN
1061 ! ** Rebuild neighbor lists in case the cell has changed (i.e. NPT MD)
1062 actual_x_data%periodic_parameter%number_of_shells = actual_x_data%periodic_parameter%mode
1063 CALL hfx_create_neighbor_cells(actual_x_data, actual_x_data%periodic_parameter%number_of_shells_from_input, &
1064 cell, i_thread)
1065 END IF
1066
1067 basis_parameter => actual_x_data%basis_parameter
1068 basis_info => actual_x_data%basis_info
1069
1070 max_set = basis_info%max_set
1071 IF (PRESENT(ri_basis_info)) max_set = max(max_set, ri_basis_info%max_set)
1072
1073 CALL get_qs_env(qs_env=qs_env, &
1074 atomic_kind_set=atomic_kind_set, &
1075 particle_set=particle_set)
1076
1077 natom = SIZE(particle_set, 1)
1078
1079 CALL get_atomic_kind_set(atomic_kind_set=atomic_kind_set, kind_of=kind_of)
1080
1081 !! precompute maximum nco and allocate scratch
1082 ncos_max = 0
1083 nsgf_max = 0
1084 CALL get_ncos_and_ncsgf(natom, kind_of, basis_parameter, ncos_max, nsgf_max)
1085 IF (PRESENT(ri_basis_parameter)) THEN
1086 CALL get_ncos_and_ncsgf(natom, kind_of, ri_basis_parameter, ncos_max, nsgf_max)
1087 END IF
1088
1089 !! Allocate the arrays for the integrals.
1090 ALLOCATE (primitive_integrals(nsgf_max**4))
1091 primitive_integrals = 0.0_dp
1092
1093 ALLOCATE (ee_work2(ncos_max**4))
1094 ALLOCATE (ee_buffer1(ncos_max**4))
1095 ALLOCATE (ee_buffer2(ncos_max**4))
1096 ALLOCATE (ee_primitives_tmp(nsgf_max**4))
1097
1098 nspins = dft_control%nspins
1099
1100 CALL get_max_contraction(max_contraction, max_set, natom, max_pgf, kind_of, basis_parameter)
1101
1102 ! ** Allocate buffers for pgf_lists
1103 nneighbors = SIZE(actual_x_data%neighbor_cells)
1104 ALLOCATE (pgf_list_ij(max_pgf**2))
1105 ALLOCATE (pgf_list_kl(max_pgf**2))
1106 ALLOCATE (nimages(max_pgf**2))
1107
1108 DO ii = 1, max_pgf**2
1109 ALLOCATE (pgf_list_ij(ii)%image_list(nneighbors))
1110 ALLOCATE (pgf_list_kl(ii)%image_list(nneighbors))
1111 END DO
1112
1113 !!! Skipped part
1114
1115 !! Get screening parameter
1116 eps_schwarz = actual_x_data%screening_parameter%eps_schwarz
1117 IF (eps_schwarz <= 0.0_dp) THEN
1118 log10_eps_schwarz = log_zero
1119 ELSE
1120 log10_eps_schwarz = log10(eps_schwarz)
1121 END IF
1122
1123 !! The number of integrals that fit into the given MAX_MEMORY
1124
1125 !!!!!!!! Missing part on the density matrix
1126
1127 !! Initialize schwarz screening matrices for near field estimates and boxing screening matrices
1128 !! for far field estimates. The update is only performed if the geomtry of the system changed.
1129 !! If the system is periodic, then the corresponding routines are called and some variables
1130 !! are initialized
1131
1132 IF (.NOT. shm_master_x_data%screen_funct_is_initialized) THEN
1133 CALL calc_pair_dist_radii(qs_env, basis_parameter, &
1134 shm_master_x_data%pair_dist_radii_pgf, max_set, max_pgf, eps_schwarz, &
1135 n_threads, i_thread)
1136 CALL calc_screening_functions(qs_env, basis_parameter, actual_x_data%eri4_context, shm_master_x_data%potential_parameter, &
1137 shm_master_x_data%screen_funct_coeffs_set, &
1138 shm_master_x_data%screen_funct_coeffs_kind, &
1139 shm_master_x_data%screen_funct_coeffs_pgf, &
1140 shm_master_x_data%pair_dist_radii_pgf, &
1141 max_set, max_pgf, n_threads, i_thread)
1142
1143 shm_master_x_data%screen_funct_is_initialized = .true.
1144 END IF
1145
1146 screen_coeffs_set => shm_master_x_data%screen_funct_coeffs_set
1147 screen_coeffs_kind => shm_master_x_data%screen_funct_coeffs_kind
1148 screen_coeffs_pgf => shm_master_x_data%screen_funct_coeffs_pgf
1149 radii_pgf => shm_master_x_data%pair_dist_radii_pgf
1150
1151 CALL timestop(handle)
1152
1153 END SUBROUTINE prepare_integral_calc
1154
1155! **************************************************************************************************
1156!> \brief ...
1157!> \param natom ...
1158!> \param kind_of ...
1159!> \param basis_parameter ...
1160!> \param ncos_max ...
1161!> \param nsgf_max ...
1162! **************************************************************************************************
1163 SUBROUTINE get_ncos_and_ncsgf(natom, kind_of, basis_parameter, ncos_max, nsgf_max)
1164
1165 INTEGER, INTENT(IN) :: natom
1166 INTEGER, DIMENSION(:), INTENT(IN) :: kind_of
1167 TYPE(hfx_basis_type), DIMENSION(:), POINTER :: basis_parameter
1168 INTEGER, INTENT(INOUT) :: ncos_max, nsgf_max
1169
1170 INTEGER :: iatom, ikind, iset, nseta
1171 INTEGER, DIMENSION(:), POINTER :: la_max, npgfa, nsgfa
1172
1173 DO iatom = 1, natom
1174 ikind = kind_of(iatom)
1175 nseta = basis_parameter(ikind)%nset
1176 npgfa => basis_parameter(ikind)%npgf
1177 la_max => basis_parameter(ikind)%lmax
1178 nsgfa => basis_parameter(ikind)%nsgf
1179 DO iset = 1, nseta
1180 ncos_max = max(ncos_max, ncoset(la_max(iset)))
1181 nsgf_max = max(nsgf_max, nsgfa(iset))
1182 END DO
1183 END DO
1184
1185 END SUBROUTINE get_ncos_and_ncsgf
1186
1187! **************************************************************************************************
1188!> \brief ...
1189!> \param max_contraction ...
1190!> \param max_set ...
1191!> \param natom ...
1192!> \param max_pgf ...
1193!> \param kind_of ...
1194!> \param basis_parameter ...
1195! **************************************************************************************************
1196 SUBROUTINE get_max_contraction(max_contraction, max_set, natom, max_pgf, kind_of, basis_parameter)
1197
1198 REAL(kind=dp), ALLOCATABLE, DIMENSION(:, :), &
1199 INTENT(OUT) :: max_contraction
1200 INTEGER, INTENT(IN) :: max_set, natom
1201 INTEGER, INTENT(OUT) :: max_pgf
1202 INTEGER, DIMENSION(:), INTENT(IN) :: kind_of
1203 TYPE(hfx_basis_type), DIMENSION(:), POINTER :: basis_parameter
1204
1205 INTEGER :: i, jatom, jkind, jset, ncob, nsetb, sgfb
1206 INTEGER, DIMENSION(:), POINTER :: lb_max, npgfb, nsgfb
1207 INTEGER, DIMENSION(:, :), POINTER :: first_sgfb
1208 REAL(kind=dp), DIMENSION(:, :), POINTER :: sphi_b
1209
1210 ALLOCATE (max_contraction(max_set, natom))
1211
1212 max_contraction = 0.0_dp
1213 max_pgf = 0
1214 DO jatom = 1, natom
1215 jkind = kind_of(jatom)
1216 lb_max => basis_parameter(jkind)%lmax
1217 nsetb = basis_parameter(jkind)%nset
1218 npgfb => basis_parameter(jkind)%npgf
1219 first_sgfb => basis_parameter(jkind)%first_sgf
1220 sphi_b => basis_parameter(jkind)%sphi
1221 nsgfb => basis_parameter(jkind)%nsgf
1222 DO jset = 1, nsetb
1223 ! takes the primitive to contracted transformation into account
1224 ncob = npgfb(jset)*ncoset(lb_max(jset))
1225 sgfb = first_sgfb(1, jset)
1226 ! if the primitives are assumed to be all of max_val2, max_val2*p2s_b becomes
1227 ! the maximum value after multiplication with sphi_b
1228 max_contraction(jset, jatom) = maxval([(sum(abs(sphi_b(1:ncob, i))), i=sgfb, sgfb + nsgfb(jset) - 1)])
1229 max_pgf = max(max_pgf, npgfb(jset))
1230 END DO
1231 END DO
1232
1233 END SUBROUTINE get_max_contraction
1234
1235END MODULE mp2_ri_libint
Define the atomic kind types and their sub types.
subroutine, public get_atomic_kind_set(atomic_kind_set, atom_of_kind, kind_of, natom_of_kind, maxatom, natom, nshell, fist_potential_present, shell_present, shell_adiabatic, shell_check_distance, damping_present)
Get attributes of an atomic kind set.
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)
...
subroutine, public init_aux_basis_set(gto_basis_set)
...
Handles all functions related to the CELL.
Definition cell_types.F:15
methods related to the blacs parallel environment
subroutine, public cp_blacs_env_release(blacs_env)
releases the given blacs_env
subroutine, public cp_blacs_env_create(blacs_env, para_env, blacs_grid_layout, blacs_repeatable, row_major, grid_2d)
allocates and initializes a type that represent a blacs context
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
Basic linear algebra operations for full matrices.
subroutine, public cp_fm_triangular_invert(matrix_a, uplo_tr)
inverts a triangular matrix
various cholesky decomposition related routines
subroutine, public cp_fm_cholesky_decompose(matrix, n, info_out)
used to replace a symmetric positive def. matrix M with its cholesky decomposition U: M = U^T * U,...
represent the structure of a full matrix
subroutine, public cp_fm_struct_create(fmstruct, para_env, context, nrow_global, ncol_global, nrow_block, ncol_block, descriptor, first_p_pos, local_leading_dimension, template_fmstruct, square_blocks, force_block)
allocates and initializes a full matrix structure
subroutine, public cp_fm_struct_release(fmstruct)
releases a full matrix structure
represent a full matrix distributed on many processors
Definition cp_fm_types.F:15
subroutine, public cp_fm_set_submatrix(fm, new_values, start_row, start_col, n_rows, n_cols, alpha, beta, transpose)
sets a submatrix of a full matrix fm(start_row:start_row+n_rows,start_col:start_col+n_cols) = alpha*o...
subroutine, public cp_fm_create(matrix, matrix_struct, name, nrow, ncol, set_zero)
creates a new full matrix with the given structure
subroutine, public cp_fm_get_submatrix(fm, target_m, start_row, start_col, n_rows, n_cols, transpose)
gets a submatrix of a full matrix op(target_m)(1:n_rows,1:n_cols) =fm(start_row:start_row+n_rows,...
Prepare and evaluate screened four-center Gaussian integrals and derivatives.
subroutine, public coulomb4(context, ra, rb, rc, rd, npgfa, npgfb, npgfc, npgfd, la_min, la_max, lb_min, lb_max, lc_min, lc_max, ld_min, ld_max, nsgfa, nsgfb, nsgfc, nsgfd, sphi_a_u1, sphi_a_u2, sphi_a_u3, sphi_b_u1, sphi_b_u2, sphi_b_u3, sphi_c_u1, sphi_c_u2, sphi_c_u3, sphi_d_u1, sphi_d_u2, sphi_d_u3, zeta, zetb, zetc, zetd, primitive_integrals, potential_parameter, neighbor_cells, screen1, screen2, eps_schwarz, max_contraction_val, cart_estimate, cell, neris_tmp, log10_pmax, log10_eps_schwarz, r1_pgf, r2_pgf, pgf1, pgf2, pgf_list_ij, pgf_list_kl, nsgfl_a, nsgfl_b, nsgfl_c, nsgfl_d, sphi_a_ext, sphi_b_ext, sphi_c_ext, sphi_d_ext, ee_work2, ee_buffer1, ee_buffer2, ee_primitives_tmp, nimages, do_periodic)
calculates two-electron integrals of a quartet/shell using the library lib_int in the periodic case
Routines for optimizing load balance between processes in HFX calculations.
subroutine, public build_pair_list_mp2(natom, list, set_list, i_start, i_end, j_start, j_end, kind_of, basis_parameter, particle_set, do_periodic, coeffs_set, coeffs_kind, coeffs_kind_max0, log10_eps_schwarz, cell, pmax_blocks, atomic_pair_list, skip_atom_symmetry)
...
Several screening methods used in HFX calcualtions.
subroutine, public calc_screening_functions(qs_env, basis_parameter, context, potential_parameter, coeffs_set, coeffs_kind, coeffs_pgf, radii_pgf, max_set, max_pgf, n_threads, i_thread)
calculates screening functions for schwarz screening
subroutine, public calc_pair_dist_radii(qs_env, basis_parameter, radii_pgf, max_set, max_pgf, eps_schwarz, n_threads, i_thread)
calculates radius functions for longrange screening
Types and set/get functions for HFX.
Definition hfx_types.F:16
real(dp), parameter, public log_zero
Definition hfx_types.F:123
subroutine, public hfx_create_neighbor_cells(x_data, pbc_shells, cell, i_thread, nkp_grid)
This routine computes the neighbor cells that are taken into account in periodic runs
Definition hfx_types.F:2065
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public do_potential_long
integer, parameter, public do_potential_tshpsc
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public int_8
Definition kinds.F:54
integer, parameter, public dp
Definition kinds.F:34
Interface to the message passing library MPI.
Routines to calculate the 3 and 2 center ERI's needed in the RI approximation using libint.
subroutine, public libint_ri_mp2(dimen, ri_dimen, occupied, natom, mp2_biel, mp2_env, c, kind_of, ri_basis_parameter, ri_basis_info, basis_s0, ri_index_table, qs_env, para_env, lai)
...
subroutine, public read_ri_basis_set(qs_env, ri_basis_parameter, ri_basis_info, natom, nkind, kind_of, ri_index_table, ri_dimen, basis_s0)
Read the auxiliary basis set for RI approxiamtion.
subroutine, public release_ri_basis_set(ri_basis_parameter, basis_s0)
Release the auxiliary basis set for RI approxiamtion (to be used only in the case of basis optimizati...
subroutine, public prepare_integral_calc(cell, qs_env, mp2_env, para_env, mp2_potential_parameter, actual_x_data, do_periodic, basis_parameter, max_set, particle_set, natom, kind_of, nsgf_max, primitive_integrals, ee_work2, ee_buffer1, ee_buffer2, ee_primitives_tmp, nspins, max_contraction, max_pgf, pgf_list_ij, pgf_list_kl, nimages, eps_schwarz, log10_eps_schwarz, screen_coeffs_set, screen_coeffs_kind, screen_coeffs_pgf, radii_pgf, ri_basis_parameter, ri_basis_info)
...
Types needed for MP2 calculations.
Definition mp2_types.F:14
Provides Cartesian and spherical orbital pointers and indices.
integer, dimension(:), allocatable, public nco
integer, dimension(:), allocatable, public ncoset
integer, dimension(:), allocatable, public nso
Define the data structure for the particle information.
subroutine, public get_qs_env(qs_env, atomic_kind_set, qs_kind_set, cell, super_cell, cell_ref, use_ref_cell, kpoints, dft_control, mos, sab_orb, sab_all, qmmm, qmmm_periodic, mimic, sac_ae, sac_ppl, sac_lri, sap_ppnl, sab_vdw, sab_scp, sap_oce, sab_lrc, sab_se, sab_xtbe, sab_tbe, sab_core, sab_xb, sab_xtb_pp, sab_xtb_nonbond, sab_almo, sab_kp, sab_kp_nosym, sab_cneo, particle_set, energy, force, matrix_h, matrix_h_im, matrix_ks, matrix_ks_im, matrix_vxc, run_rtp, rtp, matrix_h_kp, matrix_h_im_kp, matrix_ks_kp, matrix_ks_im_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, matrix_s_ri_aux_kp, matrix_s, matrix_s_ri_aux, matrix_w, matrix_p_mp2, matrix_p_mp2_admm, matrix_vhxc, rho, rho_xc, pw_env, ewald_env, ewald_pw, active_space, mpools, input, para_env, blacs_env, scf_control, rel_control, kinetic, qs_charges, vppl, xcint_weights, rho_core, rho_nlcc, rho_nlcc_g, ks_env, ks_qmmm_env, wf_history, scf_env, local_particles, local_molecules, distribution_2d, dbcsr_dist, molecule_kind_set, molecule_set, subsys, cp_subsys, oce, local_rho_set, rho_atom_set, task_list, task_list_soft, rho0_atom_set, rho0_mpole, rhoz_set, rhoz_cneo_set, ecoul_1c, rho0_s_rs, rho0_s_gs, rhoz_cneo_s_rs, rhoz_cneo_s_gs, do_kpoints, has_unit_metric, requires_mo_derivs, mo_derivs, mo_loc_history, nkind, natom, nelectron_total, nelectron_spin, efield, neighbor_list_id, linres_control, xas_env, virial, cp_ddapc_env, cp_ddapc_ewald, outer_scf_history, outer_scf_ihistory, x_data, et_coupling, dftb_potential, results, se_taper, se_store_int_env, se_nddo_mpole, se_nonbond_env, admm_env, lri_env, lri_density, exstate_env, ec_env, harris_env, dispersion_env, gcp_env, vee, rho_external, external_vxc, mask, mp2_env, bs_env, kg_env, wanniercentres, atprop, ls_scf_env, do_transport, transport_env, v_hartree_rspace, s_mstruct_changed, rho_changed, potential_changed, forces_up_to_date, mscfg_env, almo_scf_env, gradient_history, variable_history, embed_pot, spin_embed_pot, polar_env, mos_last_converged, eeq, rhs, do_rixs, tb_tblite)
Get the QUICKSTEP environment.
Define the quickstep kind type and their sub types.
subroutine, public get_qs_kind(qs_kind, basis_set, basis_type, ncgf, nsgf, all_potential, tnadd_potential, gth_potential, sgp_potential, upf_potential, cneo_potential, se_parameter, dftb_parameter, xtb_parameter, dftb3_param, zatom, zeff, elec_conf, mao, lmax_dftb, alpha_core_charge, ccore_charge, core_charge, core_charge_radius, paw_proj_set, paw_atom, hard_radius, hard0_radius, max_rad_local, covalent_radius, vdw_radius, gpw_type_forced, harmonics, max_iso_not0, max_s_harm, grid_atom, ngrid_ang, ngrid_rad, lmax_rho0, dft_plus_u_atom, l_of_dft_plus_u, n_of_dft_plus_u, u_minus_j, hund_j, u_of_dft_plus_u, j_of_dft_plus_u, alpha_of_dft_plus_u, beta_of_dft_plus_u, j0_of_dft_plus_u, occupation_of_dft_plus_u, dispersion, bs_occupation, magnetization, no_optimize, addel, laddel, naddel, orbitals, max_scf, eps_scf, smear, u_ramping, u_minus_j_target, eps_u_ramping, proj_shell_charge, lr_atom, do_mtlr, u_j_loop, ao_coef, init_u_ramping_each_scf, reltmat, ghost, monovalent, floating, name, element_symbol, pao_basis_size, pao_model_file, pao_potentials, pao_descriptors, nelec)
Get attributes of an atomic kind.
subroutine, public get_qs_kind_set(qs_kind_set, all_potential_present, tnadd_potential_present, gth_potential_present, sgp_potential_present, paw_atom_present, dft_plus_u_atom_present, maxcgf, maxsgf, maxco, maxco_proj, maxgtops, maxlgto, maxlprj, maxnset, maxsgf_set, ncgf, npgf, nset, nsgf, nshell, maxpol, maxlppl, maxlppnl, maxppnl, nelectron, maxder, max_ngrid_rad, max_sph_harm, maxg_iso_not0, lmax_rho0, basis_rcut, do_mtlr_present, basis_type, total_zeff_corr, npgf_seg, cneo_potential_present, nkind_q, natom_q)
Get attributes of an atomic kind set.
Radial fundamentals for Gaussian two-electron integrals. Entry m+1 stores order m....
subroutine, public r12_fundamentals_init(m_max, potential_parameter, para_env)
Prepare shared radial evaluator tables before entering a threaded evaluation region.
Provides all information about an atomic kind.
Type defining parameters related to the simulation cell.
Definition cell_types.F:60
represent a blacs multidimensional parallel environment (for the mpi corrispective see cp_paratypes/m...
keeps the information about the structure of a full matrix
represent a full matrix
stores some data used in construction of Kohn-Sham matrix
Definition hfx_types.F:474
stores all the informations relevant to an mpi environment
Provides all information about a quickstep kind.