You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 corresponding BaseRestartWorkChain, 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 the get_builder_from_protocol() method, but now this isn't possible. Instead, we immediately have to explain how to use the PwBaseWorkChain, which adds an extra layer of complexity.
It would be easier to implement Protocols: Consider way of "popping" when overrides is None #653, since this would definitely be the "lowest" level of the get_builder_from_protocol() hierarchy, and hence we could simply pop keys in e.g. the parameters that have value None 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?
The text was updated successfully, but these errors were encountered:
Currently, only
WorkChain
classes use theProtocolMixin
class utilities and define aget_builder_from_protocol()
method. I see no reason whyCalcJob
classes couldn't also benefit from such a method. There are several advantages to this:CalcJob
classes don't have a correspondingBaseRestartWorkChain
, but could still benefit from having a default protocol defined.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.overrides
isNone
#653, since this would definitely be the "lowest" level of theget_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?
The text was updated successfully, but these errors were encountered: