Repository navigation
Fix(gint): remove extra conjugation in noncollinear Hamiltonian assembly - #8183
Conversation
Transpose the reverse atom-pair block without conjugating its coefficients while the spin indices are fixed. The opposite spin block already carries the conjugate Pauli coefficients. The extra conjugation reverses the By contribution and breaks full spinor Hermiticity. Correct the adjacent comment to distinguish the spatial transpose from the Hermitian adjoint of the full spinor matrix. Fixes deepmodeling#8121
72e3fc2 to
f290f28
Compare
20e3910 to
f290f28
Compare
|
Added the reviewed compact O2 cases in c085dde:
Download the exact reviewed ZIP (10,257 bytes). The archive is included in the commit; PP/orbital resources are reused from the repository. The existing collector passes both fixed-build H/S references and detects the pre-fix H errors. The PR description now records the rotation diagnostics and the remaining difference between the NSOC last-SCF Hamiltonian and the Hamiltonian rebuilt from the final converged density; it does not claim that all SCF endpoint covariance checks passed. |
ABACUS-PR-BOT
left a comment
There was a problem hiding this comment.
Static review of 3e557eef16a3 supports the spatial-transpose correction in merge_hr_part_to_hR; independent direct-quadrature checks reproduce the old B_y Hermiticity error.
Non-blocking follow-up to the existing test discussion: please include the focused replacement regression, or demonstrate a retained case that fails with the old conjugation, with exact commands/results.
No ABACUS build, MPI/GPU runtime, or SCF validation was performed.
Noncollinear states with a transverse y component can converge while reverse spatial-block assembly violates full spinor Hermiticity. The production fix removes the extra conjugation in
ModuleGint::merge_hr_part_to_hR.Linked Issue
Fixes #8121
What's changed?
Retain the one-assignment Gint correction and add two compact O2 SCF regressions,
scf_nspin4_nsoc_hrandscf_nspin4_soc_hr. Both use the existing O fully relativistic pseudopotential and minimal 1s1p orbitals, an 18-bohr cell, a 2.3-bohr bond, Gamma 1x1x1, PBE/LCAO, 15 Ry,scf_thr=1e-7,scf_nmax=50, xy initial moments and no DeltaSpin constraint.Each case includes complete raw 16x16 H(R)/S(R) references at R=0 and uses the existing matrix comparator without changing its tolerances. Only the two case directories and their
CASES_CPU.txtentries are added; no archive or duplicated PP/orbital data is included.Unit Tests and/or Case Tests for my changes
Fresh runs with the GNU 11.4 and IntelLLVM 2025.3 builds exercised both final cases twice, using four MPI ranks and one OpenMP thread. All eight SCF calculations converged in 34/35 steps and passed the existing H/S comparisons. Cross-build maximum H differences are about
1.00e-13 Ry; the sparse positions match. Program calculation time is1.05-1.65 sper case locally, or4.18-5.03 sincluding MPI and other external overhead.The unfixed parent converges for both inputs but fails both H comparisons, with errors about
1.97e-2 Ry; S comparisons pass. References are byte copies of the corrected build's raw converged SCF outputs, without projections, averaging or truncation.The GitHub OpenMPI/OpenBLAS CPU integration and unit-test job also passed for commit
d0442d4. Both new cases executed with four MPI ranks and one OpenMP thread and passed the existing H(R), S(R), total-energy and energy-per-atom comparisons: NSOC took 4.137 s and SOC took 4.202 s. CPU CI log.Governance Notes
I have read
AGENTS.mdanddocs/developers_guide/agent_governance.md. No documentation update required: INPUT interfaces and output formats are unchanged, and each fixture has a short README. These compact parameters protect the assembly regression; they do not certify material-property convergence or all SCF endpoint covariance relations.