(git:c641773)
Loading...
Searching...
No Matches
rpa_gw_im_time_util.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 Utility routines for RPA and GW with imaginary time
10!> \par History
11!> 06.2019 split from rpa_im_time.F [Frederick Stein]
12! **************************************************************************************************
14
17 USE cell_types, ONLY: cell_type,&
18 pbc
20 USE cp_cfm_types, ONLY: cp_cfm_get_info,&
23 USE cp_dbcsr_api, ONLY: &
26 dbcsr_p_type, dbcsr_release, dbcsr_release_p, dbcsr_type, dbcsr_type_no_symmetry
35 USE cp_fm_types, ONLY: cp_fm_create,&
42 USE dbt_api, ONLY: &
43 dbt_contract, dbt_copy, dbt_copy_matrix_to_tensor, dbt_create, dbt_default_distvec, &
44 dbt_destroy, dbt_get_info, dbt_pgrid_create, dbt_pgrid_destroy, dbt_pgrid_type, dbt_type
45 USE hfx_types, ONLY: alloc_containers,&
48 USE kinds, ONLY: dp,&
49 int_8
50 USE mathconstants, ONLY: twopi,&
51 z_one,&
52 z_zero
62 USE qs_tensors, ONLY: compress_tensor,&
69#include "./base/base_uses.f90"
70
71 IMPLICIT NONE
72
73 PRIVATE
74
75 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'rpa_gw_im_time_util'
76
78 PUBLIC :: build_ao_propagator
79
81 MODULE PROCEDURE build_ao_propagator_fm, build_ao_propagator_cfm
82 END INTERFACE build_ao_propagator
83
84CONTAINS
85
86! **************************************************************************************************
87!> \brief Builds G = X X^T, where X is the selected, column-scaled MO window.
88!> Only the selected workspace columns are overwritten; coefficients are unchanged.
89!> \param coefficients AO-by-MO coefficient matrix
90!> \param column_factors factors for consecutive MOs starting at first_mo
91!> \param first_mo first global MO column in the window
92!> \param work coefficient workspace with the same shape and distribution as coefficients
93!> \param propagator AO-by-AO output matrix
94! **************************************************************************************************
95 SUBROUTINE build_ao_propagator_fm(coefficients, column_factors, first_mo, work, propagator)
96 TYPE(cp_fm_type), INTENT(IN) :: coefficients
97 REAL(KIND=dp), DIMENSION(:), INTENT(IN) :: column_factors
98 INTEGER, INTENT(IN) :: first_mo
99 TYPE(cp_fm_type), INTENT(INOUT) :: work, propagator
100
101 INTEGER :: nao, nmo
102
103 IF (SIZE(column_factors) == 0) THEN
104 CALL cp_fm_set_all(propagator, 0.0_dp)
105 RETURN
106 END IF
107
108 CALL cp_fm_get_info(coefficients, nrow_global=nao, ncol_global=nmo)
109 cpassert(first_mo + SIZE(column_factors) - 1 <= nmo)
110
111 CALL cp_fm_column_scale(work, column_factors, first_col=first_mo, source=coefficients)
112
113 CALL parallel_gemm("N", "T", nao, nao, SIZE(column_factors), 1.0_dp, work, work, 0.0_dp, propagator, &
114 a_first_col=first_mo, b_first_col=first_mo)
115
116 END SUBROUTINE build_ao_propagator_fm
117
118! **************************************************************************************************
119!> \brief Builds G = X X^H, where X is the selected, column-scaled MO window.
120!> Only the selected workspace columns are overwritten; coefficients are unchanged.
121!> \param coefficients complex AO-by-MO coefficient matrix
122!> \param column_factors real factors for consecutive MOs starting at first_mo
123!> \param first_mo first global MO column in the window
124!> \param work coefficient workspace with the same shape and distribution as coefficients
125!> \param propagator complex AO-by-AO output matrix
126! **************************************************************************************************
127 SUBROUTINE build_ao_propagator_cfm(coefficients, column_factors, first_mo, work, propagator)
128 TYPE(cp_cfm_type), INTENT(IN) :: coefficients
129 REAL(KIND=dp), DIMENSION(:), INTENT(IN) :: column_factors
130 INTEGER, INTENT(IN) :: first_mo
131 TYPE(cp_cfm_type), INTENT(INOUT) :: work, propagator
132
133 INTEGER :: nao, nmo
134
135 IF (SIZE(column_factors) == 0) THEN
136 CALL cp_cfm_set_all(propagator, z_zero)
137 RETURN
138 END IF
139
140 CALL cp_cfm_get_info(coefficients, nrow_global=nao, ncol_global=nmo)
141 cpassert(first_mo + SIZE(column_factors) - 1 <= nmo)
142
143 CALL cp_cfm_column_scale(work, cmplx(column_factors, 0.0_dp, kind=dp), &
144 first_col=first_mo, source=coefficients)
145
146 CALL parallel_gemm("N", "C", nao, nao, SIZE(column_factors), z_one, work, work, z_zero, propagator, &
147 a_first_col=first_mo, b_first_col=first_mo)
148
149 END SUBROUTINE build_ao_propagator_cfm
150
151! **************************************************************************************************
152!> \brief ...
153!> \param t_3c_overl_int ...
154!> \param t_3c_O_compressed ...
155!> \param t_3c_O_ind ...
156!> \param t_3c_overl_int_ao_mo ...
157!> \param t_3c_O_mo_compressed ...
158!> \param t_3c_O_mo_ind ...
159!> \param t_3c_overl_int_gw_RI ...
160!> \param t_3c_overl_int_gw_AO ...
161!> \param starts_array_mc ...
162!> \param ends_array_mc ...
163!> \param mo_coeff ...
164!> \param matrix_s ...
165!> \param gw_corr_lev_occ ...
166!> \param gw_corr_lev_virt ...
167!> \param homo ...
168!> \param nmo ...
169!> \param para_env ...
170!> \param do_ic_model ...
171!> \param t_3c_overl_nnP_ic ...
172!> \param t_3c_overl_nnP_ic_reflected ...
173!> \param qs_env ...
174!> \param unit_nr ...
175!> \param do_alpha ...
176! **************************************************************************************************
177 SUBROUTINE get_tensor_3c_overl_int_gw(t_3c_overl_int, t_3c_O_compressed, t_3c_O_ind, &
178 t_3c_overl_int_ao_mo, t_3c_O_mo_compressed, t_3c_O_mo_ind, &
179 t_3c_overl_int_gw_RI, t_3c_overl_int_gw_AO, &
180 starts_array_mc, ends_array_mc, &
181 mo_coeff, matrix_s, &
182 gw_corr_lev_occ, gw_corr_lev_virt, homo, nmo, &
183 para_env, &
184 do_ic_model, &
185 t_3c_overl_nnP_ic, t_3c_overl_nnP_ic_reflected, &
186 qs_env, unit_nr, do_alpha)
187
188 TYPE(dbt_type), DIMENSION(:, :) :: t_3c_overl_int
189 TYPE(hfx_compression_type), DIMENSION(:, :, :) :: t_3c_o_compressed
190 TYPE(block_ind_type), DIMENSION(:, :, :) :: t_3c_o_ind
191 TYPE(dbt_type) :: t_3c_overl_int_ao_mo
192 TYPE(hfx_compression_type) :: t_3c_o_mo_compressed
193 INTEGER, ALLOCATABLE, DIMENSION(:, :) :: t_3c_o_mo_ind
194 TYPE(dbt_type) :: t_3c_overl_int_gw_ri, &
195 t_3c_overl_int_gw_ao
196 INTEGER, DIMENSION(:), INTENT(IN) :: starts_array_mc, ends_array_mc
197 TYPE(cp_fm_type), INTENT(IN) :: mo_coeff
198 TYPE(dbcsr_p_type), DIMENSION(:), POINTER :: matrix_s
199 INTEGER, INTENT(IN) :: gw_corr_lev_occ, gw_corr_lev_virt, homo, &
200 nmo
201 TYPE(mp_para_env_type), INTENT(IN) :: para_env
202 LOGICAL, INTENT(IN) :: do_ic_model
203 TYPE(dbt_type) :: t_3c_overl_nnp_ic, &
204 t_3c_overl_nnp_ic_reflected
205 TYPE(qs_environment_type), POINTER :: qs_env
206 INTEGER, INTENT(IN) :: unit_nr
207 LOGICAL, INTENT(IN), OPTIONAL :: do_alpha
208
209 CHARACTER(LEN=*), PARAMETER :: routinen = 'get_tensor_3c_overl_int_gw'
210
211 INTEGER :: cut_memory, handle, i_mem, icol_global, imo, irow_global, min_bsize, &
212 min_bsize_mo, nkind, nmo_blk_gw, npcols, nprows, size_mo, unit_nr_prv
213 INTEGER(int_8) :: nze
214 INTEGER, ALLOCATABLE, DIMENSION(:) :: dist1, dist2, dist3, sizes_ao, &
215 sizes_ao_split, sizes_mo, sizes_mo_1, &
216 sizes_ri, sizes_ri_split, tmp
217 INTEGER, DIMENSION(2) :: pdims_2d
218 INTEGER, DIMENSION(2, 1) :: bounds
219 INTEGER, DIMENSION(2, 3) :: ibounds
220 INTEGER, DIMENSION(3) :: bounds_3c, pdims
221 INTEGER, DIMENSION(:), POINTER :: distp_1, distp_2, sizes_mo_blocked, &
222 sizes_mo_p1, sizes_mo_p2
223 LOGICAL :: memory_info, my_do_alpha
224 REAL(dp) :: compression_factor, memory_3c, occ
225 REAL(kind=dp), ALLOCATABLE, DIMENSION(:) :: norm
226 TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set
227 TYPE(cp_fm_type) :: fm_mat_mo_coeff_gw
228 TYPE(dbcsr_distribution_type) :: dist, dist_templ
229 TYPE(dbcsr_type) :: mat_mo_coeff_gw_reflected_norm, &
230 mat_norm, mat_norm_diag, mat_work
231 TYPE(dbcsr_type), POINTER :: mat_mo_coeff_gw, &
232 mat_mo_coeff_gw_reflected
233 TYPE(dbt_pgrid_type) :: pgrid_2d, pgrid_ao, pgrid_ic, pgrid_mo
234 TYPE(dbt_type) :: mo_coeff_gw_t, mo_coeff_gw_t_tmp, &
235 t_3c_overl_int_ao_ao, &
236 t_3c_overl_int_mo_ao, &
237 t_3c_overl_int_mo_mo
238 TYPE(gto_basis_set_p_type), DIMENSION(:), POINTER :: basis_set_ao, basis_set_ri_aux
239 TYPE(particle_type), DIMENSION(:), POINTER :: particle_set
240 TYPE(qs_kind_type), DIMENSION(:), POINTER :: qs_kind_set
241
242 memory_info = qs_env%mp2_env%ri_rpa_im_time%memory_info
243 IF (memory_info) THEN
244 unit_nr_prv = unit_nr
245 ELSE
246 unit_nr_prv = 0
247 END IF
248
249 my_do_alpha = .false.
250 IF (PRESENT(do_alpha)) my_do_alpha = do_alpha
251
252 CALL timeset(routinen, handle)
253
254 CALL get_qs_env(qs_env, nkind=nkind, qs_kind_set=qs_kind_set, particle_set=particle_set, atomic_kind_set=atomic_kind_set)
255
256 CALL cp_fm_create(fm_mat_mo_coeff_gw, mo_coeff%matrix_struct)
257 CALL cp_fm_to_fm(mo_coeff, fm_mat_mo_coeff_gw)
258
259 ! set MO coeffs to zero where
260 DO irow_global = 1, nmo
261 DO icol_global = 1, homo - gw_corr_lev_occ
262 CALL cp_fm_set_element(fm_mat_mo_coeff_gw, irow_global, icol_global, 0.0_dp)
263 END DO
264 DO icol_global = homo + gw_corr_lev_virt + 1, nmo
265 CALL cp_fm_set_element(fm_mat_mo_coeff_gw, irow_global, icol_global, 0.0_dp)
266 END DO
267 END DO
268
269 NULLIFY (mat_mo_coeff_gw)
270 CALL dbcsr_init_p(mat_mo_coeff_gw)
271
272 CALL cp_dbcsr_m_by_n_from_row_template(mat_mo_coeff_gw, template=matrix_s(1)%matrix, n=nmo, &
273 sym=dbcsr_type_no_symmetry)
274
275 CALL copy_fm_to_dbcsr(fm_mat_mo_coeff_gw, &
276 mat_mo_coeff_gw, &
277 keep_sparsity=.false.)
278
279 ! just remove the blocks which have been set to zero
280 CALL dbcsr_filter(mat_mo_coeff_gw, 1.0e-20_dp)
281
282 min_bsize = qs_env%mp2_env%ri_rpa_im_time%min_bsize
283 min_bsize_mo = qs_env%mp2_env%ri_rpa_im_time%min_bsize_mo
284
285 CALL split_block_sizes([gw_corr_lev_occ + gw_corr_lev_virt], sizes_mo, min_bsize_mo)
286 ALLOCATE (sizes_mo_1(nmo))
287 sizes_mo_1(:) = 1
288
289 nmo_blk_gw = SIZE(sizes_mo)
290 CALL move_alloc(sizes_mo, tmp)
291 ALLOCATE (sizes_mo(nmo_blk_gw + 2))
292 sizes_mo(1) = homo - gw_corr_lev_occ
293 sizes_mo(2:SIZE(tmp) + 1) = tmp(:)
294 sizes_mo(SIZE(tmp) + 2) = nmo - (homo + gw_corr_lev_virt)
295
296 ALLOCATE (basis_set_ri_aux(nkind), basis_set_ao(nkind))
297 CALL basis_set_list_setup(basis_set_ri_aux, "RI_AUX", qs_kind_set)
298 CALL get_particle_set(particle_set, qs_kind_set, nsgf=sizes_ri, basis=basis_set_ri_aux)
299 CALL basis_set_list_setup(basis_set_ao, "ORB", qs_kind_set)
300 CALL get_particle_set(particle_set, qs_kind_set, nsgf=sizes_ao, basis=basis_set_ao)
301
302 CALL pgf_block_sizes(atomic_kind_set, basis_set_ao, min_bsize, sizes_ao_split)
303 CALL pgf_block_sizes(atomic_kind_set, basis_set_ri_aux, min_bsize, sizes_ri_split)
304
305 DEALLOCATE (basis_set_ao, basis_set_ri_aux)
306
307 pdims = 0
308 CALL dbt_pgrid_create(para_env, pdims, pgrid_ao, &
309 tensor_dims=[SIZE(sizes_ri_split), SIZE(sizes_ao_split), SIZE(sizes_ao_split)])
310
311 pdims_2d = 0
312 CALL mp_dims_create(para_env%num_pe, pdims_2d)
313
314 ! we iterate over MO blocks for saving memory during contraction, thus we should not parallelize over MO dimension
315 pdims = [pdims_2d(1), pdims_2d(2), 1]
316 CALL dbt_pgrid_create(para_env, pdims, pgrid_mo, &
317 tensor_dims=[SIZE(sizes_ri_split), SIZE(sizes_ao_split), 1])
318
319 pdims_2d = 0
320 CALL dbt_pgrid_create(para_env, pdims_2d, pgrid_2d, &
321 tensor_dims=[SIZE(sizes_ao_split), nmo])
322
323 CALL create_3c_tensor(t_3c_overl_int_ao_ao, dist1, dist2, dist3, pgrid_ao, &
324 sizes_ri_split, sizes_ao_split, sizes_ao_split, [1, 2], [3], name="(RI AO | AO)")
325 DEALLOCATE (dist1, dist2, dist3)
326
327 IF (.NOT. qs_env%mp2_env%ri_g0w0%do_kpoints_Sigma) THEN
328 CALL create_3c_tensor(t_3c_overl_int_ao_mo, dist1, dist2, dist3, pgrid_ao, &
329 sizes_ri_split, sizes_ao_split, sizes_mo_1, [1, 2], [3], name="(RI AO | MO)")
330 DEALLOCATE (dist1, dist2, dist3)
331 END IF
332
333 CALL create_3c_tensor(t_3c_overl_int_gw_ri, dist1, dist2, dist3, pgrid_mo, &
334 sizes_ri_split, sizes_ao_split, sizes_mo, [1], [2, 3], name="(RI | AO MO)")
335 DEALLOCATE (dist1, dist2, dist3)
336
337 CALL create_3c_tensor(t_3c_overl_int_gw_ao, dist1, dist2, dist3, pgrid_mo, &
338 sizes_ao_split, sizes_ri_split, sizes_mo, [1], [2, 3], name="(AO | RI MO)")
339 DEALLOCATE (dist1, dist2, dist3)
340
341 CALL dbt_pgrid_destroy(pgrid_ao)
342 CALL dbt_pgrid_destroy(pgrid_mo)
343
344 CALL create_2c_tensor(mo_coeff_gw_t, dist1, dist2, pgrid_2d, sizes_ao_split, sizes_mo_1, name="(AO|MO)")
345 DEALLOCATE (dist1, dist2)
346 CALL dbt_pgrid_destroy(pgrid_2d)
347
348 CALL dbt_create(mat_mo_coeff_gw, mo_coeff_gw_t_tmp, name="MO coeffs")
349 CALL dbt_copy_matrix_to_tensor(mat_mo_coeff_gw, mo_coeff_gw_t_tmp)
350
351 CALL dbt_copy(mo_coeff_gw_t_tmp, mo_coeff_gw_t)
352
353 bounds(1, 1) = homo - gw_corr_lev_occ + 1
354 bounds(2, 1) = homo + gw_corr_lev_virt
355
356 CALL dbt_get_info(t_3c_overl_int_ao_ao, nfull_total=bounds_3c)
357
358 ibounds(:, 1) = [1, bounds_3c(1)]
359 ibounds(:, 3) = [1, bounds_3c(3)]
360
361 cut_memory = SIZE(starts_array_mc)
362
363 IF (.NOT. qs_env%mp2_env%ri_g0w0%do_kpoints_Sigma) THEN
364 DO i_mem = 1, cut_memory
365 CALL decompress_tensor(t_3c_overl_int(1, 1), t_3c_o_ind(1, 1, i_mem)%ind, t_3c_o_compressed(1, 1, i_mem), &
366 qs_env%mp2_env%ri_rpa_im_time%eps_compress)
367
368 ibounds(:, 2) = [starts_array_mc(i_mem), ends_array_mc(i_mem)]
369
370 CALL dbt_copy(t_3c_overl_int(1, 1), t_3c_overl_int_ao_ao, move_data=.true.)
371
372 CALL dbt_contract(1.0_dp, mo_coeff_gw_t, t_3c_overl_int_ao_ao, 1.0_dp, &
373 t_3c_overl_int_ao_mo, contract_1=[1], notcontract_1=[2], &
374 contract_2=[3], notcontract_2=[1, 2], map_1=[3], map_2=[1, 2], &
375 bounds_2=ibounds, move_data=.false., unit_nr=unit_nr_prv)
376
377 END DO
378 END IF
379
380 CALL cp_fm_release(fm_mat_mo_coeff_gw)
381
382 IF (do_ic_model) THEN
383 pdims = 0
384 CALL dbt_pgrid_create(para_env, pdims, pgrid_ic, &
385 tensor_dims=[SIZE(sizes_ri_split), nmo, nmo])
386
387 CALL create_3c_tensor(t_3c_overl_int_mo_ao, dist1, dist2, dist3, pgrid_ic, &
388 sizes_ri_split, sizes_mo_1, sizes_ao_split, [1, 2], [3], name="(RI MO | AO)")
389 DEALLOCATE (dist1, dist2, dist3)
390 CALL create_3c_tensor(t_3c_overl_int_mo_mo, dist1, dist2, dist3, pgrid_ic, &
391 sizes_ri_split, sizes_mo_1, sizes_mo_1, [1, 2], [3], name="(RI MO | MO)")
392 DEALLOCATE (dist1, dist2, dist3)
393 CALL dbt_create(t_3c_overl_int_mo_mo, t_3c_overl_nnp_ic)
394 CALL create_3c_tensor(t_3c_overl_nnp_ic_reflected, dist1, dist2, dist3, pgrid_ic, &
395 sizes_ri_split, sizes_mo_1, sizes_mo_1, [1], [2, 3], name="(RI | MO MO)")
396 DEALLOCATE (dist1, dist2, dist3)
397
398 CALL dbt_pgrid_destroy(pgrid_ic)
399
400 CALL dbt_copy(t_3c_overl_int_ao_mo, t_3c_overl_int_mo_ao, order=[1, 3, 2])
401 CALL dbt_contract(1.0_dp, mo_coeff_gw_t, t_3c_overl_int_mo_ao, 0.0_dp, &
402 t_3c_overl_int_mo_mo, contract_1=[1], notcontract_1=[2], &
403 contract_2=[3], notcontract_2=[1, 2], map_1=[3], map_2=[1, 2], &
404 bounds_2=bounds, move_data=.false., unit_nr=unit_nr_prv)
405 CALL dbt_copy(t_3c_overl_int_mo_mo, t_3c_overl_nnp_ic)
406
407 NULLIFY (mat_mo_coeff_gw_reflected)
408 CALL dbcsr_init_p(mat_mo_coeff_gw_reflected)
409
410 CALL cp_dbcsr_m_by_n_from_row_template(mat_mo_coeff_gw_reflected, template=matrix_s(1)%matrix, n=nmo, &
411 sym=dbcsr_type_no_symmetry)
412
413 CALL reflect_mat_row(mat_mo_coeff_gw_reflected, mat_mo_coeff_gw, para_env, qs_env, unit_nr, do_alpha=my_do_alpha)
414
415 ! normalize reflected MOs (they are not properly normalized since high angular momentum basis functions
416 ! of the image molecule are not exactly reflected at the image plane (sign problem in p_z function)
417 CALL dbcsr_create(matrix=mat_work, template=mat_mo_coeff_gw_reflected, matrix_type=dbcsr_type_no_symmetry)
418
419 CALL dbcsr_get_info(mat_work, distribution=dist_templ, nblkcols_total=size_mo, col_blk_size=sizes_mo_blocked)
420
421 CALL dbcsr_distribution_get(dist_templ, nprows=nprows, npcols=npcols)
422
423 ALLOCATE (distp_1(size_mo), distp_2(size_mo))
424 CALL dbt_default_distvec(size_mo, nprows, sizes_mo_blocked, distp_1)
425 CALL dbt_default_distvec(size_mo, npcols, sizes_mo_blocked, distp_2)
426 CALL dbcsr_distribution_new(dist, template=dist_templ, row_dist=distp_1, col_dist=distp_2, reuse_arrays=.true.)
427
428 ALLOCATE (sizes_mo_p1(size_mo))
429 ALLOCATE (sizes_mo_p2(size_mo))
430 sizes_mo_p1(:) = sizes_mo_blocked
431 sizes_mo_p2(:) = sizes_mo_blocked
432 CALL dbcsr_create(mat_norm, "mo norm", dist, dbcsr_type_no_symmetry, sizes_mo_p1, sizes_mo_p2, &
433 reuse_arrays=.true.)
435
436 CALL dbcsr_multiply("N", "N", 1.0_dp, matrix_s(1)%matrix, mat_mo_coeff_gw_reflected, 0.0_dp, mat_work)
437 CALL dbcsr_multiply("T", "N", 1.0_dp, mat_mo_coeff_gw_reflected, mat_work, 0.0_dp, mat_norm)
438
439 CALL dbcsr_release(mat_work)
440
441 ALLOCATE (norm(nmo))
442 norm = 0.0_dp
443
444 CALL dbcsr_get_diag(mat_norm, norm)
445 CALL para_env%sum(norm)
446
447 DO imo = bounds(1, 1), bounds(2, 1)
448 norm(imo) = 1.0_dp/sqrt(norm(imo))
449 END DO
450
451 CALL dbcsr_create(mat_norm_diag, template=mat_norm)
452 CALL dbcsr_release(mat_norm)
453
454 CALL dbcsr_add_on_diag(mat_norm_diag, 1.0_dp)
455
456 CALL dbcsr_set_diag(mat_norm_diag, norm)
457
458 CALL dbcsr_create(mat_mo_coeff_gw_reflected_norm, template=mat_mo_coeff_gw_reflected)
459 CALL dbcsr_multiply("N", "N", 1.0_dp, mat_mo_coeff_gw_reflected, mat_norm_diag, 0.0_dp, mat_mo_coeff_gw_reflected_norm)
460 CALL dbcsr_release(mat_norm_diag)
461
462 CALL dbcsr_filter(mat_mo_coeff_gw_reflected_norm, 1.0e-20_dp)
463
464 CALL dbt_copy_matrix_to_tensor(mat_mo_coeff_gw_reflected_norm, mo_coeff_gw_t_tmp)
465 CALL dbcsr_release(mat_mo_coeff_gw_reflected_norm)
466 CALL dbt_copy(mo_coeff_gw_t_tmp, mo_coeff_gw_t)
467
468 CALL dbt_contract(1.0_dp, mo_coeff_gw_t, t_3c_overl_int_ao_ao, 0.0_dp, &
469 t_3c_overl_int_ao_mo, contract_1=[1], notcontract_1=[2], &
470 contract_2=[3], notcontract_2=[1, 2], map_1=[3], map_2=[1, 2], &
471 bounds_2=bounds, move_data=.false., unit_nr=unit_nr_prv)
472
473 CALL dbt_copy(t_3c_overl_int_ao_mo, t_3c_overl_int_mo_ao, order=[1, 3, 2])
474 CALL dbt_contract(1.0_dp, mo_coeff_gw_t, t_3c_overl_int_mo_ao, 0.0_dp, &
475 t_3c_overl_int_mo_mo, contract_1=[1], notcontract_1=[2], &
476 contract_2=[3], notcontract_2=[1, 2], map_1=[3], map_2=[1, 2], &
477 bounds_2=bounds, move_data=.false., unit_nr=unit_nr_prv)
478 CALL dbt_copy(t_3c_overl_int_mo_mo, t_3c_overl_nnp_ic_reflected)
479 CALL dbt_destroy(t_3c_overl_int_mo_ao)
480 CALL dbt_destroy(t_3c_overl_int_mo_mo)
481
482 CALL dbcsr_release_p(mat_mo_coeff_gw_reflected)
483
484 END IF
485
486 IF (.NOT. qs_env%mp2_env%ri_g0w0%do_kpoints_Sigma) THEN
487 CALL alloc_containers(t_3c_o_mo_compressed, 1)
488 CALL get_tensor_occupancy(t_3c_overl_int_ao_mo, nze, occ)
489 memory_3c = 0.0_dp
490
491 CALL compress_tensor(t_3c_overl_int_ao_mo, t_3c_o_mo_ind, t_3c_o_mo_compressed, &
492 qs_env%mp2_env%ri_rpa_im_time%eps_compress, memory_3c)
493
494 CALL para_env%sum(memory_3c)
495 compression_factor = real(nze, dp)*1.0e-06_dp*8.0_dp/memory_3c
496
497 IF (unit_nr > 0) THEN
498 WRITE (unit=unit_nr, fmt="((T3,A,T66,F11.2,A4))") &
499 "MEMORY_INFO| Memory of MO-contracted tensor (compressed):", memory_3c, ' MiB'
500
501 WRITE (unit=unit_nr, fmt="((T3,A,T60,F21.2))") &
502 "MEMORY_INFO| Compression factor: ", compression_factor
503 END IF
504 END IF
505
506 CALL dbcsr_release_p(mat_mo_coeff_gw)
507
508 CALL dbt_destroy(t_3c_overl_int_ao_ao)
509 CALL dbt_destroy(mo_coeff_gw_t)
510 CALL dbt_destroy(mo_coeff_gw_t_tmp)
511
512 CALL timestop(handle)
513
514 END SUBROUTINE get_tensor_3c_overl_int_gw
515
516! **************************************************************************************************
517!> \brief reflect from V = (A,B|B,A) to V_reflected = (B,A|A,B) where A belongs to the block of the molecule
518!> and B to the off diagonal block between molecule and image of the molecule
519!> \param mat_reflected ...
520!> \param mat_orig ...
521!> \param para_env ...
522!> \param qs_env ...
523!> \param unit_nr ...
524!> \param do_alpha ...
525! **************************************************************************************************
526 SUBROUTINE reflect_mat_row(mat_reflected, mat_orig, para_env, qs_env, unit_nr, do_alpha)
527 TYPE(dbcsr_type), INTENT(INOUT) :: mat_reflected
528 TYPE(dbcsr_type), INTENT(IN) :: mat_orig
529 TYPE(mp_para_env_type), INTENT(IN) :: para_env
530 TYPE(qs_environment_type), POINTER :: qs_env
531 INTEGER, INTENT(IN) :: unit_nr
532 LOGICAL, INTENT(IN) :: do_alpha
533
534 CHARACTER(LEN=*), PARAMETER :: routinen = 'reflect_mat_row'
535
536 INTEGER :: handle, i_atom, j_atom, natom, &
537 nblkcols_total, nblkrows_total
538 INTEGER, ALLOCATABLE, DIMENSION(:) :: image_atom
539 INTEGER, DIMENSION(:), POINTER :: col_blk_sizes, row_blk_sizes
540 LOGICAL :: found_image_atom
541 REAL(kind=dp) :: avg_z_dist, delta, eps_dist2, &
542 min_z_dist, ra(3), rb(3), sum_z, &
543 z_reflection
544 TYPE(cell_type), POINTER :: cell
545 TYPE(particle_type), DIMENSION(:), POINTER :: particle_set
546
547 CALL timeset(routinen, handle)
548
549 CALL dbcsr_reserve_all_blocks(mat_reflected)
550
551 CALL get_qs_env(qs_env, cell=cell, &
552 particle_set=particle_set)
553
554 ! first check, whether we have an image molecule
555 CALL dbcsr_get_info(mat_orig, &
556 nblkrows_total=nblkrows_total, &
557 nblkcols_total=nblkcols_total, &
558 row_blk_size=row_blk_sizes, &
559 col_blk_size=col_blk_sizes)
560
561 natom = SIZE(particle_set)
562 cpassert(natom == nblkrows_total)
563
564 eps_dist2 = qs_env%mp2_env%ri_g0w0%eps_dist
565 eps_dist2 = eps_dist2*eps_dist2
566
567 sum_z = 0.0_dp
568
569 DO i_atom = 1, natom
570
571 ra(:) = pbc(particle_set(i_atom)%r, cell)
572
573 sum_z = sum_z + ra(3)
574
575 END DO
576
577 z_reflection = sum_z/real(natom, kind=dp)
578
579 sum_z = 0.0_dp
580
581 DO i_atom = 1, natom
582
583 ra(:) = pbc(particle_set(i_atom)%r, cell)
584
585 sum_z = sum_z + abs(ra(3) - z_reflection)
586
587 END DO
588
589 avg_z_dist = sum_z/real(natom, kind=dp)
590
591 min_z_dist = avg_z_dist
592
593 DO i_atom = 1, natom
594
595 ra(:) = pbc(particle_set(i_atom)%r, cell)
596
597 IF (abs(ra(3) - z_reflection) < min_z_dist) THEN
598 min_z_dist = abs(ra(3) - z_reflection)
599 END IF
600
601 END DO
602
603 IF (unit_nr > 0 .AND. do_alpha) THEN
604 WRITE (unit_nr, '(T3,A,T70,F9.2,A2)') 'IC_MODEL| Average distance of the molecule to the image plane:', &
605 avg_z_dist*0.529_dp, ' A'
606 WRITE (unit_nr, '(T3,A,T70,F9.2,A2)') 'IC_MODEL| Minimum distance of the molecule to the image plane:', &
607 min_z_dist*0.529_dp, ' A'
608 END IF
609
610 ALLOCATE (image_atom(nblkrows_total))
611 image_atom = 0
612
613 DO i_atom = 1, natom
614
615 found_image_atom = .false.
616
617 ra(:) = pbc(particle_set(i_atom)%r, cell)
618
619 DO j_atom = 1, natom
620
621 rb(:) = pbc(particle_set(j_atom)%r, cell)
622
623 delta = (ra(1) - rb(1))**2 + (ra(2) - rb(2))**2 + (ra(3) + rb(3) - 2.0_dp*z_reflection)**2
624
625 ! SQRT(delta) < eps_dist
626 IF (delta < eps_dist2) THEN
627 ! this CPASSERT ensures that there is at most one image atom for each atom
628 cpassert(.NOT. found_image_atom)
629 image_atom(i_atom) = j_atom
630 found_image_atom = .true.
631 ! check whether we have the same basis at the image atom
632 ! if this is wrong, check whether you have the same basis sets for the molecule and the image
633 cpassert(row_blk_sizes(i_atom) == row_blk_sizes(j_atom))
634 END IF
635
636 END DO
637
638 ! this CPASSERT ensures that there is at least one image atom for each atom
639 cpassert(found_image_atom)
640
641 END DO
642
643 CALL cp_dbcsr_from_subgroups(mat_orig, mat_reflected, para_env, row_mapping=image_atom, copy_only=.true.)
644
645 CALL timestop(handle)
646
647 END SUBROUTINE reflect_mat_row
648
649! **************************************************************************************************
650!> \brief ...
651!> \param qs_env ...
652!> \param atom_from_basis_index ...
653!> \param basis_size ...
654!> \param basis_type ...
655!> \param first_bf_from_atom ...
656! **************************************************************************************************
657 SUBROUTINE get_atom_index_from_basis_function_index(qs_env, atom_from_basis_index, basis_size, &
658 basis_type, first_bf_from_atom)
659 TYPE(qs_environment_type), POINTER :: qs_env
660 INTEGER, ALLOCATABLE, DIMENSION(:) :: atom_from_basis_index
661 INTEGER :: basis_size
662 CHARACTER(LEN=*) :: basis_type
663 INTEGER, ALLOCATABLE, DIMENSION(:), OPTIONAL :: first_bf_from_atom
664
665 INTEGER :: iatom, lll, natom, nkind
666 INTEGER, DIMENSION(:), POINTER :: row_blk_end, row_blk_start
667 TYPE(gto_basis_set_p_type), DIMENSION(:), POINTER :: basis_set
668 TYPE(particle_type), DIMENSION(:), POINTER :: particle_set
669 TYPE(qs_kind_type), DIMENSION(:), POINTER :: qs_kind_set
670
671 NULLIFY (qs_kind_set, particle_set)
672 CALL get_qs_env(qs_env, qs_kind_set=qs_kind_set, natom=natom, nkind=nkind, &
673 particle_set=particle_set)
674
675 ALLOCATE (row_blk_start(natom))
676 ALLOCATE (row_blk_end(natom))
677 ALLOCATE (basis_set(nkind))
678 CALL basis_set_list_setup(basis_set, basis_type, qs_kind_set)
679 CALL get_particle_set(particle_set, qs_kind_set, first_sgf=row_blk_start, last_sgf=row_blk_end, &
680 basis=basis_set)
681 DO lll = 1, basis_size
682 DO iatom = 1, natom
683 IF (lll >= row_blk_start(iatom) .AND. lll <= row_blk_end(iatom)) THEN
684 atom_from_basis_index(lll) = iatom
685 END IF
686 END DO
687 END DO
688
689 IF (PRESENT(first_bf_from_atom)) first_bf_from_atom(1:natom) = row_blk_start(:)
690
691 DEALLOCATE (basis_set)
692 DEALLOCATE (row_blk_start)
693 DEALLOCATE (row_blk_end)
694
696
697! **************************************************************************************************
698!> \brief ...
699!> \param weight_re ...
700!> \param weight_im ...
701!> \param num_cells ...
702!> \param iatom ...
703!> \param jatom ...
704!> \param xkp ...
705!> \param wkp_W ...
706!> \param cell ...
707!> \param index_to_cell ...
708!> \param hmat ...
709!> \param particle_set ...
710! **************************************************************************************************
711 SUBROUTINE compute_weight_re_im(weight_re, weight_im, &
712 num_cells, iatom, jatom, xkp, wkp_W, &
713 cell, index_to_cell, hmat, particle_set)
714
715 REAL(kind=dp) :: weight_re, weight_im
716 INTEGER :: num_cells, iatom, jatom
717 REAL(kind=dp), DIMENSION(3) :: xkp
718 REAL(kind=dp) :: wkp_w
719 TYPE(cell_type), POINTER :: cell
720 INTEGER, DIMENSION(:, :), POINTER :: index_to_cell
721 REAL(kind=dp), DIMENSION(3, 3) :: hmat
722 TYPE(particle_type), DIMENSION(:), POINTER :: particle_set
723
724 CHARACTER(LEN=*), PARAMETER :: routinen = 'compute_weight_re_im'
725
726 INTEGER :: handle, icell, n_equidistant_cells, &
727 xcell, ycell, zcell
728 REAL(kind=dp) :: abs_rab_cell, abs_rab_cell_min, arg
729 REAL(kind=dp), DIMENSION(3) :: cell_vector, rab_cell_i
730
731 CALL timeset(routinen, handle)
732
733 weight_re = 0.0_dp
734 weight_im = 0.0_dp
735
736 abs_rab_cell_min = 1.0e10_dp
737
738 n_equidistant_cells = 0
739
740 DO icell = 1, num_cells
741
742 xcell = index_to_cell(1, icell)
743 ycell = index_to_cell(2, icell)
744 zcell = index_to_cell(3, icell)
745
746 cell_vector(1:3) = matmul(hmat, real([xcell, ycell, zcell], dp))
747
748 rab_cell_i(1:3) = pbc(particle_set(iatom)%r(1:3), cell) - &
749 (pbc(particle_set(jatom)%r(1:3), cell) + cell_vector(1:3))
750
751 abs_rab_cell = sqrt(rab_cell_i(1)**2 + rab_cell_i(2)**2 + rab_cell_i(3)**2)
752
753 IF (abs_rab_cell < abs_rab_cell_min) THEN
754 abs_rab_cell_min = abs_rab_cell
755 END IF
756
757 END DO
758
759 DO icell = 1, num_cells
760
761 xcell = index_to_cell(1, icell)
762 ycell = index_to_cell(2, icell)
763 zcell = index_to_cell(3, icell)
764
765 cell_vector(1:3) = matmul(hmat, real([xcell, ycell, zcell], dp))
766
767 rab_cell_i(1:3) = pbc(particle_set(iatom)%r(1:3), cell) - &
768 (pbc(particle_set(jatom)%r(1:3), cell) + cell_vector(1:3))
769
770 abs_rab_cell = sqrt(rab_cell_i(1)**2 + rab_cell_i(2)**2 + rab_cell_i(3)**2)
771
772 IF (abs_rab_cell < abs_rab_cell_min + 0.1_dp) THEN
773
774 arg = real(xcell, dp)*xkp(1) + real(ycell, dp)*xkp(2) + real(zcell, dp)*xkp(3)
775
776 weight_re = weight_re + wkp_w*cos(twopi*arg)
777 weight_im = weight_im + wkp_w*sin(twopi*arg)
778
779 n_equidistant_cells = n_equidistant_cells + 1
780
781 END IF
782
783 END DO
784
785 weight_re = weight_re/real(n_equidistant_cells, kind=dp)
786 weight_im = weight_im/real(n_equidistant_cells, kind=dp)
787
788 CALL timestop(handle)
789
790 END SUBROUTINE compute_weight_re_im
791
792END MODULE rpa_gw_im_time_util
Define the atomic kind types and their sub types.
Handles all functions related to the CELL.
Definition cell_types.F:15
Basic linear algebra operations for complex full matrices.
subroutine, public cp_cfm_column_scale(matrix_a, scaling, first_col, source)
Scales columns of the full matrix by corresponding factors.
Represents a complex full matrix distributed on many processors.
subroutine, public cp_cfm_get_info(matrix, name, nrow_global, ncol_global, nrow_block, ncol_block, nrow_local, ncol_local, row_indices, col_indices, local_data, context, matrix_struct, para_env)
Returns information about a full matrix.
subroutine, public cp_cfm_set_all(matrix, alpha, beta)
Set all elements of the full matrix to alpha. Besides, set all diagonal matrix elements to beta (if g...
subroutine, public dbcsr_distribution_release(dist)
...
subroutine, public dbcsr_release_p(matrix)
...
subroutine, public dbcsr_distribution_new(dist, template, group, pgrid, row_dist, col_dist, reuse_arrays)
...
subroutine, public dbcsr_multiply(transa, transb, alpha, matrix_a, matrix_b, beta, matrix_c, first_row, last_row, first_column, last_column, first_k, last_k, retain_sparsity, filter_eps, flop)
...
subroutine, public dbcsr_get_info(matrix, nblkrows_total, nblkcols_total, nfullrows_total, nfullcols_total, nblkrows_local, nblkcols_local, nfullrows_local, nfullcols_local, my_prow, my_pcol, local_rows, local_cols, proc_row_dist, proc_col_dist, row_blk_size, col_blk_size, row_blk_offset, col_blk_offset, distribution, name, matrix_type, group)
...
subroutine, public dbcsr_init_p(matrix)
...
subroutine, public dbcsr_filter(matrix, eps)
...
subroutine, public dbcsr_release(matrix)
...
subroutine, public dbcsr_distribution_get(dist, row_dist, col_dist, nrows, ncols, has_threads, group, mynode, numnodes, nprows, npcols, myprow, mypcol, pgrid, subgroups_defined, prow_group, pcol_group)
...
subroutine, public dbcsr_set_diag(matrix, diag)
Copies the diagonal elements from the given array into the given matrix.
subroutine, public dbcsr_get_diag(matrix, diag)
Copies the diagonal elements from the given matrix into the given array.
subroutine, public dbcsr_add_on_diag(matrix, alpha)
Adds the given scalar to the diagonal of the matrix. Reserves any missing diagonal blocks.
subroutine, public dbcsr_reserve_all_blocks(matrix)
Reserves all blocks.
DBCSR operations in CP2K.
subroutine, public cp_dbcsr_m_by_n_from_row_template(matrix, template, n, sym)
Utility function to create dbcsr matrix, m x n matrix (n arbitrary) with the same processor grid and ...
subroutine, public copy_fm_to_dbcsr(fm, matrix, keep_sparsity)
Copy a BLACS matrix to a dbcsr matrix.
Redistribution of DBCSR blocks and distributed matrix slices.
subroutine, public cp_dbcsr_from_subgroups(mat_local, mat_global, para_env, row_mapping, copy_only)
Sum subgroup blocks into the global layout, or copy mapped blocks.
Basic linear algebra operations for full matrices.
subroutine, public cp_fm_column_scale(matrixa, scaling, first_col, source)
Scales columns of the full matrix by corresponding factors.
represent a full matrix distributed on many processors
Definition cp_fm_types.F:15
subroutine, public cp_fm_get_info(matrix, name, nrow_global, ncol_global, nrow_block, ncol_block, nrow_local, ncol_local, row_indices, col_indices, local_data, context, nrow_locals, ncol_locals, matrix_struct, para_env)
returns all kind of information about the full matrix
subroutine, public cp_fm_set_all(matrix, alpha, beta)
set all elements of a matrix to the same value, and optionally the diagonal to a different one
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_set_element(matrix, irow_global, icol_global, alpha)
sets an element of a matrix
This is the start of a dbt_api, all publically needed functions are exported here....
Definition dbt_api.F:17
Types and set/get functions for HFX.
Definition hfx_types.F:16
subroutine, public alloc_containers(data, bin_size)
...
Definition hfx_types.F:2935
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
Definition of mathematical constants and functions.
complex(kind=dp), parameter, public z_one
real(kind=dp), parameter, public twopi
complex(kind=dp), parameter, public z_zero
Interface to the message passing library MPI.
subroutine, public mp_dims_create(nodes, dims)
wrapper to MPI_Dims_create
basic linear algebra operations for full matrixes
Define methods related to particle_type.
subroutine, public get_particle_set(particle_set, qs_kind_set, first_sgf, last_sgf, nsgf, nmao, basis, ncgf)
Get the components of a particle set.
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.
Some utility functions for the calculation of integrals.
subroutine, public basis_set_list_setup(basis_set_list, basis_type, qs_kind_set)
Set up an easy accessible list of the basis sets for all kinds.
Define the quickstep kind type and their sub types.
Utility methods to build 3-center integral tensors of various types.
subroutine, public create_2c_tensor(t2c, dist_1, dist_2, pgrid, sizes_1, sizes_2, order, name)
...
subroutine, public split_block_sizes(blk_sizes, blk_sizes_split, max_size)
...
subroutine, public pgf_block_sizes(atomic_kind_set, basis, min_blk_size, pgf_blk_sizes)
...
subroutine, public create_3c_tensor(t3c, dist_1, dist_2, dist_3, pgrid, sizes_1, sizes_2, sizes_3, map1, map2, name)
...
Utility methods to build 3-center integral tensors of various types.
Definition qs_tensors.F:11
subroutine, public compress_tensor(tensor, blk_indices, compressed, eps, memory)
...
subroutine, public decompress_tensor(tensor, blk_indices, compressed, eps)
...
subroutine, public get_tensor_occupancy(tensor, nze, occ)
...
Utility routines for RPA and GW with imaginary time.
subroutine, public compute_weight_re_im(weight_re, weight_im, num_cells, iatom, jatom, xkp, wkp_w, cell, index_to_cell, hmat, particle_set)
...
subroutine, public get_tensor_3c_overl_int_gw(t_3c_overl_int, t_3c_o_compressed, t_3c_o_ind, t_3c_overl_int_ao_mo, t_3c_o_mo_compressed, t_3c_o_mo_ind, t_3c_overl_int_gw_ri, t_3c_overl_int_gw_ao, starts_array_mc, ends_array_mc, mo_coeff, matrix_s, gw_corr_lev_occ, gw_corr_lev_virt, homo, nmo, para_env, do_ic_model, t_3c_overl_nnp_ic, t_3c_overl_nnp_ic_reflected, qs_env, unit_nr, do_alpha)
...
subroutine, public get_atom_index_from_basis_function_index(qs_env, atom_from_basis_index, basis_size, basis_type, first_bf_from_atom)
...
Provides all information about an atomic kind.
Type defining parameters related to the simulation cell.
Definition cell_types.F:60
Represent a complex full matrix.
represent a full matrix
stores all the informations relevant to an mpi environment
Provides all information about a quickstep kind.