StorageAttribute

class openff.evaluator.storage.attributes.StorageAttribute(docstring, type_hint, optional=False)[source]

A descriptor used to mark attributes of a class as those which store information about a cached piece of data.

__init__(docstring, type_hint, optional=False)[source]

Initializes a new Attribute object.

Parameters
  • docstring (str) – A docstring describing the attributes purpose. This will automatically be decorated with additional information such as type hints, default values, etc.

  • type_hint (type, Union) – The expected type of this attribute. This will be used to help the workflow engine ensure that expected input types match corresponding output values.

  • default_value (Any) – The default value for this attribute.

  • optional (bool) – Defines whether this is an optional input of a class. If true, the default_value should be set to UNDEFINED.

  • read_only (bool) – Defines whether this attribute is read-only.

Methods

__init__(docstring, type_hint[, optional])

Initializes a new Attribute object.