|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include <LCAO_deepks.h>
Public Member Functions | |
| int | get_hr_cal () |
| void | set_hr_cal (bool cal) |
| LCAO_Deepks () | |
| ~LCAO_Deepks () | |
| void | init (const LCAO_Orbitals &orb, const int nat, const int ntype, const int nks, const Parallel_Orbitals &pv_in, std::vector< int > na, std::ofstream &ofs) |
| void | allocate_V_delta (const int nat, const int nks=1) |
| Allocate memory for correction to Hamiltonian. | |
| void | init_DMR (const UnitCell &ucell, const LCAO_Orbitals &orb, const Parallel_Orbitals &pv, const Grid_Driver &GridD) |
| Initialize the dm_r container. | |
| void | dpks_cal_e_delta_band (const std::vector< std::vector< T > > &dm, const int nks) |
| a temporary interface for cal_e_delta_band | |
Public Attributes | |
| double | E_delta = 0.0 |
| (Unit: Ry) Correction energy provided by NN | |
| double | e_delta_band = 0.0 |
(Unit: Ry) ![]() | |
| std::vector< std::vector< T > > | V_delta |
| int | lmaxd = 0 |
| int | nmaxd = 0 |
| int | inlmax = 0 |
| int | n_descriptor |
| int | des_per_atom |
| std::vector< int > | inl2l |
| ModuleBase::IntArray * | inl_index |
| bool | init_pdm = false |
| torch::jit::script::Module | model_deepks |
| std::vector< hamilt::HContainer< double > * > | phialpha |
| hamilt::HContainer< double > * | dm_r = nullptr |
| std::vector< torch::Tensor > | pdm |
| double ** | gedm |
| dE/dD, autograd from loaded model(E: Ry) | |
Private Member Functions | |
| void | init_index (const int ntype, const int nat, std::vector< int > na, const int tot_inl, const LCAO_Orbitals &orb, std::ofstream &ofs) |
Private Attributes | |
| bool | hr_cal = true |
| const Parallel_Orbitals * | pv |
The LCAO_Deepks contains subroutines for implementation of the DeePKS method in atomic basis. In essential, it is a machine-learned correction term to the XC potential in the form of delta_V=|alpha> V(D) <alpha|, where D is a list of descriptors The subroutines may be roughly grouped into 3 types
For details of DeePKS method, you can refer to DeePKS paper.
|
explicit |
| LCAO_Deepks< T >::~LCAO_Deepks | ( | ) |
| void LCAO_Deepks< T >::allocate_V_delta | ( | const int | nat, |
| const int | nks = 1 |
||
| ) |
Allocate memory for correction to Hamiltonian.
| void LCAO_Deepks< T >::dpks_cal_e_delta_band | ( | const std::vector< std::vector< T > > & | dm, |
| const int | nks | ||
| ) |
a temporary interface for cal_e_delta_band
|
inline |
| void LCAO_Deepks< T >::init | ( | const LCAO_Orbitals & | orb, |
| const int | nat, | ||
| const int | ntype, | ||
| const int | nks, | ||
| const Parallel_Orbitals & | pv_in, | ||
| std::vector< int > | na, | ||
| std::ofstream & | ofs | ||
| ) |
Allocate memory and calculate the index of descriptor in all atoms. (only for descriptor part, not including scf)
| void LCAO_Deepks< T >::init_DMR | ( | const UnitCell & | ucell, |
| const LCAO_Orbitals & | orb, | ||
| const Parallel_Orbitals & | pv, | ||
| const Grid_Driver & | GridD | ||
| ) |
Initialize the dm_r container.
|
private |
|
inline |
| int LCAO_Deepks< T >::des_per_atom |
| hamilt::HContainer<double>* LCAO_Deepks< T >::dm_r = nullptr |
| double LCAO_Deepks< T >::E_delta = 0.0 |
(Unit: Ry) Correction energy provided by NN
| double LCAO_Deepks< T >::e_delta_band = 0.0 |
(Unit: Ry) 
| double** LCAO_Deepks< T >::gedm |
dE/dD, autograd from loaded model(E: Ry)
|
private |
| bool LCAO_Deepks< T >::init_pdm = false |
| std::vector<int> LCAO_Deepks< T >::inl2l |
| ModuleBase::IntArray* LCAO_Deepks< T >::inl_index |
| int LCAO_Deepks< T >::inlmax = 0 |
| int LCAO_Deepks< T >::lmaxd = 0 |
| torch::jit::script::Module LCAO_Deepks< T >::model_deepks |
| int LCAO_Deepks< T >::n_descriptor |
| int LCAO_Deepks< T >::nmaxd = 0 |
| std::vector<torch::Tensor> LCAO_Deepks< T >::pdm |
| std::vector<hamilt::HContainer<double>*> LCAO_Deepks< T >::phialpha |
|
private |
| std::vector<std::vector<T> > LCAO_Deepks< T >::V_delta |
Correction term to the Hamiltonian matrix: 