librpa_input.h Source File

librpa_input.h Source File#

LibRPA: librpa_input.h Source File
LibRPA
librpa_input.h
Go to the documentation of this file.
1#pragma once
6
7#include <stddef.h>
8#include "librpa_enums.h"
9#include "librpa_handler.h"
10
11// C APIs
12#ifdef __cplusplus
13extern "C" {
14#endif
15
25void librpa_set_scf_dimension(LibrpaHandler* h, int nspins, int nkpts, int nstates, int nbasis, int nspinor = 1);
26
37void librpa_set_wg_ekb_efermi(LibrpaHandler* h, int nspins, int nkpts, int nstates,
38 const double* wg, const double* ekb, double efermi);
39
50void librpa_set_wfc(LibrpaHandler* h, int ispin, int ik, int nstates_local, int nbasis_local,
51 const double* wfc_real, const double* wfc_imag);
52
64void librpa_set_wfc_spinor(LibrpaHandler* h, int ik, int nstates_local, int nbasis_local,
65 const double* wfc_up_real, const double* wfc_up_imag,
66 const double* wfc_dn_real, const double* wfc_dn_imag);
67
77void librpa_set_wfc_packed(LibrpaHandler* h, int ispin, int ik, int nstates_local, int nbasis_local,
78 const double* wfc_ri);
79
89void librpa_set_wfc_spinor_packed(LibrpaHandler* h, int ik, int nstates_local,
90 int nbasis_local, const double* wfc_up_ri,
91 const double* wfc_dn_ri);
92
101void librpa_set_ao_basis_wfc(LibrpaHandler* h, int natoms, const size_t* nbs_wfc,
102 const int* nshells = nullptr, const int* l_shells = nullptr);
103
112void librpa_set_ao_basis_aux(LibrpaHandler* h, int natoms, const size_t* nbs_aux,
113 const int* nshells = nullptr, const int* l_shells = nullptr);
114
124 const size_t* nbs_aux_shrink,
125 const int* nshells = nullptr,
126 const int* l_shells = nullptr);
127
140void librpa_set_basis_convention(LibrpaHandler* h, int bloch_phase, int bloch_ratom,
142 LibrpaRshCoeff posi_m);
143
153void librpa_set_symmetry_operations(LibrpaHandler* h, int n_symops, int row_conv,
154 const int* rotmats, const double* trans);
155
162void librpa_set_latvec_and_G(LibrpaHandler* h, const double lat_mat[9], const double G_mat[9]);
163
171void librpa_set_atoms(LibrpaHandler* h, int natoms, const int* types, const double* posi_cart);
172
185void librpa_set_kgrids_kvec(LibrpaHandler* h, int nk1, int nk2, int nk3,
186 int nkpts, const double* kvecs, const double* kweights);
187
199void librpa_set_kq_mapping(LibrpaHandler* h, int nkpts, const int* map_q_ks);
200
216 int nbasis_i, int nbasis_j, int naux_mu, const int R[3],
217 const double* Cs_in, int shrink_aux = 0);
218
232void librpa_set_aux_bare_coulomb_k_atom_pair(LibrpaHandler* h, int ik, int I, int J, int naux_mu,
233 int naux_nu, const double* Vq_real_in,
234 const double* Vq_imag_in, double vq_threshold);
235
249 int naux_mu, int naux_nu,
250 const double* Vq_ri_in,
251 double vq_threshold);
252
266void librpa_set_aux_cut_coulomb_k_atom_pair(LibrpaHandler* h, int ik, int I, int J, int naux_mu,
267 int naux_nu, const double* Vq_real_in,
268 const double* Vq_imag_in, double vq_threshold);
269
283 int naux_mu, int naux_nu,
284 const double* Vq_ri_in,
285 double vq_threshold);
286
299void librpa_set_aux_bare_coulomb_k_2d_block(LibrpaHandler* h, int ik, int mu_begin, int mu_end,
300 int nu_begin, int nu_end, const double* Vq_real_in,
301 const double* Vq_imag_in);
302
315 int mu_end, int nu_begin, int nu_end,
316 const double* Vq_ri_in);
317
330void librpa_set_aux_cut_coulomb_k_2d_block(LibrpaHandler* h, int ik, int mu_begin, int mu_end,
331 int nu_begin, int nu_end, const double* Vq_real_in,
332 const double* Vq_imag_in);
333
346 int mu_end, int nu_begin, int nu_end,
347 const double* Vq_ri_in);
348
357void librpa_set_dielect_func_imagfreq(LibrpaHandler* h, int nfreq, const double* omegas_imag,
358 const double* dielect_func);
359
374void librpa_set_velocity_matrix(LibrpaHandler* h, int n_spins, int n_kpts, int n_states,
375 const double* velocity_real, const double* velocity_imag);
376
389void librpa_set_velocity_matrix_packed(LibrpaHandler* h, int n_spins, int n_kpts, int n_states,
390 const double* velocity_ri);
391
399void librpa_set_band_kvec(LibrpaHandler* h, int n_kpts_band, const double* kfrac_band);
400
411void librpa_set_band_occ_eigval(LibrpaHandler* h, int n_spins, int n_kpts_band, int n_states,
412 const double* occ, const double* eig);
413
425void librpa_set_wfc_band(LibrpaHandler* h, int ispin, int ik_band, int nstates_local,
426 int nbasis_local, const double* wfc_real, const double* wfc_imag);
427
439void librpa_set_wfc_band_spinor(LibrpaHandler* h, int ik_band, int nstates_local,
440 int nbasis_local, const double* wfc_up_real, const double* wfc_up_imag,
441 const double* wfc_dn_real, const double* wfc_dn_imag);
442
453void librpa_set_wfc_band_packed(LibrpaHandler* h, int ispin, int ik_band, int nstates_local,
454 int nbasis_local, const double* wfc_ri);
455
466void librpa_set_wfc_band_spinor_packed(LibrpaHandler* h, int ik_band, int nstates_local,
467 int nbasis_local, const double* wfc_up_ri, const double* wfc_dn_ri);
468
475
476#ifdef __cplusplus
477}
478#endif
Enumeration types and constants for LibRPA.
LibrpaAngularOrder
Ordering of real spherical harmonics inside one angular-momentum shell.
Definition librpa_enums.h:53
LibrpaRshCoeff
Coefficient-pair convention for one nonzero real spherical harmonic branch.
Definition librpa_enums.h:68
LibrpaParallelRouting
Parallel routing strategy for distributed memory calculations.
Definition librpa_enums.h:83
Handler management for LibRPA instances.
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_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_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_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_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_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_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_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_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_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_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_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_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_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_reset_band_data(LibrpaHandler *h)
Reset band structure input data.
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_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_atoms(LibrpaHandler *h, int natoms, const int *types, const double *posi_cart)
Set atom types and Cartesian coordinates.
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_symmetry_operations(LibrpaHandler *h, int n_symops, int row_conv, const int *rotmats, const double *trans)
Set real-space symmetry operations.
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_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_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_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(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_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_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_latvec_and_G(LibrpaHandler *h, const double lat_mat[9], const double G_mat[9])
Set direct and reciprocal lattice vectors.
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_scf_dimension(LibrpaHandler *h, int nspins, int nkpts, int nstates, int nbasis, int nspinor=1)
Set meanfield wavefunction dimension.
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_band_kvec(LibrpaHandler *h, int n_kpts_band, const double *kfrac_band)
Set k-points for band structure calculations.
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).
Opaque handle to a LibRPA instance.
Definition librpa_handler.h:26