File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -24,18 +24,32 @@ void Hamilt::diagH_pw(
2424 // but if mem_saver is used, ik0=0.
2525 int ik0 = ik;
2626
27- if (GlobalV::CALCULATION==" nscf" && GlobalC::wf. mem_saver == 1 )
27+ if (GlobalV::CALCULATION==" nscf" )
2828 {
2929 if (GlobalV::BASIS_TYPE==" pw" )
3030 {
3131 // generate PAOs first, then diagonalize to get
3232 // inital wavefunctions.
33- GlobalC::wf.diago_PAO_in_pw_k2 (ik, GlobalC::wf.evc [0 ]);
33+ if (GlobalC::wf.mem_saver ==1 )
34+ {
35+ GlobalC::wf.diago_PAO_in_pw_k2 (ik, GlobalC::wf.evc [0 ]);
36+ }
37+ else
38+ {
39+ GlobalC::wf.diago_PAO_in_pw_k2 (ik, GlobalC::wf.evc [ik0]);
40+ }
3441 }
3542#ifdef __LCAO
3643 else if (GlobalV::BASIS_TYPE==" lcao_in_pw" )
3744 {
38- GlobalC::wf.LCAO_in_pw_k (ik, GlobalC::wf.wanf2 [0 ]);
45+ if (GlobalC::wf.mem_saver ==1 )
46+ {
47+ GlobalC::wf.LCAO_in_pw_k (ik, GlobalC::wf.wanf2 [0 ]);
48+ }
49+ else
50+ {
51+ GlobalC::wf.LCAO_in_pw_k (ik, GlobalC::wf.wanf2 [ik0]);
52+ }
3953 }
4054#endif
4155 ik0 = 0 ;
Original file line number Diff line number Diff line change @@ -349,7 +349,7 @@ void wavefunc::wfcinit_k(void)
349349{
350350 ModuleBase::TITLE (" wavefunc" ," wfcinit_k" );
351351
352- if (mem_saver )
352+ if (GlobalV::CALCULATION== " nscf " )
353353 {
354354 return ;
355355 }
You can’t perform that action at this time.
0 commit comments