Skip to content

Commit fd47075

Browse files
committed
update build_overlap in Setup_DeePKS class
1 parent 4918a08 commit fd47075

File tree

2 files changed

+2
-49
lines changed

2 files changed

+2
-49
lines changed

source/source_esolver/lcao_before_scf.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -142,26 +142,6 @@ void ESolver_KS_LCAO<TK, TR>::before_scf(UnitCell& ucell, const int istep)
142142
// since it depends on ionic positions
143143
this->deepks.build_overlap(ucell, orb_, pv, gd, *(two_center_bundle_.overlap_orb_alpha), PARAM.inp);
144144

145-
/*
146-
#ifdef __MLALGO
147-
if (PARAM.globalv.deepks_setorb)
148-
{
149-
const Parallel_Orbitals* pv = &this->pv;
150-
// allocate <phi(0)|alpha(R)>, phialpha is different every ion step, so it is allocated here
151-
DeePKS_domain::allocate_phialpha(PARAM.inp.cal_force, ucell, orb_, this->gd, pv, this->deepks.ld.phialpha);
152-
// build and save <phi(0)|alpha(R)> at beginning
153-
DeePKS_domain::build_phialpha(PARAM.inp.cal_force, ucell, orb_, this->gd,
154-
pv, *(two_center_bundle_.overlap_orb_alpha), this->deepks.ld.phialpha);
155-
156-
if (PARAM.inp.deepks_out_unittest)
157-
{
158-
DeePKS_domain::check_phialpha(PARAM.inp.cal_force, ucell, orb_,
159-
this->gd, pv, this->deepks.ld.phialpha, GlobalV::MY_RANK);
160-
}
161-
}
162-
#endif
163-
*/
164-
165145
// 10) prepare sc calculation
166146
if (PARAM.inp.sc_mag_switch)
167147
{

source/source_esolver/lcao_others.cpp

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
#include "source_base/timer.h"
1616
#include "source_cell/module_neighbor/sltk_atom_arrange.h"
1717
#include "source_cell/module_neighbor/sltk_grid_driver.h"
18-
#ifdef __MLALGO
19-
#include "source_lcao/module_deepks/LCAO_deepks.h"
20-
#endif
2118
#include "source_lcao/LCAO_domain.h"
2219
#include "source_lcao/module_operator_lcao/op_exx_lcao.h"
2320
#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)
242239
);
243240
}
244241

245-
#ifdef __MLALGO
242+
246243
// for each ionic step, the overlap <phi|alpha> must be rebuilt
247244
// 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);
261246

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
274247
if (PARAM.inp.sc_mag_switch)
275248
{
276249
spinconstrain::SpinConstrain<TK>& sc = spinconstrain::SpinConstrain<TK>::getScInstance();

0 commit comments

Comments
 (0)