librpa.hpp Source File#
|
LibRPA
|
librpa.hpp
Go to the documentation of this file.
112void init_global(Switch switch_redirect_stdout = LIBRPA_SWITCH_OFF, const char *redirect_path = "stdout",
243 void set_aux_bare_coulomb_k_2d_block(int ik, int mu_begin, int mu_end, int nu_begin, int nu_end,
317 get_exx_pot_band_k(const Options &opts, const int n_spins, const std::vector<int> &iks_band_this,
340 int i_state_low, int i_state_high, const std::vector<double> &vxc, const std::vector<double> &vexx);
355 get_g0w0_sigc_band_k(const Options &opts, const int n_spins, const std::vector<int> &iks_band_this,
void set_ao_basis_aux(const std::vector< size_t > &nbs_aux)
Set auxiliary atomic orbital basis size.
void set_latvec_and_G(const double lat_mat[9], const double G_mat[9])
Set lattice vectors and reciprocal lattice vectors.
void set_ao_basis_wfc(const std::vector< size_t > &nbs_wfc)
Set atomic orbital basis size for wavefunctions.
void set_wfc_packed(int ispin, int ik, int nstates_local, int nbasis_local, const std::complex< double > *wfc)
Set wavefunction coefficients (packed complex array).
void set_ibz_mapping(const std::vector< int > &map_ibzk)
Set mapping from full k-point grid to irreducibleBZ.
double get_rpa_correlation_energy(const Options &opts, std::vector< std::complex< double > > &rpa_corr_ibzk_contrib)
Compute RPA correlation energy.
void set_wfc(int ispin, int ik, int nstates_local, int nbasis_local, const double *wfc_real, const double *wfc_imag)
Set wavefunction coefficients (separated real/imag arrays).
void set_dielect_func_imagfreq(const std::vector< double > &omegas_imag, const std::vector< double > &dielect_func)
Set dielectric function on imaginary frequency axis.
void set_aux_cut_coulomb_k_atom_pair(int ik, int I, int J, int naux_mu, int naux_nu, const double *Vq_real_in, const double *Vq_imag_in, double vq_threshold)
Set truncated Coulomb matrix elements (atom-pair format).
void get_imaginary_frequency_grids(const Options &opts, std::vector< double > &omegas, std::vector< double > &weights)
Construct and return frequency grids.
std::vector< std::complex< double > > get_g0w0_sigc_kgrid(const Options &opts, const int n_spins, const std::vector< int > &iks_this, int i_state_low, int i_state_high, const std::vector< double > &vxc, const std::vector< double > &vexx)
Get G0W0 correlation self-energy for k-grid states.
~Handler()
Defatul destructor - automatically frees handler if not already freed.
void set_atoms(const std::vector< int > &types, const std::vector< double > &pos_cart)
Set atom types and Cartesian coordinates.
void set_lri_coeff(LibrpaParallelRouting routing, int I, int J, int nbasis_i, int nbasis_j, int naux_mu, const int R[3], const double *Cs_in)
Set local RI coefficients.
void set_scf_dimension(int nspins, int nkpts, int nstates, int nbasis)
Set SCF wavefunction dimension (numbers of spins, k-points, states, basis).
void set_aux_bare_coulomb_k_atom_pair(int ik, int I, int J, int naux_mu, int naux_nu, const double *Vq_real_in, const double *Vq_imag_in, double vq_threshold)
Set bare Coulomb matrix elements (atom-pair format).
void set_aux_cut_coulomb_k_2d_block(int ik, int mu_begin, int mu_end, int nu_begin, int nu_end, const double *Vq_real_in, const double *Vq_imag_in)
Set truncated Coulomb matrix elements (2D block format).
void set_wfc_band(int ispin, int ik_band, int nstates_local, int nbasis_local, const double *wfc_real, const double *wfc_imag)
Set wavefunction for band k-point (separated real/imag).
std::vector< std::complex< double > > get_g0w0_sigc_band_k(const Options &opts, const int n_spins, const std::vector< int > &iks_band_this, int i_state_low, int i_state_high, const std::vector< double > &vxc_band, const std::vector< double > &vexx_band)
Get G0W0 correlation self-energy for band k-points.
void set_kgrids_kvec(int nk1, int nk2, int nk3, const double *kvecs)
Set k-point grid vectors.
void build_g0w0_sigma(const Options &opts)
Build G0W0 self-energy matrix in real space.
void set_wfc_band_packed(int ispin, int ik_band, int nstates_local, int nbasis_local, const std::complex< double > *wfc)
Set wavefunction for band k-point (packed complex).
std::vector< double > get_exx_pot_kgrid(const Options &opts, const int n_spins, const std::vector< int > &iks_this, int i_state_low, int i_state_high)
Get exact-exchange potential for k-grid states.
void build_exx(const Options &opts)
Build exact-exchange matrix in real space.
const LibrpaHandler * get_c_handler() const
Get underlying C handler (for internal use).
Definition librpa.hpp:173
void set_wg_ekb_efermi(int nspins, int nkpts, int nstates, const double *wg, const double *ekb, double efermi)
Set occupation numbers, eigenvalues, and Fermi level.
void set_aux_bare_coulomb_k_2d_block(int ik, int mu_begin, int mu_end, int nu_begin, int nu_end, const double *Vq_real_in, const double *Vq_imag_in)
Set bare Coulomb matrix elements (2D block format).
void set_band_kvec(int n_kpts_band, const double *kfrac_band)
Set k-points for band structure calculations.
Handler()
Default constructor (creates null handler).
Definition librpa.hpp:164
std::vector< double > get_exx_pot_band_k(const Options &opts, const int n_spins, const std::vector< int > &iks_band_this, int i_state_low, int i_state_high)
Get exact-exchange potential for band k-points.
Handler(MPI_Comm comm)
Construct and initialize handler with MPI communicator.
void set_band_occ_eigval(int n_spins, int n_kpts_band, int n_states, const double *occ, const double *eig)
Set occupation numbers and eigenvalues for band k-points.
void set_output_dir(const char *output_dir)
Set output directory.
Definition librpa.hpp:68
Enumeration types and constants for LibRPA.
#define LIBRPA_SWITCH_OFF
Switch value for disabled/off state (equivalent to false).
Definition librpa_enums.h:23
#define LIBRPA_SWITCH_ON
Switch value for enabled/on state (equivalent to true).
Definition librpa_enums.h:26
LibrpaParallelRouting
Parallel routing strategy for distributed memory calculations.
Definition librpa_enums.h:58
LibrpaTimeFreqGrid
Type of time or frequency grid for integration.
Definition librpa_enums.h:76
Handler management for LibRPA instances.
Runtime options for LibRPA calculations.
void librpa_set_output_dir(LibrpaOptions *opts, const char *output_dir)
Set the output directory for LibRPA results.
void librpa_init_options(LibrpaOptions *opts)
Initialize runtime options to default values.
void init_global(Switch switch_redirect_stdout=LIBRPA_SWITCH_OFF, const char *redirect_path="stdout", Switch switch_process_output=LIBRPA_SWITCH_ON)
Initialize the global LibRPA environment.
LibrpaParallelRouting ParallelRouting
Parallel routing strategy (C++ alias).
Definition librpa.hpp:35
LibrpaTimeFreqGrid TimeFreqGrid
Time/frequency grid type (C++ alias)
Definition librpa.hpp:37
char output_dir[LIBRPA_MAX_STRLEN]
Output directory.
Definition librpa_options.h:39
Generated by