Batch
- class openff.evaluator.server.Batch[source]
Represents a batch of physical properties which are being estimated by the server for a given set of force field parameters.
The expectation is that this object will be passed between calculation layers, whereby each layer will attempt to estimate each of the queued_properties. Those properties which can be estimated will be moved to the estimated_properties set, while those that couldn’t will remain in the queued_properties set ready for the next layer.
Methods
__init__
()from_json
(file_path)Create this object from a JSON file.
get_attributes
([attribute_type])Returns all attributes of a specific attribute_type.
json
([file_path, format])Creates a JSON representation of this class.
parse_json
(string_contents)Parses a typed json string into the corresponding class structure.
validate
([attribute_type])Validate the values of the attributes.
Attributes
Whether the server should attempt to cache any data, mainly the output of simulations, produced by this batch for future re-processing (e.g for reweighting).
The set of properties which have been successfully estimated.
The set of properties which have yet to be, or are currently being estimated.
The id of the force field being used to estimatethis batch of properties.
The unique id of this batch.
The options being used to estimate this batch.
The parameters that this batch of physical properties should be differentiated with respect to.
The set of properties which have yet to be estimated.
The set of properties which have been could not be estimated.
- force_field_id
The id of the force field being used to estimatethis batch of properties. The default value of this attribute is not set and must be set by the user..
- Type
- options
The options being used to estimate this batch. The default value of this attribute is not set and must be set by the user..
- Type
- parameter_gradient_keys
The parameters that this batch of physical properties should be differentiated with respect to. The default value of this attribute is not set and must be set by the user..
- Type
- enable_data_caching
Whether the server should attempt to cache any data, mainly the output of simulations, produced by this batch for future re-processing (e.g for reweighting). The default value of this attribute is
True
.- Type
- queued_properties
The set of properties which have yet to be estimated. The default value of this attribute is
[]
.- Type
- estimated_properties
The set of properties which have been successfully estimated. The default value of this attribute is
[]
.- Type
- unsuccessful_properties
The set of properties which have been could not be estimated. The default value of this attribute is
[]
.- Type
- exceptions
The set of properties which have yet to be, or are currently being estimated. The default value of this attribute is
[]
.- Type
- validate(attribute_type=None)[source]
Validate the values of the attributes. If attribute_type is set, only attributes of that type will be validated.
- Parameters
attribute_type (type of Attribute, optional) – The type of attribute to validate.
- Raises
ValueError or AssertionError –
- classmethod from_json(file_path)
Create this object from a JSON file.
- Parameters
file_path (str) – The path to load the JSON from.
- Returns
The parsed class.
- Return type
cls
- classmethod get_attributes(attribute_type=None)
Returns all attributes of a specific attribute_type.
- Parameters
attribute_type (type of Attribute, optional) – The type of attribute to search for.
- Returns
The names of the attributes of the specified type.
- Return type
list of str