ObservableArray

class openff.evaluator.utils.observables.ObservableArray(value: Optional[pint.quantity.build_quantity_class.<locals>.Quantity] = None, gradients: Optional[List[openff.evaluator.forcefield.gradients.ParameterGradient]] = None)[source]

A class which stores the value(s) of an observable obtained via molecule simulation (or simulation data) as well as optionally the derivatives of the value with respect to certain force field parameters.

__init__(value: Optional[pint.quantity.build_quantity_class.<locals>.Quantity] = None, gradients: Optional[List[openff.evaluator.forcefield.gradients.ParameterGradient]] = None)[source]

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

Methods

__init__([value, gradients])

Initialize self.

clear_gradients()

Clears all gradient information.

join(*observables)

Concatenates multiple observables together in the order that they appear in the args list.

subset(indices)

Extracts the subset of the values stored for this observable at the specified indices.

Attributes

gradients

value

The value(s) of the observable.

property value

The value(s) of the observable.

subset(indices: Iterable[int])openff.evaluator.utils.observables.ObservableArray[source]

Extracts the subset of the values stored for this observable at the specified indices.

Parameters

indices – The indices of the entries to extract.

Returns

Return type

The subset of the observable values.

classmethod join(*observables: openff.evaluator.utils.observables.ObservableArray)openff.evaluator.utils.observables.ObservableArray[source]

Concatenates multiple observables together in the order that they appear in the args list.

Parameters

observables – The observables to join.

Returns

Return type

The concatenated observable object.

clear_gradients()

Clears all gradient information.