Skip to content

fix(rt): normalize LCAO wavefunctions with arrival-endpoint overlap - #8145

Merged
mohanchen merged 4 commits into
deepmodeling:developfrom
memii-x:codex/upstream-rt-endpoint-metric-20261014
Oct 15, 2026
Merged

mohanchen merged 4 commits into
deepmodeling:developfrom
memii-x:codex/upstream-rt-endpoint-metric-20261014

Conversation

@memii-x

@memii-x memii-x commented Oct 14, 2026 •

Copy link
Copy Markdown

Problem and change

LCAO RT propagation averages H/S for its half-step solve, but previously reused that averaged S for normalization. Normalize the arriving wavefunctions with the endpoint S(t+dt) instead: the CPU path uses the existing endpoint matrix and the tensor path reloads its existing endpoint host buffer before normalization. No propagation formula, INPUT setting, or comparison tolerance changes.

This corrects sHG and moving-ion length/velocity-gauge cases with changing overlap. Constant-overlap cases retain the previous result.

Regression reference updates

Update 50 energy/force/stress reference values across 13 affected cases, the WFC-magnitude reference in 02_NO_CH_OW_TDDFT, and the current reference in 16_NO_vel_TDDFT. Preserve all test INPUT/STRU/KPT files, thresholds, comparison scripts and timing references.

A controlled moving-ion H2 check evaluated from saved WFC and endpoint S gives a final maximum 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. The old executable matches the old references and the corrected executable reproduces the CI differences. These checks support the reference updates without asserting accuracy of the full moving-ion RT discretization.

Validation

  • Built the full CPU executable directly from this PR with MPI, LCAO, Libxc and ENABLE_FLOAT_FFTW=ON.
  • Existing CASES_CPU.txt suite: all 28 cases and 115 property comparisons passed with 4 MPI x 1 OMP; repeated with 2 MPI x 1 OMP against the same references, also all passed.
  • Commands: bash ../integrate/Autotest.sh -a /tmp/upstream-norm-review-20261014/abacus_basic_para -n 4 -o 1 -j 1 -f CASES_CPU.txt, repeated with -n 2.
  • Rebuilt and ran MODULE_LCAO_tddft_evolve_psi_test and MODULE_LCAO_tddft_norm_psi_test: 2/2 CTests, 4/4 GoogleTests passed.
  • Local strict Sphinx LaTeX generation (--fail-on-warning), governance checks and git diff --check: passed. The two Read the Docs checks passed after the heading/toctree correction.
  • GPU/cuBLASMp runtime was not run locally; the updated shared references are submitted to CPU/CUDA CI for confirmation.

@memii-x memii-x changed the title fix(rt): normalize sHG wavefunctions with arrival-endpoint overlap fix(rt): normalize LCAO wavefunctions with arrival-endpoint overlap Oct 14, 2026

@AsTonyshment AsTonyshment left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall thanks for your contribution. I heard @ESROAMER talked about this normalization issue at the ABACUS annual conference. Here are some preliminary comments that we should resolve first, and I'll look into your PR in detail in the near future.

Comment thread docs/developers_guide/rt_normalization_fix.md Outdated
Comment thread docs/developers_guide/index.rst Outdated

@ABACUS-PR-BOT ABACUS-PR-BOT left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static review of 11ee6f9a8904c85b7d4be52cb1f5f0e9ea56596e completed with an independent second review. No actionable findings in the endpoint-overlap change, its caller/lifecycle paths, or the regression tests. Whitespace and governance checks passed; metadata/documentation warnings were assessed. This review was static: runtime behavior, updated numerical references, and CI remain unverified.

@AsTonyshment AsTonyshment left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mohanchen
mohanchen merged commit 45b1ed0 into deepmodeling:develop Oct 15, 2026
17 checks passed
@mohanchen mohanchen added Bugs Bugs that only solvable with sufficient knowledge of DFT Refactor Refactor ABACUS codes Tests/Examples Issues/PR related to unit tests and integrate tests labels Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bugs Bugs that only solvable with sufficient knowledge of DFT Refactor Refactor ABACUS codes Tests/Examples Issues/PR related to unit tests and integrate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants