Skip to content

Write DFT+U occupation eigenvalues to occ_mat.txt - #8289

Draft
lanshuyue wants to merge 1 commit into
deepmodeling:developfrom
lanshuyue:codex/occ-mat-eigenvalues
Draft

lanshuyue wants to merge 1 commit into
deepmodeling:developfrom
lanshuyue:codex/occ-mat-eigenvalues

Conversation

@lanshuyue

Copy link
Copy Markdown
Collaborator

Summary

  • Append sorted DFT+U occupation-matrix eigenvalues to the latest occ_mat.txt when out_occ_mat is enabled.
  • Keep the compact occupation matrices and numbered occ_matg*.txt snapshots unchanged. Eigenvalues are comment lines, so occ_mat.txt remains valid restart input.
  • For collinear calculations, diagonalize each spin block with the existing Jacobi helper; for SOC, reconstruct the complex spinor matrix and use LAPACK zheev.

Example:

# eigenvalues atom 1 L 2 spin 1: 0.70000000 0.80000000 0.80000000 0.80000000 0.90000000
# eigenvalues atom 1 L 2 spin 2: 0.20000000 0.20000000 0.20000000 0.20000000 0.20000000

Verification

  • cmake --build build --target MODULE_PW_dftu_base_test -j4 — passed.
  • OMP_NUM_THREADS=1 ./build/source/source_pw/module_pwdft/unittests/MODULE_PW_dftu_base_test --gtest_brief=1 — 29/29 passed in a normal MPI runtime environment.
  • git diff --check — passed.
  • python3 tools/03_code_analysis/agent_governance_check.py --staged — documentation-sync advisory only.

Documentation

No new INPUT parameter or parsing behavior. The output lines are self-describing, and out_occ_mat already documents the file. The format is described here for review.

@mohanchen mohanchen added DFT+U Issues related to DFT plus U function Refactor Refactor ABACUS codes labels Nov 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DFT+U Issues related to DFT plus U function Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants