librpa_compute.h File Reference

librpa_compute.h File Reference#

LibRPA: librpa_compute.h File Reference
LibRPA
librpa_compute.h File Reference

Computing data APIs for LibRPA. More...

#include "librpa_handler.h"
#include "librpa_options.h"
Include dependency graph for librpa_compute.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void librpa_get_imaginary_frequency_grids (LibrpaHandler *h, const LibrpaOptions *p_opts, double *omegas, double *weights)
 Construct and return frequency grids for numerical integration.
 
double librpa_get_rpa_correlation_energy (LibrpaHandler *h, const LibrpaOptions *p_opts, int n_ibz_kpoints, double *rpa_corr_ibzk_contrib_re, double *rpa_corr_ibzk_contrib_im)
 Compute RPA correlation energy.
 
void librpa_build_exx (LibrpaHandler *h, const LibrpaOptions *p_opts)
 Build exact-exchange matrix.
 
void librpa_get_exx_pot_kgrid (LibrpaHandler *h, const LibrpaOptions *p_opts, const int n_spins, const int n_kpts_this, const int *iks_this, int i_state_low, int i_state_high, double *vexx)
 Obtain exact-exchange potential for selected states.
 
void librpa_get_exx_pot_band_k (LibrpaHandler *h, const LibrpaOptions *p_opts, const int n_spins, const int n_kpts_band_this, const int *iks_band_this, int i_state_low, int i_state_high, double *vexx_band)
 Obtain exact-exchange potential for selected states at band k-points.
 
void librpa_build_g0w0_sigma (LibrpaHandler *h, const LibrpaOptions *p_opts)
 Build self-energy matrix of G0W0, including the correlation and exchange contributions.
 
void librpa_get_g0w0_sigc_kgrid (LibrpaHandler *h, const LibrpaOptions *p_opts, const int n_spins, const int n_kpts_this, const int *iks_this, int i_state_low, int i_state_high, const double *vxc, const double *vexx, double *sigc_re, double *sigc_im)
 Obtain correlation self-energies for selected states.
 
void librpa_get_g0w0_sigc_band_k (LibrpaHandler *h, const LibrpaOptions *p_opts, const int n_spins, const int n_kpts_band_this, const int *iks_band_this, int i_state_low, int i_state_high, const double *vxc_band, const double *vexx_band, double *sigc_band_re, double *sigc_band_im)
 Obtain correlation self-energies for selected states at band k-points.
 

Detailed Description

Computing data APIs for LibRPA.

Function Documentation

◆ librpa_build_exx()

void librpa_build_exx ( LibrpaHandler * h,
const LibrpaOptions * p_opts )

Build exact-exchange matrix.

Parameters
[in]hPointer to LibRPA handler.
[in]optsPointer to runtime options.

◆ librpa_build_g0w0_sigma()

void librpa_build_g0w0_sigma ( LibrpaHandler * h,
const LibrpaOptions * p_opts )

Build self-energy matrix of G0W0, including the correlation and exchange contributions.

Parameters
[in]hPointer to LibRPA handler.
[in]optsPointer to runtime options.

◆ librpa_get_exx_pot_band_k()

void librpa_get_exx_pot_band_k ( LibrpaHandler * h,
const LibrpaOptions * p_opts,
const int n_spins,
const int n_kpts_band_this,
const int * iks_band_this,
int i_state_low,
int i_state_high,
double * vexx_band )

Obtain exact-exchange potential for selected states at band k-points.

Parameters
[in]hPointer to LibRPA handler.
[in]optsPointer to runtime options.
[in]n_spinsNumber of spin channels.
[in]n_kpts_band_thisNumber of k-points to compute on this process.
[in]iks_band_this(Global) index of k-points that this process compute. Each process can have different indices. Must be a subset of band k-points at which the eigenvetors are parsed.
[in]i_state_lowIndex of the first state to compute the potential (inclusive)
[in]i_state_highIndex of the last state to compute the potential (exclusive)
[out]vexx_bandExact-exchange potential for selected states at band k-points. It should be at least as long as n_spins * n_kpts_band_this * (i_state_high - i_state_low).

◆ librpa_get_exx_pot_kgrid()

void librpa_get_exx_pot_kgrid ( LibrpaHandler * h,
const LibrpaOptions * p_opts,
const int n_spins,
const int n_kpts_this,
const int * iks_this,
int i_state_low,
int i_state_high,
double * vexx )

Obtain exact-exchange potential for selected states.

Parameters
[in]hPointer to LibRPA handler.
[in]optsPointer to runtime options.
[in]n_spinsNumber of spin channels.
[in]n_kpts_thisNumber of k-points to compute on this process.
[in]iks_this(Global) index of k-points that this process compute. Each process can have different indices. Must be a subset of k-points at which the eigenvetors are parsed.
[in]i_state_lowIndex of the first state to compute the potential (inclusive)
[in]i_state_highIndex of the last state to compute the potential (exclusive)
[out]vexxExact-exchange potential for selected states. It should be at least as long as n_spins * n_kpts_local * (i_state_high - i_state_low).

◆ librpa_get_g0w0_sigc_band_k()

void librpa_get_g0w0_sigc_band_k ( LibrpaHandler * h,
const LibrpaOptions * p_opts,
const int n_spins,
const int n_kpts_band_this,
const int * iks_band_this,
int i_state_low,
int i_state_high,
const double * vxc_band,
const double * vexx_band,
double * sigc_band_re,
double * sigc_band_im )

Obtain correlation self-energies for selected states at band k-points.

Parameters
[in]hPointer to LibRPA handler.
[in]optsPointer to runtime options.
[in]n_spinsNumber of spin channels.
[in]n_kpts_band_thisNumber of k-points to compute on this process.
[in]iks_band_this(Global) index of k-points that this process compute. Each process can have different indices. Must be a subset of k-points at which the eigenvetors are parsed.
[in]i_state_lowIndex of the first state to compute the potential (inclusive)
[in]i_state_highIndex of the last state to compute the potential (exclusive)
[in]vxc_bandexchange-correlation potential of the selected states at band k-points.
[in]vexx_bandExact-exchange potential for the selected states at band k-points. It should be at least as long as n_spins * n_kpts_band_this * (i_state_high - i_state_low). It can be obtained using librpa_get_exx_pot_kgrid.
[out]sigc_band_reReal-part of the correlation self-energy for the selected states. It should be at least as long as n_spins * n_kpts_band_this * (i_state_high - i_state_low).
[out]sigc_band_imSame as sigc_band_re, but for the imaginary part.

◆ librpa_get_g0w0_sigc_kgrid()

void librpa_get_g0w0_sigc_kgrid ( LibrpaHandler * h,
const LibrpaOptions * p_opts,
const int n_spins,
const int n_kpts_this,
const int * iks_this,
int i_state_low,
int i_state_high,
const double * vxc,
const double * vexx,
double * sigc_re,
double * sigc_im )

Obtain correlation self-energies for selected states.

Parameters
[in]hPointer to LibRPA handler.
[in]optsPointer to runtime options.
[in]n_spinsNumber of spin channels.
[in]n_kpts_thisNumber of k-points to compute on this process.
[in]iks_this(Global) index of k-points that this process compute. Each process can have different indices. Must be a subset of k-points at which the eigenvetors are parsed.
[in]i_state_lowIndex of the first state to compute the potential (inclusive)
[in]i_state_highIndex of the last state to compute the potential (exclusive)
[in]vxcexchange-correlation potential of the selected states.
[in]vexxExact-exchange potential for the selected states. It should be at least as long as n_spins * n_kpoints_local * (i_state_high - i_state_low). It can be obtained using librpa_get_exx_pot_kgrid.
[out]sigc_reReal-part of the correlation self-energy for the selected states. It should be at least as long as n_spins * n_kpoints_local * (i_state_high - i_state_low).
[out]sigc_imSame as sigc_re, but for the imaginary part.

◆ librpa_get_imaginary_frequency_grids()

void librpa_get_imaginary_frequency_grids ( LibrpaHandler * h,
const LibrpaOptions * p_opts,
double * omegas,
double * weights )

Construct and return frequency grids for numerical integration.

Generates the frequency points and quadrature weights based on the grid type specified in the options (e.g., Gauss-Legendre, Minimax, etc.).

Parameters
[in]hHandler.
[in]p_optsRuntime options.
[out]omegasArray of frequency points (size: opts->nfreq).
[out]weightsArray of quadrature weights (size: opts->nfreq).

◆ librpa_get_rpa_correlation_energy()

double librpa_get_rpa_correlation_energy ( LibrpaHandler * h,
const LibrpaOptions * p_opts,
int n_ibz_kpoints,
double * rpa_corr_ibzk_contrib_re,
double * rpa_corr_ibzk_contrib_im )

Compute RPA correlation energy.

Calculates the RPA correlation energy using the input data (wavefunctions, Coulomb matrices, etc.) that has been set via the input parsing functions.

Parameters
[in]hHandler.
[in]p_optsRuntime options.
[in]n_ibz_kpointsNumber of irreducible k-points.
[out]rpa_corr_ibzk_contrib_reReal part of correlation energy per IBZ k-point.
[out]rpa_corr_ibzk_contrib_imImaginary part of correlation energy per IBZ k-point.
Returns
Total RPA correlation energy (real part).