From 7fdd771af37e0cc94518439e05ae727a190e0d86 Mon Sep 17 00:00:00 2001 From: Liu Xiaohui Date: Fri, 10 May 2024 22:35:45 +0800 Subject: [PATCH] Improve output of H and S matrices: output matrices when the self-consistent iteration steps reach scf_nmax, even if the charge density doesn't converge. (#4147) Co-authored-by: liuxiaohui --- source/module_esolver/esolver_ks_lcao.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/module_esolver/esolver_ks_lcao.cpp b/source/module_esolver/esolver_ks_lcao.cpp index 80c2d94c79..4fb606be36 100644 --- a/source/module_esolver/esolver_ks_lcao.cpp +++ b/source/module_esolver/esolver_ks_lcao.cpp @@ -819,7 +819,7 @@ void ESolver_KS_LCAO::update_pot(const int istep, const int iter) ModuleBase::TITLE("ESolver_KS_LCAO", "update_pot"); // print Hamiltonian and Overlap matrix - if (this->conv_elec) + if (this->conv_elec || iter == GlobalV::SCF_NMAX) { if (!GlobalV::GAMMA_ONLY_LOCAL && hsolver::HSolverLCAO::out_mat_hs[0]) {