Skip to content

Commit e506d00

Browse files
authored
add a check before calculating EXX force (#6067)
1 parent c12bd52 commit e506d00

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

source/module_ri/Exx_LRI.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,11 @@ void Exx_LRI<Tdata>::cal_exx_force(const int& nat)
283283
ModuleBase::TITLE("Exx_LRI","cal_exx_force");
284284
ModuleBase::timer::tick("Exx_LRI", "cal_exx_force");
285285

286+
if (!this->exx_lri.flag_finish.D)
287+
{
288+
ModuleBase::WARNING_QUIT("Force_Stress_LCAO", "Cannot calculate EXX force when the first PBE loop is not converged.");
289+
}
290+
286291
this->force_exx.create(nat, Ndim);
287292
for(int is=0; is<PARAM.inp.nspin; ++is)
288293
{

0 commit comments

Comments
 (0)