librpa_compute.h File Reference#
|
LibRPA
|
Computing data APIs for LibRPA. More...
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_qpe_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, double *eqp) |
| Obtain correlation self-energies and QP energies for selected states. | |
| void | librpa_get_g0w0_spectral_function_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 int n_omegas, const double *omegas, const double *vxc, const double *vexx, double *spectral_function, double *sigc) |
| Obtain spectral functions for selected k-grid 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. | |
| void | librpa_get_g0w0_qpe_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, double *eqp_band) |
| Obtain correlation self-energies and QP energies for selected band-k states. | |
| void | librpa_get_g0w0_spectral_function_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 int n_omegas, const double *omegas, const double *vxc_band, const double *vexx_band, double *spectral_function_band, double *sigc_band) |
| Obtain spectral functions for selected band-k states. | |
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] h Pointer to LibRPA handler. [in] p_opts Pointer 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] h Pointer to LibRPA handler. [in] p_opts Pointer 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] h Pointer to LibRPA handler. [in] p_opts Pointer to runtime options. [in] n_spins Number of spin channels. [in] n_kpts_band_this Number 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_low Index of the first state to compute the potential (inclusive) [in] i_state_high Index of the last state to compute the potential (exclusive) [out] vexx_band Exact-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] h Pointer to LibRPA handler. [in] p_opts Pointer to runtime options. [in] n_spins Number of spin channels. [in] n_kpts_this Number 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_low Index of the first state to compute the potential (inclusive) [in] i_state_high Index of the last state to compute the potential (exclusive) [out] vexx Exact-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_qpe_band_k()
| void librpa_get_g0w0_qpe_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, | ||
| double * | eqp_band ) |
Obtain correlation self-energies and QP energies for selected band-k states.
Same inputs and SigC outputs as librpa_get_g0w0_sigc_band_k. If p_opts->use_hedin_shift is enabled, the QP solver evaluates
\[\Sigma_c(E - E_F - \Delta). \]
If p_opts->istate_ref_hedin_shift is negative, Delta is computed separately for each selected band state. Otherwise, that absolute zero-based reference state at each band k-point and spin provides Delta for all states in the same channel.
- Parameters
-
[in] h LibRPA handler. [in] p_opts Runtime options. [in] n_spins Number of spin channels. [in] n_kpts_band_this Number of band k-points computed on this process. [in] iks_band_this Global indices of those band k-points. [in] i_state_low First state index (inclusive). [in] i_state_high Last state index (exclusive). [in] vxc_band XC potential for the selected band states. [in] vexx_band Exact-exchange potential for the selected band states. [out] sigc_band_re Real part of the correlation self-energy. [out] sigc_band_im Imaginary part of the correlation self-energy. [out] eqp_band Quasi-particle energy solved by the selected QPE solver. It should be at least as long as sigc_band_re/sigc_band_im.
◆ librpa_get_g0w0_qpe_kgrid()
| void librpa_get_g0w0_qpe_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, | ||
| double * | eqp ) |
Obtain correlation self-energies and QP energies for selected states.
Same inputs and SigC outputs as librpa_get_g0w0_sigc_kgrid. If p_opts->use_hedin_shift is enabled, the QP solver evaluates
\[\Sigma_c(E - E_F - \Delta). \]
If p_opts->istate_ref_hedin_shift is negative, Delta is computed separately for each selected state. Otherwise, that absolute zero-based reference state at each k-point and spin provides Delta for all states in the same channel.
- Parameters
-
[in] h LibRPA handler. [in] p_opts Runtime options. [in] n_spins Number of spin channels. [in] n_kpts_this Number of k-points computed on this process. [in] iks_this Global indices of those k-points. [in] i_state_low First state index (inclusive). [in] i_state_high Last state index (exclusive). [in] vxc XC potential for the selected states. [in] vexx Exact-exchange potential for the selected states. [out] sigc_re Real part of the correlation self-energy. [out] sigc_im Imaginary part of the correlation self-energy. [out] eqp Quasi-particle energy solved by the selected QPE solver. It should be at least as long as sigc_re/sigc_im.
◆ 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] h Pointer to LibRPA handler. [in] p_opts Pointer to runtime options. [in] n_spins Number of spin channels. [in] n_kpts_band_this Number 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_low Index of the first state to compute the potential (inclusive) [in] i_state_high Index of the last state to compute the potential (exclusive) [in] vxc_band exchange-correlation potential of the selected states at band k-points. [in] vexx_band Exact-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_re Real-part of the correlation self-energy for the selected states. For option_qpe_solver=2, this is the perturbative effective real contribution that reconstructs the perturbative QP energy. It should be at least as long as n_spins * n_kpts_band_this * (i_state_high - i_state_low). [out] sigc_band_im Same 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] h Pointer to LibRPA handler. [in] p_opts Pointer to runtime options. [in] n_spins Number of spin channels. [in] n_kpts_this Number 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_low Index of the first state to compute the potential (inclusive) [in] i_state_high Index of the last state to compute the potential (exclusive) [in] vxc exchange-correlation potential of the selected states. [in] vexx Exact-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_re Real-part of the correlation self-energy for the selected states. For option_qpe_solver=2, this is the perturbative effective real contribution that reconstructs the perturbative QP energy. It should be at least as long as n_spins * n_kpoints_local * (i_state_high - i_state_low). [out] sigc_im Same as sigc_re, but for the imaginary part.
◆ librpa_get_g0w0_spectral_function_band_k()
| void librpa_get_g0w0_spectral_function_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 int | n_omegas, | ||
| const double * | omegas, | ||
| const double * | vxc_band, | ||
| const double * | vexx_band, | ||
| double * | spectral_function_band, | ||
| double * | sigc_band ) |
Obtain spectral functions for selected band-k states.
Same convention as librpa_get_g0w0_spectral_function_kgrid, but evaluates states at band k-points.
- Parameters
-
[in] h Pointer to LibRPA handler. [in] p_opts Pointer to runtime options. [in] n_spins Number of spin channels. [in] n_kpts_band_this Number of band k-points to compute on this process. [in] iks_band_this Global band-k indices computed on this process. [in] i_state_low First state index (inclusive). [in] i_state_high Last state index (exclusive). [in] n_omegas Number of real-frequency points. [in] omegas Real-frequency points, in Hartree. [in] vxc_band XC potential for selected band states. [in] vexx_band Exact-exchange potential for selected band states. [out] spectral_function_band Spectral functions. This output array should be at least as long as n_spins * n_kpts_band_this * (i_state_high - i_state_low) * n_omegas. The order is [spin][band k-point][state][omega]. [out] sigc_band Optional continued correlation self-energy. Pass nullptr if this output is not needed. If present, this is a packed complex<double> buffer with the same [spin][band k-point][state][omega] order as spectral_function_band.
◆ librpa_get_g0w0_spectral_function_kgrid()
| void librpa_get_g0w0_spectral_function_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 int | n_omegas, | ||
| const double * | omegas, | ||
| const double * | vxc, | ||
| const double * | vexx, | ||
| double * | spectral_function, | ||
| double * | sigc ) |
Obtain spectral functions for selected k-grid states.
Computes spectral functions under the diagonal approximation of the Green's function: \(A_{n\mathbf{k}}(\omega) = -\pi^{-1}\mathrm{Im}\,G_{n\mathbf{k}}(\omega)\).
- Parameters
-
[in] h Pointer to LibRPA handler. [in] p_opts Pointer to runtime options. [in] n_spins Number of spin channels. [in] n_kpts_this Number of k-points to compute on this process. [in] iks_this Global k-point indices computed on this process. [in] i_state_low First state index (inclusive). [in] i_state_high Last state index (exclusive). [in] n_omegas Number of real-frequency points. [in] omegas Real-frequency points, in Hartree. [in] vxc XC potential for selected states. [in] vexx Exact-exchange potential for selected states. [out] spectral_function Spectral functions. This output array should be at least as long as n_spins * n_kpts_this * (i_state_high - i_state_low) * n_omegas. The order is [spin][k-point][state][omega]. [out] sigc Optional continued correlation self-energy. Pass nullptr if this output is not needed. If present, this is a packed complex<double> buffer with the same [spin][k-point][state][omega] order as spectral_function.
◆ 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] h Handler. [in] p_opts Runtime options. [out] omegas Array of frequency points (size: opts->nfreq). [out] weights Array 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] h Handler. [in] p_opts Runtime options. [in] n_ibz_kpoints Number of irreducible k-points. [out] rpa_corr_ibzk_contrib_re Real part of correlation energy per IBZ k-point. [out] rpa_corr_ibzk_contrib_im Imaginary part of correlation energy per IBZ k-point.
- Returns
- Total RPA correlation energy (real part).
Generated by