Repository navigation
Conversation
ABACUS-PR-BOT
left a comment
There was a problem hiding this comment.
One conditional regression remains in out_current=2 when local-potential terms are disabled; see inline. Static source review only: governance and git diff --check passed; builds and tests were not run, and CI results were not inspected.
ABACUS-PR-BOT
left a comment
There was a problem hiding this comment.
The reported shared-H(R) defect is addressed in a0612f0; one test safeguard is noted inline. Static source review only; builds and tests were not run.
There was a problem hiding this comment.
Overall, the implementation looks fine to me in terms of physical correctness. However, there are some over-engineering issues (AI agents nowadays always over engineer things), particularly with the additional tests, that I'd suggest addressing before merging.
Linked Issue
Fixes #8285.
What's changed?
For collinear spin calculations, the commutator current now uses the same real-space Hamiltonian as propagation for each spin channel. When both spins share a Hamiltonian, the current calculation uses that shared matrix.
Unit Tests and/or Case Tests for my changes
From
tests/08_RI,bash ../integrate/Autotest.sh -a /path/to/abacus -n 4 -o 1 -j 1 -r '^rt_tddft_hse_current_spin2_up$'passed. The pre-fix binary fails the current comparison on the second output row at the existing absolute tolerance of1e-10.With two MPI ranks, the Si HSE case took 20.65 s at
scf_thr=1e-10, 13.76 s at1e-7, and 10.98 s at the selected1e-6.Governance Notes
No documentation update required. The fix preserves the existing current output format.