Skip to content

Commit 6974d42

Browse files
committed
fix bug
1 parent b541cbf commit 6974d42

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

source/module_esolver/esolver_ks_pw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ void ESolver_KS_PW<T, Device>::hamilt2density_single(const int istep, const int
362362
//---------------------------------------------------------------------------------------------------------------
363363
//---------------------------------for psi init guess!!!!--------------------------------------------------------
364364
//---------------------------------------------------------------------------------------------------------------
365-
if (!PARAM.inp.psi_initializer && PARAM.inp.basis_type == "pw" && iter == 1)
365+
if (!PARAM.inp.psi_initializer && PARAM.inp.basis_type == "pw" && this->init_psi == false)
366366
{
367367
for (int ik = 0; ik < this->pw_wfc->nks; ++ik)
368368
{

source/module_esolver/esolver_sdft_pw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ void ESolver_SDFT_PW<T, Device>::hamilt2density_single(int istep, int iter, doub
190190
//---------------------------------------------------------------------------------------------------------------
191191
//---------------------------------for psi init guess!!!!--------------------------------------------------------
192192
//---------------------------------------------------------------------------------------------------------------
193-
if (!PARAM.inp.psi_initializer && PARAM.inp.basis_type == "pw" && iter == 1)
193+
if (!PARAM.inp.psi_initializer && PARAM.inp.basis_type == "pw" && this->init_psi == false)
194194
{
195195
for (int ik = 0; ik < this->pw_wfc->nks; ++ik)
196196
{

0 commit comments

Comments
 (0)