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, int nspinor=1)
 Set meanfield 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 of meanfield input.
 
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_spinor (LibrpaHandler *h, int ik, int nstates_local, int nbasis_local, const double *wfc_up_real, const double *wfc_up_imag, const double *wfc_dn_real, const double *wfc_dn_imag)
 Set wavefunction coefficients of spinor format (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_wfc_spinor_packed (LibrpaHandler *h, int ik, int nstates_local, int nbasis_local, const double *wfc_up_ri, const double *wfc_dn_ri)
 Set wavefunction coefficients (packed complex array).
 
void librpa_set_ao_basis_wfc (LibrpaHandler *h, int natoms, const size_t *nbs_wfc, const int *nshells=nullptr, const int *l_shells=nullptr)
 Set atomic orbital basis size for wavefunctions.
 
void librpa_set_ao_basis_aux (LibrpaHandler *h, int natoms, const size_t *nbs_aux, const int *nshells=nullptr, const int *l_shells=nullptr)
 Set auxiliary atomic orbital basis size.
 
void librpa_set_ao_basis_aux_shrink (LibrpaHandler *h, int natoms, const size_t *nbs_aux_shrink, const int *nshells=nullptr, const int *l_shells=nullptr)
 Set shrink auxiliary atomic orbital basis size.
 
void librpa_set_basis_convention (LibrpaHandler *h, int bloch_phase, int bloch_ratom, LibrpaAngularOrder order, LibrpaRshCoeff nega_m, LibrpaRshCoeff posi_m)
 Set basis convention metadata used by symmetry-based reductions.
 
void librpa_set_symmetry_operations (LibrpaHandler *h, int n_symops, int row_conv, const int *rotmats, const double *trans)
 Set real-space symmetry operations.
 
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, int nkpts, const double *kvecs, const double *kweights)
 Set k-point grid vectors.
 
void librpa_set_kq_mapping (LibrpaHandler *h, int nkpts, const int *map_q_ks)
 Set the mapping from loaded SCF k-points to Coulomb q-points.
 
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, int shrink_aux=0)
 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_bare_coulomb_k_atom_pair_packed (LibrpaHandler *h, int ik, int I, int J, int naux_mu, int naux_nu, const double *Vq_ri_in, double vq_threshold)
 Set bare Coulomb matrix elements (atom-pair format, packed complex).
 
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_cut_coulomb_k_atom_pair_packed (LibrpaHandler *h, int ik, int I, int J, int naux_mu, int naux_nu, const double *Vq_ri_in, double vq_threshold)
 Set truncated Coulomb matrix elements (atom-pair format, packed complex).
 
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_bare_coulomb_k_2d_block_packed (LibrpaHandler *h, int ik, int mu_begin, int mu_end, int nu_begin, int nu_end, const double *Vq_ri_in)
 Set bare Coulomb matrix elements (2D block format, packed complex).
 
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_aux_cut_coulomb_k_2d_block_packed (LibrpaHandler *h, int ik, int mu_begin, int mu_end, int nu_begin, int nu_end, const double *Vq_ri_in)
 Set truncated Coulomb matrix elements (2D block format, packed complex).
 
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_velocity_matrix (LibrpaHandler *h, int n_spins, int n_kpts, int n_states, const double *velocity_real, const double *velocity_imag)
 Set velocity/momentum matrix.
 
void librpa_set_velocity_matrix_packed (LibrpaHandler *h, int n_spins, int n_kpts, int n_states, const double *velocity_ri)
 Set velocity/momentum matrix.
 
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_spinor (LibrpaHandler *h, int ik_band, int nstates_local, int nbasis_local, const double *wfc_up_real, const double *wfc_up_imag, const double *wfc_dn_real, const double *wfc_dn_imag)
 Set wavefunction for band k-point (spinor format, 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_set_wfc_band_spinor_packed (LibrpaHandler *h, int ik_band, int nstates_local, int nbasis_local, const double *wfc_up_ri, const double *wfc_dn_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
[in]hHandler.

◆ librpa_set_ao_basis_aux()

void librpa_set_ao_basis_aux ( LibrpaHandler * h,
int natoms,
const size_t * nbs_aux,
const int * nshells = nullptr,
const int * l_shells = nullptr )

Set auxiliary atomic orbital basis size.

Parameters
[in]hHandler.
[in]natomsNumber of atoms.
[in]nbs_auxNumber of auxiliary basis functions per atom.
[in]nshellsOptional number of angular shells per atom.
[in]l_shellsOptional concatenated angular momenta, grouped by atom.

◆ librpa_set_ao_basis_aux_shrink()

void librpa_set_ao_basis_aux_shrink ( LibrpaHandler * h,
int natoms,
const size_t * nbs_aux_shrink,
const int * nshells = nullptr,
const int * l_shells = nullptr )

Set shrink auxiliary atomic orbital basis size.

Parameters
[in]hHandler.
[in]natomsNumber of atoms.
[in]nbs_aux_shrinkNumber of shrink auxiliary basis functions per atom.
[in]nshellsOptional number of angular shells per atom.
[in]l_shellsOptional concatenated angular momenta, grouped by atom.

◆ librpa_set_ao_basis_wfc()

void librpa_set_ao_basis_wfc ( LibrpaHandler * h,
int natoms,
const size_t * nbs_wfc,
const int * nshells = nullptr,
const int * l_shells = nullptr )

Set atomic orbital basis size for wavefunctions.

Parameters
[in]hHandler.
[in]natomsNumber of atoms.
[in]nbs_wfcNumber of basis functions per atom.
[in]nshellsOptional number of angular shells per atom.
[in]l_shellsOptional concatenated angular momenta, grouped by 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]posi_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
[in]hHandler.
[in]ikK-point index.
[in]mu_beginStarting index for mu.
[in]mu_endEnding index for mu.
[in]nu_beginStarting index for nu.
[in]nu_endEnding index for nu.
[in]Vq_real_inReal part of Coulomb matrix.
[in]Vq_imag_inImaginary part of Coulomb matrix.

◆ librpa_set_aux_bare_coulomb_k_2d_block_packed()

void librpa_set_aux_bare_coulomb_k_2d_block_packed ( LibrpaHandler * h,
int ik,
int mu_begin,
int mu_end,
int nu_begin,
int nu_end,
const double * Vq_ri_in )

Set bare Coulomb matrix elements (2D block format, packed complex).

Parameters
[in]hHandler.
[in]ikK-point index.
[in]mu_beginStarting index for mu.
[in]mu_endEnding index for mu.
[in]nu_beginStarting index for nu.
[in]nu_endEnding index for nu.
[in]Vq_ri_inCoulomb matrix with interleaved real/imaginary parts.

◆ 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
[in]hHandler.
[in]ikK-point index.
[in]IAtom I index.
[in]JAtom J index.
[in]naux_muNumber of auxiliary functions for mu.
[in]naux_nuNumber of auxiliary functions for nu.
[in]Vq_real_inReal part of Coulomb matrix.
[in]Vq_imag_inImaginary part of Coulomb matrix.
[in]vq_thresholdThreshold for screening.

◆ librpa_set_aux_bare_coulomb_k_atom_pair_packed()

void librpa_set_aux_bare_coulomb_k_atom_pair_packed ( LibrpaHandler * h,
int ik,
int I,
int J,
int naux_mu,
int naux_nu,
const double * Vq_ri_in,
double vq_threshold )

Set bare Coulomb matrix elements (atom-pair format, packed complex).

Parameters
[in]hHandler.
[in]ikK-point index.
[in]IAtom I index.
[in]JAtom J index.
[in]naux_muNumber of auxiliary functions for mu.
[in]naux_nuNumber of auxiliary functions for nu.
[in]Vq_ri_inCoulomb matrix with interleaved real/imaginary parts.
[in]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
[in]hHandler.
[in]ikK-point index.
[in]mu_beginStarting index for mu.
[in]mu_endEnding index for mu.
[in]nu_beginStarting index for nu.
[in]nu_endEnding index for nu.
[in]Vq_real_inReal part of Coulomb matrix.
[in]Vq_imag_inImaginary part of Coulomb matrix.

◆ librpa_set_aux_cut_coulomb_k_2d_block_packed()

void librpa_set_aux_cut_coulomb_k_2d_block_packed ( LibrpaHandler * h,
int ik,
int mu_begin,
int mu_end,
int nu_begin,
int nu_end,
const double * Vq_ri_in )

Set truncated Coulomb matrix elements (2D block format, packed complex).

Parameters
[in]hHandler.
[in]ikK-point index.
[in]mu_beginStarting index for mu.
[in]mu_endEnding index for mu.
[in]nu_beginStarting index for nu.
[in]nu_endEnding index for nu.
[in]Vq_ri_inCoulomb matrix with interleaved real/imaginary parts.

◆ 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
[in]hHandler.
[in]ikK-point index.
[in]IAtom I index.
[in]JAtom J index.
[in]naux_muNumber of auxiliary functions for mu.
[in]naux_nuNumber of auxiliary functions for nu.
[in]Vq_real_inReal part of Coulomb matrix.
[in]Vq_imag_inImaginary part of Coulomb matrix.
[in]vq_thresholdThreshold for screening.

◆ librpa_set_aux_cut_coulomb_k_atom_pair_packed()

void librpa_set_aux_cut_coulomb_k_atom_pair_packed ( LibrpaHandler * h,
int ik,
int I,
int J,
int naux_mu,
int naux_nu,
const double * Vq_ri_in,
double vq_threshold )

Set truncated Coulomb matrix elements (atom-pair format, packed complex).

Parameters
[in]hHandler.
[in]ikK-point index.
[in]IAtom I index.
[in]JAtom J index.
[in]naux_muNumber of auxiliary functions for mu.
[in]naux_nuNumber of auxiliary functions for nu.
[in]Vq_ri_inCoulomb matrix with interleaved real/imaginary parts.
[in]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
[in]hHandler.
[in]n_kpts_bandNumber of band k-points.
[in]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
[in]hHandler.
[in]n_spinsNumber of spin channels.
[in]n_kpts_bandNumber of band k-points.
[in]n_statesNumber of states.
[in]occOccupation numbers.
[in]eigEigenvalues.

◆ librpa_set_basis_convention()

void librpa_set_basis_convention ( LibrpaHandler * h,
int bloch_phase,
int bloch_ratom,
LibrpaAngularOrder order,
LibrpaRshCoeff nega_m,
LibrpaRshCoeff posi_m )

Set basis convention metadata used by symmetry-based reductions.

This metadata is optional for calculations that do not use symmetry.

Parameters
[in]hHandler.
[in]bloch_phaseBloch-sum phase sign; must be either +1 or -1.
[in]bloch_ratomCoefficient of atom position in the Bloch-sum phase; must be -1, 0, or +1.
[in]orderOrdering of real spherical harmonics inside each shell.
[in]nega_mCoefficient convention for the m < 0 real-spherical-harmonic branch.
[in]posi_mCoefficient convention for the m > 0 real-spherical-harmonic branch.

◆ 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
[in]hHandler.
[in]nfreqNumber of frequency points.
[in]omegas_imagImaginary frequency values.
[in]dielect_funcDielectric function values.

◆ librpa_set_kgrids_kvec()

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

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]nkptsNumber of loaded SCF k-points.
[in]kvecsK-point vectors (3*nkpts, Cartesian coordinates, in Bohr^-1).
[in]kweightsOptional k-point weights, normalized internally to sum to one. Pass NULL if unavailable.

◆ librpa_set_kq_mapping()

void librpa_set_kq_mapping ( LibrpaHandler * h,
int nkpts,
const int * map_q_ks )

Set the mapping from loaded SCF k-points to Coulomb q-points.

Parameters
[in]hHandler.
[in]nkptsNumber of loaded SCF k-points.
[in]map_q_ksMapping from each loaded SCF k-point to the representative q-point, indexed in the loaded SCF k-list (0-based).

Example: four loaded k-points where the first two and last are Coulomb q-points, and the third point maps to the second q-point, then map_q_ks is (0, 1, 1, 3).

◆ 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,
int shrink_aux = 0 )

Set local RI coefficients.

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

◆ librpa_set_scf_dimension()

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

Set meanfield wavefunction dimension.

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

◆ librpa_set_symmetry_operations()

void librpa_set_symmetry_operations ( LibrpaHandler * h,
int n_symops,
int row_conv,
const int * rotmats,
const double * trans )

Set real-space symmetry operations.

Parameters
[in]hHandler.
[in]n_symopsNumber of symmetry operations.
[in]row_convPositive if rotations use the row-fractional convention.
[in]rotmatsFlattened rotation matrices, length 9*n_symops.
[in]transOptional flattened fractional translations, length 3*n_symops.

◆ librpa_set_velocity_matrix()

void librpa_set_velocity_matrix ( LibrpaHandler * h,
int n_spins,
int n_kpts,
int n_states,
const double * velocity_real,
const double * velocity_imag )

Set velocity/momentum matrix.

The flattened matrix order is [spin][k][cartesian][row band][column band]. Values are currently used by LibRPA's internal analytic head/wing convention; code-specific conversions from ABACUS or FHI-aims file formats are intentionally not applied here.

Parameters
[in]hHandler.
[in]n_spinsNumber of spin channels.
[in]n_kptsNumber of k-points used by analytic head/wing.
[in]n_statesNumber of bands.
[in]velocity_realReal parts of the flattened velocity matrices.
[in]velocity_imagImaginary parts of the flattened velocity matrices.

◆ librpa_set_velocity_matrix_packed()

void librpa_set_velocity_matrix_packed ( LibrpaHandler * h,
int n_spins,
int n_kpts,
int n_states,
const double * velocity_ri )

Set velocity/momentum matrix.

The flattened matrix order is [spin][k][cartesian][row band][column band], with interleaved real/imaginary values.

Parameters
[in]hHandler.
[in]n_spinsNumber of spin channels.
[in]n_kptsNumber of k-points used by analytic head/wing.
[in]n_statesNumber of bands.
[in]velocity_riFlattened matrix with interleaved real/imaginary parts.

◆ 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
[in]hHandler.
[in]ispinSpin index.
[in]ik_bandBand k-point index.
[in]nstates_localLocal number of states.
[in]nbasis_localLocal number of basis functions.
[in]wfc_realReal part of wavefunction.
[in]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
[in]hHandler.
[in]ispinSpin index.
[in]ik_bandBand k-point index.
[in]nstates_localLocal number of states.
[in]nbasis_localLocal number of atomic basis functions.
[in]wfc_riComplex wavefunction (packed).

◆ librpa_set_wfc_band_spinor()

void librpa_set_wfc_band_spinor ( LibrpaHandler * h,
int ik_band,
int nstates_local,
int nbasis_local,
const double * wfc_up_real,
const double * wfc_up_imag,
const double * wfc_dn_real,
const double * wfc_dn_imag )

Set wavefunction for band k-point (spinor format, separate real/imag).

Parameters
[in]hHandler.
[in]ik_bandBand k-point index.
[in]nstates_localLocal number of states.
[in]nbasis_localLocal number of atomic basis functions.
[in]wfc_up_realReal part of wavefunction coefficients (spin-up component).
[in]wfc_up_imagImaginary part of wavefunction coefficients (spin-up component).
[in]wfc_dn_realReal part of wavefunction coefficients (spin-down component).
[in]wfc_dn_imagImaginary part of wavefunction coefficients (spin-down component).

◆ librpa_set_wfc_band_spinor_packed()

void librpa_set_wfc_band_spinor_packed ( LibrpaHandler * h,
int ik_band,
int nstates_local,
int nbasis_local,
const double * wfc_up_ri,
const double * wfc_dn_ri )

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

Parameters
[in]hHandler.
[in]ik_bandBand k-point index.
[in]nstates_localLocal number of states.
[in]nbasis_localLocal number of basis functions.
[in]wfc_up_riComplex wavefunction of spin-up component (packed).
[in]wfc_dn_riComplex wavefunction of spin-down component (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_wfc_spinor()

void librpa_set_wfc_spinor ( LibrpaHandler * h,
int ik,
int nstates_local,
int nbasis_local,
const double * wfc_up_real,
const double * wfc_up_imag,
const double * wfc_dn_real,
const double * wfc_dn_imag )

Set wavefunction coefficients of spinor format (real/imag separate arrays).

Parameters
[in]hHandler.
[in]ikK-point index (0-based).
[in]nstates_localLocal number of states.
[in]nbasis_localLocal number of basis functions.
[in]wfc_up_realReal part of wavefunction coefficients (spin-up component).
[in]wfc_up_imagImaginary part of wavefunction coefficients (spin-up component).
[in]wfc_dn_realReal part of wavefunction coefficients (spin-down component).
[in]wfc_dn_imagImaginary part of wavefunction coefficients (spin-down component).

◆ librpa_set_wfc_spinor_packed()

void librpa_set_wfc_spinor_packed ( LibrpaHandler * h,
int ik,
int nstates_local,
int nbasis_local,
const double * wfc_up_ri,
const double * wfc_dn_ri )

Set wavefunction coefficients (packed complex array).

Parameters
[in]hHandler.
[in]ikK-point index (0-based).
[in]nstates_localLocal number of states.
[in]nbasis_localLocal number of basis functions.
[in]wfc_up_riComplex wavefunction coefficients of spin-up component (packed).
[in]wfc_dn_riComplex wavefunction coefficients of spin-down component (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 of meanfield input.

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.