|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include <onsite_proj.h>
Public Member Functions | |
| OnsiteProjector ()=default | |
| Own an independent projector and its workspaces. | |
| ~OnsiteProjector () | |
| OnsiteProjector (const OnsiteProjector &)=delete | |
| OnsiteProjector & | operator= (const OnsiteProjector &)=delete |
| OnsiteProjector (OnsiteProjector &&)=delete | |
| OnsiteProjector & | operator= (OnsiteProjector &&)=delete |
| void | init_proj (const std::string &orbital_dir, const std::vector< std::string > &orb_files, const std::vector< int > &nproj, const std::vector< int > &lproj, const std::vector< int > &iproj, const std::vector< double > &onsite_r) |
| initialize the radial projector for real-space projection involving operators | |
| void | tabulate_atomic (const int ik, const char grad='n') |
| calculate the onsite projectors in reciprocal space(|G+K>) for all atoms | |
| void | overlap_proj_psi (const int npm, const std::complex< double > *ppsi, const int ld_psi=0) |
| void | init (const std::string &orbital_dir, const UnitCell *ucell_in, const psi::Psi< std::complex< T >, Device > &psi, const K_Vectors &kv, const ModulePW::PW_Basis_K &pw_basis, Structure_Factor &sf, const double onsite_radius, const int nq, const double dq, const ModuleBase::matrix &wg, const ModuleBase::matrix &ekb) |
| void | cal_occupations (const psi::Psi< std::complex< T >, Device > *psi, const ModuleBase::matrix &wg_in, const int nspin_in) |
| calculate and print the occupations of all lm orbitals | |
| int | get_size_becp () const |
| void | ensure_range (double momentum, double dq) |
| Extend this projector's radial table to cover shifted momenta. | |
| void | invalidate_proj () |
| Invalidate position-dependent overlap projectors without changing radial channels. | |
| void | overlap_td (int ik, int columns, const std::complex< double > *psi, int stride, const ModuleBase::Vector3< double > &vector_potential) |
| Project endpoint spin-component columns without printing static occupations. | |
| std::complex< double > * | get_becp () const |
| std::complex< double > * | get_h_becp () const |
| std::complex< double > * | get_tab_atomic () const |
| int | get_tot_nproj () const |
| int | get_npw () const |
| int | get_npwx () const |
| const int & | get_nh (int iat) const |
| hamilt::Onsite_Proj_tools< T, Device > * | get_fs_tools () const |
| void | cal_force_onsite_dftu (int ik, int npm, T *force, const Plus_U_Base &dftu, int nks, const double *wg_ik) const |
| high-level: compute DFT+U force contribution for one k-point | |
| double | cal_stress_onsite_dftu (int ik, int npm, const Plus_U_Base &dftu, int nks, const double *wg_ik) const |
| high-level: compute DFT+U stress contribution for one k-point | |
| void | cal_force_onsite_dspin (int ik, int npm, T *force, const ModuleBase::Vector3< double > *lambda, const double *wg_ik) const |
| high-level: compute DeltaSpin force contribution for one k-point | |
| double | cal_stress_onsite_dspin (int ik, int npm, const ModuleBase::Vector3< double > *lambda, const double *wg_ik) const |
| high-level: compute DeltaSpin stress contribution for one k-point | |
Static Public Member Functions | |
| static OnsiteProjector< T, Device > * | get_instance () |
| static access to this class instance | |
Private Member Functions | |
| void | overlap_impl (int columns, const std::complex< double > *psi, int stride, const ModuleBase::Vector3< double > &vector_potential) |
Private Attributes | |
| Device * | ctx = {} |
| base_device::DEVICE_CPU * | cpu_ctx = {} |
| base_device::AbacusDevice_t | device = {} |
| hamilt::Onsite_Proj_tools< T, Device > * | fs_tools = nullptr |
| std::complex< double > * | tab_atomic_ = nullptr |
| std::complex< double > * | becp = nullptr |
| std::complex< double > * | h_becp = nullptr |
| int | size_becp = 0 |
| int | size_vproj = 0 |
| int | tot_nproj = 0 |
| int | npw_ = 0 |
| int | npwx_ = 0 |
| int | ik_ = 0 |
| std::vector< std::vector< int > > | it2ia |
| std::vector< double > | rgrid |
| std::vector< std::vector< double > > | projs |
| std::vector< std::vector< int > > | it2iproj |
| std::vector< int > | lproj |
| std::vector< int > | iat_nh |
| const UnitCell * | ucell = nullptr |
| const int * | isk_ = nullptr |
| spin index per k-point (from K_Vectors) | |
| const ModulePW::PW_Basis_K * | pw_basis_ = nullptr |
| Structure_Factor * | sf_ = nullptr |
| int | ntype = 0 |
| std::vector< int > | irow2it_ |
| std::vector< int > | irow2iproj_ |
| std::vector< int > | irow2m_ |
| std::map< std::tuple< int, int, int, int >, int > | itiaiprojm2irow_ |
| ModuleBase::realArray | tab |
| ModuleBase::matrix | nhtol |
| bool | initialed = false |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
rename the operators for CPU/GPU device
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
default |
Own an independent projector and its workspaces.
| template projectors::OnsiteProjector< T, Device >::~OnsiteProjector | ( | ) |
|
delete |
|
delete |
| template void projectors::OnsiteProjector< T, Device >::cal_force_onsite_dftu | ( | int | ik, |
| int | npm, | ||
| T * | force, | ||
| const Plus_U_Base & | dftu, | ||
| int | nks, | ||
| const double * | wg_ik ) const |
high-level: compute DFT+U force contribution for one k-point
| template void projectors::OnsiteProjector< T, Device >::cal_force_onsite_dspin | ( | int | ik, |
| int | npm, | ||
| T * | force, | ||
| const ModuleBase::Vector3< double > * | lambda, | ||
| const double * | wg_ik ) const |
high-level: compute DeltaSpin force contribution for one k-point
| template void projectors::OnsiteProjector< T, Device >::cal_occupations | ( | const psi::Psi< std::complex< T >, Device > * | psi, |
| const ModuleBase::matrix & | wg_in, | ||
| const int | nspin_in ) |
calculate and print the occupations of all lm orbitals
| template double projectors::OnsiteProjector< T, Device >::cal_stress_onsite_dftu | ( | int | ik, |
| int | npm, | ||
| const Plus_U_Base & | dftu, | ||
| int | nks, | ||
| const double * | wg_ik ) const |
high-level: compute DFT+U stress contribution for one k-point
| template double projectors::OnsiteProjector< T, Device >::cal_stress_onsite_dspin | ( | int | ik, |
| int | npm, | ||
| const ModuleBase::Vector3< double > * | lambda, | ||
| const double * | wg_ik ) const |
high-level: compute DeltaSpin stress contribution for one k-point
| void projectors::OnsiteProjector< T, Device >::ensure_range | ( | double | momentum, |
| double | dq ) |
Extend this projector's radial table to cover shifted momenta.
|
inline |
|
inline |
|
inline |
|
static |
static access to this class instance
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void projectors::OnsiteProjector< T, Device >::init | ( | const std::string & | orbital_dir, |
| const UnitCell * | ucell_in, | ||
| const psi::Psi< std::complex< T >, Device > & | psi, | ||
| const K_Vectors & | kv, | ||
| const ModulePW::PW_Basis_K & | pw_basis, | ||
| Structure_Factor & | sf, | ||
| const double | onsite_radius, | ||
| const int | nq, | ||
| const double | dq, | ||
| const ModuleBase::matrix & | wg, | ||
| const ModuleBase::matrix & | ekb ) |
| void projectors::OnsiteProjector< T, Device >::init_proj | ( | const std::string & | orbital_dir, |
| const std::vector< std::string > & | orb_files, | ||
| const std::vector< int > & | nproj, | ||
| const std::vector< int > & | lproj, | ||
| const std::vector< int > & | iproj, | ||
| const std::vector< double > & | onsite_r ) |
initialize the radial projector for real-space projection involving operators
| orbital_dir | You know what it is |
| orb_files | You know what it is |
| nproj | # of projectors for each type defined in UnitCell, can be zero |
| lproj | angular momentum for each projector |
| iproj | index of zeta function that each projector generated from |
| onsite_r | onsite-radius for all valid projectors |
| rgrid | [out] the radial grid shared by all projectors |
| projs | [out] projectors indexed by iproj |
| it2iproj | [out] for each type, the projector index (across all types) |
| template void projectors::OnsiteProjector< T, Device >::invalidate_proj | ( | ) |
Invalidate position-dependent overlap projectors without changing radial channels.
|
delete |
|
delete |
|
private |
| template void projectors::OnsiteProjector< T, Device >::overlap_proj_psi | ( | const int | npm, |
| const std::complex< double > * | ppsi, | ||
| const int | ld_psi = 0 ) |
compute becp = <alpha|psi>; ld_psi is the leading dimension of psi (defaults to npwx if 0, but should be ngk[ik] when called from the Davidson/CG solver where psi stride varies per k-point)
| template void projectors::OnsiteProjector< T, Device >::overlap_td | ( | int | ik, |
| int | columns, | ||
| const std::complex< double > * | psi, | ||
| int | stride, | ||
| const ModuleBase::Vector3< double > & | vector_potential ) |
Project endpoint spin-component columns without printing static occupations.
| template void projectors::OnsiteProjector< T, Device >::tabulate_atomic | ( | const int | ik, |
| const char | grad = 'n' ) |
calculate the onsite projectors in reciprocal space(|G+K>) for all atoms
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
spin index per k-point (from K_Vectors)
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |