Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/module_esolver/esolver_ks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -673,10 +673,10 @@ void ESolver_KS<T, Device>::iter_finish(int& iter)
this->pelec->f_en.etot_old = this->pelec->f_en.etot;

// add a energy threshold for SCF convergence
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
{
this->conv_esolver
= (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);
}
}

Expand Down
Loading