|
15 | 15 | #include "source_base/timer.h" |
16 | 16 | #include "source_cell/module_neighbor/sltk_atom_arrange.h" |
17 | 17 | #include "source_cell/module_neighbor/sltk_grid_driver.h" |
18 | | -#ifdef __MLALGO |
19 | | -#include "source_lcao/module_deepks/LCAO_deepks.h" |
20 | | -#endif |
21 | 18 | #include "source_lcao/LCAO_domain.h" |
22 | 19 | #include "source_lcao/module_operator_lcao/op_exx_lcao.h" |
23 | 20 | #include "source_lcao/module_operator_lcao/operator_lcao.h" |
@@ -242,35 +239,11 @@ void ESolver_KS_LCAO<TK, TR>::others(UnitCell& ucell, const int istep) |
242 | 239 | ); |
243 | 240 | } |
244 | 241 |
|
245 | | -#ifdef __MLALGO |
| 242 | + |
246 | 243 | // for each ionic step, the overlap <phi|alpha> must be rebuilt |
247 | 244 | // since it depends on ionic positions |
248 | | - if (PARAM.globalv.deepks_setorb) |
249 | | - { |
250 | | - const Parallel_Orbitals* pv = &this->pv; |
251 | | - // allocate <phi(0)|alpha(R)>, phialpha is different every ion step, so it is allocated here |
252 | | - DeePKS_domain::allocate_phialpha(PARAM.inp.cal_force, ucell, orb_, this->gd, pv, this->deepks.ld.phialpha); |
253 | | - // build and save <phi(0)|alpha(R)> at beginning |
254 | | - DeePKS_domain::build_phialpha(PARAM.inp.cal_force, |
255 | | - ucell, |
256 | | - orb_, |
257 | | - this->gd, |
258 | | - pv, |
259 | | - *(two_center_bundle_.overlap_orb_alpha), |
260 | | - this->deepks.ld.phialpha); |
| 245 | + this->deepks.build_overlap(ucell, orb_, pv, gd, *(two_center_bundle_.overlap_orb_alpha), PARAM.inp); |
261 | 246 |
|
262 | | - if (PARAM.inp.deepks_out_unittest) |
263 | | - { |
264 | | - DeePKS_domain::check_phialpha(PARAM.inp.cal_force, |
265 | | - ucell, |
266 | | - orb_, |
267 | | - this->gd, |
268 | | - pv, |
269 | | - this->deepks.ld.phialpha, |
270 | | - GlobalV::MY_RANK); |
271 | | - } |
272 | | - } |
273 | | -#endif |
274 | 247 | if (PARAM.inp.sc_mag_switch) |
275 | 248 | { |
276 | 249 | spinconstrain::SpinConstrain<TK>& sc = spinconstrain::SpinConstrain<TK>::getScInstance(); |
|
0 commit comments