Skip to content

Commit 7536337

Browse files
committed
Fix bug in DeePKS test.
1 parent 04a7f00 commit 7536337

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

source/module_hamilt_lcao/module_deepks/test/LCAO_deepks_test.cpp

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,13 @@ void test_deepks::check_phialpha()
4646
overlap_orb_alpha_,
4747
this->ld.phialpha);
4848

49-
DeePKS_domain::check_phialpha(PARAM.input.cal_force, ucell, ORB, Test_Deepks::GridD, &ParaO, this->ld.phialpha);
49+
DeePKS_domain::check_phialpha(PARAM.input.cal_force,
50+
ucell,
51+
ORB,
52+
Test_Deepks::GridD,
53+
&ParaO,
54+
this->ld.phialpha,
55+
0); // 0 for rank
5056

5157
this->compare_with_ref("phialpha.dat", "phialpha_ref.dat");
5258
this->compare_with_ref("dphialpha_x.dat", "dphialpha_x_ref.dat");
@@ -373,16 +379,16 @@ void test_deepks::check_edelta(std::vector<torch::Tensor>& descriptor)
373379
ld.allocate_V_delta(ucell.nat, kv.nkstot);
374380
}
375381
DeePKS_domain::cal_edelta_gedm(ucell.nat,
376-
this->ld.lmaxd,
377-
this->ld.nmaxd,
378-
this->ld.inlmax,
379-
this->ld.des_per_atom,
380-
this->ld.inl_l,
381-
descriptor,
382-
this->ld.pdm,
383-
this->ld.model_deepks,
384-
this->ld.gedm,
385-
this->ld.E_delta);
382+
this->ld.lmaxd,
383+
this->ld.nmaxd,
384+
this->ld.inlmax,
385+
this->ld.des_per_atom,
386+
this->ld.inl_l,
387+
descriptor,
388+
this->ld.pdm,
389+
this->ld.model_deepks,
390+
this->ld.gedm,
391+
this->ld.E_delta);
386392

387393
std::ofstream ofs("E_delta.dat");
388394
ofs << std::setprecision(10) << this->ld.E_delta << std::endl;

0 commit comments

Comments
 (0)