Repository navigation
Write DFT+U occupation eigenvalues to occ_mat.txt - #8289
Conversation
ABACUS-PR-BOT
left a comment
There was a problem hiding this comment.
The new eigenvalue output has three correctness issues: a nonterminating collinear boundary case and incorrect spectra in both LCAO SOC representations. One non-blocking test-style item is also noted. Static source and analytic review of d1fba2e0; no builds or tests were run.
ABACUS-PR-BOT
left a comment
There was a problem hiding this comment.
The added eigenvalue output reports an unused spin spectrum for nonmagnetic LCAO calculations. The Jacobi cutoff and both SOC corrections are fixed in the inspected source.
Static review of 9035800ca; no builds, tests or CI verification. PW nspin=1 eigenvalue normalization remains unverified.
Non-blocking: Please mention the sorted eigenvalue comments in the out_occ_mat help text, including that they appear only in the latest occ_mat.txt.
|
Follow-up to the latest review (e4df384): the |
mohanchen
left a comment
There was a problem hiding this comment.
LGTM. Congratulations for another PR!
Summary
occ_mat.txtwhenout_occ_matis enabled. Eigenvalue lines are comments, so restart input remains readable; numberedocc_matg*.txtfiles do not gain eigenvalue lines.1e-10boundary.dft_plus_u=1SOC occupation data as four Pauli blocks in both output and restart input. Keepdft_plus_u=2in its real spin-basis layout.nspin=1, labelednonmagnetic; a stale second channel can no longer appear as a falsespin 2spectrum.out_occ_matINPUT help text.SOC occupation-matrix layout correction (
nspin=4)This PR also corrects how the shared output/restart code interprets LCAO occupation data. The underlying DFT+U occupation calculation and Hamiltonian are unchanged.
(2l+1) × (2l+1)Pauli blocks[N0, Nx, Ny, Nz]dft_plus_u=1(2l+1) × (2l+1)Pauli blocksdft_plus_u=22(2l+1) × 2(2l+1)spin-basis matrixLCAO method 1 already computes four Pauli components (
spin_fold=4); the old output/restart caller passed the spin-basis layout for both LCAO methods. The layout is now selected bydft_plus_u. For a Pauli input, the writer reconstructsN↑↑=(N0+Nz)/2,N↓↓=(N0−Nz)/2, andN↑↓=(Nx+iNy)/2before writing the four compact spin blocks and diagonalizing the full Hermitian spinor matrix. For method 2, retaining the complete upper-right orbital block prevents loss of cross-orbital coupling. Both layouts continue to produce the same compactocc_mat.txtformat.Nonmagnetic normalization (
nspin=1)The eigenvalues are those of the stored occupation matrix, without an output-only rescaling. PW
nspin=1k-point weights include spin degeneracy (a unit projector with weight 2 yields an eigenvalue of 2), whereas LCAOdft_plus_u=1halves its DMR contribution before storing the matrix. The output prints onenonmagneticspectrum from channel 0 for both paths. This PR leaves the underlying occupation and DFT+U energy conventions unchanged.Example:
Verification
cmake --build build --target MODULE_PW_dftu_base_test esolver hamilt_lcao -j4— passed for the earlier SOC correction;cmake --build build --target MODULE_PW_dftu_base_test abacus_input_yaml -j4— passed for the latest change.OMP_NUM_THREADS=1 ./build/source/source_pw/module_pwdft/unittests/MODULE_PW_dftu_base_test --gtest_brief=1— 33/33 passed in the normal MPI runtime environment, including the new single-channel and PW spin-summed-weight regressions../build/source/source_io/abacus_input_yaml > /tmp/abacus-pr-8289-parameters.yaml— passed; the generatedout_occ_mathelp includes the new behavior.git diff --cached --check— passed before the latest commit.python3 tools/03_code_analysis/agent_governance_check.py --staged— passed with a documentation-sync advisory; parameter help is the source for generated docs, so no generated YAML/Markdown is committed.Documentation
Updated the
out_occ_matINPUT help metadata. No new INPUT parameter or parsing behavior.