73#include "./base/base_uses.f90"
79 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'gw_ri_rs_large_cell_Gamma'
98 CHARACTER(LEN=*),
PARAMETER :: routinen =
'gw_calc_ri_rs_large_cell_Gamma'
101 TYPE(
cp_fm_type),
ALLOCATABLE,
DIMENSION(:) :: fm_sigma_x_gamma, fm_w_time
102 TYPE(
cp_fm_type),
ALLOCATABLE,
DIMENSION(:, :, :) :: fm_sigma_c_gamma_time
104 CALL timeset(routinen, handle)
128 CALL atomic_basis_at_grid_point(bs_env, bs_env%ri_rs%grid_points, &
129 bs_env%ri_rs%mat_phi_mu_l)
144 CALL compute_z_lp(qs_env, bs_env, bs_env%ri_rs%grid_points, &
145 bs_env%ri_rs%mat_phi_mu_l, bs_env%ri_rs%mat_Z_lP)
146 bs_env%ri_rs%grid_built = .true.
157 CALL get_mat_chi_gamma_tau(bs_env, bs_env%mat_chi_Gamma_tau, &
158 bs_env%ri_rs%mat_phi_mu_l, bs_env%ri_rs%mat_Z_lP)
164 CALL get_w_mic(bs_env, qs_env, bs_env%mat_chi_Gamma_tau, fm_w_time)
174 CALL compute_sigma_x(bs_env, qs_env, bs_env%ri_rs%mat_phi_mu_l, &
175 bs_env%ri_rs%mat_Z_lP, fm_sigma_x_gamma)
184 CALL compute_sigma_c(bs_env, fm_w_time, bs_env%ri_rs%mat_phi_mu_l, &
185 bs_env%ri_rs%mat_Z_lP, fm_sigma_c_gamma_time)
196 CALL timestop(handle)
207 SUBROUTINE atomic_basis_at_grid_point(bs_env, ri_rs_grid_points, mat_phi_mu_l)
210 REAL(kind=
dp),
ALLOCATABLE,
INTENT(INOUT) :: ri_rs_grid_points(:, :)
213 CHARACTER(LEN=*),
PARAMETER :: routinen =
'atomic_basis_at_grid_point'
215 INTEGER :: c_size, chunk_size, handle, i, i_blk, &
216 iatom, natom, npcol, nprow, &
217 num_grid_chunks, r_end, r_start
218 INTEGER,
DIMENSION(:),
POINTER :: col_dist, r_blk_sizes, row_dist, sizes_ao
219 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: atom_col_buffer
225 CALL timeset(routinen, handle)
230 natom = bs_env%n_atom
231 cell => bs_env%ri_rs%cell
232 para_env => bs_env%para_env
233 particle_set => bs_env%ri_rs%particle_set
234 sizes_ao => bs_env%sizes_AO
235 cpassert(
ASSOCIATED(cell))
236 cpassert(
ASSOCIATED(para_env))
237 cpassert(
ASSOCIATED(particle_set))
238 cpassert(
SIZE(sizes_ao) == natom)
239 cpassert(
SIZE(ri_rs_grid_points, 2) == bs_env%ri_rs%n_grid_points)
246 num_grid_chunks = ceiling(real(bs_env%ri_rs%n_grid_points, kind=
dp)/real(chunk_size, kind=
dp))
247 ALLOCATE (r_blk_sizes(num_grid_chunks))
248 r_blk_sizes = chunk_size
249 IF (mod(bs_env%ri_rs%n_grid_points, chunk_size) /= 0)
THEN
250 r_blk_sizes(num_grid_chunks) = mod(bs_env%ri_rs%n_grid_points, chunk_size)
254 CALL dbcsr_get_info(bs_env%mat_ao_ao%matrix, distribution=dbcsr_dist_ks)
259 ALLOCATE (row_dist(num_grid_chunks))
260 DO i = 1, num_grid_chunks
261 row_dist(i) = mod(i - 1, nprow)
264 ALLOCATE (col_dist(natom))
266 col_dist(i) = mod(i - 1, npcol)
271 row_dist=row_dist, col_dist=col_dist)
273 CALL dbcsr_create(mat_phi_mu_l, name=
"phi_val_sparse", dist=dist, &
274 matrix_type=dbcsr_type_no_symmetry, &
275 row_blk_size=r_blk_sizes, col_blk_size=sizes_ao)
281 DO iatom = para_env%mepos + 1, natom, para_env%num_pe
283 c_size = sizes_ao(iatom)
286 ALLOCATE (atom_col_buffer(bs_env%ri_rs%n_grid_points, c_size))
287 atom_col_buffer = 0.0_dp
292 CALL fill_phi_for_atom(atom_col_buffer, ri_rs_grid_points, bs_env%ri_rs%n_grid_points, &
294 r2_threshold=bs_env%ri_rs%radius_ao_per_atom(iatom)**2)
297 DO i_blk = 1, num_grid_chunks
298 r_start = (i_blk - 1)*chunk_size + 1
299 r_end = min(i_blk*chunk_size, bs_env%ri_rs%n_grid_points)
302 IF (maxval(abs(atom_col_buffer(r_start:r_end, 1:c_size))) > bs_env%eps_filter)
THEN
304 block=atom_col_buffer(r_start:r_end, 1:c_size))
308 DEALLOCATE (atom_col_buffer)
315 IF (bs_env%unit_nr > 0)
THEN
316 WRITE (bs_env%unit_nr, *)
"Done with evaluation of phi"
322 DEALLOCATE (r_blk_sizes, row_dist, col_dist)
325 CALL timestop(handle)
327 END SUBROUTINE atomic_basis_at_grid_point
344 SUBROUTINE fill_phi_for_atom(phi_val, ri_rs_grid, npts, iatom, bs_env, r2_threshold)
346 REAL(kind=
dp),
INTENT(INOUT) :: phi_val(:, :)
347 INTEGER,
INTENT(IN) :: npts
348 REAL(kind=
dp),
INTENT(IN) :: ri_rs_grid(3, npts)
349 INTEGER,
INTENT(IN) :: iatom
351 REAL(kind=
dp),
INTENT(IN) :: r2_threshold
353 CHARACTER(LEN=*),
PARAMETER :: routinen =
'fill_phi_for_atom'
355 INTEGER :: first_sgf, handle, i_pt, ico, iend_co, ikind, ipgf, iset, isgf, ishell, &
356 istart_co, ix, ix_max, ix_min, iy, iy_max, iy_min, iz, iz_max, iz_min, l, last_sgf, lx, &
357 ly, lz, n_cart_total, row_idx
358 REAL(kind=
dp) :: alpha, cell_vector(3), dist_vec(3), &
359 dist_vec_raw(3), exp_val, poly, r2, &
361 REAL(kind=
dp),
DIMENSION(3, 3) :: hmat
366 CALL timeset(routinen, handle)
369 cell => bs_env%ri_rs%cell
370 particle_set => bs_env%ri_rs%particle_set
371 ikind = particle_set(iatom)%atomic_kind%kind_number
372 orb_basis_set => bs_env%basis_set_AO(ikind)%gto_basis_set
374 cpassert(
ASSOCIATED(orb_basis_set))
376 IF (cell%perd(1) == 1) then; ix_min = -1; ix_max = 1; else; ix_min = 0; ix_max = 0
378 IF (cell%perd(2) == 1) then; iy_min = -1; iy_max = 1; else; iy_min = 0; iy_max = 0
380 IF (cell%perd(3) == 1) then; iz_min = -1; iz_max = 1; else; iz_min = 0; iz_max = 0
383 r_atom = particle_set(iatom)%r
396 dist_vec_raw = ri_rs_grid(:, i_pt) - r_atom
398 DO ix = ix_min, ix_max
399 DO iy = iy_min, iy_max
400 DO iz = iz_min, iz_max
402 cell_vector(1:3) = matmul(hmat, real([ix, iy, iz],
dp))
404 dist_vec = dist_vec_raw - cell_vector
406 r2 = dot_product(dist_vec, dist_vec)
408 IF (r2 > r2_threshold) cycle
410 DO iset = 1, orb_basis_set%nset
411 n_cart_total =
ncoset(orb_basis_set%lmax(iset))
413 DO ishell = 1, orb_basis_set%nshell(iset)
414 l = orb_basis_set%l(ishell, iset)
415 istart_co =
ncoset(l - 1) + 1
418 first_sgf = orb_basis_set%first_sgf(ishell, iset)
419 last_sgf = orb_basis_set%last_sgf(ishell, iset)
421 DO ipgf = 1, orb_basis_set%npgf(iset)
422 alpha = orb_basis_set%zet(ipgf, iset)
423 exp_val = exp(-alpha*r2)
425 DO isgf = first_sgf, last_sgf
426 DO ico = istart_co, iend_co
427 row_idx = (ipgf - 1)*n_cart_total + ico
428 weight = orb_basis_set%sphi(row_idx, isgf)
432 poly = (dist_vec(1)**lx)*(dist_vec(2)**ly)*(dist_vec(3)**lz)
434 phi_val(i_pt, isgf) = phi_val(i_pt, isgf) + (weight*poly*exp_val)
447 CALL timestop(handle)
449 END SUBROUTINE fill_phi_for_atom
460 SUBROUTINE compute_z_lp(qs_env, bs_env, ri_rs_grid_points, mat_phi_mu_l, mat_Z_lP)
465 REAL(kind=
dp),
ALLOCATABLE,
INTENT(INOUT) :: ri_rs_grid_points(:, :)
466 TYPE(
dbcsr_type),
INTENT(INOUT) :: mat_phi_mu_l
469 CHARACTER(LEN=*),
PARAMETER :: key =
'PROPERTIES%BANDSTRUCTURE%GW%PRINT%RESTART', &
470 routinen =
'compute_Z_lP'
472 INTEGER :: atom_j_mepos, atom_j_stride, atom_p, atom_p_start, atom_p_stride, col_end, &
473 col_start, group_handle, handle, handle_dpotrf, handle_dpotrs, i_blk, ikind, info, j, l, &
474 loc_idx, max_ao_size, max_loc_ri, my_group, n_ao_total, n_grid_total, n_groups, n_loc_ri, &
475 n_local_grid, n_procs_per_atom, natom, nkind, npcol_phi, num_grid_chunks, p_loop_atom, &
477 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: local_grid_idx, row_offset
478 INTEGER,
DIMENSION(:),
POINTER :: col_dist_ri, r_blk_sizes, ri_blk_sizes, &
480 REAL(kind=
dp) :: cutoff_ri, cutoff_ri_2, d_sp, dist2_min, &
481 r2_threshold, r_c, t1, t2, t3
482 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: cutoff_ri_per_atom, cutoff_ri_per_kind, &
484 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: d_local, d_lp_local, phi_local, &
486 REAL(kind=
dp),
DIMENSION(3) :: dist_vec_raw, pos_p
499 CALL timeset(routinen, handle)
503 CALL get_qs_env(qs_env, para_env=para_env, particle_set=particle_set, input=input, cell=cell)
504 atomic_kind_set => bs_env%ri_rs%atomic_kind_set
514 n_procs_per_atom = min(bs_env%ri_rs%n_procs_per_atom_z_lp, para_env%num_pe)
515 IF (n_procs_per_atom < 1) n_procs_per_atom = 1
517 NULLIFY (para_env_sub, blacs_env_sub)
518 IF (n_procs_per_atom > 1)
THEN
519 n_groups = para_env%num_pe/n_procs_per_atom
520 my_group = min(para_env%mepos/n_procs_per_atom, n_groups - 1)
521 ALLOCATE (para_env_sub)
522 CALL para_env_sub%from_split(para_env, my_group)
524 atom_p_start = my_group + 1
525 atom_p_stride = n_groups
526 atom_j_mepos = para_env_sub%mepos
527 atom_j_stride = para_env_sub%num_pe
529 atom_p_start = para_env%mepos + 1
530 atom_p_stride = para_env%num_pe
535 natom = bs_env%n_atom
536 n_ao_total = bs_env%i_ao_end_from_atom(natom)
537 n_grid_total = bs_env%ri_rs%n_grid_points
538 cpassert(
SIZE(ri_rs_grid_points, 2) == n_grid_total)
543 CALL dbcsr_get_info(mat_phi_mu_l, row_blk_size=r_blk_sizes, distribution=dist_phi)
545 group=group_handle, npcols=npcol_phi)
547 num_grid_chunks =
SIZE(r_blk_sizes)
549 ALLOCATE (row_offset(num_grid_chunks))
551 DO i_blk = 2, num_grid_chunks
552 row_offset(i_blk) = row_offset(i_blk - 1) + r_blk_sizes(i_blk - 1)
555 ALLOCATE (ri_blk_sizes(natom), col_dist_ri(natom))
557 ri_blk_sizes(atom_p) = bs_env%i_RI_end_from_atom(atom_p) - bs_env%i_RI_start_from_atom(atom_p) + 1
558 col_dist_ri(atom_p) = mod(atom_p - 1, npcol_phi)
563 IF (bs_env%ri_rs%Z_lP_exists)
THEN
565 distribution=dist_z, &
567 IF (bs_env%unit_nr > 0)
THEN
568 WRITE (bs_env%unit_nr,
'(T2,A,T57,A,F7.1,A)') &
569 'Read Z_lP from file ',
' Execution time',
m_walltime() - t1,
' s'
570 WRITE (bs_env%unit_nr,
'(A)')
' '
574 CALL dbcsr_create(mat_z_lp, name=
"mat_Z_lP", dist=dist_z, &
575 matrix_type=dbcsr_type_no_symmetry, &
576 row_blk_size=r_blk_sizes, col_blk_size=ri_blk_sizes)
580 max_ao_size = max(max_ao_size, bs_env%i_ao_end_from_atom(j) - bs_env%i_ao_start_from_atom(j) + 1)
582 max_loc_ri = maxval(ri_blk_sizes)
588 nkind =
SIZE(atomic_kind_set)
589 ALLOCATE (cutoff_ri_per_atom(natom))
591 IF (bs_env%ri_rs%cutoff_radius_ri_rs > 0.0_dp)
THEN
592 cutoff_ri_per_atom(:) = bs_env%ri_rs%cutoff_radius_ri_rs
594 r_c = bs_env%ri_metric%cutoff_radius
595 DO p_loop_atom = 1, natom
596 cutoff_ri_per_atom(p_loop_atom) = &
597 r_c + bs_env%ri_rs%radius_ao_per_atom(p_loop_atom)
601 ALLOCATE (cutoff_ri_per_kind(nkind))
602 cutoff_ri_per_kind(:) = 0.0_dp
603 IF (bs_env%unit_nr > 0)
THEN
604 DO p_loop_atom = 1, natom
605 ikind = particle_set(p_loop_atom)%atomic_kind%kind_number
606 cutoff_ri_per_kind(ikind) = max(cutoff_ri_per_kind(ikind), &
607 cutoff_ri_per_atom(p_loop_atom))
609 WRITE (bs_env%unit_nr,
'(T2,A)')
'Per-kind maximum RI-RS sphere cutoff (Bohr):'
610 WRITE (bs_env%unit_nr,
'(T4,A4,A14)')
'Kind',
'max cutoff_ri'
612 WRITE (bs_env%unit_nr,
'(T4,A4,F14.4)') &
613 atomic_kind_set(ikind)%element_symbol, &
614 cutoff_ri_per_kind(ikind)
616 WRITE (bs_env%unit_nr,
'(A)')
' '
617 DEALLOCATE (cutoff_ri_per_kind)
625 basis_j=bs_env%basis_set_AO, basis_k=bs_env%basis_set_AO, &
626 basis_i=bs_env%basis_set_RI)
633 DO atom_p = atom_p_start, natom, atom_p_stride
635 n_loc_ri = ri_blk_sizes(atom_p)
636 pos_p(:) = particle_set(atom_p)%r(:)
638 cutoff_ri = cutoff_ri_per_atom(atom_p)
639 cutoff_ri_2 = cutoff_ri**2
645 DO l = 1, n_grid_total
646 dist_vec_raw =
pbc(ri_rs_grid_points(1:3, l), pos_p(1:3), cell)
647 dist2_min = dot_product(dist_vec_raw, dist_vec_raw)
648 IF (dist2_min <= cutoff_ri_2) n_local_grid = n_local_grid + 1
651 ALLOCATE (local_grid_idx(n_local_grid))
654 DO l = 1, n_grid_total
655 dist_vec_raw =
pbc(ri_rs_grid_points(1:3, l), pos_p(1:3), cell)
656 dist2_min = dot_product(dist_vec_raw, dist_vec_raw)
657 IF (dist2_min <= cutoff_ri_2)
THEN
658 n_local_grid = n_local_grid + 1
659 local_grid_idx(n_local_grid) = l
670 ALLOCATE (sphere_grid(3, n_local_grid))
671 DO loc_idx = 1, n_local_grid
672 sphere_grid(:, loc_idx) = ri_rs_grid_points(:, local_grid_idx(loc_idx))
675 ALLOCATE (phi_local(n_local_grid, n_ao_total))
678 DO ri_atom = 1, natom
679 dist_vec_raw =
pbc(particle_set(ri_atom)%r(:), pos_p(:), cell)
680 d_sp = norm2(dist_vec_raw)
681 IF (d_sp > bs_env%ri_rs%radius_ao_per_atom(ri_atom) + cutoff_ri) cycle
683 col_start = bs_env%i_ao_start_from_atom(ri_atom)
684 col_end = bs_env%i_ao_end_from_atom(ri_atom)
685 r2_threshold = bs_env%ri_rs%radius_ao_per_atom(ri_atom)**2
687 CALL fill_phi_for_atom(phi_local(:, col_start:col_end), sphere_grid, &
688 n_local_grid, ri_atom, bs_env, r2_threshold)
691 DEALLOCATE (sphere_grid)
698 ALLOCATE (d_lp_local(n_local_grid, n_loc_ri))
703 CALL compute_d_lp(bs_env, ctx_3c, phi_local, d_lp_local, n_local_grid, &
704 n_loc_ri, atom_p, max_ao_size, atom_j_mepos, atom_j_stride)
708 IF (n_procs_per_atom > 1)
THEN
709 CALL para_env_sub%sum(d_lp_local)
717 ALLOCATE (d_vec_local(n_local_grid))
719 IF (n_procs_per_atom == 1)
THEN
721 bs_env%ri_rs%tikhonov, d_local, d_vec_local)
738 IF (n_procs_per_atom == 1)
THEN
739 CALL timeset(routinen//
"_dpotrf", handle_dpotrf)
740 CALL dpotrf(
'L', n_local_grid, d_local, n_local_grid, info)
741 CALL timestop(handle_dpotrf)
742 IF (info /= 0) cpabort(
"RI-RS Cholesky factorization failed")
743 CALL timeset(routinen//
"_dpotrs", handle_dpotrs)
744 CALL dpotrs(
'L', n_local_grid, n_loc_ri, d_local, n_local_grid, &
745 d_lp_local, n_local_grid, info)
746 CALL timestop(handle_dpotrs)
747 IF (info /= 0) cpabort(
"RI-RS Cholesky solve failed")
751 n_local_grid, n_ao_total, n_loc_ri, &
752 bs_env%ri_rs%tikhonov, &
753 para_env_sub, blacs_env_sub, &
754 fm_struct_d, fm_struct_b, fm_d, fm_b, info)
755 IF (info /= 0) cpabort(
"Distributed RI-RS Cholesky solve failed")
772 IF (n_procs_per_atom == 1 .OR. para_env_sub%mepos == 0)
THEN
774 n_loc_ri, atom_p, r_blk_sizes, row_offset, &
778 DEALLOCATE (d_vec_local, d_lp_local)
779 DEALLOCATE (local_grid_idx, phi_local)
783 DEALLOCATE (cutoff_ri_per_atom)
788 IF (bs_env%unit_nr > 0)
THEN
789 WRITE (bs_env%unit_nr,
'(T2,A,T57,A,F7.1,A)') &
790 'Computed Z_lP ',
' Execution time',
m_walltime() - t1,
' s'
791 WRITE (bs_env%unit_nr,
'(A)')
' '
802 DEALLOCATE (row_offset, ri_blk_sizes, col_dist_ri)
805 IF (n_procs_per_atom > 1)
THEN
807 CALL para_env_sub%free()
808 DEALLOCATE (para_env_sub)
811 DEALLOCATE (ri_rs_grid_points)
813 CALL timestop(handle)
815 END SUBROUTINE compute_z_lp
837 SUBROUTINE compute_d_lp(bs_env, ctx, phi_val, d_lp, n_grid_total, n_loc_ri, atom_P, &
838 max_ao_size, atom_j_mepos, atom_j_stride)
842 REAL(kind=
dp),
DIMENSION(:, :),
INTENT(IN) :: phi_val
843 INTEGER,
INTENT(IN) :: n_grid_total, n_loc_ri
844 REAL(kind=
dp),
INTENT(INOUT) :: d_lp(n_grid_total, n_loc_ri)
845 INTEGER,
INTENT(IN) :: atom_p, max_ao_size, atom_j_mepos, &
848 CHARACTER(LEN=*),
PARAMETER :: routinen =
'compute_d_lp'
849 INTEGER,
PARAMETER :: grid_chunk = 1024
851 INTEGER :: atom_j, atom_k, c, handle, handle_dgemm, ix_max, ix_min, ix_r, ix_s, iy_max, &
852 iy_min, iy_r, iy_s, iz_max, iz_min, iz_r, iz_s, j, jk_idx, jsize, jstart, k, ksize, &
853 kstart, l, l0, natom, ri
854 INTEGER,
DIMENSION(3) :: cell_r_vec, cell_s_vec
855 LOGICAL :: any_kept, screened
856 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: d_lp_prv, int_2d_prv, rho_chunk
857 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :, :) :: int_3c_prv, int_3c_sum
860 CALL timeset(routinen, handle)
862 natom = bs_env%n_atom
864 IF (bs_env%ri_rs%cell%perd(1) == 1) then; ix_min = -1; ix_max = 1; else; ix_min = 0; ix_max = 0
866 IF (bs_env%ri_rs%cell%perd(2) == 1) then; iy_min = -1; iy_max = 1; else; iy_min = 0; iy_max = 0
868 IF (bs_env%ri_rs%cell%perd(3) == 1) then; iz_min = -1; iz_max = 1; else; iz_min = 0; iz_max = 0
880 ALLOCATE (int_3c_prv(max_ao_size, max_ao_size, n_loc_ri))
881 ALLOCATE (int_3c_sum(max_ao_size, max_ao_size, n_loc_ri))
882 ALLOCATE (int_2d_prv(max_ao_size*max_ao_size, n_loc_ri))
883 ALLOCATE (rho_chunk(grid_chunk, max_ao_size*max_ao_size))
884 ALLOCATE (d_lp_prv(n_grid_total, n_loc_ri))
885 d_lp_prv(:, :) = 0.0_dp
895 DO atom_j = atom_j_mepos + 1, natom, atom_j_stride
897 jstart = bs_env%i_ao_start_from_atom(atom_j)
898 jsize = bs_env%i_ao_end_from_atom(atom_j) - jstart + 1
899 kstart = bs_env%i_ao_start_from_atom(atom_k)
900 ksize = bs_env%i_ao_end_from_atom(atom_k) - kstart + 1
902 int_3c_sum(1:jsize, 1:ksize, 1:n_loc_ri) = 0.0_dp
905 DO ix_r = ix_min, ix_max
906 DO iy_r = iy_min, iy_max
907 DO iz_r = iz_min, iz_max
908 cell_r_vec = [ix_r, iy_r, iz_r]
909 DO ix_s = ix_min, ix_max
910 DO iy_s = iy_min, iy_max
911 DO iz_s = iz_min, iz_max
912 cell_s_vec = [ix_s, iy_s, iz_s]
914 int_3c_prv(1:jsize, 1:ksize, 1:n_loc_ri) = 0.0_dp
917 1:jsize, 1:ksize, 1:n_loc_ri), ctx, ws, &
918 atom_j=atom_j, atom_k=atom_k, atom_i=atom_p, &
919 cell_j=cell_r_vec, cell_k=cell_s_vec, cell_i=[0, 0, 0], &
924 int_3c_sum(1:jsize, 1:ksize, 1:n_loc_ri) = &
925 int_3c_sum(1:jsize, 1:ksize, 1:n_loc_ri) + &
926 int_3c_prv(1:jsize, 1:ksize, 1:n_loc_ri)
934 IF (.NOT. any_kept) cycle
940 jk_idx = (k - 1)*jsize + j
941 int_2d_prv(jk_idx, ri) = int_3c_sum(j, k, ri)
948 DO l0 = 1, n_grid_total, grid_chunk
949 c = min(grid_chunk, n_grid_total - l0 + 1)
952 jk_idx = (k - 1)*jsize + j
954 rho_chunk(l, jk_idx) = phi_val(l0 + l - 1, jstart + j - 1)* &
955 phi_val(l0 + l - 1, kstart + k - 1)
959 CALL timeset(routinen//
"_dgemm", handle_dgemm)
960 CALL dgemm(
"N",
"N", c, n_loc_ri, jsize*ksize, &
961 1.0_dp, rho_chunk, grid_chunk, &
962 int_2d_prv, max_ao_size*max_ao_size, &
963 1.0_dp, d_lp_prv(l0, 1), n_grid_total)
964 CALL timestop(handle_dgemm)
971 d_lp(1:n_grid_total, 1:n_loc_ri) = d_lp(1:n_grid_total, 1:n_loc_ri) + &
972 d_lp_prv(1:n_grid_total, 1:n_loc_ri)
975 DEALLOCATE (int_3c_prv, int_3c_sum, int_2d_prv, rho_chunk, d_lp_prv)
980 CALL timestop(handle)
982 END SUBROUTINE compute_d_lp
992 SUBROUTINE get_mat_chi_gamma_tau(bs_env, mat_chi_Gamma_tau, mat_phi_mu_l, mat_Z_lP)
995 TYPE(
dbcsr_p_type),
DIMENSION(:),
POINTER :: mat_chi_gamma_tau
996 TYPE(
dbcsr_type),
INTENT(INOUT) :: mat_phi_mu_l, mat_z_lp
998 CHARACTER(LEN=*),
PARAMETER :: routinen =
'get_mat_chi_Gamma_tau'
1000 INTEGER :: handle, i, i_t, ispin, npcol
1001 INTEGER,
DIMENSION(:),
POINTER :: blk_ao, blk_grid, dist_col_grid, &
1003 REAL(kind=
dp) :: t1, tau
1005 TYPE(
dbcsr_type) :: matrix_chi_grid, matrix_chi_grid_spin, &
1006 matrix_g_occ_grid, matrix_g_vir_grid
1008 CALL timeset(routinen, handle)
1013 CALL dbcsr_get_info(mat_phi_mu_l, distribution=dist_phi, row_blk_size=blk_grid, col_blk_size=blk_ao)
1017 ALLOCATE (dist_col_grid(
SIZE(blk_grid)))
1018 DO i = 1,
SIZE(blk_grid)
1019 dist_col_grid(i) = mod(i - 1, npcol)
1023 row_dist=dist_row_grid, col_dist=dist_col_grid)
1025 CALL dbcsr_create(matrix_g_occ_grid,
"G_occ_grid", dist_grid_grid, dbcsr_type_no_symmetry, blk_grid, blk_grid)
1026 CALL dbcsr_create(matrix_g_vir_grid,
"G_vir_grid", dist_grid_grid, dbcsr_type_no_symmetry, blk_grid, blk_grid)
1027 CALL dbcsr_create(matrix_chi_grid,
"chi_grid", dist_grid_grid, dbcsr_type_no_symmetry, blk_grid, blk_grid)
1028 CALL dbcsr_create(matrix_chi_grid_spin,
"chi_grid_spin", dist_grid_grid, dbcsr_type_no_symmetry, blk_grid, blk_grid)
1033 DO i_t = 1, bs_env%num_time_freq_points
1036 tau = bs_env%time_frequency_grid%imaginary_time(i_t)
1042 DO ispin = 1, bs_env%n_spin
1046 CALL build_g_grid(bs_env, tau, ispin, .true., .false., mat_phi_mu_l, &
1047 matrix_g_occ_grid, bs_env%eps_filter)
1051 CALL build_g_grid(bs_env, tau, ispin, .false., .true., mat_phi_mu_l, &
1052 matrix_g_vir_grid, bs_env%eps_filter)
1058 CALL hadamard_product(matrix_g_occ_grid, matrix_g_vir_grid, matrix_chi_grid_spin, bs_env%spin_degeneracy)
1061 CALL dbcsr_add(matrix_chi_grid, matrix_chi_grid_spin, 1.0_dp, 1.0_dp)
1072 mat_chi_gamma_tau(i_t)%matrix, bs_env%eps_filter)
1074 IF (bs_env%unit_nr > 0)
THEN
1075 WRITE (bs_env%unit_nr,
'(T2,A,I13,A,I3,A,F7.1,A)') &
1076 'Computed χ(iτ,k=0) for time point', i_t,
' /', bs_env%num_time_freq_points, &
1090 DEALLOCATE (dist_col_grid)
1092 IF (bs_env%unit_nr > 0)
WRITE (bs_env%unit_nr,
'(A)')
' '
1094 CALL timestop(handle)
1096 END SUBROUTINE get_mat_chi_gamma_tau
1110 SUBROUTINE build_g_grid(bs_env, tau, ispin, occ, vir, mat_phi_mu_l, matrix_G_grid, eps_filter)
1113 REAL(kind=
dp),
INTENT(IN) :: tau
1114 INTEGER,
INTENT(IN) :: ispin
1115 LOGICAL,
INTENT(IN) :: occ, vir
1116 TYPE(
dbcsr_type),
INTENT(INOUT) :: mat_phi_mu_l, matrix_g_grid
1117 REAL(kind=
dp),
INTENT(IN) :: eps_filter
1119 CHARACTER(LEN=*),
PARAMETER :: routinen =
'build_G_grid'
1122 INTEGER,
DIMENSION(:),
POINTER :: blk_ao, dist_row_ao
1127 CALL timeset(routinen, handle)
1131 fm_g => bs_env%fm_Gocc
1133 fm_g => bs_env%fm_Gvir
1138 CALL g_occ_vir(bs_env, tau, fm_g, ispin, occ=occ, vir=vir)
1143 CALL dbcsr_create(matrix_g_ao, name=
"G_ao", dist=dist_ao_ao, &
1144 matrix_type=dbcsr_type_no_symmetry, &
1145 row_blk_size=blk_ao, col_blk_size=blk_ao)
1158 CALL timestop(handle)
1160 END SUBROUTINE build_g_grid
1171 SUBROUTINE compute_sigma_x(bs_env, qs_env, mat_phi_mu_l, mat_Z_lP, fm_Sigma_x_Gamma)
1175 TYPE(
dbcsr_type),
INTENT(INOUT) :: mat_phi_mu_l, mat_z_lp
1176 TYPE(
cp_fm_type),
ALLOCATABLE,
DIMENSION(:) :: fm_sigma_x_gamma
1178 CHARACTER(LEN=*),
PARAMETER :: routinen =
'compute_Sigma_x'
1180 INTEGER :: handle, ispin
1181 INTEGER,
DIMENSION(:),
POINTER :: blk_aux, blk_grid, dist_col_grid, &
1184 TYPE(
cp_fm_type),
ALLOCATABLE,
DIMENSION(:, :) :: fm_vtr_gamma
1186 TYPE(
dbcsr_type) :: mat_sigma_x_gamma, matrix_d_grid, &
1187 matrix_sigma_x_grid, matrix_v_aux, &
1190 CALL timeset(routinen, handle)
1194 ALLOCATE (fm_sigma_x_gamma(bs_env%n_spin))
1195 DO ispin = 1, bs_env%n_spin
1196 CALL cp_fm_create(fm_sigma_x_gamma(ispin), bs_env%fm_s_Gamma%matrix_struct)
1199 CALL dbcsr_create(mat_sigma_x_gamma, template=bs_env%mat_ao_ao%matrix)
1210 CALL ri_2c_integral_mat(qs_env, fm_vtr_gamma, bs_env%fm_RI_RI%matrix_struct, bs_env%n_RI, &
1211 bs_env%trunc_coulomb)
1216 CALL dbcsr_create(matrix_v_aux,
"V_aux", dist_aux_aux, dbcsr_type_no_symmetry, blk_aux, blk_aux)
1217 CALL dbcsr_create(matrix_v_grid,
"V_grid", dist_grid_grid, dbcsr_type_no_symmetry, blk_grid, blk_grid)
1219 CALL copy_fm_to_dbcsr(fm_vtr_gamma(1, 1), matrix_v_aux, keep_sparsity=.false.)
1229 DO ispin = 1, bs_env%n_spin
1234 CALL dbcsr_create(matrix_d_grid,
"D_grid", dist_grid_grid, dbcsr_type_no_symmetry, blk_grid, blk_grid)
1235 CALL build_g_grid(bs_env, 0.0_dp, ispin, .true., .false., mat_phi_mu_l, matrix_d_grid, bs_env%eps_filter)
1239 CALL dbcsr_create(matrix_sigma_x_grid, template=matrix_v_grid)
1240 CALL hadamard_product(matrix_d_grid, matrix_v_grid, matrix_sigma_x_grid, 1.0_dp)
1247 mat_sigma_x_gamma, bs_env%eps_filter)
1257 IF (bs_env%unit_nr > 0)
THEN
1258 WRITE (bs_env%unit_nr,
'(T2,A,T58,A,F7.1,A)') &
1259 'Computed Σ^x(k=0),',
' Execution time',
m_walltime() - t1,
' s'
1260 WRITE (bs_env%unit_nr,
'(A)')
' '
1267 m1=mat_sigma_x_gamma, m2=matrix_v_grid)
1272 CALL timestop(handle)
1274 END SUBROUTINE compute_sigma_x
1285 SUBROUTINE compute_sigma_c(bs_env, fm_W_time, mat_phi_mu_l, mat_Z_lP, fm_Sigma_c_Gamma_time)
1288 TYPE(
cp_fm_type),
ALLOCATABLE,
DIMENSION(:) :: fm_w_time
1289 TYPE(
dbcsr_type),
INTENT(INOUT) :: mat_phi_mu_l, mat_z_lp
1290 TYPE(
cp_fm_type),
ALLOCATABLE,
DIMENSION(:, :, :) :: fm_sigma_c_gamma_time
1292 CHARACTER(LEN=*),
PARAMETER :: routinen =
'compute_Sigma_c'
1294 INTEGER :: handle, i_t, ispin
1295 INTEGER,
DIMENSION(:),
POINTER :: blk_aux, blk_grid, dist_col_grid, &
1297 REAL(kind=
dp) :: t1, tau
1299 TYPE(
dbcsr_p_type),
DIMENSION(:, :),
POINTER :: mat_sigma_neg_tau, mat_sigma_pos_tau
1300 TYPE(
dbcsr_type) :: matrix_g_occ_grid, matrix_g_vir_grid, matrix_sigma_neg_grid, &
1301 matrix_sigma_pos_grid, matrix_w_aux, matrix_w_grid
1303 CALL timeset(routinen, handle)
1312 NULLIFY (mat_sigma_neg_tau, mat_sigma_pos_tau)
1313 ALLOCATE (mat_sigma_neg_tau(bs_env%num_time_freq_points, bs_env%n_spin))
1314 ALLOCATE (mat_sigma_pos_tau(bs_env%num_time_freq_points, bs_env%n_spin))
1316 DO i_t = 1, bs_env%num_time_freq_points
1317 DO ispin = 1, bs_env%n_spin
1318 ALLOCATE (mat_sigma_neg_tau(i_t, ispin)%matrix)
1319 ALLOCATE (mat_sigma_pos_tau(i_t, ispin)%matrix)
1320 CALL dbcsr_create(mat_sigma_neg_tau(i_t, ispin)%matrix, template=bs_env%mat_ao_ao%matrix)
1321 CALL dbcsr_create(mat_sigma_pos_tau(i_t, ispin)%matrix, template=bs_env%mat_ao_ao%matrix)
1328 DO i_t = 1, bs_env%num_time_freq_points
1329 tau = bs_env%time_frequency_grid%imaginary_time(i_t)
1334 CALL dbcsr_create(matrix_w_aux,
"W_aux", dist_aux_aux, dbcsr_type_no_symmetry, blk_aux, blk_aux)
1335 CALL dbcsr_create(matrix_w_grid,
"W_grid", dist_grid_grid, dbcsr_type_no_symmetry, blk_grid, blk_grid)
1345 DO ispin = 1, bs_env%n_spin
1351 CALL dbcsr_create(matrix_g_occ_grid,
"G_occ_grid", dist_grid_grid, dbcsr_type_no_symmetry, blk_grid, blk_grid)
1352 CALL dbcsr_create(matrix_g_vir_grid,
"G_vir_grid", dist_grid_grid, dbcsr_type_no_symmetry, blk_grid, blk_grid)
1356 CALL build_g_grid(bs_env, tau, ispin, .true., .false., mat_phi_mu_l, matrix_g_occ_grid, bs_env%eps_filter)
1360 CALL build_g_grid(bs_env, tau, ispin, .false., .true., mat_phi_mu_l, matrix_g_vir_grid, bs_env%eps_filter)
1367 CALL dbcsr_create(matrix_sigma_neg_grid, template=matrix_w_grid)
1368 CALL dbcsr_create(matrix_sigma_pos_grid, template=matrix_w_grid)
1371 CALL hadamard_product(matrix_g_occ_grid, matrix_w_grid, matrix_sigma_neg_grid, 1.0_dp)
1374 CALL hadamard_product(matrix_g_vir_grid, matrix_w_grid, matrix_sigma_pos_grid, 1.0_dp)
1387 mat_sigma_neg_tau(i_t, ispin)%matrix, bs_env%eps_filter)
1388 CALL dbcsr_scale(mat_sigma_neg_tau(i_t, ispin)%matrix, -1.0_dp)
1392 mat_sigma_pos_tau(i_t, ispin)%matrix, bs_env%eps_filter)
1398 IF (bs_env%unit_nr > 0)
THEN
1399 WRITE (bs_env%unit_nr,
'(T2,A,I10,A,I3,A,F7.1,A)') &
1400 'Computed Σ^c(iτ,k=0) for time point ', i_t,
' /', bs_env%num_time_freq_points, &
1411 IF (bs_env%unit_nr > 0)
WRITE (bs_env%unit_nr,
'(A)')
' '
1417 mat_sigma_pos_tau, mat_sigma_neg_tau)
1428 CALL timestop(handle)
1430 END SUBROUTINE compute_sigma_c
1443 TYPE(
dbcsr_type),
INTENT(IN) :: matrix_template
1444 CHARACTER(LEN=*),
INTENT(IN) :: dim_type
1446 INTEGER,
DIMENSION(:),
INTENT(OUT),
POINTER :: blk_sizes, mapped_dist
1448 CHARACTER(LEN=*),
PARAMETER :: routinen =
'setup_square_topology'
1450 INTEGER :: handle, i, np, npcols, nprows
1451 INTEGER,
DIMENSION(:),
POINTER :: col_blk, col_dist, row_blk, row_dist
1454 CALL timeset(routinen, handle)
1456 CALL dbcsr_get_info(matrix_template, distribution=dist_template, &
1457 row_blk_size=row_blk, col_blk_size=col_blk)
1459 nprows=nprows, npcols=npcols)
1461 IF (trim(dim_type) ==
'ROW')
THEN
1463 blk_sizes => row_blk
1465 ALLOCATE (mapped_dist(
SIZE(blk_sizes)))
1466 DO i = 1,
SIZE(blk_sizes)
1467 mapped_dist(i) = mod(i - 1, np)
1470 row_dist=row_dist, col_dist=mapped_dist)
1472 ELSE IF (trim(dim_type) ==
'COL')
THEN
1474 blk_sizes => col_blk
1476 ALLOCATE (mapped_dist(
SIZE(blk_sizes)))
1477 DO i = 1,
SIZE(blk_sizes)
1478 mapped_dist(i) = mod(i - 1, np)
1481 row_dist=mapped_dist, col_dist=col_dist)
1484 CALL timestop(handle)
1502 INTEGER,
DIMENSION(:),
INTENT(INOUT),
OPTIONAL, &
1503 POINTER :: mapped_dist
1504 TYPE(
dbcsr_type),
INTENT(INOUT),
OPTIONAL :: m1, m2, m3, m4
1506 CHARACTER(LEN=*),
PARAMETER :: routinen =
'release_dbcsr_topology_and_matrices'
1510 CALL timeset(routinen, handle)
1513 IF (
PRESENT(mapped_dist))
THEN
1514 IF (
ASSOCIATED(mapped_dist))
THEN
1515 DEALLOCATE (mapped_dist)
1516 NULLIFY (mapped_dist)
1524 CALL timestop(handle)
static void dgemm(const char transa, const char transb, const int m, const int n, const int k, const double alpha, const double *a, const int lda, const double *b, const int ldb, const double beta, double *c, const int ldc)
Convenient wrapper to hide Fortran nature of dgemm_, swapping a and b.
Define the atomic kind types and their sub types.
Handles all functions related to the CELL.
subroutine, public get_cell(cell, alpha, beta, gamma, deth, orthorhombic, abc, periodic, h, h_inv, symmetry_id, tag)
Get informations about a simulation cell.
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
subroutine, public dbcsr_distribution_release(dist)
...
subroutine, public dbcsr_scale(matrix, alpha_scalar)
...
subroutine, public dbcsr_distribution_new(dist, template, group, pgrid, row_dist, col_dist, reuse_arrays)
...
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_binary_write(matrix, filepath)
...
subroutine, public dbcsr_finalize(matrix)
...
subroutine, public dbcsr_set(matrix, alpha)
...
subroutine, public dbcsr_release(matrix)
...
subroutine, public dbcsr_binary_read(filepath, distribution, matrix_new)
...
subroutine, public dbcsr_put_block(matrix, row, col, block, summation)
...
subroutine, public dbcsr_add(matrix_a, matrix_b, alpha_scalar, beta_scalar)
...
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)
...
DBCSR operations in CP2K.
integer, save, public max_elements_per_block
subroutine, public copy_dbcsr_to_fm(matrix, fm, plan)
Copy a DBCSR matrix to a BLACS matrix.
subroutine, public copy_fm_to_dbcsr(fm, matrix, keep_sparsity)
Copy a BLACS matrix to a dbcsr matrix.
represent the structure of a full matrix
represent a full matrix distributed on many processors
subroutine, public cp_fm_create(matrix, matrix_struct, name, nrow, ncol, set_zero)
creates a new full matrix with the given structure
various routines to log and control the output. The idea is that decisions about where to log should ...
type(cp_logger_type) function, pointer, public cp_get_default_logger()
returns the default logger
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer, parameter, public cp_p_file
integer function, public cp_print_key_should_output(iteration_info, basis_section, print_key_path, used_print_key, first_time)
returns what should be done with the given property if btest(res,cp_p_store) then the property should...
Shared numerical operations for computing the RI-RS matrix Z_lP.
subroutine, public build_gram_jacobi_blas(phi_local, n_local_grid, n_ao_used, tikhonov, d_local, d_vec_local)
Forms the conditioned dense RI-RS matrix.
subroutine, public scale_rows_by_diag(matrix, diagonal, nrow, ncol)
Multiplies every matrix row by the corresponding diagonal entry: A(l, :) <- d_l A(l,...
subroutine, public build_jacobi_diag_from_phi(phi_local, n_local_grid, n_ao_used, d_vec_local)
Computes d_l = 1/sqrt(D_ll) = 1/Σ_μ ϕ_μ(r_l)² without forming D.
subroutine, public solve_d_lp_distributed(phi_local, d_vec, d_lp, n_loc, n_ao, n_rhs, tikhonov, para_env_sub, blacs_env_sub, fm_struct_d, fm_struct_b, fm_d, fm_b, info)
Solves D Z = d with ScaLAPACK for one RI atom and replicated inputs.
subroutine, public store_z_lp_columns(mat_z_lp, z_local, local_grid_idx, n_local_grid, n_loc_ri, atom_p, r_blk_sizes, row_offset, eps_filter)
Stores dense Z_lP columns in the distributed block-sparse matrix.
Main setup file for RI-RS grids {r_l}.
subroutine, public setup_ri_rs_grid(bs_env, grid_points)
Get RI-RS grid points {r_l}, either by on-the-fly optimization or reading pretabulated atomic grids.
GW using RI-RS Approximation for molecules.
subroutine, public gw_calc_ri_rs_large_cell_gamma(qs_env, bs_env)
GW calculation using RI-RS formalism for molecules.
subroutine, public setup_square_topology(matrix_template, dim_type, square_dist, blk_sizes, mapped_dist)
DBCSR Topology Generation.
subroutine, public release_dbcsr_topology_and_matrices(dist, mapped_dist, m1, m2, m3, m4)
DBCSR matrices deallocation.
Common setup operations used by the periodic and non-periodic GW RI-RS implementations.
subroutine, public precompute_ri_rs_radii(bs_env)
Compute per-atom AO and RI basis radii from the most diffuse Gaussian primitive in the AO ("ORB") and...
Routines from paper [Graml2024].
subroutine, public compute_qp_energies(bs_env, qs_env, fm_sigma_x_gamma, fm_sigma_c_gamma_time)
...
subroutine, public fill_fm_sigma_c_gamma_time(fm_sigma_c_gamma_time, bs_env, mat_sigma_pos_tau, mat_sigma_neg_tau)
...
subroutine, public g_occ_vir(bs_env, tau, fm_g_gamma, ispin, occ, vir)
...
subroutine, public get_w_mic(bs_env, qs_env, mat_chi_gamma_tau, fm_w_mic_time)
...
subroutine, public delete_unnecessary_files(bs_env)
...
Utility method to build 3-center integrals for small cell GW.
subroutine, public gw_3c_ws_create(ws, ctx)
Creates a per-thread 3c workspace: libint object + LIBXSMM contraction buffers.
subroutine, public build_3c_integral_block_ctx(int_3c, ctx, ws, atom_j, atom_k, atom_i, cell_j, cell_k, cell_i, j_offset, k_offset, i_offset, screened)
Computes the 3c integral block (mu(atom_j) nu(atom_k) | P(atom_i)) for ONE atom triple,...
subroutine, public gw_3c_ctx_release(ctx)
Releases the shared 3c-integral context.
subroutine, public gw_3c_ws_release(ws)
Releases a per-thread 3c workspace.
subroutine, public gw_3c_ctx_create(ctx, bs_env, potential_parameter, basis_j, basis_k, basis_i)
Build the shared 3c-integral context from the band-structure environment and explicitly supplied pote...
Common DBCSR matrix operations used by GW modules.
subroutine, public hadamard_product(matrix_a, matrix_b, matrix_c, factor)
Computes the scaled element-wise product C = factor (A ◦ B) while preserving the block structure of A...
subroutine, public dbcsr_contract_aba(trans_a_left, trans_a_right, matrix_a, matrix_b, matrix_c, eps_filter, retain_sparsity)
Computes C=A B A^T or C=A^T B A for DBCSR matrices.
Full-matrix operations not provided by the CP2K FM packages.
subroutine, public de_init_bs_env(qs_env, bs_env)
Releases the memory-heavy GW intermediates that cannot be freed in bs_env_release,...
Defines the basic variable types.
integer, parameter, public dp
Machine interface based on Fortran 2003 and POSIX.
real(kind=dp) function, public m_walltime()
returns time from a real-time clock, protected against rolling early/easily
Interface to the message passing library MPI.
Framework for 2c-integrals for RI.
subroutine, public ri_2c_integral_mat(qs_env, fm_matrix_minv_l_gamma, fm_matrix_l_struct, dimen_ri, ri_metric, put_mat_ks_env, regularization_ri)
...
Provides Cartesian and spherical orbital pointers and indices.
integer, dimension(:), allocatable, public ncoset
integer, dimension(:, :), allocatable, public indco
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.
Provides all information about an atomic kind.
Type defining parameters related to the simulation cell.
represent a blacs multidimensional parallel environment (for the mpi corrispective see cp_paratypes/m...
keeps the information about the structure of a full matrix
type of a logger, at the moment it contains just a print level starting at which level it should be l...
Shared read-only context for repeated 3-center integral block builds: screening parameters,...
Per-thread workspace for 3-center integral block builds: libint object + contraction buffers....
stores all the informations relevant to an mpi environment