ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
ModuleDFPT::DFPT_PW_Data Class Reference

#include <dfpt_pw_data.h>

Collaboration diagram for ModuleDFPT::DFPT_PW_Data:

Public Member Functions

 DFPT_PW_Data ()
 ~DFPT_PW_Data ()
void init (ModuleCell::QList *qlist, int nk, int nbands, int npw_max, int nrxx, int nspin, int nat, const Plus_U_Base *dftu)
void clean ()
int get_nq () const
ModuleBase::Vector3< double > get_qvec (int q_idx) const
int get_nirr (int q_idx) const
std::vector< int > get_irrep_modes (int q_idx, int irrep) const
void set_dpsi (int q_idx, int k_idx, int band_idx, const std::vector< std::complex< double > > &psi)
std::vector< std::complex< double > > get_dpsi (int q_idx, int k_idx, int band_idx) const
void set_drho_r (int q_idx, int spin, const std::vector< double > &rho)
std::vector< double > get_drho_r (int q_idx, int spin) const
void set_drho_g (int q_idx, int spin, const std::vector< std::complex< double > > &rho)
void set_drhoc_g (int q_idx, const std::vector< std::complex< double > > &rho_c)
std::vector< std::complex< double > > get_drhoc_g (int q_idx) const
std::vector< std::complex< double > > get_drho_g (int q_idx, int spin) const
void set_dv_r (int q_idx, int spin, const std::vector< double > &v)
std::vector< double > get_dv_r (int q_idx, int spin) const
void set_dv_recip_c (int q_idx, int spin, const std::vector< std::complex< double > > &v)
std::vector< std::complex< double > > get_dv_recip_c (int q_idx, int spin) const
void set_dv_rc (int q_idx, int spin, const std::vector< std::complex< double > > &v)
std::vector< std::complex< double > > get_dv_rc (int q_idx, int spin) const
void set_dynmat (int q_idx, const ModuleBase::ComplexMatrix &dm)
ModuleBase::ComplexMatrix get_dynmat (int q_idx) const
void set_dynmat_raw (int q_idx, const ModuleBase::ComplexMatrix &dm)
ModuleBase::ComplexMatrix get_dynmat_raw (int q_idx) const
bool has_dynmat_raw (int q_idx) const
void set_phon_freq (int q_idx, const std::vector< double > &freq)
std::vector< double > get_phon_freq (int q_idx) const
void set_dielectric (const ModuleBase::matrix &eps)
ModuleBase::matrix get_dielectric () const
void set_born (int atom_idx, const ModuleBase::matrix &z)
ModuleBase::matrix get_born (int atom_idx) const
void set_compute_q0 (bool flag)
bool get_compute_q0 () const
void set_loto (bool flag)
bool get_loto () const
void set_loto_dir (const ModuleBase::Vector3< double > &dir)
ModuleBase::Vector3< double > get_loto_dir () const
void set_phon_freq_loto (const std::vector< double > &freq)
std::vector< double > get_phon_freq_loto () const
void set_pert_atom (int atom_idx)
int get_pert_atom () const
void set_pert_dir (int dir)
int get_pert_dir () const
void set_is_metal (bool flag)
bool get_is_metal () const
void set_dmu (double dmu)
double get_dmu () const
void set_max_iter (int iter)
int get_max_iter () const
void set_conv_thr (double thr)
double get_conv_thr () const
void set_lin_max_iter (int iter)
int get_lin_max_iter () const
void set_lin_conv_thr (double thr)
double get_lin_conv_thr () const
void set_converged (int q_idx, int irrep, bool flag)
bool get_converged (int q_idx, int irrep) const
void add_residual (int q_idx, int irrep, double r)
std::vector< double > get_residuals (int q_idx, int irrep) const
void set_current_iter (int q_idx, int irrep, int iter)
int get_current_iter (int q_idx, int irrep) const
bool with_u () const
bool u_active () const
const Plus_U_Base * get_dftu () const
void set_docc (int q_idx, const std::vector< std::complex< double > > &occ)
std::vector< std::complex< double > > get_docc (int q_idx) const
void set_vsc_r (int atom_idx, int dir, const std::vector< std::complex< double > > &v)
std::vector< std::complex< double > > get_vsc_r (int atom_idx, int dir) const
void set_drho_disp (int atom_idx, int dir, const std::vector< std::complex< double > > &rho)
std::vector< std::complex< double > > get_drho_disp (int atom_idx, int dir) const
void set_dpsi_disp (int atom_idx, int dir, const std::vector< std::vector< std::vector< std::complex< double > > > > &d)
std::vector< std::vector< std::vector< std::complex< double > > > > get_dpsi_disp (int atom_idx, int dir) const
void set_pos_resp (int dir, const std::vector< std::vector< std::vector< std::complex< double > > > > &y)
std::vector< std::vector< std::vector< std::complex< double > > > > get_pos_resp (int dir) const
void set_dpsi_efield (int dir, const std::vector< std::vector< std::vector< std::complex< double > > > > &d)
std::vector< std::vector< std::vector< std::complex< double > > > > get_dpsi_efield (int dir) const

Private Member Functions

void allocate_memory ()
void deallocate_memory ()

Private Attributes

ModuleCell::QList * qlist_ = nullptr
int nk_ = 0
int nbands_ = 0
int npw_max_ = 0
int nrxx_ = 0
int nspin_ = 1
int nat_ = 0
std::vector< std::vector< std::vector< std::vector< std::complex< double > > > > > dpsi_
std::vector< std::vector< std::vector< double > > > drho_r_
std::vector< std::vector< std::vector< std::complex< double > > > > drho_g_
 q-shifted first-order core density (G space), [q]
std::vector< std::vector< std::complex< double > > > drhoc_g_
std::vector< std::vector< std::vector< double > > > dv_r_
std::vector< std::vector< std::vector< std::complex< double > > > > dv_recip_c_
std::vector< std::vector< std::vector< std::complex< double > > > > dv_rc_
std::vector< ModuleBase::ComplexMatrix > dynmat_
std::vector< ModuleBase::ComplexMatrix > dynmat_raw_
 pre-ASR / pre-LO-TO copies for the dyn file output ([q])
std::vector< std::vector< double > > phon_freq_
bool compute_q0_ = false
bool loto_ = false
ModuleBase::Vector3< double > loto_dir_ {1.0 / std::sqrt(3.0), 1.0 / std::sqrt(3.0), 1.0 / std::sqrt(3.0)}
std::vector< double > phon_freq_loto_
int pert_atom_ = -1
int pert_dir_ = -1
ModuleBase::matrix dielectric_
std::vector< ModuleBase::matrix > born_
bool is_metal_ = false
double dmu_ = 0.0
const Plus_U_Base * dftu_ = nullptr
 DFT+U reservation state (U0).
std::vector< std::vector< std::complex< double > > > docc_
std::vector< std::vector< std::complex< double > > > vsc_r_
 converged v_sc per displacement (atom, dir): [3*nat] entries
std::vector< std::vector< std::complex< double > > > drho_disp_
 converged first-order density per displacement (atom, dir): [3*nat]
std::vector< std::vector< std::vector< std::vector< std::complex< double > > > > > dpsi_disp_
 converged dpsi per displacement (atom, dir): [3*nat][k][band] entries
std::vector< std::vector< std::vector< std::vector< std::complex< double > > > > > pos_resp_
std::vector< std::vector< std::vector< std::vector< std::complex< double > > > > > dpsi_efield_
 converged E-field response dpsi^E per direction: [3][k][band]
int max_iter_ = 100
double conv_thr_ = 1e-8
int lin_max_iter_ = 0
double lin_conv_thr_ = -1.0
 per-(q, irrep) SCF ledger (B4: absorbed from DFPT_IrrepData)
std::map< std::pair< int, int >, bool > converged_
std::map< std::pair< int, int >, std::vector< double > > residuals_
std::map< std::pair< int, int >, int > current_iter_
bool is_initialized_ = false

Constructor & Destructor Documentation

◆ DFPT_PW_Data()

ModuleDFPT::DFPT_PW_Data::DFPT_PW_Data ( )

◆ ~DFPT_PW_Data()

ModuleDFPT::DFPT_PW_Data::~DFPT_PW_Data ( )
Here is the call graph for this function:

Member Function Documentation

◆ add_residual()

void ModuleDFPT::DFPT_PW_Data::add_residual ( int q_idx,
int irrep,
double r )
Here is the call graph for this function:

◆ allocate_memory()

void ModuleDFPT::DFPT_PW_Data::allocate_memory ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ clean()

void ModuleDFPT::DFPT_PW_Data::clean ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ deallocate_memory()

void ModuleDFPT::DFPT_PW_Data::deallocate_memory ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_born()

ModuleBase::matrix ModuleDFPT::DFPT_PW_Data::get_born ( int atom_idx) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_compute_q0()

bool ModuleDFPT::DFPT_PW_Data::get_compute_q0 ( ) const
inline
Here is the caller graph for this function:

◆ get_conv_thr()

double ModuleDFPT::DFPT_PW_Data::get_conv_thr ( ) const
inline
Here is the caller graph for this function:

◆ get_converged()

bool ModuleDFPT::DFPT_PW_Data::get_converged ( int q_idx,
int irrep ) const
Here is the call graph for this function:

◆ get_current_iter()

int ModuleDFPT::DFPT_PW_Data::get_current_iter ( int q_idx,
int irrep ) const
Here is the call graph for this function:

◆ get_dftu()

const Plus_U_Base * ModuleDFPT::DFPT_PW_Data::get_dftu ( ) const
inline

◆ get_dielectric()

ModuleBase::matrix ModuleDFPT::DFPT_PW_Data::get_dielectric ( ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_dmu()

double ModuleDFPT::DFPT_PW_Data::get_dmu ( ) const
inline

◆ get_docc()

std::vector< std::complex< double > > ModuleDFPT::DFPT_PW_Data::get_docc ( int q_idx) const
Here is the call graph for this function:

◆ get_dpsi()

std::vector< std::complex< double > > ModuleDFPT::DFPT_PW_Data::get_dpsi ( int q_idx,
int k_idx,
int band_idx ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_dpsi_disp()

std::vector< std::vector< std::vector< std::complex< double > > > > ModuleDFPT::DFPT_PW_Data::get_dpsi_disp ( int atom_idx,
int dir ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_dpsi_efield()

std::vector< std::vector< std::vector< std::complex< double > > > > ModuleDFPT::DFPT_PW_Data::get_dpsi_efield ( int dir) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_drho_disp()

std::vector< std::complex< double > > ModuleDFPT::DFPT_PW_Data::get_drho_disp ( int atom_idx,
int dir ) const
Here is the call graph for this function:

◆ get_drho_g()

std::vector< std::complex< double > > ModuleDFPT::DFPT_PW_Data::get_drho_g ( int q_idx,
int spin ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_drho_r()

std::vector< double > ModuleDFPT::DFPT_PW_Data::get_drho_r ( int q_idx,
int spin ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_drhoc_g()

std::vector< std::complex< double > > ModuleDFPT::DFPT_PW_Data::get_drhoc_g ( int q_idx) const
Here is the call graph for this function:

◆ get_dv_r()

std::vector< double > ModuleDFPT::DFPT_PW_Data::get_dv_r ( int q_idx,
int spin ) const
Here is the call graph for this function:

◆ get_dv_rc()

std::vector< std::complex< double > > ModuleDFPT::DFPT_PW_Data::get_dv_rc ( int q_idx,
int spin ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_dv_recip_c()

std::vector< std::complex< double > > ModuleDFPT::DFPT_PW_Data::get_dv_recip_c ( int q_idx,
int spin ) const
Here is the call graph for this function:

◆ get_dynmat()

ModuleBase::ComplexMatrix ModuleDFPT::DFPT_PW_Data::get_dynmat ( int q_idx) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_dynmat_raw()

ModuleBase::ComplexMatrix ModuleDFPT::DFPT_PW_Data::get_dynmat_raw ( int q_idx) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_irrep_modes()

std::vector< int > ModuleDFPT::DFPT_PW_Data::get_irrep_modes ( int q_idx,
int irrep ) const

◆ get_is_metal()

bool ModuleDFPT::DFPT_PW_Data::get_is_metal ( ) const
inline

◆ get_lin_conv_thr()

double ModuleDFPT::DFPT_PW_Data::get_lin_conv_thr ( ) const
inline
Here is the caller graph for this function:

◆ get_lin_max_iter()

int ModuleDFPT::DFPT_PW_Data::get_lin_max_iter ( ) const
inline
Here is the caller graph for this function:

◆ get_loto()

bool ModuleDFPT::DFPT_PW_Data::get_loto ( ) const
inline

◆ get_loto_dir()

ModuleBase::Vector3< double > ModuleDFPT::DFPT_PW_Data::get_loto_dir ( ) const
inline
Here is the caller graph for this function:

◆ get_max_iter()

int ModuleDFPT::DFPT_PW_Data::get_max_iter ( ) const
inline
Here is the caller graph for this function:

◆ get_nirr()

int ModuleDFPT::DFPT_PW_Data::get_nirr ( int q_idx) const

◆ get_nq()

int ModuleDFPT::DFPT_PW_Data::get_nq ( ) const
Here is the caller graph for this function:

◆ get_pert_atom()

int ModuleDFPT::DFPT_PW_Data::get_pert_atom ( ) const
inline
Here is the caller graph for this function:

◆ get_pert_dir()

int ModuleDFPT::DFPT_PW_Data::get_pert_dir ( ) const
inline
Here is the caller graph for this function:

◆ get_phon_freq()

std::vector< double > ModuleDFPT::DFPT_PW_Data::get_phon_freq ( int q_idx) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_phon_freq_loto()

std::vector< double > ModuleDFPT::DFPT_PW_Data::get_phon_freq_loto ( ) const
inline
Here is the caller graph for this function:

◆ get_pos_resp()

std::vector< std::vector< std::vector< std::complex< double > > > > ModuleDFPT::DFPT_PW_Data::get_pos_resp ( int dir) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_qvec()

ModuleBase::Vector3< double > ModuleDFPT::DFPT_PW_Data::get_qvec ( int q_idx) const
Here is the caller graph for this function:

◆ get_residuals()

std::vector< double > ModuleDFPT::DFPT_PW_Data::get_residuals ( int q_idx,
int irrep ) const
Here is the call graph for this function:

◆ get_vsc_r()

std::vector< std::complex< double > > ModuleDFPT::DFPT_PW_Data::get_vsc_r ( int atom_idx,
int dir ) const
Here is the call graph for this function:

◆ has_dynmat_raw()

bool ModuleDFPT::DFPT_PW_Data::has_dynmat_raw ( int q_idx) const
Here is the caller graph for this function:

◆ init()

void ModuleDFPT::DFPT_PW_Data::init ( ModuleCell::QList * qlist,
int nk,
int nbands,
int npw_max,
int nrxx,
int nspin,
int nat,
const Plus_U_Base * dftu )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_born()

void ModuleDFPT::DFPT_PW_Data::set_born ( int atom_idx,
const ModuleBase::matrix & z )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_compute_q0()

void ModuleDFPT::DFPT_PW_Data::set_compute_q0 ( bool flag)
inline

◆ set_conv_thr()

void ModuleDFPT::DFPT_PW_Data::set_conv_thr ( double thr)
inline

◆ set_converged()

void ModuleDFPT::DFPT_PW_Data::set_converged ( int q_idx,
int irrep,
bool flag )

Per-(q, irrep) SCF convergence ledger (B4: sunk from the retired DFPT_IrrepData adapter). The irrep dimension is a stage-A slot: today the single fallback irrep 0 carries the full 3N displacement basis, and DFPT_PW::run records one ledger entry per outer SCF pass (worst displacement residual of the pass); missing keys read as not-converged / empty history / iteration 0.

Here is the call graph for this function:

◆ set_current_iter()

void ModuleDFPT::DFPT_PW_Data::set_current_iter ( int q_idx,
int irrep,
int iter )
Here is the call graph for this function:

◆ set_dielectric()

void ModuleDFPT::DFPT_PW_Data::set_dielectric ( const ModuleBase::matrix & eps)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_dmu()

void ModuleDFPT::DFPT_PW_Data::set_dmu ( double dmu)
inline

◆ set_docc()

void ModuleDFPT::DFPT_PW_Data::set_docc ( int q_idx,
const std::vector< std::complex< double > > & occ )

first-order occupation matrix (docc) storage, indexed by q. lazy allocation: unset / out-of-range reads return an empty vector.

Here is the call graph for this function:

◆ set_dpsi()

void ModuleDFPT::DFPT_PW_Data::set_dpsi ( int q_idx,
int k_idx,
int band_idx,
const std::vector< std::complex< double > > & psi )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_dpsi_disp()

void ModuleDFPT::DFPT_PW_Data::set_dpsi_disp ( int atom_idx,
int dir,
const std::vector< std::vector< std::vector< std::complex< double > > > > & d )

converged dpsi of displacement (atom, dir), indexed [k][band]; the two-pass 2n+1 accumulation reads it back after all displacements of the basis have been solved (the working dpsi slots get overwritten by later solves).

Here is the call graph for this function:

◆ set_dpsi_efield()

void ModuleDFPT::DFPT_PW_Data::set_dpsi_efield ( int dir,
const std::vector< std::vector< std::vector< std::complex< double > > > > & d )

converged screened E-field response dpsi^E(dir) of the q = 0 mesh (QE solve_e + dfpt_kernel fixed point on the rhs -(Y^dir + dV_sc^E|psi>)), indexed [dir][k][band]

Here is the call graph for this function:

◆ set_drho_disp()

void ModuleDFPT::DFPT_PW_Data::set_drho_disp ( int atom_idx,
int dir,
const std::vector< std::complex< double > > & rho )

converged first-order density response (G space) of displacement (atom, dir): the two-pass 2n+1 accumulation needs it to rebuild the nlcc kernel input f_xc.(drho_val + drhoc) per displacement, after the working drho slots hold the last solved displacement

Here is the call graph for this function:

◆ set_drho_g()

void ModuleDFPT::DFPT_PW_Data::set_drho_g ( int q_idx,
int spin,
const std::vector< std::complex< double > > & rho )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_drho_r()

void ModuleDFPT::DFPT_PW_Data::set_drho_r ( int q_idx,
int spin,
const std::vector< double > & rho )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_drhoc_g()

void ModuleDFPT::DFPT_PW_Data::set_drhoc_g ( int q_idx,
const std::vector< std::complex< double > > & rho_c )

q-shifted first-order core-density amplitude (G space, npw); zero-size means no nlcc atoms / not yet computed

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_dv_r()

void ModuleDFPT::DFPT_PW_Data::set_dv_r ( int q_idx,
int spin,
const std::vector< double > & v )
Here is the call graph for this function:

◆ set_dv_rc()

void ModuleDFPT::DFPT_PW_Data::set_dv_rc ( int q_idx,
int spin,
const std::vector< std::complex< double > > & v )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_dv_recip_c()

void ModuleDFPT::DFPT_PW_Data::set_dv_recip_c ( int q_idx,
int spin,
const std::vector< std::complex< double > > & v )

First-order perturbation potential dV stored as complex plane-wave coefficients (indexed by the rho-grid ig) and as the corresponding complex real-space array on the shared FFT grid (C1). The reciprocal coefficients already carry the -i(Delta+q) prefactor and the atomic phase exp(i(Delta+q).tau); the real-space array is their inverse Fourier transform, so that dV.psi is a plain cyclic convolution on the shared grid (apply_dv needs no extra q-phase).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_dynmat()

void ModuleDFPT::DFPT_PW_Data::set_dynmat ( int q_idx,
const ModuleBase::ComplexMatrix & dm )

The dynamical matrix at a generic q is complex Hermitian; stored as a ModuleBase::ComplexMatrix (C5), consumed by DFPT_Phon::diagonalize through the LapackConnector::zheev wrapper.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_dynmat_raw()

void ModuleDFPT::DFPT_PW_Data::set_dynmat_raw ( int q_idx,
const ModuleBase::ComplexMatrix & dm )

stash the raw (pre-ASR, pre-LO-TO) dynamical matrix for the dyn file output; the working dynmat_ is mutated in place by apply_asr and add_loto at Gamma, so the file writer needs this untouched copy

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_is_metal()

void ModuleDFPT::DFPT_PW_Data::set_is_metal ( bool flag)
inline

◆ set_lin_conv_thr()

void ModuleDFPT::DFPT_PW_Data::set_lin_conv_thr ( double thr)
inline

◆ set_lin_max_iter()

void ModuleDFPT::DFPT_PW_Data::set_lin_max_iter ( int iter)
inline

Dedicated knobs of the inner Sternheimer linear solve. Both default to the inherit sentinel: unless set explicitly they track the outer mixing values (the historical single-knob behavior), so existing INPUT files are unaffected.

◆ set_loto()

void ModuleDFPT::DFPT_PW_Data::set_loto ( bool flag)
inline

◆ set_loto_dir()

void ModuleDFPT::DFPT_PW_Data::set_loto_dir ( const ModuleBase::Vector3< double > & dir)

q->0 direction of the non-analytic (LO-TO) term, as a unit vector. The setter normalizes; a null vector falls back to the isotropic default (1,1,1)/sqrt(3) (documented cubic-crystal default; a general direction control arrives with the irrep machinery of stage A).

< empirical parameter: norm below which the direction input is null

Here is the call graph for this function:

◆ set_max_iter()

void ModuleDFPT::DFPT_PW_Data::set_max_iter ( int iter)
inline

◆ set_pert_atom()

void ModuleDFPT::DFPT_PW_Data::set_pert_atom ( int atom_idx)
inline

The perturbation currently being solved: displacement of which linear atom index (over all atoms) and along which cartesian direction. Set by DFPT_Pert::build_dv and consumed by DFPT_Pert::apply_dv so the Stern solver can keep applying the same perturbation per irrep without re-passing (atom,dir) on every matrix-vector product.

Here is the caller graph for this function:

◆ set_pert_dir()

void ModuleDFPT::DFPT_PW_Data::set_pert_dir ( int dir)
inline
Here is the caller graph for this function:

◆ set_phon_freq()

void ModuleDFPT::DFPT_PW_Data::set_phon_freq ( int q_idx,
const std::vector< double > & freq )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_phon_freq_loto()

void ModuleDFPT::DFPT_PW_Data::set_phon_freq_loto ( const std::vector< double > & freq)
inline

signed Gamma frequencies (cm^-1) after the non-analytic LO-TO term along loto_dir_; empty until add_loto + diagonalize_loto have run

Here is the caller graph for this function:

◆ set_pos_resp()

void ModuleDFPT::DFPT_PW_Data::set_pos_resp ( int dir,
const std::vector< std::vector< std::vector< std::complex< double > > > > & y )

conduction-projected position operator P_c r_dir |u_(k,band)> of the q = 0 mesh, solved exactly as a linear response ((H - eps_band) Y = -(i/tpiba) dH/dk_dir |u>), indexed [dir][k][band]; the screened Born charge contraction <dpsi^kappa|P_c r|u> avoids the empty-eigenvector truncation of the explicit r-matrix sum

Here is the call graph for this function:

◆ set_vsc_r()

void ModuleDFPT::DFPT_PW_Data::set_vsc_r ( int atom_idx,
int dir,
const std::vector< std::complex< double > > & v )

converged screened response potential of displacement (atom, dir): the real-space q-shifted complex amplitude v_sc used by the last Sternheimer iteration of that displacement. The 2n+1 accumulation needs it to complete the term2 cross section 2<dpsi^a|dV_ext^b + dV_sc^b|psi> (screening channel).

Here is the call graph for this function:

◆ u_active()

bool ModuleDFPT::DFPT_PW_Data::u_active ( ) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ with_u()

bool ModuleDFPT::DFPT_PW_Data::with_u ( ) const
inline

DFT+U interface reservation (U0): the DFPT modules never read global input state directly; the esolver layer decides whether DFT+U is active and passes a non-null Plus_U_Base* only then. with_u(): a DFT+U provider is wired (dft_plus_u enabled upstream). u_active(): the provider is additionally usable (occupation matrices initialized, which the ground state does when DFT+U actually runs; a provider without them stays inactive).

Here is the caller graph for this function:

Member Data Documentation

◆ born_

std::vector<ModuleBase::matrix> ModuleDFPT::DFPT_PW_Data::born_
private

◆ compute_q0_

bool ModuleDFPT::DFPT_PW_Data::compute_q0_ = false
private

◆ conv_thr_

double ModuleDFPT::DFPT_PW_Data::conv_thr_ = 1e-8
private

◆ converged_

std::map<std::pair<int, int>, bool> ModuleDFPT::DFPT_PW_Data::converged_
private

◆ current_iter_

std::map<std::pair<int, int>, int> ModuleDFPT::DFPT_PW_Data::current_iter_
private

◆ dftu_

const Plus_U_Base* ModuleDFPT::DFPT_PW_Data::dftu_ = nullptr
private

DFT+U reservation state (U0).

◆ dielectric_

ModuleBase::matrix ModuleDFPT::DFPT_PW_Data::dielectric_
private

◆ dmu_

double ModuleDFPT::DFPT_PW_Data::dmu_ = 0.0
private

◆ docc_

std::vector<std::vector<std::complex<double> > > ModuleDFPT::DFPT_PW_Data::docc_
private

◆ dpsi_

std::vector<std::vector<std::vector<std::vector<std::complex<double> > > > > ModuleDFPT::DFPT_PW_Data::dpsi_
private

first-order wavefunction response, indexed [q][k][band]; each entry is the dpsi on the k+q basis for that band (a vector of complex coefficients).

◆ dpsi_disp_

std::vector<std::vector<std::vector<std::vector<std::complex<double> > > > > ModuleDFPT::DFPT_PW_Data::dpsi_disp_
private

converged dpsi per displacement (atom, dir): [3*nat][k][band] entries

◆ dpsi_efield_

std::vector<std::vector<std::vector<std::vector<std::complex<double> > > > > ModuleDFPT::DFPT_PW_Data::dpsi_efield_
private

converged E-field response dpsi^E per direction: [3][k][band]

◆ drho_disp_

std::vector<std::vector<std::complex<double> > > ModuleDFPT::DFPT_PW_Data::drho_disp_
private

converged first-order density per displacement (atom, dir): [3*nat]

◆ drho_g_

std::vector<std::vector<std::vector<std::complex<double> > > > ModuleDFPT::DFPT_PW_Data::drho_g_
private

q-shifted first-order core density (G space), [q]

◆ drho_r_

std::vector<std::vector<std::vector<double> > > ModuleDFPT::DFPT_PW_Data::drho_r_
private

◆ drhoc_g_

std::vector<std::vector<std::complex<double> > > ModuleDFPT::DFPT_PW_Data::drhoc_g_
private

◆ dv_r_

std::vector<std::vector<std::vector<double> > > ModuleDFPT::DFPT_PW_Data::dv_r_
private

◆ dv_rc_

std::vector<std::vector<std::vector<std::complex<double> > > > ModuleDFPT::DFPT_PW_Data::dv_rc_
private

◆ dv_recip_c_

std::vector<std::vector<std::vector<std::complex<double> > > > ModuleDFPT::DFPT_PW_Data::dv_recip_c_
private

◆ dynmat_

std::vector<ModuleBase::ComplexMatrix> ModuleDFPT::DFPT_PW_Data::dynmat_
private

◆ dynmat_raw_

std::vector<ModuleBase::ComplexMatrix> ModuleDFPT::DFPT_PW_Data::dynmat_raw_
private

pre-ASR / pre-LO-TO copies for the dyn file output ([q])

◆ is_initialized_

bool ModuleDFPT::DFPT_PW_Data::is_initialized_ = false
private

◆ is_metal_

bool ModuleDFPT::DFPT_PW_Data::is_metal_ = false
private

◆ lin_conv_thr_

double ModuleDFPT::DFPT_PW_Data::lin_conv_thr_ = -1.0
private

per-(q, irrep) SCF ledger (B4: absorbed from DFPT_IrrepData)

◆ lin_max_iter_

int ModuleDFPT::DFPT_PW_Data::lin_max_iter_ = 0
private

inner Sternheimer knobs; <=0 / <=0.0 is the inherit sentinel resolved at read time by the getters (keeps tracking the outer values until set explicitly)

◆ loto_

bool ModuleDFPT::DFPT_PW_Data::loto_ = false
private

◆ loto_dir_

ModuleBase::Vector3<double> ModuleDFPT::DFPT_PW_Data::loto_dir_ {1.0 / std::sqrt(3.0), 1.0 / std::sqrt(3.0), 1.0 / std::sqrt(3.0)}
private

◆ max_iter_

int ModuleDFPT::DFPT_PW_Data::max_iter_ = 100
private

◆ nat_

int ModuleDFPT::DFPT_PW_Data::nat_ = 0
private

◆ nbands_

int ModuleDFPT::DFPT_PW_Data::nbands_ = 0
private

◆ nk_

int ModuleDFPT::DFPT_PW_Data::nk_ = 0
private

◆ npw_max_

int ModuleDFPT::DFPT_PW_Data::npw_max_ = 0
private

◆ nrxx_

int ModuleDFPT::DFPT_PW_Data::nrxx_ = 0
private

◆ nspin_

int ModuleDFPT::DFPT_PW_Data::nspin_ = 1
private

◆ pert_atom_

int ModuleDFPT::DFPT_PW_Data::pert_atom_ = -1
private

◆ pert_dir_

int ModuleDFPT::DFPT_PW_Data::pert_dir_ = -1
private

◆ phon_freq_

std::vector<std::vector<double> > ModuleDFPT::DFPT_PW_Data::phon_freq_
private

◆ phon_freq_loto_

std::vector<double> ModuleDFPT::DFPT_PW_Data::phon_freq_loto_
private

◆ pos_resp_

std::vector<std::vector<std::vector<std::vector<std::complex<double> > > > > ModuleDFPT::DFPT_PW_Data::pos_resp_
private

conduction-projected position response P_c r_dir|u> per direction: [3][k][band] entries

◆ qlist_

ModuleCell::QList* ModuleDFPT::DFPT_PW_Data::qlist_ = nullptr
private

◆ residuals_

std::map<std::pair<int, int>, std::vector<double> > ModuleDFPT::DFPT_PW_Data::residuals_
private

◆ vsc_r_

std::vector<std::vector<std::complex<double> > > ModuleDFPT::DFPT_PW_Data::vsc_r_
private

converged v_sc per displacement (atom, dir): [3*nat] entries


The documentation for this class was generated from the following files: