From 7ae45cb4523e7d28ee360a12520e6b304bbb9a61 Mon Sep 17 00:00:00 2001 From: memii-x Date: Wed, 14 Oct 2026 20:44:42 +0800 Subject: [PATCH 1/4] fix(rt): normalize sHG wavefunctions with endpoint overlap --- docs/developers_guide/rt_normalization_fix.md | 20 ++++ source/source_lcao/module_rt/evolve_psi.cpp | 10 +- .../source_lcao/module_rt/test/CMakeLists.txt | 13 +++ .../module_rt/test/norm_psi_test.cpp | 39 +++++++ .../module_rt/test/test_evolve_psi.cpp | 107 ++++++++++++++++++ 5 files changed, 186 insertions(+), 3 deletions(-) create mode 100644 docs/developers_guide/rt_normalization_fix.md create mode 100644 source/source_lcao/module_rt/test/test_evolve_psi.cpp diff --git a/docs/developers_guide/rt_normalization_fix.md b/docs/developers_guide/rt_normalization_fix.md new file mode 100644 index 00000000000..0c324a1d2ff --- /dev/null +++ b/docs/developers_guide/rt_normalization_fix.md @@ -0,0 +1,20 @@ +# Fix: normalize RT wavefunctions with the endpoint overlap + +After half_Hmatrix averages H/S for propagation, evolve_psi currently passes the averaged S to normalization. A wavefunction arriving at t+dt needs its norm evaluated using S(t+dt). For a time-dependent overlap, a unit norm in the averaged metric need not be a unit norm at the endpoint. + +The CPU path uses the unmodified endpoint s_mat.p. The tensor path reloads endpoint S from the existing distributed or root-gathered host buffer after propagation and before normalization. Band energies already use endpoint H. This also benefits moving-ion cases with changing S; constant-S results should be unchanged. + +### Unit Tests and/or Case Tests +- `cmake --build /tmp/upstream-norm-review-20261014 --target MODULE_LCAO_tddft_evolve_psi_test MODULE_LCAO_tddft_norm_psi_test -j4`: passed. +- `OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 ctest --test-dir /tmp/upstream-norm-review-20261014 -V -R 'MODULE_LCAO_tddft_(evolve_psi|norm_psi)_test'`: 2/2 CTests, 4/4 GTests passed. The new tests call the actual CPU and tensor-LAPACK propagation entries with a complex, positive-definite changing overlap. +- Negative regression check: compiled a separate copy of `evolve_psi.cpp` with the previous averaged-overlap normalization restored and linked it to the same tests. Both propagation tests failed with endpoint norm 1.1935483870967742; both pass with the fix. The reviewed worktree was unchanged during this check. +- git diff --check and staged agent_governance_check: passed (documentation review warning before this note was added). +- Full executable build, GPU/cuBLASMp execution, distributed multi-rank execution, and material trajectories: not run. The non-LAPACK tensor kernels require cuBLASMp and are not exercised by the CPU test target. The propagation tests use one MPI rank and a two-orbital matrix fixture, not a material calculation. +- The new propagation regression target is excluded when ENABLE_CUBLASMP is enabled: it exercises CPU and CPU Tensor-LAPACK paths and does not supply GPU kernel or distributed-library link dependencies. Existing test targets are unchanged. + +### Linked Issue +No separate issue: this PR contains the localized defect and regression evidence. Related PRs were searched before preparation. + +### Governance Notes +No INPUT syntax, defaults, or parser metadata changes. No change to the propagation formula. This is a bug fix in existing RT paths. No governance exception requested. +Core impact: module_rt normalization call sites only; no interfaces changed. diff --git a/source/source_lcao/module_rt/evolve_psi.cpp b/source/source_lcao/module_rt/evolve_psi.cpp index d40fd4305e5..8974fd6b958 100644 --- a/source/source_lcao/module_rt/evolve_psi.cpp +++ b/source/source_lcao/module_rt/evolve_psi.cpp @@ -104,9 +104,9 @@ void evolve_psi(const int nband, // (4)->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> /// @brief normalize psi_k - /// @input Stmp, psi_not_norm, psi_k, print_matrix + /// @input S(t+dt), psi_not_norm, psi_k, print_matrix /// @output psi_k - norm_psi(pv, nband, nlocal, Stmp, psi_k, ofs_running, print_matrix); + norm_psi(pv, nband, nlocal, s_mat.p, psi_k, ofs_running, print_matrix); // (5)->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @@ -284,7 +284,11 @@ void evolve_psi_tensor(const int nband, upsi_tensor_lapack(pv, nband, nlocal, U_operator, psi_k_laststep, psi_k, ofs_running, print_matrix); } - // (4) Normalize psi_k + // (4) Normalize in the endpoint metric, not the averaged propagation metric. + if (s_src != nullptr && (!use_lapack || myid == root_proc)) + { + syncmem_complex_h2d_op()(Stmp.data>(), s_src, len_HS); + } if (!use_lapack) { norm_psi_tensor(pv, nband, nlocal, Stmp, psi_k, ofs_running, print_matrix, cublas_res); diff --git a/source/source_lcao/module_rt/test/CMakeLists.txt b/source/source_lcao/module_rt/test/CMakeLists.txt index 02bf3a6a207..8e12967bbe3 100644 --- a/source/source_lcao/module_rt/test/CMakeLists.txt +++ b/source/source_lcao/module_rt/test/CMakeLists.txt @@ -9,6 +9,19 @@ add_library(tddft_test_lib tddft_test.cpp) target_link_libraries(tddft_test_lib PRIVATE Threads::Threads GTest::gtest_main GTest::gmock_main) #target_include_directories(tddft_test_lib PUBLIC $<$:${GTEST_INCLUDE_DIRS}>) +# This regression exercises CPU and CPU Tensor-LAPACK propagation. A cuBLASMp +# target also needs its GPU kernels and distributed-library link dependencies. +if(NOT ENABLE_CUBLASMP) + AddTest( + TARGET MODULE_LCAO_tddft_evolve_psi_test + LIBS parameter base device tddft_test_lib + SOURCES test_evolve_psi.cpp ../evolve_psi.cpp ../middle_hamilt.cpp ../norm_psi.cpp + ../band_energy.cpp ../upsi.cpp ../solve_propagation.cpp ../propagator.cpp + ../propagator_cn2.cpp ../propagator_taylor.cpp ../propagator_etrs.cpp + ../../../source_basis/module_ao/parallel_orbitals.cpp + ) +endif() + AddTest( TARGET MODULE_LCAO_tddft_middle_hamilt_test LIBS parameter base device tddft_test_lib diff --git a/source/source_lcao/module_rt/test/norm_psi_test.cpp b/source/source_lcao/module_rt/test/norm_psi_test.cpp index cfc7d46c13a..10c8701dc5c 100644 --- a/source/source_lcao/module_rt/test/norm_psi_test.cpp +++ b/source/source_lcao/module_rt/test/norm_psi_test.cpp @@ -121,3 +121,42 @@ TEST(NormPsiTest, testNormPsi) delete[] psi_k; delete[] Stmp; } + +// A wavefunction arriving at t+dt must be normalized with S(t+dt). +// Here the averaged overlap gives a unit norm in the wrong time layer. +TEST(NormPsiTest, EndpointMetricDiffersFromPropagationMetric) +{ + Parallel_Orbitals pv; + const int nlocal = 2; + const int nband = 1; + const int block = 1; + const int zero = 0; + pv.nloc = 4; + pv.nloc_wfc = 2; + pv.nrow = pv.ncol = 2; + pv.ncol_bands = 1; + pv.dim0 = pv.dim1 = pv.nb = 1; + pv.blacs_ctxt = ictxt; + pv.set_coord(0, 0); + int info = 0; + int lld = 2; + descinit_(pv.desc, &nlocal, &nlocal, &block, &block, &zero, &zero, &ictxt, &lld, &info); + ASSERT_EQ(info, 0); + descinit_(pv.desc_wfc, &nlocal, &nband, &block, &block, &zero, &zero, &ictxt, &lld, &info); + ASSERT_EQ(info, 0); + descinit_(pv.desc_Eij, &nband, &nband, &block, &block, &zero, &zero, &ictxt, &lld, &info); + ASSERT_EQ(info, 0); + std::complex endpoint[4] = {2.0, {0.0, -0.4}, {0.0, 0.4}, 1.0}; + std::complex midpoint[4] = {1.5, {0.0, -0.2}, {0.0, 0.2}, 1.0}; + std::complex right[2] = {1.0, {0.0, 0.5}}; + std::complex wrong[2] = {right[0], right[1]}; + auto norm = [&](const std::complex* psi) { + return (std::conj(psi[0]) * (endpoint[0]*psi[0] + endpoint[2]*psi[1]) + + std::conj(psi[1]) * (endpoint[1]*psi[0] + endpoint[3]*psi[1])).real(); + }; + std::ofstream log; + module_rt::norm_psi(&pv, nband, nlocal, endpoint, right, log, 0); + module_rt::norm_psi(&pv, nband, nlocal, midpoint, wrong, log, 0); + EXPECT_NEAR(norm(right), 1.0, 1e-12); + EXPECT_GT(std::abs(norm(wrong)-1.0), 0.1); +} diff --git a/source/source_lcao/module_rt/test/test_evolve_psi.cpp b/source/source_lcao/module_rt/test/test_evolve_psi.cpp new file mode 100644 index 00000000000..942a48c70c4 --- /dev/null +++ b/source/source_lcao/module_rt/test/test_evolve_psi.cpp @@ -0,0 +1,107 @@ +#include "source_lcao/module_rt/evolve_psi.h" +#include "source_base/module_external/scalapack_connector.h" +#include "tddft_test.h" + +#include +#include +#include +#include + +namespace +{ +using Complex = std::complex; + +// A two-orbital Hamiltonian with changing overlap and zero energy. This keeps +// the normalization oracle independent of the propagator's phase convention. +class EndpointHamiltonian : public hamilt::Hamilt +{ + public: + std::array h = {{0.0, 0.0, 0.0, 0.0}}; + std::array s = {{2.0, Complex(0.0, -0.4), Complex(0.0, 0.4), 1.0}}; + + void matrix(hamilt::MatrixBlock& hk, hamilt::MatrixBlock& sk) override + { + hk.p = h.data(); + sk.p = s.data(); + hk.row = sk.row = 2; + hk.col = sk.col = 2; + } +}; + +class EvolvePsiTest : public testing::Test +{ + protected: + Parallel_Orbitals pv; + EndpointHamiltonian hamiltonian; + std::array previous_s = {{1.0, 0.0, 0.0, 1.0}}; + std::array previous_psi = {{1.0, Complex(0.0, 0.5)}}; + std::ofstream log; + + void SetUp() override + { + const int nlocal = 2; + const int nband = 1; + const int block = 1; + const int zero = 0; + const int lld = 2; + int info = 0; + pv.nloc = 4; + pv.nloc_wfc = 2; + pv.nrow = pv.ncol = 2; + pv.nrow_bands = pv.ncol_bands = 1; + pv.dim0 = pv.dim1 = pv.nb = 1; + pv.blacs_ctxt = ictxt; + pv.set_coord(0, 0); + descinit_(pv.desc, &nlocal, &nlocal, &block, &block, &zero, &zero, &ictxt, &lld, &info); + ASSERT_EQ(info, 0); + descinit_(pv.desc_wfc, &nlocal, &nband, &block, &block, &zero, &zero, &ictxt, &lld, &info); + ASSERT_EQ(info, 0); + descinit_(pv.desc_Eij, &nband, &nband, &block, &block, &zero, &zero, &ictxt, &lld, &info); + ASSERT_EQ(info, 0); + } + + void expect_endpoint_norm(const Complex* psi) + { + const auto& s = hamiltonian.s; + const Complex norm = std::conj(psi[0]) * (s[0] * psi[0] + s[2] * psi[1]) + + std::conj(psi[1]) * (s[1] * psi[0] + s[3] * psi[1]); + EXPECT_NEAR(norm.real(), 1.0, 1e-12); + EXPECT_NEAR(norm.imag(), 0.0, 1e-12); + } + + void run_tensor_lapack() + { + ct::Tensor psi(ct::DataType::DT_COMPLEX_DOUBLE, ct::TensorShape({1, 2})); + ct::Tensor last_psi(ct::DataType::DT_COMPLEX_DOUBLE, ct::TensorShape({1, 2})); + ct::Tensor last_h(ct::DataType::DT_COMPLEX_DOUBLE, ct::TensorShape({4})); + ct::Tensor last_s(ct::DataType::DT_COMPLEX_DOUBLE, ct::TensorShape({4})); + ct::Tensor energy(ct::DataType::DT_DOUBLE, ct::TensorShape({1})); + last_h.zero(); + std::copy(previous_psi.begin(), previous_psi.end(), last_psi.data()); + std::copy(previous_s.begin(), previous_s.end(), last_s.data()); + CublasMpResources resources; + const bool use_lapack = true; + module_rt::evolve_psi_tensor( + 1, 2, &pv, &hamiltonian, psi, last_psi, last_h, last_s, energy, 0, log, 0, + use_lapack, resources); + expect_endpoint_norm(psi.data()); + EXPECT_NEAR(energy.data()[0], 0.0, 1e-12); + } +}; + +TEST_F(EvolvePsiTest, CpuUsesEndpointOverlap) +{ + std::array psi; + std::array last_h = {{0.0, 0.0, 0.0, 0.0}}; + double energy = 0.0; + module_rt::evolve_psi(1, 2, &pv, &hamiltonian, psi.data(), previous_psi.data(), + last_h.data(), previous_s.data(), nullptr, false, &energy, 0, log, 0); + expect_endpoint_norm(psi.data()); + EXPECT_NEAR(energy, 0.0, 1e-12); +} + +TEST_F(EvolvePsiTest, LapackUsesEndpointOverlap) +{ + run_tensor_lapack(); +} +} // namespace From d19e8101950936993932a7cdb6aefa4081e688f7 Mon Sep 17 00:00:00 2001 From: memii-x Date: Wed, 14 Oct 2026 22:32:56 +0800 Subject: [PATCH 2/4] docs(rt): fix normalization note headings and navigation --- docs/developers_guide/index.rst | 1 + docs/developers_guide/rt_normalization_fix.md | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/developers_guide/index.rst b/docs/developers_guide/index.rst index 80224240428..8eca2bca558 100644 --- a/docs/developers_guide/index.rst +++ b/docs/developers_guide/index.rst @@ -12,3 +12,4 @@ This section provides guidelines and resources for developers working on the ABA basic_types_class.md input_availability.md agent_governance.md + rt_normalization_fix.md diff --git a/docs/developers_guide/rt_normalization_fix.md b/docs/developers_guide/rt_normalization_fix.md index 0c324a1d2ff..c46ccd0dda3 100644 --- a/docs/developers_guide/rt_normalization_fix.md +++ b/docs/developers_guide/rt_normalization_fix.md @@ -4,7 +4,7 @@ After half_Hmatrix averages H/S for propagation, evolve_psi currently passes the The CPU path uses the unmodified endpoint s_mat.p. The tensor path reloads endpoint S from the existing distributed or root-gathered host buffer after propagation and before normalization. Band energies already use endpoint H. This also benefits moving-ion cases with changing S; constant-S results should be unchanged. -### Unit Tests and/or Case Tests +## Unit Tests and/or Case Tests - `cmake --build /tmp/upstream-norm-review-20261014 --target MODULE_LCAO_tddft_evolve_psi_test MODULE_LCAO_tddft_norm_psi_test -j4`: passed. - `OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 ctest --test-dir /tmp/upstream-norm-review-20261014 -V -R 'MODULE_LCAO_tddft_(evolve_psi|norm_psi)_test'`: 2/2 CTests, 4/4 GTests passed. The new tests call the actual CPU and tensor-LAPACK propagation entries with a complex, positive-definite changing overlap. - Negative regression check: compiled a separate copy of `evolve_psi.cpp` with the previous averaged-overlap normalization restored and linked it to the same tests. Both propagation tests failed with endpoint norm 1.1935483870967742; both pass with the fix. The reviewed worktree was unchanged during this check. @@ -12,9 +12,9 @@ The CPU path uses the unmodified endpoint s_mat.p. The tensor path reloads endpo - Full executable build, GPU/cuBLASMp execution, distributed multi-rank execution, and material trajectories: not run. The non-LAPACK tensor kernels require cuBLASMp and are not exercised by the CPU test target. The propagation tests use one MPI rank and a two-orbital matrix fixture, not a material calculation. - The new propagation regression target is excluded when ENABLE_CUBLASMP is enabled: it exercises CPU and CPU Tensor-LAPACK paths and does not supply GPU kernel or distributed-library link dependencies. Existing test targets are unchanged. -### Linked Issue +## Linked Issue No separate issue: this PR contains the localized defect and regression evidence. Related PRs were searched before preparation. -### Governance Notes +## Governance Notes No INPUT syntax, defaults, or parser metadata changes. No change to the propagation formula. This is a bug fix in existing RT paths. No governance exception requested. Core impact: module_rt normalization call sites only; no interfaces changed. From abaf094f384589866ce8404f3052526c16167ccd Mon Sep 17 00:00:00 2001 From: memii-x Date: Wed, 14 Oct 2026 22:56:31 +0800 Subject: [PATCH 3/4] test(rt): refresh references for endpoint normalization --- docs/developers_guide/rt_normalization_fix.md | 5 +- .../05_rtTDDFT/01_NO_KP_ocp_TDDFT/result.ref | 8 +- tests/05_rtTDDFT/02_NO_CH_OW_TDDFT/result.ref | 8 +- .../02_NO_CH_OW_TDDFT/wfk1g3_nao_mod.txt.ref | 160 +++++++++--------- tests/05_rtTDDFT/05_NO_cur_TDDFT/result.ref | 8 +- tests/05_rtTDDFT/06_NO_dir_TDDFT/result.ref | 8 +- tests/05_rtTDDFT/07_NO_EDM_TDDFT/result.ref | 8 +- tests/05_rtTDDFT/09_NO_HEAV_TDDFT/result.ref | 8 +- tests/05_rtTDDFT/10_NO_HHG_TDDFT/result.ref | 8 +- tests/05_rtTDDFT/11_NO_O3_TDDFT/result.ref | 8 +- .../05_rtTDDFT/13_NO_Taylor_TDDFT/result.ref | 8 +- tests/05_rtTDDFT/14_NO_TRAP_TDDFT/result.ref | 8 +- tests/05_rtTDDFT/15_NO_TRI_TDDFT/result.ref | 8 +- .../16_NO_vel_TDDFT/current_tot.txt.ref | 6 +- tests/05_rtTDDFT/16_NO_vel_TDDFT/result.ref | 8 +- .../20_NO_MIXED_EFIELD_TDDFT/result.ref | 4 +- 16 files changed, 137 insertions(+), 134 deletions(-) diff --git a/docs/developers_guide/rt_normalization_fix.md b/docs/developers_guide/rt_normalization_fix.md index c46ccd0dda3..0bf7063a7a5 100644 --- a/docs/developers_guide/rt_normalization_fix.md +++ b/docs/developers_guide/rt_normalization_fix.md @@ -9,7 +9,10 @@ The CPU path uses the unmodified endpoint s_mat.p. The tensor path reloads endpo - `OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 ctest --test-dir /tmp/upstream-norm-review-20261014 -V -R 'MODULE_LCAO_tddft_(evolve_psi|norm_psi)_test'`: 2/2 CTests, 4/4 GTests passed. The new tests call the actual CPU and tensor-LAPACK propagation entries with a complex, positive-definite changing overlap. - Negative regression check: compiled a separate copy of `evolve_psi.cpp` with the previous averaged-overlap normalization restored and linked it to the same tests. Both propagation tests failed with endpoint norm 1.1935483870967742; both pass with the fix. The reviewed worktree was unchanged during this check. - git diff --check and staged agent_governance_check: passed (documentation review warning before this note was added). -- Full executable build, GPU/cuBLASMp execution, distributed multi-rank execution, and material trajectories: not run. The non-LAPACK tensor kernels require cuBLASMp and are not exercised by the CPU test target. The propagation tests use one MPI rank and a two-orbital matrix fixture, not a material calculation. +- Full CPU executable built from this PR with MPI, LCAO, Libxc and single-precision FFTW enabled. `bash ../integrate/Autotest.sh -a /tmp/upstream-norm-review-20261014/abacus_basic_para -n 4 -o 1 -j 1 -f CASES_CPU.txt`: all 28 RT-TDDFT cases and 115 property comparisons passed after updating affected references. INPUT, STRU, KPT and comparison tolerances are unchanged. +- Repeating the same complete suite with `-n 2` also passed all 28 cases and 115 property comparisons using the same references. The two focused CTest targets were rebuilt in this configuration and passed again (4/4 GoogleTests). +- The 13 affected moving-ion cases have changing overlap even in the length and velocity gauges. Their energy, force and stress references therefore change; the wavefunction reference in `02_NO_CH_OW_TDDFT` and current reference in `16_NO_vel_TDDFT` also change. A controlled moving-ion H2 check gives a final maximum endpoint per-band norm defect of `1.8658e-3` before the fix and `2.5313e-14` after it; freezing the ions makes the paired energies identical. +- GPU/cuBLASMp execution was not run locally. The non-LAPACK tensor kernels require cuBLASMp and are not exercised by the CPU unit-test target. The focused propagation unit tests use one MPI rank and a two-orbital matrix fixture; the existing integration suite supplies the multi-rank case coverage. These checks do not establish the accuracy of the complete moving-ion RT discretization. - The new propagation regression target is excluded when ENABLE_CUBLASMP is enabled: it exercises CPU and CPU Tensor-LAPACK paths and does not supply GPU kernel or distributed-library link dependencies. Existing test targets are unchanged. ## Linked Issue diff --git a/tests/05_rtTDDFT/01_NO_KP_ocp_TDDFT/result.ref b/tests/05_rtTDDFT/01_NO_KP_ocp_TDDFT/result.ref index 0c5a7f4b0ea..cac9b167136 100644 --- a/tests/05_rtTDDFT/01_NO_KP_ocp_TDDFT/result.ref +++ b/tests/05_rtTDDFT/01_NO_KP_ocp_TDDFT/result.ref @@ -1,5 +1,5 @@ -etotref -18.06593168523521 -etotperatomref -9.0329658426 -totalforceref 40.752890 -totalstressref 72.113950 +etotref -18.06317131077989 +etotperatomref -9.0315856554 +totalforceref 40.778000 +totalstressref 72.075825 totaltimeref 1.51 diff --git a/tests/05_rtTDDFT/02_NO_CH_OW_TDDFT/result.ref b/tests/05_rtTDDFT/02_NO_CH_OW_TDDFT/result.ref index 35cb6e241b4..143c1d10fab 100644 --- a/tests/05_rtTDDFT/02_NO_CH_OW_TDDFT/result.ref +++ b/tests/05_rtTDDFT/02_NO_CH_OW_TDDFT/result.ref @@ -1,6 +1,6 @@ -etotref -323.5398409807095 -etotperatomref -107.8466136602 -totalforceref 19.449586 -totalstressref 329.291622 +etotref -323.5414256083637 +etotperatomref -107.8471418695 +totalforceref 19.479505 +totalstressref 329.532786 Compare_wfc_lcao_pass 0 totaltimeref 2.08 diff --git a/tests/05_rtTDDFT/02_NO_CH_OW_TDDFT/wfk1g3_nao_mod.txt.ref b/tests/05_rtTDDFT/02_NO_CH_OW_TDDFT/wfk1g3_nao_mod.txt.ref index 9d6f419c56c..88a1db8e153 100644 --- a/tests/05_rtTDDFT/02_NO_CH_OW_TDDFT/wfk1g3_nao_mod.txt.ref +++ b/tests/05_rtTDDFT/02_NO_CH_OW_TDDFT/wfk1g3_nao_mod.txt.ref @@ -3,102 +3,102 @@ 10 (number of bands) 31 (number of orbitals) 1 (band) --1.61755597e+00 (Ry) +-1.61956674e+00 (Ry) 1.00000000e+00 (Occupations) -1.7973043938e-02 5.6365832482e-03 4.0292662011e-03 9.3736555060e-07 3.1049873027e-04 -4.4881398078e-01 6.1981640010e-02 2.1866535770e-03 5.3897313978e-05 1.3443943213e-02 -2.4004970606e-03 5.6471009836e-05 2.1371977997e-03 1.1018497715e-02 3.0196749177e-08 -3.4646045381e-05 2.2873667193e-03 1.7872146624e-05 4.7006669445e-01 4.4280513019e-02 -2.3897983686e-03 1.0158791017e-04 1.3497044181e-02 2.1842110247e-03 4.9927225942e-05 -2.2484070449e-03 8.2944340647e-03 5.4571952020e-08 2.2603779928e-05 2.5122887235e-03 -1.9522588113e-05 +1.7978898550e-02 5.6366910412e-03 4.0322435374e-03 9.3798766189e-07 3.1016773183e-04 +4.4883757431e-01 6.1966744236e-02 2.1800265035e-03 5.3946088255e-05 1.3439980727e-02 +2.4036051496e-03 5.6499392644e-05 2.1412949922e-03 1.1024172420e-02 2.9436045423e-08 +3.3815912900e-05 2.2873845642e-03 1.7885120830e-05 4.7001888827e-01 4.4305874063e-02 +2.3831696068e-03 1.0164371922e-04 1.3493438927e-02 2.1869387626e-03 4.9968190799e-05 +2.2523402527e-03 8.3005989975e-03 5.2732435653e-08 2.1805528903e-05 2.5123858069e-03 +1.9536387830e-05 2 (band) --7.07747373e-01 (Ry) +-7.08529790e-01 (Ry) 1.00000000e+00 (Occupations) -2.0653069044e-01 1.2922438214e-03 5.5721552369e-03 7.2107890104e-07 1.1945264266e-04 -2.4049797032e-02 9.0534178503e-03 4.1353051803e-01 7.6243598584e-08 1.0850406734e-03 -8.5129373380e-03 2.6137874323e-06 2.3615760670e-03 6.7179031525e-03 6.4628270727e-06 -2.8515439786e-03 7.4067280152e-05 1.8547996963e-06 1.8685696660e-02 1.1546954703e-02 -4.1059383480e-01 1.0508242989e-05 2.0026414555e-03 5.0069936802e-03 4.5255783501e-06 -3.1904695199e-04 6.5641412277e-03 6.4629453133e-06 2.5762247539e-03 6.2136578048e-04 -2.3450104732e-07 +2.0646047614e-01 1.2861261803e-03 5.5751873309e-03 7.2012205818e-07 1.1938872104e-04 +2.4034276362e-02 9.0459619354e-03 4.1340319593e-01 7.3654303492e-08 1.0847619613e-03 +8.5213061349e-03 2.6142104594e-06 2.3609822930e-03 6.7029906478e-03 6.4599215041e-06 +2.8505552253e-03 7.3822408962e-05 1.8538671872e-06 1.8673791495e-02 1.1537276794e-02 +4.1046337053e-01 1.0507171096e-05 2.0014259820e-03 5.0198316820e-03 4.5265044545e-06 +3.1926187220e-04 6.5493908957e-03 6.4594988163e-06 2.5753374295e-03 6.2099617840e-04 +2.3598489551e-07 3 (band) --4.79113206e-01 (Ry) +-4.78693920e-01 (Ry) 1.00000000e+00 (Occupations) -7.0949991528e-01 8.1390263005e-02 4.9575118700e-03 2.7483923543e-06 8.1834463522e-05 -5.7799082474e-02 3.6790649728e-03 2.2770637352e-01 2.2541428598e-05 7.3952402289e-03 -1.1241010814e-03 1.1728087063e-05 2.4012336056e-03 1.2402328734e-02 3.1370968456e-06 -5.0148802325e-04 2.4026880519e-04 3.6789407726e-07 4.8045716271e-02 8.0553214099e-03 -2.2283829965e-01 4.5750575711e-05 1.5504092995e-02 6.2851811344e-04 3.2441273217e-06 -2.8429220454e-03 1.2036492083e-02 4.3292811855e-06 2.8188480320e-04 1.5086954993e-03 -5.1152329172e-06 +7.1004946661e-01 8.1450938358e-02 4.9395597457e-03 2.7487224323e-06 8.1631705931e-05 +5.7829797909e-02 3.7031756176e-03 2.2789404977e-01 2.2560792678e-05 7.4008498450e-03 +1.0972358283e-03 1.1737822389e-05 2.4036715824e-03 1.2424733070e-02 3.1366832795e-06 +5.0097504967e-04 2.3981595345e-04 3.7540901618e-07 4.8105627823e-02 8.0655095605e-03 +2.2302561565e-01 4.5797451701e-05 1.5514591641e-02 6.1487470643e-04 3.2526419501e-06 +2.8433201707e-03 1.2058467539e-02 4.3304170759e-06 2.8106838918e-04 1.5095021321e-03 +5.1139697124e-06 4 (band) --4.50651893e-01 (Ry) +-4.52882734e-01 (Ry) 1.00000000e+00 (Occupations) -1.3217097755e-02 7.3806064880e-04 1.2039734432e-03 1.7927330311e-06 6.7026358167e-04 -6.9718730997e-03 2.5739269810e-03 2.8140856028e-03 3.8117027304e-03 6.3187344806e-01 -3.1905229613e-04 8.0840443344e-04 1.2861276004e-01 3.1525074076e-03 6.1157600920e-06 -1.0276743126e-03 6.6002886306e-02 3.2860482696e-04 8.4197612364e-03 3.4694185400e-03 -2.9154496332e-03 4.0958343738e-03 6.7963777219e-01 2.1227339874e-04 6.8936701349e-04 -1.1232882734e-01 3.2277104175e-03 6.4194817440e-06 1.0253157697e-03 7.2324878450e-02 -3.6946345590e-04 +1.3217335093e-02 7.3727750351e-04 1.2050544312e-03 1.7935518214e-06 6.6976661385e-04 +6.9736470048e-03 2.5739450331e-03 2.8143333276e-03 3.8113004019e-03 6.3180443143e-01 +3.1973138837e-04 8.0882191415e-04 1.2868341372e-01 3.1523729444e-03 5.9666640386e-06 +1.0014479353e-03 6.6010032458e-02 3.2864614901e-04 8.4188749587e-03 3.4680039854e-03 +2.9157132747e-03 4.0956112998e-03 6.7960033523e-01 2.1269290536e-04 6.8967193189e-04 +1.1237966029e-01 3.2276262110e-03 6.2640547783e-06 9.9842154060e-04 7.2340702498e-02 +3.6955196688e-04 5 (band) --4.29244918e-01 (Ry) +-4.31480781e-01 (Ry) 1.00000000e+00 (Occupations) -1.2546345097e-04 1.1549793258e-05 5.4857705532e-06 1.7615067526e-04 4.0243258957e-06 -2.4556284209e-05 1.3132013087e-05 2.6969529589e-05 6.3651794916e-01 3.8379303257e-03 -1.6110581304e-06 1.3046916020e-01 7.5108455649e-04 1.7032402131e-05 1.0434769506e-03 -6.3770696327e-06 4.0366253454e-04 5.5551345877e-02 1.4437473875e-04 7.4710347480e-05 -2.7465612737e-05 6.8689845606e-01 4.1425969972e-03 4.1990382723e-07 1.1228617889e-01 -6.6490946210e-04 1.4347980412e-05 1.0445399518e-03 6.1202194759e-06 4.4273751465e-04 -6.2664386483e-02 +1.2546300088e-04 1.1544419848e-05 5.4942274942e-06 1.7619214274e-04 4.0224364989e-06 +2.4597950718e-05 1.3167764352e-05 2.6971741725e-05 6.3644973778e-01 3.8375039171e-03 +1.6162250031e-06 1.3053917376e-01 7.5151573396e-04 1.7031749016e-05 1.0186590414e-03 +6.2186970867e-06 4.0370503645e-04 5.5558102720e-02 1.4442834930e-04 7.4732362682e-05 +2.7466693884e-05 6.8686156956e-01 4.1423733968e-03 4.2015005442e-07 1.1233643502e-01 +6.6521290261e-04 1.4348155985e-05 1.0184597013e-03 5.9558219401e-06 4.4283742447e-04 +6.2679678678e-02 6 (band) -4.03555478e-01 (Ry) +4.01355569e-01 (Ry) 0.00000000e+00 (Occupations) -8.1756853804e-06 1.4726002623e-06 1.9926827054e-06 1.3205847861e-04 2.4037628504e-06 -2.4248674591e-04 1.6038440115e-06 6.9047060430e-06 9.7310772497e-01 7.7983002859e-03 -6.0669465978e-06 5.6609682874e-02 4.9199867740e-04 9.7677240136e-06 1.3864011770e-03 -1.0077715105e-05 1.1828854219e-03 1.6453331700e-01 2.3320409245e-04 1.7959969054e-05 -2.1113749459e-06 9.7075043110e-01 7.7724078957e-03 2.2137732366e-06 6.3595395340e-02 -5.5419599527e-04 6.1531296898e-06 1.3430501429e-03 9.4413885659e-06 1.2904066196e-03 -1.7669219340e-01 +8.1765382256e-06 1.4723424388e-06 1.9944574791e-06 1.2724638244e-04 2.4008924861e-06 +2.4247430396e-04 1.5964249387e-06 6.9211473871e-06 9.7295037212e-01 7.7971327194e-03 +6.0543349782e-06 5.6493656157e-02 4.9112907363e-04 9.7752723629e-06 1.3441238962e-03 +9.7322333870e-06 1.1831228230e-03 1.6456535257e-01 2.3319234580e-04 1.7960741032e-05 +2.1244262132e-06 9.7060145833e-01 7.7713173116e-03 2.2001820834e-06 6.3488033235e-02 +5.5340508093e-04 6.1443976916e-06 1.3010619773e-03 9.0953302969e-06 1.2906710664e-03 +1.7672719027e-01 7 (band) -4.29134758e-01 (Ry) +4.26938573e-01 (Ry) 0.00000000e+00 (Occupations) -2.0480946395e-03 2.1273300953e-04 4.7719244715e-04 1.4696326594e-06 1.0470311603e-04 -9.8666670088e-02 1.1656518985e-02 8.5216242340e-04 7.7101178400e-03 9.9362664003e-01 -1.1296243997e-03 4.8820825804e-04 6.7644381447e-02 6.7123713358e-04 1.0840575556e-05 -1.2451732319e-03 1.5673281830e-01 1.3488478325e-03 9.5609650162e-02 1.6674853442e-02 -4.1258058382e-04 7.6978947909e-03 9.9115501373e-01 2.8455247362e-04 5.3144399462e-04 -7.4105554472e-02 2.4095607344e-03 1.0772987703e-05 1.2234007472e-03 1.6933162690e-01 -1.4384419805e-03 +2.0482188045e-03 2.1266023376e-04 4.7721139922e-04 1.4408763205e-06 1.0384483808e-04 +9.8678865855e-02 1.1661715110e-02 8.5538571549e-04 7.7088253246e-03 9.9347173328e-01 +1.1265399113e-03 4.8726654476e-04 6.7530487736e-02 6.7290331423e-04 1.0502159071e-05 +1.2005997230e-03 1.5676439980e-01 1.3491122042e-03 9.5621893424e-02 1.6679939202e-02 +4.0847675357e-04 7.6966572631e-03 9.9100868342e-01 2.8114151531e-04 5.3055963429e-04 +7.4000446053e-02 2.4076022261e-03 1.0436801716e-05 1.1788837476e-03 1.6936625727e-01 +1.4387257564e-03 8 (band) -4.92284898e-01 (Ry) +4.91352987e-01 (Ry) 0.00000000e+00 (Occupations) -2.5847686475e-01 3.5257767479e-02 5.4429817444e-02 4.2800479963e-08 1.1707003177e-04 -2.5391693038e-01 3.0906458744e-01 1.0309380927e-01 1.5690058903e-05 1.6756080117e-02 -7.4477563029e-02 7.1711876929e-06 2.7626743177e-03 2.1035597043e-01 4.3173134636e-06 -6.4592447180e-04 1.0156619157e-03 3.3288592277e-05 1.5848550144e-01 3.3347684867e-01 -9.6590964216e-02 9.0011058768e-06 2.2792423066e-03 7.3586649880e-02 5.0701595243e-05 -3.0483400107e-03 2.0961787776e-01 5.5391856269e-06 5.4738559843e-04 2.0894231013e-03 -7.0353203665e-06 +2.5865076697e-01 3.5282240483e-02 5.4427194935e-02 4.2213880655e-08 1.1740832263e-04 +2.5409279287e-01 3.0923887154e-01 1.0318117800e-01 1.5758941746e-05 1.6769661826e-02 +7.4532904324e-02 7.1408186138e-06 2.7601769549e-03 2.1049405581e-01 4.3191791524e-06 +6.4674087229e-04 1.0176402543e-03 3.3302987436e-05 1.5854547576e-01 3.3369622370e-01 +9.6670427626e-02 8.9782364529e-06 2.2862611332e-03 7.3645039878e-02 5.0756339340e-05 +3.0441385650e-03 2.0975437711e-01 5.5385640142e-06 5.4872294175e-04 2.0900052094e-03 +7.0115138556e-06 9 (band) -7.32222119e-01 (Ry) +7.30101827e-01 (Ry) 0.00000000e+00 (Occupations) -2.4578208099e-03 8.5847556868e-04 6.2451396786e-04 2.5249221788e-07 1.2684874430e-03 -2.2778095437e+00 3.7725640644e-01 4.7386691353e-02 2.8868075795e-04 3.8786189795e-02 -1.0678281716e-02 8.5395923953e-05 4.7206230460e-03 1.4010781725e-01 7.5926982369e-07 -1.1083169862e-04 7.8127696803e-03 5.1037265705e-05 2.2812749546e+00 3.7121473632e-01 -4.2697424407e-02 3.5567803722e-04 3.9611025367e-02 1.5859297322e-02 1.6143615843e-04 -5.7494623163e-03 1.3199606167e-01 6.0533859920e-07 1.5523468806e-04 8.4274553739e-03 -5.9662172579e-05 +2.4579625212e-03 8.5825303449e-04 6.2440566243e-04 2.4784434719e-07 1.2669747411e-03 +2.2779971233e+00 3.7732774019e-01 4.7287372854e-02 2.8871195305e-04 3.8781817532e-02 +1.0588051098e-02 8.5408224465e-05 4.7172122108e-03 1.4007101459e-01 7.4740623959e-07 +1.1011622396e-04 7.8135869103e-03 5.1022566447e-05 2.2814624594e+00 3.7128603378e-01 +4.2597509895e-02 3.5572258423e-04 3.9607059321e-02 1.5769172146e-02 1.6146222806e-04 +5.7464823043e-03 1.3195913833e-01 5.9323812941e-07 1.5418730122e-04 8.4283669410e-03 +5.9651499967e-05 10 (band) -9.17560989e-01 (Ry) +9.15500991e-01 (Ry) 0.00000000e+00 (Occupations) -1.4606023528e-02 3.2672698707e-03 3.5047317472e-03 3.2795571456e-07 1.4170211301e-03 -6.0584573025e-02 1.2710721285e-02 1.4913817050e+00 7.1935525183e-06 2.9201081715e-03 -3.1644405045e-01 2.5005563054e-06 1.5440308394e-03 5.6773861367e-03 9.5814964427e-07 -3.3827412551e-03 3.7440304557e-04 8.0088113958e-07 6.2704186789e-02 3.8211457165e-03 -1.4740767749e+00 1.0480089133e-05 3.1784992560e-03 3.4460940625e-01 6.4683415396e-06 -1.4877866802e-03 1.8028478460e-03 8.3408664858e-08 2.5473380709e-03 3.9643628566e-04 -1.7675027510e-06 +1.4607034345e-02 3.2673316864e-03 3.5029959111e-03 3.2659368534e-07 1.4105684635e-03 +6.0469334046e-02 1.2696158914e-02 1.4912704230e+00 7.1899750411e-06 2.9204853580e-03 +3.1633885213e-01 2.5004628352e-06 1.5438677657e-03 5.7288438809e-03 9.5736870196e-07 +3.3823395333e-03 3.7406983686e-04 8.0336813907e-07 6.2588224078e-02 3.8077941067e-03 +1.4739673442e+00 1.0473590075e-05 3.1798001184e-03 3.4450386526e-01 6.4653602240e-06 +1.4886344286e-03 1.7490552225e-03 8.4800326322e-08 2.5470449473e-03 3.9636150391e-04 +1.7685095749e-06 diff --git a/tests/05_rtTDDFT/05_NO_cur_TDDFT/result.ref b/tests/05_rtTDDFT/05_NO_cur_TDDFT/result.ref index 6f2c4d9b7b9..fcb86f3b2d0 100644 --- a/tests/05_rtTDDFT/05_NO_cur_TDDFT/result.ref +++ b/tests/05_rtTDDFT/05_NO_cur_TDDFT/result.ref @@ -1,6 +1,6 @@ -etotref -30.91255300422819 -etotperatomref -15.4562765021 -totalforceref 0.479532 -totalstressref 0.981046 +etotref -30.90700656487152 +etotperatomref -15.4535032824 +totalforceref 0.477220 +totalstressref 0.897787 CompareCurrent_pass 0 totaltimeref 1.73 diff --git a/tests/05_rtTDDFT/06_NO_dir_TDDFT/result.ref b/tests/05_rtTDDFT/06_NO_dir_TDDFT/result.ref index 5fbff0177d0..7070f16d32b 100644 --- a/tests/05_rtTDDFT/06_NO_dir_TDDFT/result.ref +++ b/tests/05_rtTDDFT/06_NO_dir_TDDFT/result.ref @@ -1,5 +1,5 @@ -etotref -30.45454376271165 -etotperatomref -15.2272718814 -totalforceref 0.595498 -totalstressref 4.286358 +etotref -30.44916398293971 +etotperatomref -15.2245819915 +totalforceref 0.593208 +totalstressref 4.354288 totaltimeref 1.55 diff --git a/tests/05_rtTDDFT/07_NO_EDM_TDDFT/result.ref b/tests/05_rtTDDFT/07_NO_EDM_TDDFT/result.ref index e319cfc11ea..14de6adea8f 100644 --- a/tests/05_rtTDDFT/07_NO_EDM_TDDFT/result.ref +++ b/tests/05_rtTDDFT/07_NO_EDM_TDDFT/result.ref @@ -1,5 +1,5 @@ -etotref -18.06494189760862 -etotperatomref -9.0324709488 -totalforceref 41.359252 -totalstressref 73.228950 +etotref -18.06207691064244 +etotperatomref -9.0310384553 +totalforceref 41.388212 +totalstressref 73.194450 totaltimeref 1.53 diff --git a/tests/05_rtTDDFT/09_NO_HEAV_TDDFT/result.ref b/tests/05_rtTDDFT/09_NO_HEAV_TDDFT/result.ref index 16bc961000f..7a5d97ed4c0 100644 --- a/tests/05_rtTDDFT/09_NO_HEAV_TDDFT/result.ref +++ b/tests/05_rtTDDFT/09_NO_HEAV_TDDFT/result.ref @@ -1,5 +1,5 @@ -etotref -22.97638349080425 -etotperatomref -11.4881917454 -totalforceref 0.582042 -totalstressref 76.025571 +etotref -22.97307211770303 +etotperatomref -11.4865360589 +totalforceref 0.579756 +totalstressref 76.073654 totaltimeref 1.56 diff --git a/tests/05_rtTDDFT/10_NO_HHG_TDDFT/result.ref b/tests/05_rtTDDFT/10_NO_HHG_TDDFT/result.ref index e47c61dabbf..9ef1f23d968 100644 --- a/tests/05_rtTDDFT/10_NO_HHG_TDDFT/result.ref +++ b/tests/05_rtTDDFT/10_NO_HHG_TDDFT/result.ref @@ -1,5 +1,5 @@ -etotref 20.47683114572229 -etotperatomref 10.2384155729 -totalforceref 0.451670 -totalstressref 487.779801 +etotref 20.46810349845972 +etotperatomref 10.2340517492 +totalforceref 0.449538 +totalstressref 487.715103 totaltimeref 1.56 diff --git a/tests/05_rtTDDFT/11_NO_O3_TDDFT/result.ref b/tests/05_rtTDDFT/11_NO_O3_TDDFT/result.ref index 576e2bc0b1f..2ebf9bbe355 100644 --- a/tests/05_rtTDDFT/11_NO_O3_TDDFT/result.ref +++ b/tests/05_rtTDDFT/11_NO_O3_TDDFT/result.ref @@ -1,5 +1,5 @@ -etotref -1336.999475563259 -etotperatomref -445.6664918544 -totalforceref 11.627501 -totalstressref 64.927558 +etotref -1336.999647245151 +etotperatomref -445.6665490817 +totalforceref 11.627092 +totalstressref 64.925589 totaltimeref 2.42 diff --git a/tests/05_rtTDDFT/13_NO_Taylor_TDDFT/result.ref b/tests/05_rtTDDFT/13_NO_Taylor_TDDFT/result.ref index 7cefd9f06ad..abbbf0ce0d3 100644 --- a/tests/05_rtTDDFT/13_NO_Taylor_TDDFT/result.ref +++ b/tests/05_rtTDDFT/13_NO_Taylor_TDDFT/result.ref @@ -1,5 +1,5 @@ -etotref 18.6691468568 -etotperatomref 9.3345734284 -totalforceref 82.531062 -totalstressref 170.582088 +etotref 18.75870525074617 +etotperatomref 9.3793526254 +totalforceref 82.639558 +totalstressref 170.755679 totaltimeref 1.54 diff --git a/tests/05_rtTDDFT/14_NO_TRAP_TDDFT/result.ref b/tests/05_rtTDDFT/14_NO_TRAP_TDDFT/result.ref index c46aedc8303..58efb28def2 100644 --- a/tests/05_rtTDDFT/14_NO_TRAP_TDDFT/result.ref +++ b/tests/05_rtTDDFT/14_NO_TRAP_TDDFT/result.ref @@ -1,5 +1,5 @@ -etotref -30.89964815765915 -etotperatomref -15.4498240788 -totalforceref 0.596612 -totalstressref 1.073053 +etotref -30.89414473427034 +etotperatomref -15.4470723671 +totalforceref 0.594324 +totalstressref 1.036616 totaltimeref 1.44 diff --git a/tests/05_rtTDDFT/15_NO_TRI_TDDFT/result.ref b/tests/05_rtTDDFT/15_NO_TRI_TDDFT/result.ref index 0db2ec45d13..e08bf8bae29 100644 --- a/tests/05_rtTDDFT/15_NO_TRI_TDDFT/result.ref +++ b/tests/05_rtTDDFT/15_NO_TRI_TDDFT/result.ref @@ -1,5 +1,5 @@ -etotref -30.90911715730050 -etotperatomref -15.4545585787 -totalforceref 0.596616 -totalstressref 1.147852 +etotref -30.90361111472604 +etotperatomref -15.4518055574 +totalforceref 0.594326 +totalstressref 1.066949 totaltimeref 1.43 diff --git a/tests/05_rtTDDFT/16_NO_vel_TDDFT/current_tot.txt.ref b/tests/05_rtTDDFT/16_NO_vel_TDDFT/current_tot.txt.ref index 9c7b4713a66..7f8fc9967b3 100644 --- a/tests/05_rtTDDFT/16_NO_vel_TDDFT/current_tot.txt.ref +++ b/tests/05_rtTDDFT/16_NO_vel_TDDFT/current_tot.txt.ref @@ -1,4 +1,4 @@ 1 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 -2 -9.3131677426699668e-13 2.9106758466191378e-12 9.4269252212746820e-12 -3 5.5279118424753619e-07 -2.7750450081350425e-09 -4.4554804911324553e-09 -4 -9.4214650315355873e-08 9.6892138880731047e-09 1.5473572660469397e-08 +2 -2.3833707451596696e-13 2.7656027222152551e-12 9.0876104192339571e-12 +3 5.5263838630689616e-07 -2.7744898431637265e-09 -4.4546147494321377e-09 +4 -9.4188580856770235e-08 9.6868862867664117e-09 1.5469706745150555e-08 diff --git a/tests/05_rtTDDFT/16_NO_vel_TDDFT/result.ref b/tests/05_rtTDDFT/16_NO_vel_TDDFT/result.ref index 5fddab55cf4..a6f5d25a94c 100644 --- a/tests/05_rtTDDFT/16_NO_vel_TDDFT/result.ref +++ b/tests/05_rtTDDFT/16_NO_vel_TDDFT/result.ref @@ -1,6 +1,6 @@ -etotref -30.91255473637468 -etotperatomref -15.4562773682 -totalforceref 0.479298 -totalstressref 0.980420 +etotref -30.90700827865216 +etotperatomref -15.4535041393 +totalforceref 0.476984 +totalstressref 0.897160 CompareCurrent_pass 0 totaltimeref 1.10 diff --git a/tests/05_rtTDDFT/20_NO_MIXED_EFIELD_TDDFT/result.ref b/tests/05_rtTDDFT/20_NO_MIXED_EFIELD_TDDFT/result.ref index e076828c6b5..bf3a2f5d3bc 100644 --- a/tests/05_rtTDDFT/20_NO_MIXED_EFIELD_TDDFT/result.ref +++ b/tests/05_rtTDDFT/20_NO_MIXED_EFIELD_TDDFT/result.ref @@ -1,5 +1,5 @@ -etotref -194.7658545436277 -etotperatomref -97.3829272718 +etotref -194.7653066442119 +etotperatomref -97.3826533221 Compareefield_1_txt_pass 0 Compareefield_2_txt_pass 0 Compareefield_3_txt_pass 0 From 11ee6f9a8904c85b7d4be52cb1f5f0e9ea56596e Mon Sep 17 00:00:00 2001 From: memii-x Date: Thu, 15 Oct 2026 00:18:24 +0800 Subject: [PATCH 4/4] docs(rt): remove PR-specific normalization write-up --- docs/developers_guide/index.rst | 1 - docs/developers_guide/rt_normalization_fix.md | 23 ------------------- 2 files changed, 24 deletions(-) delete mode 100644 docs/developers_guide/rt_normalization_fix.md diff --git a/docs/developers_guide/index.rst b/docs/developers_guide/index.rst index 8eca2bca558..80224240428 100644 --- a/docs/developers_guide/index.rst +++ b/docs/developers_guide/index.rst @@ -12,4 +12,3 @@ This section provides guidelines and resources for developers working on the ABA basic_types_class.md input_availability.md agent_governance.md - rt_normalization_fix.md diff --git a/docs/developers_guide/rt_normalization_fix.md b/docs/developers_guide/rt_normalization_fix.md deleted file mode 100644 index 0bf7063a7a5..00000000000 --- a/docs/developers_guide/rt_normalization_fix.md +++ /dev/null @@ -1,23 +0,0 @@ -# Fix: normalize RT wavefunctions with the endpoint overlap - -After half_Hmatrix averages H/S for propagation, evolve_psi currently passes the averaged S to normalization. A wavefunction arriving at t+dt needs its norm evaluated using S(t+dt). For a time-dependent overlap, a unit norm in the averaged metric need not be a unit norm at the endpoint. - -The CPU path uses the unmodified endpoint s_mat.p. The tensor path reloads endpoint S from the existing distributed or root-gathered host buffer after propagation and before normalization. Band energies already use endpoint H. This also benefits moving-ion cases with changing S; constant-S results should be unchanged. - -## Unit Tests and/or Case Tests -- `cmake --build /tmp/upstream-norm-review-20261014 --target MODULE_LCAO_tddft_evolve_psi_test MODULE_LCAO_tddft_norm_psi_test -j4`: passed. -- `OMP_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1 ctest --test-dir /tmp/upstream-norm-review-20261014 -V -R 'MODULE_LCAO_tddft_(evolve_psi|norm_psi)_test'`: 2/2 CTests, 4/4 GTests passed. The new tests call the actual CPU and tensor-LAPACK propagation entries with a complex, positive-definite changing overlap. -- Negative regression check: compiled a separate copy of `evolve_psi.cpp` with the previous averaged-overlap normalization restored and linked it to the same tests. Both propagation tests failed with endpoint norm 1.1935483870967742; both pass with the fix. The reviewed worktree was unchanged during this check. -- git diff --check and staged agent_governance_check: passed (documentation review warning before this note was added). -- Full CPU executable built from this PR with MPI, LCAO, Libxc and single-precision FFTW enabled. `bash ../integrate/Autotest.sh -a /tmp/upstream-norm-review-20261014/abacus_basic_para -n 4 -o 1 -j 1 -f CASES_CPU.txt`: all 28 RT-TDDFT cases and 115 property comparisons passed after updating affected references. INPUT, STRU, KPT and comparison tolerances are unchanged. -- Repeating the same complete suite with `-n 2` also passed all 28 cases and 115 property comparisons using the same references. The two focused CTest targets were rebuilt in this configuration and passed again (4/4 GoogleTests). -- The 13 affected moving-ion cases have changing overlap even in the length and velocity gauges. Their energy, force and stress references therefore change; the wavefunction reference in `02_NO_CH_OW_TDDFT` and current reference in `16_NO_vel_TDDFT` also change. A controlled moving-ion H2 check gives a final maximum endpoint per-band norm defect of `1.8658e-3` before the fix and `2.5313e-14` after it; freezing the ions makes the paired energies identical. -- GPU/cuBLASMp execution was not run locally. The non-LAPACK tensor kernels require cuBLASMp and are not exercised by the CPU unit-test target. The focused propagation unit tests use one MPI rank and a two-orbital matrix fixture; the existing integration suite supplies the multi-rank case coverage. These checks do not establish the accuracy of the complete moving-ion RT discretization. -- The new propagation regression target is excluded when ENABLE_CUBLASMP is enabled: it exercises CPU and CPU Tensor-LAPACK paths and does not supply GPU kernel or distributed-library link dependencies. Existing test targets are unchanged. - -## Linked Issue -No separate issue: this PR contains the localized defect and regression evidence. Related PRs were searched before preparation. - -## Governance Notes -No INPUT syntax, defaults, or parser metadata changes. No change to the propagation formula. This is a bug fix in existing RT paths. No governance exception requested. -Core impact: module_rt normalization call sites only; no interfaces changed.