Repository navigation
feat(parser): record fermi level on the DOS output node - #62
Merged
Merged
Conversation
The bands branch already attaches `fermi_level` (parsed from the `EFERMI = <value> <unit>` line in `running_*.log`) to the BandsData node as a base attribute. The DOS branch was missing this, so callers that plot the DOS could not align it with the fermi level from the sibling bands output. Mirror the bands convention in the DOS branch: read the fermi level already stored in `misc_results["fermi_level"]` and, when present, attach it to the dos ArrayData as `base.attributes["fermi_level"]`. When the running log does not contain an `EFERMI` line the DOS node is produced unchanged. Tests: one new integration case in `tests/test_parser.py`, `test_parser_dos_records_fermi_level_from_running_log`, which stages the pw_Si2 fixture (reporting `EFERMI = 6.5508038645 eV`) plus a synthetic DOS1 file and asserts the DOS node carries the same value. The omission path is covered by the `if fermi_level is not None` guard itself.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bands branch already attaches
fermi_level(parsed from theEFERMI = <value> <unit>line inrunning_*.log) to the BandsData node as a base attribute. The DOS branch was missing this, so callers that plot the DOS could not align it with the fermi level from the sibling bands output.Mirror the bands convention in the DOS branch: read the fermi level already stored in
misc_results["fermi_level"]and, when present, attach it to the dos ArrayData asbase.attributes["fermi_level"]. When the running log does not contain anEFERMIline the DOS node is produced unchanged.Tests: one new integration case in
tests/test_parser.py,test_parser_dos_records_fermi_level_from_running_log, which stages the pw_Si2 fixture (reportingEFERMI = 6.5508038645 eV) plus a synthetic DOS1 file and asserts the DOS node carries the same value. The omission path is covered by theif fermi_level is not Noneguard itself.