-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ProjwfcParser
: refactor code and temp retrieve PDOS files
#749
base: main
Are you sure you want to change the base?
Conversation
Fixes two issues when using the `PdosWorkChain`: 1. Remove the validation of the `parent_folder` input for `nscf` `PwCalculation`s. This made it impossible to use the `PdosWorkChain` with an initial `scf` run, since the `parent_folder` is only created inside the logic of the work chain, and hence cannot be provided as an input upon submission. 2. In the `PdosWorkChain.get_builder_from_protocol()` method, override the `occupations` setting to make sure it is set to `tetrahedra`. Although this setting is also passed to the overrides from the `yaml` file that defines the protocol, if the user sets `ElectronicType.INSULATOR`, the occupations is set to `fixed` in the `PwBaseWorkChain.get_builder_from_protocol()` method.
The current `ProjwfcParser` uses several in and output nodes from the parent calculation. This increased the complexity of the tests for this parser, and made running `opengrid.x` in between the `pw.x` and `projwfc.x` run impossible without adding these in and output nodes to the calculation job of `opengrid.x`. Here we switch to parsing the XML instead of relying on the parent calculation. The `data-file-schema.xml` of the parent calculation is retrieved and parsed, providing the required information for the subsequent parsing of the `projwfc.x` output. All the parsing tests are updated to include the XML output file and remove the in/output links for the parent calculation. The `convert_qe_to_kpoints` function is added to convert the k-points data in the XML to a `KpointsData` node.
4040d49
to
581bd57
Compare
Note: the Python 3.6 tests fail because More importantly, the tests succeed for 581bd57 and Python >= 3.7, without touching the tests. I've also run both the old parser and refactored one for the 4 different spin settings, and compared the content of the orbitals and PDOS arrays. So I'm quite confident that the parsing is unaltered. |
Massive refactoring of the
ProjwfcParser
to make the code less entangledand more readable.
TODO: