librpa_input.h File Reference

librpa_input.h File Reference#

LibRPA: librpa_input.h File Reference
LibRPA
librpa_input.h File Reference

Input data APIs for LibRPA. More...

#include <stddef.h>
#include "librpa_enums.h"
#include "librpa_handler.h"
Include dependency graph for librpa_input.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void librpa_set_scf_dimension (LibrpaHandler *h, int nspins, int nkpts, int nstates, int nbasis)
 Set SCF wavefunction dimension.
 
void librpa_set_wg_ekb_efermi (LibrpaHandler *h, int nspins, int nkpts, int nstates, const double *wg, const double *ekb, double efermi)
 Set occupation numbers, eigenvalues, and Fermi level.
 
void librpa_set_wfc (LibrpaHandler *h, int ispin, int ik, int nstates_local, int nbasis_local, const double *wfc_real, const double *wfc_imag)
 Set wavefunction coefficients (real/imag separate arrays).
 
void librpa_set_wfc_packed (LibrpaHandler *h, int ispin, int ik, int nstates_local, int nbasis_local, const double *wfc_ri)
 Set wavefunction coefficients (packed complex array).
 
void librpa_set_ao_basis_wfc (LibrpaHandler *h, int natoms, const size_t *nbs_wfc)
 Set atomic orbital basis size for wavefunctions.
 
void librpa_set_ao_basis_aux (LibrpaHandler *h, int natoms, const size_t *nbs_aux)
 Set auxiliary atomic orbital basis size.
 
void librpa_set_latvec_and_G (LibrpaHandler *h, const double lat_mat[9], const double G_mat[9])
 Set direct and reciprocal lattice vectors.
 
void librpa_set_atoms (LibrpaHandler *h, int natoms, const int *types, const double *posi_cart)
 Set atom types and Cartesian coordinates.
 
void librpa_set_kgrids_kvec (LibrpaHandler *h, int nk1, int nk2, int nk3, const double *kvecs)
 Set k-point grid vectors.
 
void librpa_set_ibz_mapping (LibrpaHandler *h, int nkpts, const int *map_ibzk)
 Set the mapping from full k-point list to the irreducible sector.
 
void librpa_set_lri_coeff (LibrpaHandler *h, 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 librpa_set_aux_bare_coulomb_k_atom_pair (LibrpaHandler *h, 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 librpa_set_aux_cut_coulomb_k_atom_pair (LibrpaHandler *h, 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 librpa_set_aux_bare_coulomb_k_2d_block (LibrpaHandler *h, 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 librpa_set_aux_cut_coulomb_k_2d_block (LibrpaHandler *h, 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 librpa_set_dielect_func_imagfreq (LibrpaHandler *h, int nfreq, const double *omegas_imag, const double *dielect_func)
 Set dielectric function on imaginary frequency axis.
 
void librpa_set_band_kvec (LibrpaHandler *h, int n_kpts_band, const double *kfrac_band)
 Set k-points for band structure calculations.
 
void librpa_set_band_occ_eigval (LibrpaHandler *h, 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 librpa_set_wfc_band (LibrpaHandler *h, 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 (separate real/imag).
 
void librpa_set_wfc_band_packed (LibrpaHandler *h, int ispin, int ik_band, int nstates_local, int nbasis_local, const double *wfc_ri)
 Set wavefunction for band k-point (packed complex).
 
void librpa_reset_band_data (LibrpaHandler *h)
 Reset band structure input data.
 

Detailed Description

Input data APIs for LibRPA.

Function Documentation

◆ librpa_reset_band_data()

void librpa_reset_band_data ( LibrpaHandler * h)

Reset band structure input data.

Parameters
hHandler.

◆ librpa_set_ao_basis_aux()

void librpa_set_ao_basis_aux ( LibrpaHandler * h,
int natoms,
const size_t * nbs_aux )

Set auxiliary atomic orbital basis size.

Parameters
[in]hHandler.
[in]natomsNumber of atoms.
[in]nbs_auxNumber of auxiliary basis functions per atom.

◆ librpa_set_ao_basis_wfc()

void librpa_set_ao_basis_wfc ( LibrpaHandler * h,
int natoms,
const size_t * nbs_wfc )

Set atomic orbital basis size for wavefunctions.

Parameters
[in]hHandler.
[in]natomsNumber of atoms.
[in]nbs_wfcNumber of basis functions per atom.

◆ librpa_set_atoms()

void librpa_set_atoms ( LibrpaHandler * h,
int natoms,
const int * types,
const double * posi_cart )

Set atom types and Cartesian coordinates.

Parameters
[in]hHandler.
[in]natomsNumber of atoms.
[in]typesAtom types (species indices, 0-based).
[in]pos_cartCartesian coordinates (3*natoms, in Bohr).

◆ librpa_set_aux_bare_coulomb_k_2d_block()

void librpa_set_aux_bare_coulomb_k_2d_block ( LibrpaHandler * h,
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).

Parameters
hHandler.
ikK-point index.
mu_beginStarting index for mu.
mu_endEnding index for mu.
nu_beginStarting index for nu.
nu_endEnding index for nu.
Vq_real_inReal part of Coulomb matrix.
Vq_imag_inImaginary part of Coulomb matrix.

◆ librpa_set_aux_bare_coulomb_k_atom_pair()

void librpa_set_aux_bare_coulomb_k_atom_pair ( LibrpaHandler * h,
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).

Parameters
hHandler.
ikK-point index.
IAtom I index.
JAtom J index.
naux_muNumber of auxiliary functions for mu.
naux_nuNumber of auxiliary functions for nu.
Vq_real_inReal part of Coulomb matrix.
Vq_imag_inImaginary part of Coulomb matrix.
vq_thresholdThreshold for screening.

◆ librpa_set_aux_cut_coulomb_k_2d_block()

void librpa_set_aux_cut_coulomb_k_2d_block ( LibrpaHandler * h,
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).

Parameters
hHandler.
ikK-point index.
mu_beginStarting index for mu.
mu_endEnding index for mu.
nu_beginStarting index for nu.
nu_endEnding index for nu.
Vq_real_inReal part of Coulomb matrix.
Vq_imag_inImaginary part of Coulomb matrix.

◆ librpa_set_aux_cut_coulomb_k_atom_pair()

void librpa_set_aux_cut_coulomb_k_atom_pair ( LibrpaHandler * h,
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).

Parameters
hHandler.
ikK-point index.
IAtom I index.
JAtom J index.
naux_muNumber of auxiliary functions for mu.
naux_nuNumber of auxiliary functions for nu.
Vq_real_inReal part of Coulomb matrix.
Vq_imag_inImaginary part of Coulomb matrix.
vq_thresholdThreshold for screening.

◆ librpa_set_band_kvec()

void librpa_set_band_kvec ( LibrpaHandler * h,
int n_kpts_band,
const double * kfrac_band )

Set k-points for band structure calculations.

Parameters
hHandler.
n_kpts_bandNumber of band k-points.
kfrac_bandBand k-point coordinates (fractional).

◆ librpa_set_band_occ_eigval()

void librpa_set_band_occ_eigval ( LibrpaHandler * h,
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.

Parameters
hHandler.
n_spinsNumber of spin channels.
n_kpts_bandNumber of band k-points.
n_statesNumber of states.
occOccupation numbers.
eigEigenvalues.

◆ librpa_set_dielect_func_imagfreq()

void librpa_set_dielect_func_imagfreq ( LibrpaHandler * h,
int nfreq,
const double * omegas_imag,
const double * dielect_func )

Set dielectric function on imaginary frequency axis.

Parameters
hHandler.
nfreqNumber of frequency points.
omegas_imagImaginary frequency values.
dielectric_funcDielectric function values.

◆ librpa_set_ibz_mapping()

void librpa_set_ibz_mapping ( LibrpaHandler * h,
int nkpts,
const int * map_ibzk )

Set the mapping from full k-point list to the irreducible sector.

Parameters
hHandler.
nkptsNumber of k-points in the full Brillouin zone.
map_ibzkMapping to the k-point in the irreducible sector (0-based).

Example: four-k-point case where the first two and last points are in the irreducible sector, and the third point is mapped to the second, then map_ibzk should be (0, 1, 1, 3).

◆ librpa_set_kgrids_kvec()

void librpa_set_kgrids_kvec ( LibrpaHandler * h,
int nk1,
int nk2,
int nk3,
const double * kvecs )

Set k-point grid vectors.

Parameters
[in]hHandler.
[in]nk1Number of k-points along direction 1.
[in]nk2Number of k-points along direction 2.
[in]nk3Number of k-points along direction 3.
[in]kvecsK-point vectors (nk1*nk2*nk3, Cartesian coordinates, in Bohr^-1).

◆ librpa_set_latvec_and_G()

void librpa_set_latvec_and_G ( LibrpaHandler * h,
const double lat_mat[9],
const double G_mat[9] )

Set direct and reciprocal lattice vectors.

Parameters
[in]hHandler.
[in]lat_matLattice vectors (3x3, column-major, in Bohr).
[in]G_matReciprocal lattice vectors (3x3, column-major, in Bohr^-1).

◆ librpa_set_lri_coeff()

void librpa_set_lri_coeff ( LibrpaHandler * h,
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.

Parameters
hHandler.
routingParallel routing strategy.
IAtom I index (0-based).
JAtom J index (0-based).
nbasis_iNumber of basis functions on atom I.
nbasis_jNumber of basis functions on atom J.
naux_muNumber of auxiliary functions for mu index.
RLattice vector [R1, R2, R3].
Cs_inRI triple coefficients.

◆ librpa_set_scf_dimension()

void librpa_set_scf_dimension ( LibrpaHandler * h,
int nspins,
int nkpts,
int nstates,
int nbasis )

Set SCF wavefunction dimension.

Parameters
[in]hHandler.
[in]nspinsNumber of spin channels.
[in]nkptsNumber of k-points.
[in]nstatesNumber of electronic states.
[in]nbasisNumber of basis functions.

◆ librpa_set_wfc()

void librpa_set_wfc ( LibrpaHandler * h,
int ispin,
int ik,
int nstates_local,
int nbasis_local,
const double * wfc_real,
const double * wfc_imag )

Set wavefunction coefficients (real/imag separate arrays).

Parameters
[in]hHandler.
[in]ispinSpin index (0-based).
[in]ikK-point index (0-based).
[in]nstates_localLocal number of states.
[in]nbasis_localLocal number of basis functions.
[in]wfc_realReal part of wavefunction coefficients.
[in]wfc_imagImaginary part of wavefunction coefficients.

◆ librpa_set_wfc_band()

void librpa_set_wfc_band ( LibrpaHandler * h,
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 (separate real/imag).

Parameters
hHandler.
ispinSpin index.
ik_bandBand k-point index.
nstates_localLocal number of states.
nbasis_localLocal number of basis functions.
wfc_realReal part of wavefunction.
wfc_imagImaginary part of wavefunction.

◆ librpa_set_wfc_band_packed()

void librpa_set_wfc_band_packed ( LibrpaHandler * h,
int ispin,
int ik_band,
int nstates_local,
int nbasis_local,
const double * wfc_ri )

Set wavefunction for band k-point (packed complex).

Parameters
hHandler.
ispinSpin index.
ik_bandBand k-point index.
nstates_localLocal number of states.
nbasis_localLocal number of basis functions.
wfc_riComplex wavefunction (packed).

◆ librpa_set_wfc_packed()

void librpa_set_wfc_packed ( LibrpaHandler * h,
int ispin,
int ik,
int nstates_local,
int nbasis_local,
const double * wfc_ri )

Set wavefunction coefficients (packed complex array).

Parameters
[in]hHandler.
[in]ispinSpin index (0-based).
[in]ikK-point index (0-based).
[in]nstates_localLocal number of states.
[in]nbasis_localLocal number of basis functions.
[in]wfc_riComplex wavefunction coefficients (packed).

◆ librpa_set_wg_ekb_efermi()

void librpa_set_wg_ekb_efermi ( LibrpaHandler * h,
int nspins,
int nkpts,
int nstates,
const double * wg,
const double * ekb,
double efermi )

Set occupation numbers, eigenvalues, and Fermi level.

Parameters
[in]hHandler.
[in]nspinsNumber of spin channels.
[in]nkptsNumber of k-points.
[in]nstatesNumber of electronic states.
[in]wgOccupation numbers (size: nspins * nkpts * nstates).
[in]ekbEigenvalues (size: same as wg).
[in]efermiFermi level.