Skip to content

Commit 2cf7753

Browse files
committed
fix bug of mixing_dmr
1 parent 27229c0 commit 2cf7753

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/module_esolver/esolver_ks_lcao.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ void ESolver_KS_LCAO<TK, TR>::iter_finish(UnitCell& ucell, const int istep, int&
827827

828828
// 5) mix density matrix if mixing_restart + mixing_dmr + not first
829829
// mixing_restart at every iter
830-
if (!conv_esolver && PARAM.inp.mixing_restart > 0 && this->p_chgmix->mixing_restart_count > 0 && PARAM.inp.mixing_dmr)
830+
if (iter != PARAM.inp.scf_nmax && !conv_esolver && PARAM.inp.mixing_restart > 0 && this->p_chgmix->mixing_restart_count > 0 && PARAM.inp.mixing_dmr)
831831
{
832832
elecstate::DensityMatrix<TK, double>* dm = dynamic_cast<elecstate::ElecStateLCAO<TK>*>(this->pelec)->get_DM();
833833
this->p_chgmix->mix_dmr(dm);

0 commit comments

Comments
 (0)