Repository navigation
feat(band): auto-configure DOS file retrieval list based on basis_type - #55
Conversation
stillfast
commented
May 28, 2026
- Auto-set out_dos parameter (1 for pw, 2 for lcao)
- Add DOS1_smearing.dat and PDOS to additional_retrieve_list
- PDOS is only retrieved when basis_type is lcao (out_dos=2)
- DOS1_smearing.dat is always retrieved
- Auto-set out_dos parameter (1 for pw, 2 for lcao) - Add DOS1_smearing.dat and PDOS to additional_retrieve_list - PDOS is only retrieved when basis_type is lcao (out_dos=2) - DOS1_smearing.dat is always retrieved
…rieval - Add DosParser class to parse DOS1/DOS2 smearing files - Add DOS parsing logic in AbacusParser with include_dos flag - Add "dos" output port (ArrayData) to AbacusCalculation - Add include_dos flag to SettingsOptions - Update band workflow to use nspin-based DOS file retrieval
|
This PR adds DOS (Density of States) output support for ABACUS calculations, including a new parser, output port, and automatic file retrieval configuration in the band workchain. Changes1. calculations.py
2. common/opthold.py
3. parsers/raw_parsers.py
4. parsers/abacus.py
5. workflows/band.py
I have succeed in dos calculation in both cases of |
- Define 'dos' output port (ArrayData) in spec - Output DOS data from the DOS sub-workchain when it finishes successfully
Use inputs.abacus.get('settings') to safely handle all three cases:
1. settings already a dict (bands section was run first)
2. settings still an orm.Dict (bands not run, but user provided settings)
3. settings not present at all (bands not run, user didn't provide settings)
Remove redundant type-checking code that was no longer needed.
Use a single expression to handle all three cases: dict, orm.Dict, and None.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 895b98ec49
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| help="Primitive structure for which the band structure is calculated for.", | ||
| ) | ||
| spec.output("seekpath_parameters", valid_type=orm.Dict, help="Parameters used for the kpath generation.") | ||
| spec.output("dos", valid_type=orm.ArrayData, help="Output density of states data.") |
There was a problem hiding this comment.
Mark DOS output optional for band-only workflows
AiiDA output ports default to required=True, but the default band settings leave run_dos disabled, so run_bands_dos does not submit a DOS workchain and verify_bands_dos never emits dos. Default band-structure workflows will therefore finish with AiiDA's missing-required-output error even though DOS was not requested; please make this output optional or only require it when run_dos is enabled.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
You are right. I will change the code as your advice.
Allow the DOS output to be optional since it may not be generated when certain calculation parameters are used.
|
@zhubonan Would you please check this PR? |
|
Merged, thanks! |