diff --git a/source/module_ri/Exx_LRI.hpp b/source/module_ri/Exx_LRI.hpp index 206f88e2c4..26c494a805 100644 --- a/source/module_ri/Exx_LRI.hpp +++ b/source/module_ri/Exx_LRI.hpp @@ -283,6 +283,11 @@ void Exx_LRI::cal_exx_force(const int& nat) ModuleBase::TITLE("Exx_LRI","cal_exx_force"); ModuleBase::timer::tick("Exx_LRI", "cal_exx_force"); + if (!this->exx_lri.flag_finish.D) + { + ModuleBase::WARNING_QUIT("Force_Stress_LCAO", "Cannot calculate EXX force when the first PBE loop is not converged."); + } + this->force_exx.create(nat, Ndim); for(int is=0; is