metadata.options contains the information regarding the operation of the CastepCalculation. Two approaches may be used:
Expose the input port from CastepCalculation. This enables automatic checking and tab completion, but renders get_builder_restart difficult to use for CastepBaseWorkChain.
Wrap everything in the Dict. This is the way VaspWorkChain handles it. It allows get_builder_restart to be used. However, any problem with the options supports.
The plan was to migrate from 1 to 2, but 2 is not really good as it does not use the mechanism in aiida-core - so more like a workaround. The key problem is the metadata.options is a non-db input, e.g. plain python dictionary, but it is needed for creating a workchian level restart builder.
The alternative is to implement custom methods for performing the restart. However, it is not possible to, in general, recover the metadata.options from the called calculations, but cause what was stored may be the results from modifications.
To support 1., CastepBaseWorkChain can implement a method to store the metadata.options inside the extras of the underlying WorkChainNode. This way, the original inputs may be recovered for manual restart.
metadata.options
contains the information regarding the operation of theCastepCalculation
. Two approaches may be used:CastepCalculation
. This enables automatic checking and tab completion, but rendersget_builder_restart
difficult to use forCastepBaseWorkChain
.Dict
. This is the wayVaspWorkChain
handles it. It allowsget_builder_restart
to be used. However, any problem with the options supports.The plan was to migrate from 1 to 2, but 2 is not really good as it does not use the mechanism in aiida-core - so more like a workaround. The key problem is the
metadata.options
is a non-db input, e.g. plain python dictionary, but it is needed for creating a workchian level restart builder.The alternative is to implement custom methods for performing the restart. However, it is not possible to, in general, recover the
metadata.options
from the called calculations, but cause what was stored may be the results from modifications. To support 1.,CastepBaseWorkChain
can implement a method to store themetadata.options
inside theextras
of the underlyingWorkChainNode
. This way, the original inputs may be recovered for manual restart.