# Batch¶

class propertyestimator.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.

__init__()

Initialize self. See help(type(self)) for accurate signature.

Methods

 __init__ Initialize self. 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[, encoding]) Parses a typed json string into the corresponding class structure. validate([attribute_type]) Validate the values of the attributes.

Attributes

 estimated_properties The set of properties which have been successfully estimated. exceptions The set of properties which have yet to be, or are currently being estimated. force_field_id The id of the force field being used to estimatethis batch of properties. id The unique id of this batch. options The options being used to estimate this batch. parameter_gradient_keys The parameters that this batch of physical properties should be differentiated with respect to. queued_properties The set of properties which have yet to be estimated. unsuccessful_properties The set of properties which have been could not be estimated.
id

The unique id of this batch.

Type

str

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

str

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

RequestOptions

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

list

queued_properties

The set of properties which have yet to be estimated. The default value of this attribute is [].

Type

list

estimated_properties

The set of properties which have been successfully estimated. The default value of this attribute is [].

Type

list

unsuccessful_properties

The set of properties which have been could not be estimated. The default value of this attribute is [].

Type

list

exceptions

The set of properties which have yet to be, or are currently being estimated. The default value of this attribute is [].

Type

list

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
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

json(file_path=None, format=False)

Creates a JSON representation of this class.

Parameters
• file_path (str, optional) – The (optional) file path to save the JSON file to.

• format (bool) – Whether to format the JSON or not.

Returns

The JSON representation of this class.

Return type

str

classmethod parse_json(string_contents, encoding='utf8')

Parses a typed json string into the corresponding class structure.

Parameters
• string_contents (str or bytes) – The typed json string.

• encoding (str) – The encoding of the string_contents.

Returns

The parsed class.

Return type

Any