(git:d3d49ac)
Loading...
Searching...
No Matches
rt_bse_ri_rs.F File Reference

Go to the source code of this file.

Modules

module  rt_bse_ri_rs
 RT-BSE RI-RS kernels: SEX and Hartree evaluated by collocation on grid points r_l. Once-built grid objects: φ_µ(r_l) [grid×AO], Z_lP [grid×RI], V^aux_PQ = [M^-1 V^tr M^-1]_PQ [RI×RI], W^0_ll' = sum_PQ Z_lP (V + W^c(ω=0))_PQ Z_l'Q. Per-call kernels, collocation X = φ_µ(r_l) (AO domain, written φ_lµ below): SEX: ρ^grid_ll' = sum_µν φ_lµ Δρ_µν φ_l'ν ; Σ_µν = pref * sum_ll' φ_lµ [ρ^grid ∘ W^0]_ll' φ_l'ν Hartree: n_l = sum_µν φ_lµ Δρ_µν φ_lν ; v_l = sum_PQl' Z_lP V^aux_PQ Z_l'Q n_l' (applied factorized, stage 2) ; V^H_µν = sum_l φ_lµ v_l φ_lν (diagonal-only, no grid×grid) Independent of which GW variant produced bs_envfm_W_MIC_freq_zero.
 

Functions/Subroutines

subroutine, public rt_bse_ri_rs::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 populated in memory. If GW was run with RI-RS the grid is already built; otherwise build it here so the AO-RI GW + RI-RS RT-BSE combination is possible.
 
subroutine, public rt_bse_ri_rs::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 W^MIC convention). The grid Coulomb V_ll' = sum_PQ Z_lP V^aux_PQ Z_l'Q is never materialized – the Hartree stage applies it factorized: v_l = sum_PQl' Z_lP V^aux_PQ Z_l'Q n_l' Needed by RT-BSE RI-RS Hartree.
 
subroutine, public rt_bse_ri_rs::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). Needed by RT-BSE RI-RS SEX/COH. Reuses bs_envfm_W_MIC_freq_zero which must already contain M^-1 W^c(ω=0) M^-1 (built by either GW path under the BSE rtp_method gate). W^0 enters only through the Hadamard ρ^grid ∘ W^0 – its elements are needed, so it is the one persistent grid×grid object of the kernel layer.
 
subroutine, public rt_bse_ri_rs::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µ Δρ_µν φ_l'ν. The grid×grid ρ^grid is intrinsic to SEX – the Hadamard needs W^0's elements, so no factorized application exists (unlike the Hartree V_ll'). Real input, real output; used for COH (input S^-1) and the init reference (ρ^0); dynamic Δρ goes through the complex variant. Mirrors the AO-RI get_sigma(rtbse_env, sigma_fm, prefactor, rho_fm) API.
 
subroutine, public rt_bse_ri_rs::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 Δρ] + i Σ[Im Δρ]. Required for non-Hermitian Δρ inputs (TDA OV-only / ABBA OV+VO).
 
subroutine, public rt_bse_ri_rs::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 grid×grid) ; v_l = sum_PQl' Z_lP V^aux_PQ Z_l'Q n_l' (factorized, stage 2) ; V^H_µν = sum_l φ_lµ v_l φ_lν (diagonal-only row-scale, stage 3) Real input, real output; complex inputs go through compute_hartree_ri_rs_complex.
 
subroutine, public rt_bse_ri_rs::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' Z_lP V^aux_PQ Z_l'Q n_l' (factorized Coulomb) ; V^H_µν = sum_l φ_lµ v_l φ_lν (Φ_lν = v_l φ_lν rowscale, then V^H = φ^T Φ). n_l is harvested as diag(φρφ^T) inside compute_sigma_ri_rs (the SEX grid kernel), so the Hartree never rebuilds the grid×grid product. Real in/out.
 
subroutine, public rt_bse_ri_rs::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_potential_from_diag_ri_rs (stages 2-3 only). n_re/n_im are the spin-summed grid densities harvested in the SEX kernel; this is the cross-spin / TDA complex consumer that replaces compute_hartree_ri_rs_complex when SEX already built the grid. n_im optional: when absent the result is purely real (matches the Re-only real-input Hartree).
 
subroutine, public rt_bse_ri_rs::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_rs and reassemble. Real-input Hartree on a non-Hermitian input would silently drop Im and break Hermitian conjugacy of OV+VO contributions in TDA.