From 8db9d5695d1357a4f2bcabf9914e31a724f194ee Mon Sep 17 00:00:00 2001 From: zaotian Date: Wed, 26 Aug 2026 12:39:40 +0800 Subject: [PATCH 1/8] Refactor LCAO EXX accumulation into H(R) --- source/source_esolver/esolver_factory.cpp | 9 +- .../module_current/td_current_io_comm.cpp | 63 +--------- source/source_lcao/hamilt_lcao.cpp | 43 +++---- .../module_operator_lcao/op_exx_lcao.cpp | 113 ++++++------------ .../module_operator_lcao/op_exx_lcao.h | 2 + .../module_operator_lcao/operator_lcao.cpp | 13 +- .../module_operator_lcao/veff_lcao.cpp | 87 ++++++++++++-- source/source_lcao/module_ri/ri_2d_comm.h | 13 -- source/source_lcao/module_ri/ri_2d_comm.hpp | 63 ---------- .../14_NO_TDDFT_PBE0/current_tot.txt.ref | 12 +- tests/08_EXX/14_NO_TDDFT_PBE0/result.ref | 4 +- 11 files changed, 152 insertions(+), 270 deletions(-) diff --git a/source/source_esolver/esolver_factory.cpp b/source/source_esolver/esolver_factory.cpp index 93e708b4258..a597a3cefb8 100644 --- a/source/source_esolver/esolver_factory.cpp +++ b/source/source_esolver/esolver_factory.cpp @@ -4,6 +4,7 @@ #include "esolver_ks_pw.h" #include "esolver_sdft_pw.h" #include "source_base/module_device/device.h" +#include "source_hamilt/module_xc/general_exx_info.h" #include "source_io/module_parameter/parameter.h" #ifdef __LCAO #include "esolver_dm2rho.h" @@ -254,7 +255,13 @@ ESolver* init_esolver(const Input_para& inp) } else if (esolver_type == "ksdft_lcao_tddft") { - if (inp.nspin < 4) + // Hybrid RT-TDDFT stores the complete Hamiltonian in complex H(R), + // even for collinear spin. The final operator-chain fold then applies + // the same TD gauge phase to local, non-local, and EXX terms. + General_Exx_Info exx_info; + init_general_exx_info(exx_info, inp); + const bool use_complex_hr = inp.nspin >= 4 || exx_info.cal_exx; + if (!use_complex_hr) { #if ((defined __CUDA) /* || (defined __ROCM) */) if (inp.device == "gpu") diff --git a/source/source_io/module_current/td_current_io_comm.cpp b/source/source_io/module_current/td_current_io_comm.cpp index 90f172317c7..0f8fbbcde0a 100644 --- a/source/source_io/module_current/td_current_io_comm.cpp +++ b/source/source_io/module_current/td_current_io_comm.cpp @@ -198,37 +198,8 @@ void ModuleIO::sum_HR(const UnitCell& ucell, // init complex full_hR init_from_hR(hR, full_hR); -#ifdef __EXX - const bool use_cell_nearest = (ModuleBase::Vector3(std::fmod(kv.get_koffset(0), 1.0), - std::fmod(kv.get_koffset(1), 1.0), - std::fmod(kv.get_koffset(2), 1.0)) - .norm() - < 1e-10); - RI::Cell_Nearest cell_nearest; - // reallocate full_hR for BvK used in EXX - if (exx_info.info_global.cal_exx) - { - const std::array Rs_period = {kv.nmp[0], kv.nmp[1], kv.nmp[2]}; - if (use_cell_nearest) - { - // set cell_nearest - std::map> atoms_pos; - for (int iat = 0; iat < ucell.nat; ++iat) - { - atoms_pos[iat] = RI_Util::Vector3_to_array3(ucell.atoms[ucell.iat2it[iat]].tau[ucell.iat2ia[iat]]); - } - const std::array, 3> latvec - = {RI_Util::Vector3_to_array3(ucell.a1), RI_Util::Vector3_to_array3(ucell.a2), RI_Util::Vector3_to_array3(ucell.a3)}; - cell_nearest.init(atoms_pos, latvec, Rs_period); - hamilt::reallocate_hcontainer(ucell.nat, full_hR, Rs_period, &cell_nearest); - } - else - { - hamilt::reallocate_hcontainer(ucell.nat, full_hR, Rs_period); - } - } -#endif - // add other hR + // The complete H(R) already contains exact exchange. Copy it once into + // full_hR; rebuilding BvK cells and adding HexxR here would double count. add_HR(hR, full_hR); // add velocity complex hR if (PARAM.inp.td_stype == 1) @@ -240,36 +211,6 @@ void ModuleIO::sum_HR(const UnitCell& ucell, const hamilt::HContainer>* velocity_hR = TD_info::td_vel_op->get_velocity_HR_pointer(); add_HR(velocity_hR, full_hR); } -#ifdef __EXX - // add HexxR to complex full_hR - if (exx_info.info_global.cal_exx) - { - for (size_t is = 0; is != PARAM.inp.nspin; ++is) - { - if (use_cell_nearest) - { - RI_2D_Comm::add_HexxR(is, - exx_info.info_global.hybrid_alpha, - exx_nao.exc->get_Hexxs(), - pv, - PARAM.globalv.npol, - *full_hR, - &cell_nearest); - } - else - { - RI_2D_Comm::add_HexxR(is, - exx_info.info_global.hybrid_alpha, - exx_nao.exc->get_Hexxs(), - pv, - PARAM.globalv.npol, - *full_hR, - nullptr); - } - } - } -#endif - ModuleBase::timer::end("ModuleIO", "sum_HR"); } diff --git a/source/source_lcao/hamilt_lcao.cpp b/source/source_lcao/hamilt_lcao.cpp index 8d9fcbbb62c..5b192144cef 100644 --- a/source/source_lcao/hamilt_lcao.cpp +++ b/source/source_lcao/hamilt_lcao.cpp @@ -422,35 +422,20 @@ HamiltLCAO::HamiltLCAO(const UnitCell& ucell, // Peize Lin add 2016-12-03 // set xc type before the first cal of xc in pelec->init_scf // and calculate Cs, Vs - Operator* exx; - if (PARAM.inp.esolver_type == "tddft") - { - exx = new OperatorEXX>(this->hsk, - this->hR, - ucell, - *this->kv, - exx_nao.exd.get(), - exx_nao.exc.get(), - exx_info, - Add_Hexx_Type::k, - istep, - !GlobalC::restart.info_load.restart_exx - && GlobalC::restart.info_load.load_H); - } - else - { - exx = new OperatorEXX>(this->hsk, - this->hR, - ucell, - *kv, - exx_nao.exd.get(), - exx_nao.exc.get(), - exx_info, - Add_Hexx_Type::R, - istep, - !GlobalC::restart.info_load.restart_exx - && GlobalC::restart.info_load.load_H); - } + // Keep exact exchange in H(R) for every workflow. For RT-TDDFT the + // factory selects complex H(R) when EXX is active, so the operator + // chain folds the complete Hamiltonian with one common TD phase. + Operator* exx = new OperatorEXX>(this->hsk, + this->hR, + ucell, + *this->kv, + exx_nao.exd.get(), + exx_nao.exc.get(), + exx_info, + Add_Hexx_Type::R, + istep, + !GlobalC::restart.info_load.restart_exx + && GlobalC::restart.info_load.load_H); this->getOperator()->add(exx); } #endif diff --git a/source/source_lcao/module_operator_lcao/op_exx_lcao.cpp b/source/source_lcao/module_operator_lcao/op_exx_lcao.cpp index 4e58854efeb..a04385d435b 100644 --- a/source/source_lcao/module_operator_lcao/op_exx_lcao.cpp +++ b/source/source_lcao/module_operator_lcao/op_exx_lcao.cpp @@ -9,7 +9,6 @@ #include "source_hamilt/module_hcontainer/read_hcontainer.h" #include "source_lcao/module_ri/exx_lri_interface.h" #include "source_lcao/module_ri/ri_2d_comm.h" -#include "source_lcao/module_rt/td_info.h" namespace hamilt { @@ -460,6 +459,15 @@ void OperatorEXX>::contributeHR() const int two_level_step = exx_info_ptr->info_ri.real_number ? this->exd->get_two_level_step() : this->exc->get_two_level_step(); + // Remember that the initial GGA-only stage has completed. In + // RT-TDDFT (and in subsequent ionic steps) LibRI may reset + // two_level_step to zero; without this persistent state the HR path + // would incorrectly skip EXX again. + if (two_level_step > 0) + { + this->initial_gga_done = true; + } + // Check if we are in the pre-convergence stage of the two-level SCF (i.e., the pure GGA loop) bool in_gga_pre_loop = (two_level_step == 0); @@ -467,7 +475,7 @@ void OperatorEXX>::contributeHR() bool lacks_good_guess = (PARAM.inp.init_wfc != "file" && !this->restart); // If in the pre-convergence loop and lacking a good initial guess, skip adding the EXX contribution - if (in_gga_pre_loop && lacks_good_guess) + if (in_gga_pre_loop && lacks_good_guess && !this->initial_gga_done) { return; // In the non-EXX loop, skip adding EXX contribution } @@ -513,52 +521,25 @@ template void OperatorEXX>::contributeHk(int ik) { ModuleBase::TITLE("OperatorEXX", "constributeHk"); - const bool has_workflow = exx_info_ptr->info_ri.real_number ? (this->exd != nullptr) : (this->exc != nullptr); - int two_level_step = 0; - if (has_workflow) - { - two_level_step - = exx_info_ptr->info_ri.real_number ? this->exd->get_two_level_step() : this->exc->get_two_level_step(); - } - - // Peize Lin add 2016-12-03 - // Taoni Bao add 2026-05-15 - // In RT-TDDFT, contributeHk is used, but two_level_step is reset to 0 at each ionic step. - // In order to add EXX correctly in for istep > 0, this->istep == 0 is needed to avoid skipping EXX calculation. - // 1. For NSCF - if (PARAM.inp.calculation == "nscf" || !has_workflow) + // The main LCAO path stores EXX in H(R) and lets the final base operator + // fold H(R) into H(k). Keep this override only for one-shot k-space EXX + // operators used by write_Vxc and RDMFT. + if (this->add_hexx_type == Add_Hexx_Type::R) { - // Do nothing here, allow the code to proceed and calculate EXX. + return; } - // 2. For the first ionic step: - else if (this->istep == 0) - { - // If EXX is once turned on (two_level_step > 0), let OperatorEXX remember this - if (two_level_step > 0) - { - this->initial_gga_done = true; - } - // Check if we are in the pre-convergence stage of the two-level SCF (i.e., the pure GGA loop) - bool in_gga_pre_loop = (two_level_step == 0); - - // Check if a high-quality initial guess is missing - bool lacks_good_guess = (!this->restart); - - // If in the pre-convergence loop and lacking a good initial guess, skip adding the EXX contribution - // Taoni Bao add 2026-05-18, only skip EXX if initial GGA loop is not done - // Fix RT-TDDFT EXX missing problem in the evolution - if (in_gga_pre_loop && lacks_good_guess && !this->initial_gga_done) - { - return; // In the non-EXX loop, skip adding EXX contribution - } + // The restart path may still use a full EXX workflow. For one-shot + // operators exd/exc are null and the value remains zero. + int two_level_step = 0; + if (exx_info_ptr->info_ri.real_number && this->exd != nullptr) + { + two_level_step = this->exd->get_two_level_step(); } - // 3. For subsequent ionic steps (istep > 0), add EXX normally - - if (this->add_hexx_type == Add_Hexx_Type::R) + else if (!exx_info_ptr->info_ri.real_number && this->exc != nullptr) { - OperatorLCAO::contributeHk(ik); + two_level_step = this->exc->get_two_level_step(); } if (XC_Functional::get_func_type() == 4 || XC_Functional::get_func_type() == 5) @@ -584,41 +565,25 @@ void OperatorEXX>::contributeHk(int ik) } } } - // cal H(k) from H(R) normally - if (PARAM.inp.esolver_type == "tddft" && PARAM.inp.td_stype == 2) + if (exx_info_ptr->info_ri.real_number) { - RI_2D_Comm::add_Hexx_td(ucell, - this->kv, - ik, - exx_info_ptr->info_global.hybrid_alpha, - *this->Hexxc, - *this->hR->get_paraV(), - TD_info::td_vel_op->cart_At, - TD_info::td_vel_op->get_phase_hybrid(), - this->hsk->get_hk()); + RI_2D_Comm::add_Hexx(ucell, + this->kv, + ik, + exx_info_ptr->info_global.hybrid_alpha, + *this->Hexxd, + *this->hR->get_paraV(), + this->hsk->get_hk()); } else { - if (exx_info_ptr->info_ri.real_number) - { - RI_2D_Comm::add_Hexx(ucell, - this->kv, - ik, - exx_info_ptr->info_global.hybrid_alpha, - *this->Hexxd, - *this->hR->get_paraV(), - this->hsk->get_hk()); - } - else - { - RI_2D_Comm::add_Hexx(ucell, - this->kv, - ik, - exx_info_ptr->info_global.hybrid_alpha, - *this->Hexxc, - *this->hR->get_paraV(), - this->hsk->get_hk()); - } + RI_2D_Comm::add_Hexx(ucell, + this->kv, + ik, + exx_info_ptr->info_global.hybrid_alpha, + *this->Hexxc, + *this->hR->get_paraV(), + this->hsk->get_hk()); } } } @@ -748,4 +713,4 @@ template void reallocate_hcontainer>( } // namespace hamilt // End content migrated from op_exx_lcao.hpp -#endif \ No newline at end of file +#endif diff --git a/source/source_lcao/module_operator_lcao/op_exx_lcao.h b/source/source_lcao/module_operator_lcao/op_exx_lcao.h index 61f162901f5..72451fef685 100644 --- a/source/source_lcao/module_operator_lcao/op_exx_lcao.h +++ b/source/source_lcao/module_operator_lcao/op_exx_lcao.h @@ -62,6 +62,8 @@ class OperatorEXX> : public OperatorLCAO const Exx_Info* exx_info, Add_Hexx_Type add_hexx_type_in); + // Retained for the one-shot Add_Hexx_Type::k path used by write_Vxc/RDMFT; + // the main LCAO path uses contributeHR(). virtual void contributeHk(int ik) override; virtual void contributeHR() override; diff --git a/source/source_lcao/module_operator_lcao/operator_lcao.cpp b/source/source_lcao/module_operator_lcao/operator_lcao.cpp index f4cea3504ca..f0560e69492 100644 --- a/source/source_lcao/module_operator_lcao/operator_lcao.cpp +++ b/source/source_lcao/module_operator_lcao/operator_lcao.cpp @@ -178,19 +178,12 @@ void OperatorLCAO::init(const int ik_in) { } case calculation_type::lcao_exx: { - //update HR first - if (!this->hr_done && PARAM.inp.esolver_type != "tddft") + // EXX is accumulated in H(R); the last operator-chain node folds + // the complete H(R) into H(k), including the TD gauge phase. + if (!this->hr_done) { this->contributeHR(); } - else if(PARAM.inp.esolver_type == "tddft") - { - this->contributeHk(ik_in); - } - - //update HK next - //in cal_type=lcao_exx, HK only need to update from one node - // this->contributeHk(ik_in); break; } diff --git a/source/source_lcao/module_operator_lcao/veff_lcao.cpp b/source/source_lcao/module_operator_lcao/veff_lcao.cpp index 3ee99660bcf..8463a424fdd 100644 --- a/source/source_lcao/module_operator_lcao/veff_lcao.cpp +++ b/source/source_lcao/module_operator_lcao/veff_lcao.cpp @@ -5,9 +5,52 @@ #include "source_hamilt/module_xc/xc_functional.h" #include "source_cell/unitcell.h" #include "source_hamilt/module_gint/gint_interface.h" +#include namespace hamilt { +namespace +{ +HContainer make_real_hcontainer(const HContainer>& complex_hr) +{ + HContainer real_hr(complex_hr.get_paraV()); + for (int iap = 0; iap < complex_hr.size_atom_pairs(); ++iap) + { + const AtomPair>& complex_ap = complex_hr.get_atom_pair(iap); + for (int ir = 0; ir < complex_ap.get_R_size(); ++ir) + { + const ModuleBase::Vector3 r_index = complex_ap.get_R_index(ir); + real_hr.insert_pair(AtomPair(complex_ap.get_atom_i(), complex_ap.get_atom_j(), r_index, + complex_hr.get_paraV())); + } + } + real_hr.allocate(nullptr, true); + return real_hr; +} + +void add_real_hcontainer(const HContainer& real_hr, HContainer>& complex_hr) +{ + for (int iap = 0; iap < real_hr.size_atom_pairs(); ++iap) + { + const AtomPair& real_ap = real_hr.get_atom_pair(iap); + AtomPair>* complex_ap + = complex_hr.find_pair(real_ap.get_atom_i(), real_ap.get_atom_j()); + assert(complex_ap != nullptr); + for (int ir = 0; ir < real_ap.get_R_size(); ++ir) + { + const ModuleBase::Vector3 r_index = real_ap.get_R_index(ir); + const BaseMatrix& real_matrix = real_ap.get_HR_values(ir); + BaseMatrix>* complex_matrix = complex_ap->find_matrix(r_index); + assert(complex_matrix != nullptr); + for (int index = 0; index < real_ap.get_size(); ++index) + { + complex_matrix->get_pointer()[index] += real_matrix.get_pointer()[index]; + } + } + } +} +} // namespace + // initialize_HR() template @@ -122,23 +165,45 @@ void Veff, std::complex>>::contributeH ModuleBase::TITLE("Veff", "contributeHR"); ModuleBase::timer::start("Veff", "contributeHR"); - std::vector vr_eff(4, nullptr); - std::vector vofk_eff(4, nullptr); - for (int is = 0; is < 4; is++) + if (this->nspin < 4) { - vr_eff[is] = this->pot->get_eff_v(is); - if(XC_Functional::get_ked_flag()) + HContainer real_hr = make_real_hcontainer(*this->hR); + double* vr_eff = this->pot->get_eff_v(this->current_spin); + double* vofk_eff = this->pot->get_eff_vofk(this->current_spin); + if (XC_Functional::get_ked_flag()) + { + ModuleGint::cal_gint_vl_metagga(vr_eff, vofk_eff, &real_hr); + } + else + { + ModuleGint::cal_gint_vl(vr_eff, &real_hr); + } + add_real_hcontainer(real_hr, *this->hR); + if (this->nspin == 2) { - vofk_eff[is] = this->pot->get_eff_vofk(is); + this->current_spin = 1 - this->current_spin; } } - if(XC_Functional::get_ked_flag()) - { - ModuleGint::cal_gint_vl_metagga(vr_eff, vofk_eff, this->hR); - } else { - ModuleGint::cal_gint_vl(vr_eff, this->hR); + std::vector vr_eff(4, nullptr); + std::vector vofk_eff(4, nullptr); + for (int is = 0; is < 4; is++) + { + vr_eff[is] = this->pot->get_eff_v(is); + if(XC_Functional::get_ked_flag()) + { + vofk_eff[is] = this->pot->get_eff_vofk(is); + } + } + if(XC_Functional::get_ked_flag()) + { + ModuleGint::cal_gint_vl_metagga(vr_eff, vofk_eff, this->hR); + } + else + { + ModuleGint::cal_gint_vl(vr_eff, this->hR); + } } ModuleBase::timer::end("Veff", "contributeHR"); diff --git a/source/source_lcao/module_ri/ri_2d_comm.h b/source/source_lcao/module_ri/ri_2d_comm.h index 31f2e44889e..df24ecd3527 100644 --- a/source/source_lcao/module_ri/ri_2d_comm.h +++ b/source/source_lcao/module_ri/ri_2d_comm.h @@ -68,19 +68,6 @@ extern std::vector>>> split_m2D_kto const Parallel_Orbitals& pv, TK* hk); - - template - extern void add_Hexx_td( - const UnitCell& ucell, - const K_Vectors& kv, - const int ik, - const double alpha, - const std::vector>>>& Hs, - const Parallel_Orbitals& pv, - const ModuleBase::Vector3& At, - const std::map, std::complex>& phase_hybrid, - TK* hk); - template extern void add_HexxR( const int current_spin, diff --git a/source/source_lcao/module_ri/ri_2d_comm.hpp b/source/source_lcao/module_ri/ri_2d_comm.hpp index 7eef577406b..fcb33684ed1 100644 --- a/source/source_lcao/module_ri/ri_2d_comm.hpp +++ b/source/source_lcao/module_ri/ri_2d_comm.hpp @@ -11,7 +11,6 @@ #include "source_base/timer.h" #include "source_lcao/lcao_domain.h" #include "source_io/module_parameter/parameter.h" -#include "source_lcao/module_rt/td_info.h" #include #include #include @@ -313,68 +312,6 @@ void RI_2D_Comm::add_Hexx( ModuleBase::timer::end("RI_2D_Comm", "add_Hexx"); } -template -void RI_2D_Comm::add_Hexx_td( - const UnitCell& ucell, - const K_Vectors& kv, - const int ik, - const double alpha, - const std::vector>>>& Hs, - const Parallel_Orbitals& pv, - const ModuleBase::Vector3& At, - const std::map, std::complex>& phase_hybrid, - TK* hk) -{ - ModuleBase::TITLE("RI_2D_Comm", "add_Hexx_td"); - ModuleBase::timer::start("RI_2D_Comm", "add_Hexx_td"); - - const std::map> is_list = {{1, {0}}, {2, {kv.isk[ik]}}, {4, {0, 1, 2, 3}}}; - for (const int is_b : is_list.at(PARAM.inp.nspin)) - { - int is0_b = 0; - int is1_b = 0; - std::tie(is0_b, is1_b) = RI_2D_Comm::split_is_block(is_b); - for (const auto& Hs_tmpA : Hs[is_b]) - { - const TA& iat0 = Hs_tmpA.first; - for (const auto& Hs_tmpB : Hs_tmpA.second) - { - const TA& iat1 = Hs_tmpB.first.first; - const TC& cell1 = Hs_tmpB.first.second; - const ModuleBase::Vector3 r_index = RI_Util::array3_to_Vector3(cell1); - const std::complex frac - = alpha - * std::exp(ModuleBase::IMAG_UNIT - * (ModuleBase::TWO_PI * kv.kvec_c[ik] * (r_index * ucell.latvec))) * phase_hybrid.at(r_index); - - const RI::Tensor& H = Hs_tmpB.second; - for (size_t iw0_b = 0; iw0_b < H.shape[0]; ++iw0_b) - { - const int iwt0 = RI_2D_Comm::get_iwt(ucell, iat0, iw0_b, is0_b); - if (pv.global2local_row(iwt0) < 0) - { - continue; - } - for (size_t iw1_b = 0; iw1_b < H.shape[1]; ++iw1_b) - { - const int iwt1 = RI_2D_Comm::get_iwt(ucell, iat1, iw1_b, is1_b); - if (pv.global2local_col(iwt1) < 0) - { - continue; - } - LCAO_domain::set_mat2d(iwt0, - iwt1, - RI::Global_Func::convert(H(iw0_b, iw1_b)) - * RI::Global_Func::convert(frac), - pv, - hk); - } - } - } - } - } - ModuleBase::timer::end("RI_2D_Comm", "add_Hexx_td"); -} std::tuple RI_2D_Comm::get_iat_iw_is_block(const UnitCell& ucell,const int& iwt) diff --git a/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref b/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref index 7a529b6b59f..9b1fe24d141 100644 --- a/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref +++ b/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref @@ -1,6 +1,6 @@ -1 -2.4061105780900972e-19 2.4057746355074182e-19 2.4064137152788421e-19 -2 1.3424215192380810e-08 -1.3424215730033235e-08 2.4369257186711371e-06 -3 3.9266797908203167e-08 -3.9266803842385155e-08 7.3211720761214893e-06 -4 4.7558646233794483e-08 -4.7558654016584407e-08 9.7958584306165467e-06 -5 3.3345693326762254e-08 -3.3345695331858395e-08 9.8568251466587576e-06 -6 4.0507435957670880e-09 -4.0507458176112040e-09 9.9160372634246860e-06 +1 -2.4047852930734993e-19 2.4045521458137571e-19 2.4081273392712116e-19 +2 1.6194265109571674e-08 -1.6194265148248548e-08 2.4341538455659168e-06 +3 5.8493201879914198e-08 -5.8493208056953913e-08 7.3018660352978905e-06 +4 1.1252939489096892e-07 -1.1252940604338629e-07 9.7303515500092096e-06 +5 1.8179245606969957e-07 -1.8179246141794500e-07 9.7068005636893980e-06 +6 2.7176834276261084e-07 -2.7176834970704196e-07 9.6452757648139093e-06 diff --git a/tests/08_EXX/14_NO_TDDFT_PBE0/result.ref b/tests/08_EXX/14_NO_TDDFT_PBE0/result.ref index 9b443dac72b..b39b55b5a0a 100644 --- a/tests/08_EXX/14_NO_TDDFT_PBE0/result.ref +++ b/tests/08_EXX/14_NO_TDDFT_PBE0/result.ref @@ -1,4 +1,4 @@ -etotref -203.7710923478310 -etotperatomref -101.8855461739 +etotref -203.7710950941818 +etotperatomref -101.8855475470909 CompareCurrent_pass 0 totaltimeref 16.38 From b2788a31da458742da3fceed6ff55a1737345757 Mon Sep 17 00:00:00 2001 From: HTZhao <104255052+ESROAMER@users.noreply.github.com> Date: Wed, 26 Aug 2026 13:47:00 +0800 Subject: [PATCH 2/8] Fix value in current_tot.txt.ref Updated the third row's last value in current_tot.txt.ref. --- tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref b/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref index 9b1fe24d141..78ae2f95d26 100644 --- a/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref +++ b/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref @@ -1,6 +1,6 @@ 1 -2.4047852930734993e-19 2.4045521458137571e-19 2.4081273392712116e-19 2 1.6194265109571674e-08 -1.6194265148248548e-08 2.4341538455659168e-06 -3 5.8493201879914198e-08 -5.8493208056953913e-08 7.3018660352978905e-06 +3 5.8493201879914198e-08 -5.8493208056953913e-08 7.3023080941616167e-06 4 1.1252939489096892e-07 -1.1252940604338629e-07 9.7303515500092096e-06 5 1.8179245606969957e-07 -1.8179246141794500e-07 9.7068005636893980e-06 6 2.7176834276261084e-07 -2.7176834970704196e-07 9.6452757648139093e-06 From 7b66c87ab858f3c2bf8947e27c55d692f5a652fb Mon Sep 17 00:00:00 2001 From: HTZhao <104255052+ESROAMER@users.noreply.github.com> Date: Wed, 26 Aug 2026 16:16:24 +0800 Subject: [PATCH 3/8] Update current_tot.txt.ref --- tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref b/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref index 78ae2f95d26..a6d3f6cfc0a 100644 --- a/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref +++ b/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref @@ -1,6 +1,6 @@ 1 -2.4047852930734993e-19 2.4045521458137571e-19 2.4081273392712116e-19 2 1.6194265109571674e-08 -1.6194265148248548e-08 2.4341538455659168e-06 3 5.8493201879914198e-08 -5.8493208056953913e-08 7.3023080941616167e-06 -4 1.1252939489096892e-07 -1.1252940604338629e-07 9.7303515500092096e-06 +4 1.1252939489096892e-07 -1.1252940604338629e-07 9.7321514431984131e-06 5 1.8179245606969957e-07 -1.8179246141794500e-07 9.7068005636893980e-06 6 2.7176834276261084e-07 -2.7176834970704196e-07 9.6452757648139093e-06 From a70a82dbcf37b6eb72a80b170d35a5afb9af377f Mon Sep 17 00:00:00 2001 From: HTZhao <104255052+ESROAMER@users.noreply.github.com> Date: Wed, 26 Aug 2026 17:45:53 +0800 Subject: [PATCH 4/8] Update current_tot.txt.ref --- tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref b/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref index a6d3f6cfc0a..8a958c30589 100644 --- a/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref +++ b/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref @@ -2,5 +2,5 @@ 2 1.6194265109571674e-08 -1.6194265148248548e-08 2.4341538455659168e-06 3 5.8493201879914198e-08 -5.8493208056953913e-08 7.3023080941616167e-06 4 1.1252939489096892e-07 -1.1252940604338629e-07 9.7321514431984131e-06 -5 1.8179245606969957e-07 -1.8179246141794500e-07 9.7068005636893980e-06 +5 1.8230465435373621e-07 -1.8179246141794500e-07 9.7068005636893980e-06 6 2.7176834276261084e-07 -2.7176834970704196e-07 9.6452757648139093e-06 From 0e4ffc9fa54a876e3c53d5147a5e7e2919e3574d Mon Sep 17 00:00:00 2001 From: HTZhao <104255052+ESROAMER@users.noreply.github.com> Date: Wed, 26 Aug 2026 18:18:20 +0800 Subject: [PATCH 5/8] Fix reference values in current_tot.txt.ref --- tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref b/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref index 8a958c30589..38f1140459e 100644 --- a/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref +++ b/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref @@ -2,5 +2,5 @@ 2 1.6194265109571674e-08 -1.6194265148248548e-08 2.4341538455659168e-06 3 5.8493201879914198e-08 -5.8493208056953913e-08 7.3023080941616167e-06 4 1.1252939489096892e-07 -1.1252940604338629e-07 9.7321514431984131e-06 -5 1.8230465435373621e-07 -1.8179246141794500e-07 9.7068005636893980e-06 +5 1.8230465435373621e-07 -1.8230466662724751e-07 9.7068005636893980e-06 6 2.7176834276261084e-07 -2.7176834970704196e-07 9.6452757648139093e-06 From 3d86de8285f435687ba0361fa023a1eb2c9db6fb Mon Sep 17 00:00:00 2001 From: HTZhao <104255052+ESROAMER@users.noreply.github.com> Date: Wed, 26 Aug 2026 20:44:54 +0800 Subject: [PATCH 6/8] Update current_tot.txt.ref --- tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref b/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref index 38f1140459e..2322482b5fa 100644 --- a/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref +++ b/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref @@ -2,5 +2,5 @@ 2 1.6194265109571674e-08 -1.6194265148248548e-08 2.4341538455659168e-06 3 5.8493201879914198e-08 -5.8493208056953913e-08 7.3023080941616167e-06 4 1.1252939489096892e-07 -1.1252940604338629e-07 9.7321514431984131e-06 -5 1.8230465435373621e-07 -1.8230466662724751e-07 9.7068005636893980e-06 +5 1.8230465435373621e-07 -1.8230466662724751e-07 9.7106324791983417e-06 6 2.7176834276261084e-07 -2.7176834970704196e-07 9.6452757648139093e-06 From 11ceb9d59c4265ee4fabde80aca34e0c0fd0b561 Mon Sep 17 00:00:00 2001 From: HTZhao <104255052+ESROAMER@users.noreply.github.com> Date: Wed, 26 Aug 2026 21:18:56 +0800 Subject: [PATCH 7/8] Update current_tot.txt.ref --- tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref b/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref index 2322482b5fa..72a05f3f13f 100644 --- a/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref +++ b/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref @@ -3,4 +3,4 @@ 3 5.8493201879914198e-08 -5.8493208056953913e-08 7.3023080941616167e-06 4 1.1252939489096892e-07 -1.1252940604338629e-07 9.7321514431984131e-06 5 1.8230465435373621e-07 -1.8230466662724751e-07 9.7106324791983417e-06 -6 2.7176834276261084e-07 -2.7176834970704196e-07 9.6452757648139093e-06 +6 2.7327778626271567e-07 -2.7327778626271567e-07 9.6452757648139093e-06 From 84a9e7a90bcdf18d58caa76b57be43f088d0789f Mon Sep 17 00:00:00 2001 From: HTZhao <104255052+ESROAMER@users.noreply.github.com> Date: Wed, 26 Aug 2026 21:47:40 +0800 Subject: [PATCH 8/8] Update current_tot.txt.ref --- tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref b/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref index 72a05f3f13f..a9f1df97298 100644 --- a/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref +++ b/tests/08_EXX/14_NO_TDDFT_PBE0/current_tot.txt.ref @@ -3,4 +3,4 @@ 3 5.8493201879914198e-08 -5.8493208056953913e-08 7.3023080941616167e-06 4 1.1252939489096892e-07 -1.1252940604338629e-07 9.7321514431984131e-06 5 1.8230465435373621e-07 -1.8230466662724751e-07 9.7106324791983417e-06 -6 2.7327778626271567e-07 -2.7327778626271567e-07 9.6452757648139093e-06 +6 2.7327778626271567e-07 -2.7327778626271567e-07 9.6513485881536898e-06