PwBandStructureWorkChain
: Deprecate and fix
#688
Merged
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.
Fixes #687
The
PwBandStructureWorkChain
is a legacy version of a band structure workchain with a pre-defined protocol, mostly used for previous tutorials.
However, now that the
PwBandsWorkChain
has been equipped with a protocolthrough the
get_builder_from_protocol()
method, it no longer serves apurpose and should be deprecated.
However, there were still two issues with running the work chain that
needed to be fixed, since users were still running it and it is still
supported until v4.0.0:
get_pseudos_from_dict()
method, used by the work chain, onlyaccepted
UpfData
from theaiida-pseudo
package. Since the work chainwas often run with legacy
UpfData
, this raised errors for severalusers. This is fixed by also accepting the legacy
UpfData
here.PwRelaxWorkChain
when using therelaxation_scheme
input (which is also deprecated). Basically, at somepoint in the work chain, the
base
input port was checked for thepw.parameters.CONTROL.calculation
value, but in case the user doesn'tspecify this input (which passes validation when the
relaxation_scheme
is provided), this would raise a
KeyError
when running the work chain.This is fixed by obtaining the
calculation
value from the contextinstead.