1- // wenfei 2022-1-5
2- // This file contains constructor and destructor of the class LCAO_deepks,
31#include " source_io/module_parameter/parameter.h"
4- // as well as subroutines for initializing and releasing relevant data structures
5-
6- // Other than the constructor and the destructor, it contains 3 types of subroutines:
7- // 1. subroutines that are related to calculating descriptors:
8- // - init : allocates some arrays
9- // - init_index : records the index (inl)
10- // 2. subroutines that are related to V_delta:
11- // - allocate_V_delta : allocates V_delta; if calculating force, it also allocates F_delta
122
133#ifdef __MLALGO
144
@@ -57,7 +47,12 @@ void LCAO_Deepks<T>::init(const LCAO_Orbitals& orb,
5747 ModuleBase::TITLE (" LCAO_Deepks" , " init" );
5848 ModuleBase::timer::start (" LCAO_Deepks" , " init" );
5949
60- ofs << " Initialize the descriptor index for DeePKS (lcao line)" << std::endl;
50+ ofs << " >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>" << std::endl;
51+ ofs << " | |" << std::endl;
52+ ofs << " | #Initialize DeePKS (LCAO)# |" << std::endl;
53+ ofs << " | Setup machine-Learning-Based DeePKS method based on NAO basis set |" << std::endl;
54+ ofs << " | |" << std::endl;
55+ ofs << " <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" << std::endl;
6156
6257 const int lm = orb.get_lmax_d ();
6358 const int nm = orb.get_nchimax_d ();
@@ -82,8 +77,8 @@ void LCAO_Deepks<T>::init(const LCAO_Orbitals& orb,
8277 this ->deepks_param .nchi_d_l [l] = orb.Alpha [0 ].getNchi (l);
8378 }
8479
85- ofs << " lmax of descriptor = " << deepks_param.lmaxd << std::endl;
86- ofs << " nmax of descriptor = " << deepks_param.nmaxd << std::endl;
80+ ofs << " Lmax of descriptor " << deepks_param.lmaxd << std::endl;
81+ ofs << " Nmax of descriptor " << deepks_param.nmaxd << std::endl;
8782
8883 int pdm_size = 0 ;
8984 this ->deepks_param .inlmax = tot_inl;
@@ -104,7 +99,7 @@ void LCAO_Deepks<T>::init(const LCAO_Orbitals& orb,
10499
105100 if (!PARAM.inp .deepks_equiv )
106101 {
107- ofs << " total basis (all atoms) for descriptor = " << std::endl;
102+ // ofs << " total basis (all atoms) for descriptor = " << std::endl;
108103
109104 // init pdm
110105 for (int inl = 0 ; inl < this ->deepks_param .inlmax ; inl++)
@@ -122,7 +117,7 @@ void LCAO_Deepks<T>::init(const LCAO_Orbitals& orb,
122117 }
123118 pdm_size = pdm_size * pdm_size;
124119 this ->deepks_param .des_per_atom = pdm_size;
125- ofs << " Equivariant version, size of pdm matrices : " << pdm_size << std::endl;
120+ ofs << " Equivariant version, pdm matrices size " << pdm_size << std::endl;
126121 for (int iat = 0 ; iat < nat; iat++)
127122 {
128123 this ->pdm [iat] = torch::zeros ({pdm_size}, torch::kFloat64 );
@@ -153,7 +148,7 @@ void LCAO_Deepks<T>::init_index(const int ntype,
153148 {
154149 this ->deepks_param .inl_index [it].create (na[it], this ->deepks_param .lmaxd + 1 , this ->deepks_param .nmaxd );
155150
156- ofs << " Type " << it + 1 << " number_of_atoms " << na[it] << std::endl;
151+ // ofs << " Type " << it + 1 << " number_of_atoms " << na[it] << std::endl;
157152
158153 for (int ia = 0 ; ia < na[it]; ia++)
159154 {
@@ -170,8 +165,8 @@ void LCAO_Deepks<T>::init_index(const int ntype,
170165 } // end ia
171166 } // end it
172167 assert (Total_nchi == inl);
173- ofs << " descriptors_per_atom " << this ->deepks_param .des_per_atom << std::endl;
174- ofs << " total_descriptors " << this ->deepks_param .n_descriptor << std::endl;
168+ ofs << " Descriptors per atom " << this ->deepks_param .des_per_atom << std::endl;
169+ ofs << " Total Descriptors " << this ->deepks_param .n_descriptor << std::endl;
175170 return ;
176171}
177172
0 commit comments