From f1abb0a0ad623bc16407321cc541ba398a45f939 Mon Sep 17 00:00:00 2001 From: maki49 <1579492865@qq.com> Date: Thu, 27 Mar 2025 18:28:35 +0800 Subject: [PATCH] add a check before calculating EXX force --- source/module_ri/Exx_LRI.hpp | 5 +++++ 1 file changed, 5 insertions(+) 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