Skip to content

Feature: use new format of CSR file for out_mat_hs2 and out_mat_ds, out_mat_t, out_mat_r, out_mat_xc2#6991

Open
dyzheng wants to merge 9 commits intodeepmodeling:developfrom
dyzheng:out_mat_hs2_refactor
Open

Feature: use new format of CSR file for out_mat_hs2 and out_mat_ds, out_mat_t, out_mat_r, out_mat_xc2#6991
dyzheng wants to merge 9 commits intodeepmodeling:developfrom
dyzheng:out_mat_hs2_refactor

Conversation

@dyzheng
Copy link
Collaborator

@dyzheng dyzheng commented Mar 2, 2026

Reminder

  • Have you linked an issue with this pull request?
  • Have you added adequate unit tests and/or case tests for your pull request?
  • Have you noticed possible changes of behavior below or in the linked issue?
  • Have you explained the changes of codes in core modules of ESolver, HSolver, ElecState, Hamilt, Operator or Psi? (ignore if not applicable)

Linked Issue

Fix #...

Unit Tests and/or Case Tests for my changes

  • A unit test is added for each new feature or bug fix.

What's changed?

  • Example: My changes might affect the performance of the application under certain conditions, and I have tested the impact on various scenarios...

Any changes of core modules? (ignore if not applicable)

  • Example: I have added a new virtual function in the esolver base class in order to ...

@mohanchen mohanchen requested a review from zhubonan March 4, 2026 04:58
@mohanchen mohanchen added Features Needed The features are indeed needed, and developers should have sophisticated knowledge Refactor Refactor ABACUS codes Input&Output Suitable for coders without knowing too many DFT details labels Mar 4, 2026
@mohanchen mohanchen requested a review from ErjieWu March 4, 2026 05:00
Copy link
Collaborator

@zhubonan zhubonan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move the parameter description update to the read_input_item_oputput.cpp source code file regenerate parameters.yaml and input-main.md. See also: https://abacus.deepmodeling.com/en/latest/CONTRIBUTING.html#how-to-regenerate

type: "Boolean \\[Integer\\](optional)"
description: |
Whether to print files containing the Hamiltonian matrix and overlap matrix into files in the directory OUT.${suffix}. For more information, please refer to hs_matrix.md.
Output H(R) and S(R) matrices in CSR format with optional precision. Optional second parameter specifies output precision (default 8). For more information, please refer to hs_matrix.md.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be autogenerated instead of being edited by hand. You can regenerate with abacus --generate-parameters-yaml > docs/parameters.yaml, after moving the description into read_input_item_output.cpp file. Then python3 docs/generate_input_main.py docs/parameters.yaml --output docs/advanced/input_files/input-main.md to propagate the changes to the input-main.md. In fact, input-main.md will be regenerated on-the-fly from parameters.yaml. Nevertheless, it is useful to commit the up-to-date documentation in the repository.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

50a82cb to fix this concern.

@dyzheng dyzheng force-pushed the out_mat_hs2_refactor branch from be54bb1 to f7cce86 Compare March 4, 2026 07:50
@ErjieWu
Copy link
Collaborator

ErjieWu commented Mar 5, 2026

Format of reference files in integration tests should be updated as well. LGTM.

dyzheng and others added 6 commits March 9, 2026 10:27
Enable the previously commented-out H(R) matrix comparison in
catch_properties.sh and regenerate all CSR reference files for
scf_out_hsr, scf_out_hsr_spin4, and nscf_out_hsr_tr_rr to match
the new CSR output format. Add missing hrs1_nao.csr.ref for nscf test.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dyzheng dyzheng force-pushed the out_mat_hs2_refactor branch from f7cce86 to 460ebf6 Compare March 9, 2026 04:23
dyzheng and others added 3 commits March 9, 2026 13:30
The CI build uses C++11 where std::make_unique is not available.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dyzheng dyzheng requested review from ErjieWu and zhubonan March 9, 2026 09:02
Copy link
Collaborator

@ErjieWu ErjieWu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

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

Labels

Features Needed The features are indeed needed, and developers should have sophisticated knowledge Input&Output Suitable for coders without knowing too many DFT details Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants