aiida-quantumespresso
aiida-quantumespresso copied to clipboard
Protocols: Extend protocol concept to `CalcJob` classes
Currently, only WorkChain
classes use the ProtocolMixin
class utilities and define a get_builder_from_protocol()
method. I see no reason why CalcJob
classes couldn't also benefit from such a method. There are several advantages to this:
- Some
CalcJob
classes don't have a correspondingBaseRestartWorkChain
, but could still benefit from having a default protocol defined. - In some cases a user might not want to use the restart features, but still use a protocol.
- In the tutorials, it would be natural to start with explaining how to run a
PwCalculation
using theget_builder_from_protocol()
method, but now this isn't possible. Instead, we immediately have to explain how to use thePwBaseWorkChain
, which adds an extra layer of complexity. - It would be easier to implement https://github.com/aiidateam/aiida-quantumespresso/issues/653, since this would definitely be the "lowest" level of the
get_builder_from_protocol()
hierarchy, and hence we could simplypop
keys in e.g. theparameters
that have valueNone
at this point.
There are probably still more, but at this point I'm pretty convinced this would be a sensible approach. What do you think, @sphuber?