forked from aiidateam/aiida-quantumespresso
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PwCalculation
: refactor parent_folder
validation
In 3fea26b we added validation for restarting from a `parent_folder` to the `PwCalculation`. Here we ran into the following problem: 1. We want to check that a `parent_folder` is present when `CONTROL.calculation` is `nscf` or `bands` 2. The `parent_folder` will not be present in the initial inputs of e.g. the `PwBandsWorkChain` `bands` name space, since it is only created on runtime. 3. The validation will hence always fail, raising a warning when the builder is put together using the `get_builder_from_protocol()` method. Our solution at the time was to split up the validation in a base and full one, and override the validator. However, a more elegant solution is to check if the `parent_folder` is in the name space, and only do the restart validation in this case. Wrapping work chains that dynamically assign this input should exclude the `parent_folder` port when exposing the inputs of the `PwBaseWorkChain`.
- Loading branch information
Showing
3 changed files
with
26 additions
and
36 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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