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
Feature: use new format of CSR file for out_mat_hs2 and out_mat_ds, out_mat_t, out_mat_r, out_mat_xc2#6991dyzheng wants to merge 3 commits intodeepmodeling:developfrom
Conversation
zhubonan
left a comment
There was a problem hiding this comment.
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
| item.category = "Output information"; | ||
| item.type = "Boolean"; | ||
| item.type = R"(Boolean \[Integer\](optional))"; | ||
| item.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." |
There was a problem hiding this comment.
Perhaps useful to mention that the second item is used for the floating-point precision in the output file.
| 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. |
There was a problem hiding this comment.
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.
| ### out_mat_hs2 | ||
|
|
||
| - **Type**: Boolean | ||
| - **Type**: Boolean \[Integer\](optional) |
There was a problem hiding this comment.
Please commit the changes after updating the .cpp file and regenerate (see comments for parameters.yaml).
be54bb1 to
f7cce86
Compare
|
|
||
| /// Get HR as a vector of HContainer pointers (one per spin). | ||
| /// For nspin=2, creates temporary HContainers wrapping each spin half of hRS2. | ||
| /// Caller must delete returned pointers when nspin=2. |
There was a problem hiding this comment.
Is this delete operation for nspin=2 a temporary solution during refactor? It seems rather strange here.
|
Format of reference files in integration tests should be updated as well. LGTM. |
Reminder
Linked Issue
Fix #...
Unit Tests and/or Case Tests for my changes
What's changed?
Any changes of core modules? (ignore if not applicable)