(git:f2099e5)
Loading...
Searching...
No Matches
bse_util.F File Reference

Go to the source code of this file.

Modules

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

Functions/Subroutines

pure integer function, public bse_util::ia_of_occ_virt (i_occ, a_virt, virt)
 Compound transition index ia = (i-1)*virt + a of the pair (i, a): a is the fast index.
pure integer function, public bse_util::occ_of_ia (ia, virt)
 Occupied level of the compound transition index ia = (i-1)*virt + a.
pure integer function, public bse_util::virt_of_ia (ia, virt)
 Virtual level of the compound transition index ia = (i-1)*virt + a.
subroutine, public bse_util::screen_slabs (fm_eps_inv, fm_s_ij, fm_s_ia, dimen_ri_red, homo, virtual, fm_s_bar_ij, fm_s_bar_ia)
 The screened slabs \bar{B}^P_ij = sum_Q [1+Q(0)]^-1_PQ B^Q_ij and \bar{B}^P_ia = sum_Q [1+Q(0)]^-1_PQ B^Q_ia, P, Q ≤ dimen_RI_red.
subroutine, public bse_util::fm_general_add_bse (fm_out, fm_in, beta, nrow_secidx_in, ncol_secidx_in, nrow_secidx_out, ncol_secidx_out, unit_nr, reordering, bse_env, row_offset, col_offset)
 Adds and reorders full matrices with a combined index structure, e.g. adding W_ij,ab to A_ia, jb which needs MPI communication.
subroutine, public bse_util::truncate_fm (fm_out, fm_in, ncol_in, nrow_out, ncol_out, unit_nr, debug_print, 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 bse_util::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 bse_util::sort_excitations (idx_prim, idx_sec, eigvec_entries, idx_spin)
 Sorts excitation entries by ascending primary index, reordering the secondary index, the eigenvector coefficients and - open shell - the spin index alongside.
subroutine, public bse_util::estimate_bse_resources (n_ov_joint, unit_nr, bse_abba, para_env, diag_runtime_est)
 Roughly estimates the needed runtime and memory during the BSE run.
pure real(kind=dp) function, public bse_util::fulldiag_memory_estimate_gb (n_ov_joint, do_abba)
 Peak memory of the full diagonalization in GB, all ranks together: n_ov^2 doubles times the matrices held at once, 2 for TDA (A and W_ijab), 10 for ABBA (B, C and the six that build C added).
subroutine, public bse_util::filter_eigvec_contrib (fm_eigvec, idx_homo, idx_virt, eigvec_entries, i_exc, virtual, num_entries, bse_env, offsets, virtual_per_spin, idx_spin)
 Filters eigenvector entries above a given threshold to describe excitations in the singleparticle basis.
subroutine, public bse_util::get_bse_spin_block_layout (homo_red, virt_red, n_ov, offsets, n_ov_joint)
 Spin-block layout for the open-shell (joint) BSE matrix: per-spin OV-pair counts and the block offsets into the joint matrix of dimension n_ov_joint = sum_sigma homo*virtual.
subroutine, public bse_util::bse_window_from_dft (eigenval_scf, n_mo, homo, cutoff_occ, cutoff_empty, window, warn)
 The active MO window on the DFT axis: one absolute MO range for every spin; when the spin windows differ, the smallest range covering all of them.
subroutine, public bse_util::bse_window_from_mos (mos, cutoff_occ, cutoff_empty, window, warn)
 The active MO window of bse_window_from_dft, from the DFT eigenvalues of the MO sets.
subroutine, public bse_util::truncate_bse_matrices (fm_s_ia_full, fm_s_ij_full, fm_s_ab_full, eigenval_scf, eigenval, eigenval_reduced_scf, eigenval_reduced_qp, homo, virtual, dimen_ri, unit_nr, ispin, bse_env, window, print_window)
 Determines indices within the given energy cutoffs and truncates Eigenvalues and matrices.
subroutine, public bse_util::reshuffle_eigvec (fm_eigvec, fm_eigvec_reshuffled, homo, virtual, n_exc, do_transpose, unit_nr, bse_env)
 ...
subroutine, public bse_util::print_bse_nto_cubes (bse_env, mos, istate, info_approximation, stride, append_cube, print_section)
 Borrowed from the tddfpt module with slight adaptions.
subroutine, public bse_util::adapt_bse_input_params (homo, virtual, unit_nr, bse_env)
 Checks BSE input section and adapts them if necessary.
subroutine, public bse_util::get_multipoles_mo (fm_multipole_ai_trunc, fm_multipole_ij_trunc, fm_multipole_ab_trunc, matrix_multipole, mos, mo_coeff, homo_red, virtual_red, context_bse, ispin)
 The multipoles in the MO window, D^k_pq = sum_µν C_µp M^k_µν C_νq, cut to the ai, ij and ab blocks of the window; M^k_µν are the AO multipoles of get_multipoles_ao.
subroutine, public bse_util::trace_exciton_descr (fm_a, fm_b, fm_c, alpha)
 Computes trace of form Tr{A^T B C} for exciton descriptors.
subroutine, public bse_util::assemble_joint_ov_slab (fm_s_ia, offsets, n_ov, dimen_ri, fm_s_joint)
 Column-concatenate per-spin ia-slabs into the joint dimen_RI x n_ov_joint slab. Sigma-block of spin isp occupies columns offsets(isp)+1 .. offsets(isp)+n_ov(isp). fm_S_joint must be pre-created and zeroed by the caller.