Skip to content

Commit d8eda67

Browse files
use scf_os_stop to control esovler
1 parent 808c221 commit d8eda67

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

source/module_esolver/esolver_ks.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,10 @@ void ESolver_KS<T, Device>::runner(const int istep, UnitCell& ucell)
532532
this->p_chgmix->mixing_restart_step = iter + 1;
533533
}
534534

535-
this->oscillate_esolver = this->p_chgmix->if_scf_oscillate(iter, drho, PARAM.inp.scf_os_ndim, PARAM.inp.scf_thr_os);
535+
if (PARAM.inp.scf_os_stop) // if oscillation is detected, SCF will stop
536+
{
537+
this->oscillate_esolver = this->p_chgmix->if_scf_oscillate(iter, drho, PARAM.inp.scf_os_ndim, PARAM.inp.scf_thr_os);
538+
}
536539

537540
// drho will be 0 at this->p_chgmix->mixing_restart step, which is
538541
// not ground state

0 commit comments

Comments
 (0)