ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
Functions | |
template<typename TK > | |
void | print_dm (const int nks, const int nlocal, const int nrow, const std::vector< std::vector< TK > > &dm) |
print density matrices | |
void | load_npy_gedm (const int nat, const int des_per_atom, double **gedm, double &e_delta, const int rank) |
void | save_npy_d (const int nat, const int des_per_atom, const int inlmax, const std::vector< int > &inl2l, const bool deepks_equiv, const std::vector< torch::Tensor > &descriptor, const std::string &dm_eig_file, const int rank) |
save descriptor | |
void | save_npy_e (const double &e, const std::string &e_file, const int rank, const double unit_scale=Ry2Hartree) |
template<typename TK , typename TH > | |
void | save_npy_h (const std::vector< TH > &hamilt, const std::string &h_file, const int nlocal, const int nks, const int rank, const double unit_scale=Ry2Hartree) |
void | save_matrix2npy (const std::string &file_name, const ModuleBase::matrix &matrix, const int rank, const double &scale=1.0, const char mode='N', const double unit_scale=Ry2Hartree) |
template<typename T > | |
void | save_tensor2npy (const std::string &file_name, const torch::Tensor &tensor, const int rank) |
Variables | |
constexpr double | Ry2Hartree = 0.5 |
others print quantities in .npy format | |
void LCAO_deepks_io::load_npy_gedm | ( | const int | nat, |
const int | des_per_atom, | ||
double ** | gedm, | ||
double & | e_delta, | ||
const int | rank | ||
) |
void LCAO_deepks_io::print_dm | ( | const int | nks, |
const int | nlocal, | ||
const int | nrow, | ||
const std::vector< std::vector< TK > > & | dm | ||
) |
print density matrices
void LCAO_deepks_io::save_matrix2npy | ( | const std::string & | file_name, |
const ModuleBase::matrix & | matrix, | ||
const int | rank, | ||
const double & | scale = 1.0 , |
||
const char | mode = 'N' , |
||
const double | unit_scale = Ry2Hartree |
||
) |
void LCAO_deepks_io::save_npy_d | ( | const int | nat, |
const int | des_per_atom, | ||
const int | inlmax, | ||
const std::vector< int > & | inl2l, | ||
const bool | deepks_equiv, | ||
const std::vector< torch::Tensor > & | descriptor, | ||
const std::string & | dm_eig_file, | ||
const int | rank | ||
) |
save descriptor
void LCAO_deepks_io::save_npy_e | ( | const double & | e, |
const std::string & | e_file, | ||
const int | rank, | ||
const double | unit_scale = Ry2Hartree |
||
) |
[in] | e | ![]() ![]() |
void LCAO_deepks_io::save_npy_h | ( | const std::vector< TH > & | hamilt, |
const std::string & | h_file, | ||
const int | nlocal, | ||
const int | nks, | ||
const int | rank, | ||
const double | unit_scale = Ry2Hartree |
||
) |
template void LCAO_deepks_io::save_tensor2npy< double > | ( | const std::string & | file_name, |
const torch::Tensor & | tensor, | ||
const int | rank | ||
) |
|
constexpr |
others print quantities in .npy format
This file contains subroutines that contains interface with libnpy since many arrays must be saved in numpy format It also contains subroutines for printing density matrices which is used in unit tests There are 2 subroutines for printing and loading .npy file: