(git:27c966b)
Loading...
Searching...
No Matches
bse_main Module Reference

Main routines for GW + Bethe-Salpeter for computing electronic excitations: a GW path prepares the BSE environment, bse_solve runs the solver on it. More...

Functions/Subroutines

subroutine, public prepare_bse_env_from_ri_rpa_gw (bse_env, fm_s_ia_full, fm_s_ij_full, fm_s_ab_full, fm_q, eigenval, eigenval_scf, homo, virtual, dimen_ri, dimen_ri_red, gw_corr_lev_occ, bse_lev_virt, qs_env, unit_nr)
 Entry for the BSE of RI_RPAGW, which hands over the slabs of all its GW levels and the static polarizability Q(0): re-reads the settings, cuts the window on the DFT axis out of the slabs and both energy sets, and inverts 1+Q(0) for W0 screening. Starts no solver.
subroutine, public prepare_bse_env_from_bandstructure_gw (bse_env, fm_s_ia, fm_s_ij, fm_s_ab, fm_eps_inv, eigenval_qp, eigenval_dft, homo_full, homo_red, virt_red, dimen_ri, qs_env, unit_nr)
 Entry for the BSE of PROPERTIESBANDSTRUCTUREGW (PROPERTIESBSE), which hands over window-sized slabs and a ready inverse dielectric matrix: nothing is cut or inverted, the slabs are taken over as they are. Shares start_bse_env and finish_bse_env with prepare_bse_env_from_ri_rpa_gw. Starts no solver.
subroutine, public bse_solve (bse_env, mo_coeff, unit_nr)
 Solves the BSE on a prepared environment: input normalisation, the screened slabs from [1+Q(0)]^-1, then the FULLDIAG or ITERDIAG solver on the energies USE_KS_ENERGIES selects.
subroutine, public bse_fulldiag_memory_check (bse_env, window, homo, para_env, unit_nr)
 Early memory check for the full diagonalization, before any GW work: the window on the DFT axis gives n_ov = sum_spin n_occ n_virt, the estimate is estimate_BSE_resources', and the run stops when it exceeds what MEMORY_PER_PROC leaves after the memory the rank holds, since a full diagonalization has nothing to shrink.
subroutine, public bse_fulldiag_memory_check_from_mos (bse_env, mos, para_env, unit_nr)
 bse_fulldiag_memory_check for a caller that holds MO sets: the window on the DFT axis from their eigenvalues, the occupied MOs per spin from their homo

Detailed Description

Main routines for GW + Bethe-Salpeter for computing electronic excitations: a GW path prepares the BSE environment, bse_solve runs the solver on it.

History
04.2024 created [Maximilian Graml] 09.2026 split into prepare_bse_env and bse_solve [Maximilian Graml]

Function/Subroutine Documentation

◆ prepare_bse_env_from_ri_rpa_gw()

subroutine, public bse_main::prepare_bse_env_from_ri_rpa_gw ( type(bse_env_type), intent(inout) bse_env,
type(cp_fm_type), dimension(:), intent(in) fm_s_ia_full,
type(cp_fm_type), dimension(:), intent(in) fm_s_ij_full,
type(cp_fm_type), dimension(:), intent(in) fm_s_ab_full,
type(cp_fm_type), intent(in) fm_q,
real(kind=dp), dimension(:, :, :), intent(in) eigenval,
real(kind=dp), dimension(:, :, :), intent(in) eigenval_scf,
integer, dimension(:), intent(in) homo,
integer, dimension(:), intent(in) virtual,
integer, intent(in) dimen_ri,
integer, intent(in) dimen_ri_red,
integer, intent(in) gw_corr_lev_occ,
integer, dimension(:), intent(in) bse_lev_virt,
type(qs_environment_type), pointer qs_env,
integer, intent(in) unit_nr )

Entry for the BSE of RI_RPAGW, which hands over the slabs of all its GW levels and the static polarizability Q(0): re-reads the settings, cuts the window on the DFT axis out of the slabs and both energy sets, and inverts 1+Q(0) for W0 screening. Starts no solver.

Parameters
bse_envsettings re-read from its section; state filled here
fm_S_ia_fullB^P_ia of the GW levels per spin, the RPA copy without the energy factor
fm_S_ij_fullB^P_ij per spin
fm_S_ab_fullB^P_ab per spin
fm_Qthe static polarizability Q(0), untouched; the caller releases it afterwards
Eigenvalquasiparticle energies (level, 1, spin)
Eigenval_scfDFT energies (level, 1, spin)
homooccupied MOs per spin
virtualvirtual MOs per spin
dimen_RIRI dimension of the slabs
dimen_RI_redreduced RI dimension of Q(0)
gw_corr_lev_occGW-corrected occupied levels; the window may not exceed them
bse_lev_virtGW-corrected virtual levels per spin
qs_envsource of the pointers the solver reads and of the AO multipoles
unit_nroutput unit, positive on the writing rank only

Definition at line 94 of file bse_main.F.

Here is the call graph for this function:

◆ prepare_bse_env_from_bandstructure_gw()

subroutine, public bse_main::prepare_bse_env_from_bandstructure_gw ( type(bse_env_type), intent(inout) bse_env,
type(cp_fm_type), dimension(:), intent(inout), allocatable fm_s_ia,
type(cp_fm_type), dimension(:), intent(inout), allocatable fm_s_ij,
type(cp_fm_type), dimension(:), intent(inout), allocatable fm_s_ab,
type(cp_fm_type), intent(in) fm_eps_inv,
real(kind=dp), dimension(:, :), intent(in) eigenval_qp,
real(kind=dp), dimension(:, :), intent(in) eigenval_dft,
integer, dimension(:), intent(in) homo_full,
integer, dimension(:), intent(in) homo_red,
integer, dimension(:), intent(in) virt_red,
integer, intent(in) dimen_ri,
type(qs_environment_type), pointer qs_env,
integer, intent(in) unit_nr )

Entry for the BSE of PROPERTIESBANDSTRUCTUREGW (PROPERTIESBSE), which hands over window-sized slabs and a ready inverse dielectric matrix: nothing is cut or inverted, the slabs are taken over as they are. Shares start_bse_env and finish_bse_env with prepare_bse_env_from_ri_rpa_gw. Starts no solver.

Parameters
bse_envsettings read and screening normalised by the caller; state filled here
fm_S_iaB^P_ia of the window per spin; moved into bse_env, deallocated on return
fm_S_ijB^P_ij of the window per spin; moved into bse_env, deallocated on return
fm_S_abB^P_ab of the window per spin; moved into bse_env, deallocated on return
fm_eps_invthe inverse dielectric matrix ε^-1_PQ the core screens the slabs with, \bar{B}^P_ij = sum_Q ε^-1_PQ B^Q_ij; RI x RI, copied for W0 only; stays the caller's May be uncreated for other screening methods.
eigenval_qpquasiparticle energies of the window (level, spin)
eigenval_dftDFT energies of the window (level, spin)
homo_fulloccupied MOs per spin of the full reference
homo_redoccupied levels in the window per spin
virt_redvirtual levels in the window per spin
dimen_RIRI dimension of the slabs and of fm_eps_inv
qs_envsource of the pointers the solver reads and of the AO multipoles
unit_nroutput unit, positive on the writing rank only

Definition at line 189 of file bse_main.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bse_solve()

subroutine, public bse_main::bse_solve ( type(bse_env_type), intent(inout) bse_env,
type(cp_fm_type), dimension(:), intent(in) mo_coeff,
integer, intent(in) unit_nr )

Solves the BSE on a prepared environment: input normalisation, the screened slabs from [1+Q(0)]^-1, then the FULLDIAG or ITERDIAG solver on the energies USE_KS_ENERGIES selects.

Parameters
bse_envprepared by a GW path; the screened slabs are formed here
mo_coeffMO coefficients of the reference, per spin, for the properties
unit_nroutput unit, positive on the writing rank only

Definition at line 403 of file bse_main.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bse_fulldiag_memory_check()

subroutine, public bse_main::bse_fulldiag_memory_check ( type(bse_env_type), intent(inout) bse_env,
type(mo_window_type), intent(in) window,
integer, dimension(:), intent(in) homo,
type(mp_para_env_type), pointer para_env,
integer, intent(in) unit_nr )

Early memory check for the full diagonalization, before any GW work: the window on the DFT axis gives n_ov = sum_spin n_occ n_virt, the estimate is estimate_BSE_resources', and the run stops when it exceeds what MEMORY_PER_PROC leaves after the memory the rank holds, since a full diagonalization has nothing to shrink.

Parameters
bse_envsettings; the TDA flag and MEMORY_PER_PROC, resolved here when still -1
windowthe active MO window on the DFT axis, one absolute range for every spin
homooccupied MOs per spin
para_envthe ranks that will hold the matrices
unit_nroutput unit, positive on the writing rank only

Definition at line 505 of file bse_main.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bse_fulldiag_memory_check_from_mos()

subroutine, public bse_main::bse_fulldiag_memory_check_from_mos ( type(bse_env_type), intent(inout) bse_env,
type(mo_set_type), dimension(:), intent(in) mos,
type(mp_para_env_type), pointer para_env,
integer, intent(in) unit_nr )

bse_fulldiag_memory_check for a caller that holds MO sets: the window on the DFT axis from their eigenvalues, the occupied MOs per spin from their homo

Parameters
bse_envsettings; the window cutoffs, the TDA flag and MEMORY_PER_PROC, resolved when still -1
mosthe MO sets the GW will correct, for their DFT eigenvalues and occupations
para_envthe ranks that will hold the matrices
unit_nroutput unit, positive on the writing rank only

Definition at line 570 of file bse_main.F.

Here is the call graph for this function:
Here is the caller graph for this function: