We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a29e2f commit 603d01cCopy full SHA for 603d01c
source/module_esolver/esolver_ks.cpp
@@ -673,10 +673,10 @@ void ESolver_KS<T, Device>::iter_finish(int& iter)
673
this->pelec->f_en.etot_old = this->pelec->f_en.etot;
674
675
// add a energy threshold for SCF convergence
676
- if (this->conv_esolver == 0) // only check when density is not converged
+ if (this->scf_ene_thr > 0.0 && this->conv_esolver == 1) // only check when density is not converged
677
{
678
this->conv_esolver
679
- = (iter != 1 && std::abs(this->pelec->f_en.etot_delta * ModuleBase::Ry_to_eV) < this->scf_ene_thr);
+ = (std::abs(this->pelec->f_en.etot_delta * ModuleBase::Ry_to_eV) < this->scf_ene_thr);
680
}
681
682
0 commit comments