Workflow¶
-
class
propertyestimator.workflow.
Workflow
(physical_property, global_metadata, workflow_uuid=None)[source]¶ Encapsulates and prepares a workflow which is able to estimate a physical property.
-
__init__
(physical_property, global_metadata, workflow_uuid=None)[source]¶ Constructs a new Workflow object.
- Parameters
physical_property (PhysicalProperty) – The property which this workflow aims to calculate.
global_metadata (dict of str and Any) – A dictionary of the global metadata available to each of the workflow properties.
workflow_uuid (str, optional) – An optional uuid to assign to this workflow. If none is provided, one will be chosen at random.
Methods
__init__
(physical_property, global_metadata)Constructs a new Workflow object.
generate_default_metadata
(physical_property, …)Generates a default global metadata dictionary.
replace_protocol
(old_protocol, new_protocol)Replaces an existing protocol with a new one, while updating all input and local references to point to the new protocol.
Attributes
schema
-
replace_protocol
(old_protocol, new_protocol)[source]¶ Replaces an existing protocol with a new one, while updating all input and local references to point to the new protocol.
The main use of this method is when merging multiple protocols into one.
- Parameters
old_protocol (protocols.BaseProtocol or str) – The protocol (or its id) to replace.
new_protocol (protocols.BaseProtocol or str) – The new protocol (or its id) to use.
-
static
generate_default_metadata
(physical_property, force_field_path, parameter_gradient_keys=None, workflow_options=None)[source]¶ Generates a default global metadata dictionary.
- Parameters
physical_property (PhysicalProperty) – The physical property whose arguments are available in the global scope.
force_field_path (str) – The path to the force field parameters to use in the workflow.
parameter_gradient_keys (list of ParameterGradientKey) – A list of references to all of the parameters which all observables should be differentiated with respect to.
workflow_options (WorkflowOptions, optional) – The options provided when an estimate request was submitted.
- Returns
The metadata dictionary, with the following keys / types:
- thermodynamic_state: ThermodynamicState - The state (T,p) at which the
property is being computed
substance: Substance - The composition of the system of interest.
- components: list of Substance - The components present in the system for
which the property is being estimated.
- target_uncertainty: propertyestimator.unit.Quantity - The target uncertainty with which
properties should be estimated.
- per_component_uncertainty: propertyestimator.unit.Quantity - The target uncertainty divided
by the sqrt of the number of components in the system + 1
- force_field_path: str - A path to the force field parameters with which the
property should be evaluated with.
- parameter_gradient_keys: list of ParameterGradientKey - A list of references to all of the
parameters which all observables should be differentiated with respect to.
- Return type
dict of str, Any
-