-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Protocols: Move all static work chain inputs to protocol (#902)
Some "default" inputs are set inside one of the steps of several work chains, which: 1. Can be confusing for the user, since the expected inputs are not there in the input files. 2. Can be frustrating for the user when a different value is desirable, for a use case that may not immediately be obvious. 3. Means default values are specified _both_ in the work chain logic and protocol, making it more difficult to get a clear overview of the input parameters. Here we move the specification of all static default inputs to the corresponding protocol file. Additionally: * Since the default protocol now correctly sets the calculation type to `bands`, the `validate_inputs` validator of the `PwCalculation` will raise a warning because a `parent_folder` has not been initially provided. Hence, we set the `validate_inputs_base` validator for the `pw` port of the `bands` namespace, as is also done for e.g. the `nscf` of the `PdosWorkchain`. * We fix a bug in the `base_final_scf` part of the `PwRelaxWorkChain` protocol, that erroneously specified `CELL.press_conv_thr`. * We move the logic in `PwBaseWorkChain.set_max_seconds` to `PwBaseWorkChain.prepare_process`. Having a separate method for these few lines of code seemed unnecessary, especially since it's the only step that is executed in `prepare_process`. * We remove the code added in 0aba276 that automatically set `RestartType.FULL` in case the `parent_folder` input is provided for the `PwBaseWorkChain`. There are simply too many different use cases of restarting I think it's difficult if not impossible to consider all of them, and in several known use cases this code addition would cause more harm than good.
- Loading branch information
Showing
9 changed files
with
36 additions
and
51 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
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
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