58#include "../base/base_uses.f90"
64 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'rt_bse_ri_rs'
91 CHARACTER(LEN=*),
PARAMETER :: routinen =
'rt_bse_ri_rs_ensure_grid'
96 CALL timeset(routinen, handle)
98 IF (bs_env%ri_rs%grid_built)
THEN
108 IF (.NOT.
ALLOCATED(bs_env%ri_rs%radius_ao_per_atom))
THEN
111 CALL atomic_basis_at_grid_point(bs_env, bs_env%ri_rs%grid_points, &
112 bs_env%ri_rs%mat_phi_mu_l)
113 CALL compute_z_lp(qs_env, bs_env, bs_env%ri_rs%grid_points, &
114 bs_env%ri_rs%mat_phi_mu_l, bs_env%ri_rs%mat_Z_lP)
116 bs_env%ri_rs%grid_built = .true.
118 IF (bs_env%unit_nr > 0)
THEN
119 WRITE (bs_env%unit_nr,
'(T2,A,T58,A,F7.1,A)') &
120 'Built RI-RS grid for RT-BSE (no GW_RI_RS used),',
' Execution time', &
122 WRITE (bs_env%unit_nr,
'(A)')
' '
125 CALL timestop(handle)
143 CHARACTER(LEN=*),
PARAMETER :: routinen =
'rt_bse_ri_rs_ensure_V_grid'
146 INTEGER,
DIMENSION(:),
POINTER :: blk_aux, dist_row_aux
148 TYPE(
cp_fm_type),
ALLOCATABLE,
DIMENSION(:, :) :: fm_vtr_gamma
151 CALL timeset(routinen, handle)
153 IF (bs_env%ri_rs%V_grid_built)
THEN
154 CALL timestop(handle)
163 CALL ri_2c_integral_mat(qs_env, fm_vtr_gamma, bs_env%fm_RI_RI%matrix_struct, bs_env%n_RI, &
164 bs_env%trunc_coulomb)
170 CALL dbcsr_create(bs_env%ri_rs%mat_V_aux_rtbse,
"V_aux_rtbse", dist_aux_aux, &
171 dbcsr_type_no_symmetry, blk_aux, blk_aux)
173 keep_sparsity=.false.)
175 bs_env%ri_rs%V_grid_built = .true.
177 IF (bs_env%unit_nr > 0)
THEN
178 WRITE (bs_env%unit_nr,
'(T2,A,T57,A,F7.1,A)') &
179 'Precomputed RT-BSE RI-RS V_aux kernel,',
' Execution time', &
181 WRITE (bs_env%unit_nr,
'(A)')
' '
187 CALL timestop(handle)
207 CHARACTER(LEN=*),
PARAMETER :: routinen =
'rt_bse_ri_rs_ensure_W0_grid'
210 INTEGER,
DIMENSION(:),
POINTER :: blk_aux, blk_grid, dist_col_grid, &
212 LOGICAL :: use_cutoff_w0
213 REAL(kind=
dp) :: fnorm_w0, occ_w0, t1
214 TYPE(
cp_fm_type),
ALLOCATABLE,
DIMENSION(:, :) :: fm_vtr_gamma
216 TYPE(
dbcsr_type) :: matrix_v_aux, matrix_w_aux
218 CALL timeset(routinen, handle)
220 IF (bs_env%ri_rs%W0_grid_built)
THEN
221 CALL timestop(handle)
227 IF (.NOT.
ASSOCIATED(bs_env%fm_W_MIC_freq_zero%matrix_struct))
THEN
228 CALL cp_abort(__location__, &
229 "RT-BSE RI-RS kernel needs the screened interaction W(w=0), which the GW "// &
230 "step did not build. Select the RT-BSE propagator with '&RTBSE' or "// &
231 "'&RTBSE RTBSE', not '&RTBSE TDDFT'.")
241 CALL ri_2c_integral_mat(qs_env, fm_vtr_gamma, bs_env%fm_RI_RI%matrix_struct, bs_env%n_RI, &
242 bs_env%trunc_coulomb)
246 CALL dbcsr_create(matrix_v_aux,
"V_aux_rtbse_W0", dist_aux_aux, dbcsr_type_no_symmetry, &
248 CALL copy_fm_to_dbcsr(fm_vtr_gamma(1, 1), matrix_v_aux, keep_sparsity=.false.)
250 CALL dbcsr_create(matrix_w_aux,
"W_aux_rtbse", dist_aux_aux, dbcsr_type_no_symmetry, &
252 CALL copy_fm_to_dbcsr(bs_env%fm_W_MIC_freq_zero, matrix_w_aux, keep_sparsity=.false.)
253 CALL dbcsr_add(matrix_w_aux, matrix_v_aux, 1.0_dp, 1.0_dp)
255 CALL dbcsr_create(bs_env%ri_rs%mat_W0_grid_rtbse,
"W0_grid_rtbse", dist_grid_grid, &
256 dbcsr_type_no_symmetry, blk_grid, blk_grid)
261 use_cutoff_w0 = bs_env%ri_rs%cutoff_radius_w0 > 0.0_dp
265 IF (use_cutoff_w0 .AND. .NOT.
ALLOCATED(bs_env%ri_rs%chunk_centroids))
THEN
266 CALL cp_abort(__location__, &
267 "RTBSE%CUTOFF_RADIUS_W0 needs the per-grid-block centroids, which only the "// &
268 "non-periodic RI-RS GW driver builds; this cell is periodic. Use '&CELL "// &
269 "PERIODIC NONE', or drop CUTOFF_RADIUS_W0 to propagate with the exact W0.")
272 IF (use_cutoff_w0)
THEN
274 bs_env%ri_rs%chunk_centroids, &
275 bs_env%ri_rs%cutoff_radius_w0)
281 bs_env%ri_rs%mat_W0_grid_rtbse, bs_env%eps_filter, &
282 retain_sparsity=.true.)
285 bs_env%ri_rs%mat_W0_grid_rtbse, bs_env%eps_filter)
288 bs_env%ri_rs%W0_grid_built = .true.
296 IF (bs_env%unit_nr > 0)
THEN
297 WRITE (bs_env%unit_nr,
'(T2,A,T67,F14.4)') &
298 'W0CUT| Cutoff radius, negative = off [angstrom]', bs_env%ri_rs%cutoff_radius_w0*
angstrom
299 WRITE (bs_env%unit_nr,
'(T2,A,T67,F14.6)')
'W0CUT| Retained block fraction', occ_w0
300 WRITE (bs_env%unit_nr,
'(T2,A,T59,ES22.8)')
'W0CUT| Retained Frobenius norm', fnorm_w0
301 WRITE (bs_env%unit_nr,
'(T2,A,T57,A,F7.1,A)') &
302 'Precomputed RT-BSE RI-RS W0_grid kernel,',
' Execution time', &
304 WRITE (bs_env%unit_nr,
'(A)')
' '
309 m1=matrix_v_aux, m2=matrix_w_aux)
312 CALL timestop(handle)
333 TYPE(
cp_fm_type),
INTENT(INOUT) :: sigma_ao_fm
334 REAL(kind=
dp),
INTENT(IN) :: prefactor
336 REAL(kind=
dp),
INTENT(INOUT),
OPTIONAL :: grid_diag_accum(:)
338 CHARACTER(LEN=*),
PARAMETER :: routinen =
'compute_sigma_ri_rs'
340 INTEGER :: handle, n_grid
341 INTEGER,
DIMENSION(:),
POINTER :: blk_ao, dist_row_ao
342 REAL(kind=
dp),
ALLOCATABLE :: diag_local(:)
344 TYPE(
dbcsr_type) :: matrix_rho_ao, matrix_rho_grid, &
347 CALL timeset(routinen, handle)
349 cpassert(bs_env%ri_rs%W0_grid_built)
354 CALL dbcsr_create(matrix_rho_ao,
"rho_AO_ri_rs", dist_ao_ao, dbcsr_type_no_symmetry, &
359 IF (bs_env%ri_rs%eps_filter_rho >= 0.0_dp)
THEN
360 CALL dbcsr_filter(matrix_rho_ao, bs_env%ri_rs%eps_filter_rho)
370 CALL dbcsr_create(matrix_rho_grid, template=bs_env%ri_rs%mat_W0_grid_rtbse)
371 CALL dbcsr_copy(matrix_rho_grid, bs_env%ri_rs%mat_W0_grid_rtbse)
374 matrix_rho_grid, 0.0_dp, retain_sparsity=.true.)
381 IF (
PRESENT(grid_diag_accum))
THEN
382 n_grid =
SIZE(grid_diag_accum)
383 ALLOCATE (diag_local(n_grid))
386 CALL bs_env%para_env%sum(diag_local)
387 grid_diag_accum(:) = grid_diag_accum(:) + diag_local(:)
388 DEALLOCATE (diag_local)
396 CALL dbcsr_create(matrix_sigma_ao, template=matrix_rho_ao)
399 matrix_sigma_ao, 0.0_dp)
405 m1=matrix_rho_ao, m2=matrix_sigma_ao)
408 CALL timestop(handle)
424 grid_diag_re_accum, grid_diag_im_accum)
428 REAL(kind=
dp),
INTENT(IN) :: prefactor
430 REAL(kind=
dp),
INTENT(INOUT),
OPTIONAL :: grid_diag_re_accum(:), &
431 grid_diag_im_accum(:)
433 CHARACTER(LEN=*),
PARAMETER :: routinen =
'compute_sigma_ri_rs_complex'
439 CALL timeset(routinen, handle)
441 CALL cp_fm_create(fm_rho, bs_env%fm_s_Gamma%matrix_struct)
442 CALL cp_fm_create(fm_sigma, bs_env%fm_s_Gamma%matrix_struct)
443 CALL cp_cfm_create(cfm_real_part, bs_env%fm_s_Gamma%matrix_struct)
448 grid_diag_accum=grid_diag_re_accum)
449 CALL cp_fm_to_cfm(msourcer=fm_sigma, mtarget=cfm_real_part)
453 grid_diag_accum=grid_diag_im_accum)
454 CALL cp_fm_to_cfm(msourcei=fm_sigma, mtarget=sigma_ao_cfm)
457 cmplx(1.0_dp, 0.0_dp, kind=
dp), cfm_real_part)
463 CALL timestop(handle)
483 CHARACTER(LEN=*),
PARAMETER :: routinen =
'compute_hartree_ri_rs'
485 INTEGER :: handle, n_grid
486 INTEGER,
DIMENSION(:),
POINTER :: blk_ao, blk_grid, dist_col_grid, &
488 REAL(kind=
dp),
ALLOCATABLE :: n_vec(:)
490 TYPE(
dbcsr_type) :: matrix_rho_ao, matrix_rho_grid
492 CALL timeset(routinen, handle)
494 cpassert(bs_env%ri_rs%V_grid_built)
500 CALL dbcsr_create(matrix_rho_ao,
"rho_AO_hartree", dist_ao_ao, dbcsr_type_no_symmetry, &
504 n_grid = sum(blk_grid)
505 ALLOCATE (n_vec(n_grid))
510 CALL dbcsr_create(matrix_rho_grid,
"rho_grid_hartree", dist_grid_grid, &
511 dbcsr_type_no_symmetry, blk_grid, blk_grid)
517 matrix_rho_grid, 0.0_dp)
520 CALL bs_env%para_env%sum(n_vec)
531 CALL timestop(handle)
548 REAL(kind=
dp),
INTENT(IN) :: n_vec(:)
551 CHARACTER(LEN=*),
PARAMETER :: routinen =
'hartree_potential_from_diag_ri_rs'
554 INTEGER,
DIMENSION(:),
POINTER :: blk_ao, dist_row_ao
555 REAL(kind=
dp),
ALLOCATABLE :: u_ri(:), v_vec(:), w_ri(:)
559 CALL timeset(routinen, handle)
561 cpassert(bs_env%ri_rs%V_grid_built)
564 ALLOCATE (v_vec(
SIZE(n_vec)))
567 ALLOCATE (w_ri(bs_env%n_RI), u_ri(bs_env%n_RI))
569 CALL dbcsr_matvec_replicated(bs_env%ri_rs%mat_Z_lP, n_vec, w_ri, bs_env%para_env, &
572 CALL dbcsr_matvec_replicated(bs_env%ri_rs%mat_V_aux_rtbse, w_ri, u_ri, bs_env%para_env)
574 CALL dbcsr_matvec_replicated(bs_env%ri_rs%mat_Z_lP, u_ri, v_vec, bs_env%para_env)
575 DEALLOCATE (w_ri, u_ri)
578 CALL dbcsr_create(matrix_phi, template=bs_env%ri_rs%mat_phi_mu_l)
579 CALL dbcsr_copy(matrix_phi, bs_env%ri_rs%mat_phi_mu_l)
580 CALL dbcsr_scale_rows_replicated(matrix_phi, v_vec)
582 CALL dbcsr_create(matrix_v_h_ao,
"V_H_AO_hartree", dist_ao_ao, dbcsr_type_no_symmetry, &
585 CALL dbcsr_multiply(
"T",
"N", 1.0_dp, bs_env%ri_rs%mat_phi_mu_l, matrix_phi, &
586 0.0_dp, matrix_v_h_ao, filter_eps=0.0_dp)
596 CALL timestop(handle)
614 REAL(kind=
dp),
INTENT(IN) :: n_re(:)
616 REAL(kind=
dp),
INTENT(IN),
OPTIONAL :: n_im(:)
618 CHARACTER(LEN=*),
PARAMETER :: routinen =
'compute_hartree_ri_rs_from_diag'
624 CALL timeset(routinen, handle)
626 CALL cp_fm_create(fm_v, bs_env%fm_s_Gamma%matrix_struct)
629 IF (
PRESENT(n_im))
THEN
630 CALL cp_cfm_create(cfm_real_part, bs_env%fm_s_Gamma%matrix_struct)
635 cmplx(1.0_dp, 0.0_dp, kind=
dp), cfm_real_part)
643 CALL timestop(handle)
661 CHARACTER(LEN=*),
PARAMETER :: routinen =
'compute_hartree_ri_rs_complex'
667 CALL timeset(routinen, handle)
669 CALL cp_fm_create(fm_rho, bs_env%fm_s_Gamma%matrix_struct)
670 CALL cp_fm_create(fm_v, bs_env%fm_s_Gamma%matrix_struct)
671 CALL cp_cfm_create(cfm_real_part, bs_env%fm_s_Gamma%matrix_struct)
682 cmplx(1.0_dp, 0.0_dp, kind=
dp), cfm_real_part)
688 CALL timestop(handle)
698 SUBROUTINE dbcsr_scale_rows_replicated(matrix, vec)
701 REAL(kind=
dp),
INTENT(IN) :: vec(:)
703 INTEGER :: col_blk, ic, ir, nblkrows_total, &
705 INTEGER,
ALLOCATABLE :: row_offset(:)
706 INTEGER,
DIMENSION(:),
POINTER :: row_blk_size
707 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: blk
710 CALL dbcsr_get_info(matrix, nblkrows_total=nblkrows_total, row_blk_size=row_blk_size)
711 ALLOCATE (row_offset(nblkrows_total + 1))
713 DO ir = 1, nblkrows_total
714 row_offset(ir + 1) = row_offset(ir) + row_blk_size(ir)
720 row_off = row_offset(row_blk)
721 DO ic = 1,
SIZE(blk, 2)
722 DO ir = 1,
SIZE(blk, 1)
723 blk(ir, ic) = vec(row_off + ir)*blk(ir, ic)
729 DEALLOCATE (row_offset)
731 END SUBROUTINE dbcsr_scale_rows_replicated
743 SUBROUTINE dbcsr_matvec_replicated(matrix, vec_in, vec_out, para_env, transposed)
746 REAL(kind=
dp),
INTENT(IN) :: vec_in(:)
747 REAL(kind=
dp),
INTENT(INOUT) :: vec_out(:)
749 LOGICAL,
INTENT(IN),
OPTIONAL :: transposed
751 INTEGER :: col_blk, col_off, ic, ir, &
752 nblkcols_total, nblkrows_total, &
754 INTEGER,
ALLOCATABLE :: col_offset(:), row_offset(:)
755 INTEGER,
DIMENSION(:),
POINTER :: col_blk_size, row_blk_size
757 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: block
761 IF (
PRESENT(transposed)) my_trans = transposed
764 nblkcols_total=nblkcols_total, &
765 row_blk_size=row_blk_size, col_blk_size=col_blk_size)
767 ALLOCATE (row_offset(nblkrows_total + 1), col_offset(nblkcols_total + 1))
769 DO ir = 1, nblkrows_total
770 row_offset(ir + 1) = row_offset(ir) + row_blk_size(ir)
773 DO ic = 1, nblkcols_total
774 col_offset(ic + 1) = col_offset(ic) + col_blk_size(ic)
782 row_off = row_offset(row_blk)
783 col_off = col_offset(col_blk)
785 DO ic = 1,
SIZE(block, 2)
786 DO ir = 1,
SIZE(block, 1)
787 vec_out(col_off + ic) = vec_out(col_off + ic) + &
788 block(ir, ic)*vec_in(row_off + ir)
792 DO ic = 1,
SIZE(block, 2)
793 DO ir = 1,
SIZE(block, 1)
794 vec_out(row_off + ir) = vec_out(row_off + ir) + &
795 block(ir, ic)*vec_in(col_off + ic)
802 DEALLOCATE (row_offset, col_offset)
804 CALL para_env%sum(vec_out)
806 END SUBROUTINE dbcsr_matvec_replicated
Basic linear algebra operations for complex full matrices.
subroutine, public cp_cfm_scale_and_add(alpha, matrix_a, beta, matrix_b)
Scale and add two BLACS matrices (a = alpha*a + beta*b).
Represents a complex full matrix distributed on many processors.
subroutine, public cp_cfm_release(matrix)
Releases a full matrix.
subroutine, public cp_fm_to_cfm(msourcer, msourcei, mtarget)
Construct a complex full matrix by taking its real and imaginary parts from two separate real-value f...
subroutine, public cp_cfm_create(matrix, matrix_struct, name, nrow, ncol, set_zero)
Creates a new full matrix with the given structure.
subroutine, public cp_cfm_to_fm(msource, mtargetr, mtargeti)
Copy real and imaginary parts of a complex full matrix into separate real-value full matrices.
subroutine, public dbcsr_scale(matrix, alpha_scalar)
...
logical function, public dbcsr_iterator_blocks_left(iterator)
...
subroutine, public dbcsr_iterator_stop(iterator)
...
subroutine, public dbcsr_copy(matrix_b, matrix_a, name, keep_sparsity, keep_imaginary)
...
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_iterator_next_block(iterator, row, column, block, block_number_argument_has_been_removed, row_size, col_size, row_offset, col_offset, transposed)
...
subroutine, public dbcsr_filter(matrix, eps)
...
real(kind=dp) function, public dbcsr_get_occupation(matrix)
...
subroutine, public dbcsr_iterator_start(iterator, matrix, shared, dynamic, dynamic_byrows)
...
subroutine, public dbcsr_set(matrix, alpha)
...
subroutine, public dbcsr_release(matrix)
...
subroutine, public dbcsr_add(matrix_a, matrix_b, alpha_scalar, beta_scalar)
...
subroutine, public dbcsr_get_diag(matrix, diag)
Copies the diagonal elements from the given matrix into the given array.
real(dp) function, public dbcsr_frobenius_norm(matrix)
Compute the frobenius norm of a dbcsr matrix.
DBCSR operations in CP2K.
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 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
Computes the RI-RS fitting matrix Z_lP.
subroutine, public compute_z_lp(qs_env, bs_env, ri_rs_grid_points, mat_phi_mu_l, mat_z_lp)
Computes Z_lP for (1) a tabulated RI basis set or (2) an on-the-fly generated RI basis set.
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 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.
GW using RI-RS Approximation for molecules.
subroutine, public reserve_blocks_within_radius(matrix, centers, radius)
Pre-seeds a square blocked DBCSR matrix with zero blocks only for block pairs whose centers lie withi...
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...
Common DBCSR matrix operations used by GW modules.
subroutine, public hadamard_product_inplace(matrix_a, matrix_b, factor)
Form A = factor * (A element-wise B) without changing A's block structure.
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.
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)
...
Definition of physical constants:
real(kind=dp), parameter, public angstrom
RT-BSE RI-RS kernels: SEX and Hartree evaluated by collocation on grid points r_l....
subroutine, public compute_hartree_ri_rs_complex(bs_env, rho_ao_cfm, v_h_ao_cfm)
Complex-input Hartree potential via RI-RS. Re/Im split: feed each part to the real compute_hartree_ri...
subroutine, public rt_bse_ri_rs_ensure_w0_grid(bs_env, qs_env)
Build W^0_ll' = sum_PQ Z_lP (V + W^c(ω=0))_PQ Z_l'Q (statically screened W on the grid)....
subroutine, public hartree_potential_from_diag_ri_rs(bs_env, n_vec, v_h_ao_fm)
Hartree stages 2-3 from a precomputed grid density n_l (skips the stage-1 φρφ^T build): v_l = sum_PQl...
subroutine, public compute_sigma_ri_rs_complex(bs_env, sigma_ao_cfm, prefactor, rho_ao_cfm, grid_diag_re_accum, grid_diag_im_accum)
Complex-input AO SEX via Re/Im split: the kernel is real, so complex linearity holds as Σ[Δρ] = Σ[Re ...
subroutine, public rt_bse_ri_rs_ensure_grid(bs_env, qs_env)
Make sure the AO collocation φ_µ(r_l) (mat_phi_mu_l) and the RI fit coefficients Z_lP (mat_Z_lP) are ...
subroutine, public compute_sigma_ri_rs(bs_env, sigma_ao_fm, prefactor, rho_ao_fm, grid_diag_accum)
AO-domain SEX: Σ_µν = pref * sum_ll' φ_lµ [ρ^grid ∘ W^0]_ll' φ_l'ν, ρ^grid_ll' = sum_µν φ_lµ Δρ_µν φ_...
subroutine, public compute_hartree_ri_rs(bs_env, rho_ao_fm, v_h_ao_fm)
AO-domain Hartree via RI-RS: n_l = sum_µν φ_lµ Δρ_µν φ_lν = (φ ρ φ^T)_ll (diagonal of materialized gr...
subroutine, public compute_hartree_ri_rs_from_diag(bs_env, n_re, v_h_ao_cfm, n_im)
Complex Hartree from precomputed grid diagonals: V^H = V^H[n_re] + i V^H[n_im], each via hartree_pote...
subroutine, public rt_bse_ri_rs_ensure_v_grid(bs_env, qs_env)
Build V^aux_PQ = [M^-1 V^tr M^-1]_PQ (truncated Coulomb in the RI basis, M^-1-sandwiched to match the...
Represent a complex full matrix.
stores all the informations relevant to an mpi environment