(git:c5411e0)
Loading...
Searching...
No Matches
bse_util Module Reference

Auxiliary routines for GW + Bethe-Salpeter for computing electronic excitations. More...

Functions/Subroutines

subroutine, public mult_b_with_w (fm_mat_s_ij_bse, fm_mat_s_ia_bse, fm_mat_s_bar_ia_bse, fm_mat_s_bar_ij_bse, fm_mat_q_static_bse_gemm, dimen_ri, homo, virtual)
 Multiplies B-matrix (RI-3c-Integrals) with W (screening) to obtain \bar{B}.
 
subroutine, public fm_general_add_bse (fm_out, fm_in, beta, nrow_secidx_in, ncol_secidx_in, nrow_secidx_out, ncol_secidx_out, unit_nr, reordering, mp2_env)
 Adds and reorders full matrices with a combined index structure, e.g. adding W_ij,ab to A_ia, which needs MPI communication.
 
subroutine, public truncate_fm (fm_out, fm_in, ncol_in, nrow_out, ncol_out, unit_nr, mp2_env, nrow_offset, ncol_offset)
 Routine for truncating a full matrix as given by the energy cutoffs in the input file. Logic: Matrices have some dimension dimen_RI x nrow_in*ncol_in for the incoming (untruncated) matrix and dimen_RI x nrow_out*ncol_out for the truncated matrix. The truncation is done by resorting the indices via parallel communication.
 
subroutine, public fm_write_thresh (fm, thresh, header, unit_nr, abs_vals)
 Debug function to write elements of a full matrix to file, if they are larger than a given threshold.
 
subroutine, public print_bse_start_flag (bse_tda, bse_abba, unit_nr)
 ...
 
subroutine, public deallocate_matrices_bse (fm_mat_s_bar_ia_bse, fm_mat_s_bar_ij_bse, fm_mat_s_trunc, fm_mat_s_ij_trunc, fm_mat_s_ab_trunc, fm_mat_q_static_bse, fm_mat_q_static_bse_gemm)
 ...
 
subroutine, public comp_eigvec_coeff_bse (fm_work, eig_vals, beta, gamma, do_transpose)
 Routine for computing the coefficients of the eigenvectors of the BSE matrix from a multiplication with the eigenvalues.
 
subroutine, public sort_excitations (idx_prim, idx_sec, eigvec_entries)
 ...
 
subroutine, public estimate_bse_resources (homo_red, virtual_red, unit_nr, bse_abba, para_env, diag_runtime_est)
 Roughly estimates the needed runtime and memory during the BSE run.
 
subroutine, public filter_eigvec_contrib (fm_eigvec, idx_homo, idx_virt, eigvec_entries, i_exc, virtual, num_entries, mp2_env)
 Filters eigenvector entries above a given threshold to describe excitations in the singleparticle basis.
 
subroutine, public truncate_bse_matrices (fm_mat_s_ia_bse, fm_mat_s_ij_bse, fm_mat_s_ab_bse, fm_mat_s_trunc, fm_mat_s_ij_trunc, fm_mat_s_ab_trunc, eigenval, eigenval_reduced, homo, virtual, dimen_ri, unit_nr, homo_red, virt_red, mp2_env)
 Determines indices within the given energy cutoffs and truncates Eigenvalues and matrices.
 

Detailed Description

Auxiliary routines for GW + Bethe-Salpeter for computing electronic excitations.

History
11.2023 created [Maximilian Graml]

Function/Subroutine Documentation

◆ mult_b_with_w()

subroutine, public bse_util::mult_b_with_w ( type(cp_fm_type), intent(in)  fm_mat_s_ij_bse,
type(cp_fm_type), intent(in)  fm_mat_s_ia_bse,
type(cp_fm_type), intent(out)  fm_mat_s_bar_ia_bse,
type(cp_fm_type), intent(out)  fm_mat_s_bar_ij_bse,
type(cp_fm_type), intent(in)  fm_mat_q_static_bse_gemm,
integer, intent(in)  dimen_ri,
integer, intent(in)  homo,
integer, intent(in)  virtual 
)

Multiplies B-matrix (RI-3c-Integrals) with W (screening) to obtain \bar{B}.

Parameters
fm_mat_S_ij_bse...
fm_mat_S_ia_bse...
fm_mat_S_bar_ia_bse...
fm_mat_S_bar_ij_bse...
fm_mat_Q_static_bse_gemm...
dimen_RI...
homo...
virtual...

Definition at line 64 of file bse_util.F.

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

◆ fm_general_add_bse()

subroutine, public bse_util::fm_general_add_bse ( type(cp_fm_type), intent(inout)  fm_out,
type(cp_fm_type), intent(inout)  fm_in,
real(kind=dp)  beta,
integer, intent(in)  nrow_secidx_in,
integer, intent(in)  ncol_secidx_in,
integer, intent(in)  nrow_secidx_out,
integer, intent(in)  ncol_secidx_out,
integer  unit_nr,
integer, dimension(4)  reordering,
type(mp2_type), intent(inout)  mp2_env 
)

Adds and reorders full matrices with a combined index structure, e.g. adding W_ij,ab to A_ia, which needs MPI communication.

Parameters
fm_out...
fm_in...
beta...
nrow_secidx_in...
ncol_secidx_in...
nrow_secidx_out...
ncol_secidx_out...
unit_nr...
reordering...
mp2_env...

Definition at line 149 of file bse_util.F.

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

◆ truncate_fm()

subroutine, public bse_util::truncate_fm ( type(cp_fm_type), intent(inout)  fm_out,
type(cp_fm_type), intent(in)  fm_in,
integer  ncol_in,
integer  nrow_out,
integer  ncol_out,
integer  unit_nr,
type(mp2_type), intent(inout)  mp2_env,
integer, intent(in), optional  nrow_offset,
integer, intent(in), optional  ncol_offset 
)

Routine for truncating a full matrix as given by the energy cutoffs in the input file. Logic: Matrices have some dimension dimen_RI x nrow_in*ncol_in for the incoming (untruncated) matrix and dimen_RI x nrow_out*ncol_out for the truncated matrix. The truncation is done by resorting the indices via parallel communication.

Parameters
fm_out...
fm_in...
ncol_in...
nrow_out...
ncol_out...
unit_nr...
mp2_env...
nrow_offset...
ncol_offset...

Definition at line 419 of file bse_util.F.

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

◆ fm_write_thresh()

subroutine, public bse_util::fm_write_thresh ( type(cp_fm_type), intent(in)  fm,
real(kind=dp), intent(in)  thresh,
character(len=*), intent(in)  header,
integer, intent(in)  unit_nr,
logical, optional  abs_vals 
)

Debug function to write elements of a full matrix to file, if they are larger than a given threshold.

Parameters
fm...
thresh...
header...
unit_nr...
abs_vals...

Definition at line 721 of file bse_util.F.

Here is the call graph for this function:

◆ print_bse_start_flag()

subroutine, public bse_util::print_bse_start_flag ( logical, intent(in)  bse_tda,
logical, intent(in)  bse_abba,
integer, intent(in)  unit_nr 
)

...

Parameters
bse_tda...
bse_abba...
unit_nr...

Definition at line 787 of file bse_util.F.

Here is the caller graph for this function:

◆ deallocate_matrices_bse()

subroutine, public bse_util::deallocate_matrices_bse ( type(cp_fm_type), intent(inout)  fm_mat_s_bar_ia_bse,
type(cp_fm_type), intent(inout)  fm_mat_s_bar_ij_bse,
type(cp_fm_type), intent(inout)  fm_mat_s_trunc,
type(cp_fm_type), intent(inout)  fm_mat_s_ij_trunc,
type(cp_fm_type), intent(inout)  fm_mat_s_ab_trunc,
type(cp_fm_type), intent(inout)  fm_mat_q_static_bse,
type(cp_fm_type), intent(inout)  fm_mat_q_static_bse_gemm 
)

...

Parameters
fm_mat_S_bar_ia_bse...
fm_mat_S_bar_ij_bse...
fm_mat_S_trunc...
fm_mat_S_ij_trunc...
fm_mat_S_ab_trunc...
fm_mat_Q_static_bse...
fm_mat_Q_static_bse_gemm...

Definition at line 830 of file bse_util.F.

Here is the caller graph for this function:

◆ comp_eigvec_coeff_bse()

subroutine, public bse_util::comp_eigvec_coeff_bse ( type(cp_fm_type), intent(inout)  fm_work,
real(kind=dp), dimension(:), intent(in), allocatable  eig_vals,
real(kind=dp), intent(in)  beta,
real(kind=dp), intent(in), optional  gamma,
logical, intent(in), optional  do_transpose 
)

Routine for computing the coefficients of the eigenvectors of the BSE matrix from a multiplication with the eigenvalues.

Parameters
fm_work...
eig_vals...
beta...
gamma...
do_transpose...

Definition at line 864 of file bse_util.F.

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

◆ sort_excitations()

subroutine, public bse_util::sort_excitations ( integer, dimension(:), allocatable  idx_prim,
integer, dimension(:), allocatable  idx_sec,
real(kind=dp), dimension(:), allocatable  eigvec_entries 
)

...

Parameters
idx_prim...
idx_sec...
eigvec_entries...

Definition at line 929 of file bse_util.F.

Here is the caller graph for this function:

◆ estimate_bse_resources()

subroutine, public bse_util::estimate_bse_resources ( integer  homo_red,
integer  virtual_red,
integer  unit_nr,
logical  bse_abba,
type(mp_para_env_type), pointer  para_env,
real(kind=dp)  diag_runtime_est 
)

Roughly estimates the needed runtime and memory during the BSE run.

Parameters
homo_red...
virtual_red...
unit_nr...
bse_abba...
para_env...
diag_runtime_est...

Definition at line 1012 of file bse_util.F.

Here is the caller graph for this function:

◆ filter_eigvec_contrib()

subroutine, public bse_util::filter_eigvec_contrib ( type(cp_fm_type), intent(in)  fm_eigvec,
integer, dimension(:), allocatable  idx_homo,
integer, dimension(:), allocatable  idx_virt,
real(kind=dp), dimension(:), allocatable  eigvec_entries,
integer  i_exc,
integer  virtual,
integer  num_entries,
type(mp2_type), intent(inout)  mp2_env 
)

Filters eigenvector entries above a given threshold to describe excitations in the singleparticle basis.

Parameters
fm_eigvec...
idx_homo...
idx_virt...
eigvec_entries...
i_exc...
virtual...
num_entries...
mp2_env...

Definition at line 1063 of file bse_util.F.

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

◆ truncate_bse_matrices()

subroutine, public bse_util::truncate_bse_matrices ( type(cp_fm_type), intent(in)  fm_mat_s_ia_bse,
type(cp_fm_type), intent(in)  fm_mat_s_ij_bse,
type(cp_fm_type), intent(in)  fm_mat_s_ab_bse,
type(cp_fm_type), intent(inout)  fm_mat_s_trunc,
type(cp_fm_type), intent(inout)  fm_mat_s_ij_trunc,
type(cp_fm_type), intent(inout)  fm_mat_s_ab_trunc,
real(kind=dp), dimension(:)  eigenval,
real(kind=dp), dimension(:), allocatable  eigenval_reduced,
integer, intent(in)  homo,
integer, intent(in)  virtual,
integer, intent(in)  dimen_ri,
integer, intent(in)  unit_nr,
integer, intent(out)  homo_red,
integer, intent(out)  virt_red,
type(mp2_type), intent(inout)  mp2_env 
)

Determines indices within the given energy cutoffs and truncates Eigenvalues and matrices.

Parameters
fm_mat_S_ia_bse...
fm_mat_S_ij_bse...
fm_mat_S_ab_bse...
fm_mat_S_trunc...
fm_mat_S_ij_trunc...
fm_mat_S_ab_trunc...
Eigenval...
Eigenval_reduced...
homo...
virtual...
dimen_RI...
unit_nr...
homo_red...
virt_red...
mp2_env...

Definition at line 1202 of file bse_util.F.

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