Skip to content

Support NPZ output for LCAO H(R), S(R), and DM(R)#7471

Merged
mohanchen merged 4 commits into
deepmodeling:developfrom
pincher-chen:feature/out-hsr-npz
Jul 2, 2026
Merged

Support NPZ output for LCAO H(R), S(R), and DM(R)#7471
mohanchen merged 4 commits into
deepmodeling:developfrom
pincher-chen:feature/out-hsr-npz

Conversation

@pincher-chen

Copy link
Copy Markdown

Summary

  • Add INPUT options out_hr_npz, out_hsr_npz, and out_dm_npz.
  • Output LCAO H(R), S(R), and DM(R) matrices in NPZ format.
  • Support nspin=1, nspin=2, and nspin=4 by adding complex HContainer NPZ output.
  • Add input parsing tests and documentation entries.

Tests

  • Built with MPICH ch3, ELPA, and CNPY.
  • MODULE_IO_read_item_serial
  • LCAO Si2 nspin=1 NPZ output smoke test
  • LCAO H atom nspin=2 NPZ output smoke test
  • LCAO noncollinear H atom nspin=4 NPZ output smoke test

@mohanchen mohanchen added the Feature Discussed The features will be discussed first but will not be implemented soon label Jun 17, 2026
@mohanchen mohanchen self-requested a review June 17, 2026 04:44
@pincher-chen

Copy link
Copy Markdown
Author

Updated this PR with a new commit:

  • NPZ output files are now written under OUT./ via PARAM.globalv.global_out_dir.
  • Added integration tests for out_hr_npz, out_hsr_npz, and out_dm_npz in tests/03_NAO_multik.
  • Verified locally with the ch3 MPICH build and yhrun -p debug (computing on NSCC-GZ supercomputer cluster).

The new commit is 9d56021.

@pincher-chen

Copy link
Copy Markdown
Author

Fixed the failed 03_NAO_multik CI issue in commit f467bd298.

The NPZ runtime tests require CNPY, but they were previously included in the default CASES_CPU.txt. I moved them to
CASES_CNPY.txt and registered the new 03_NAO_multik_npz test only when ENABLE_CNPY=ON.

@mohanchen mohanchen 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, thanks.

@mohanchen mohanchen added Input&Output Suitable for coders without knowing too many DFT details Machine Learning & AI Issues related to AI labels Jul 2, 2026
@mohanchen mohanchen merged commit 2d21aec into deepmodeling:develop Jul 2, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Discussed The features will be discussed first but will not be implemented soon Input&Output Suitable for coders without knowing too many DFT details Machine Learning & AI Issues related to AI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants