ObservableFrame

class openff.evaluator.utils.observables.ObservableFrame(observables: Optional[Dict[Union[str, openff.evaluator.utils.observables.ObservableType], openff.evaluator.utils.observables.ObservableArray]] = None)[source]

A data object for storing and retrieving frames of the thermodynamic observables enumerated by the ObservableType enum.

__init__(observables: Optional[Dict[Union[str, openff.evaluator.utils.observables.ObservableType], openff.evaluator.utils.observables.ObservableArray]] = None)[source]

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

Methods

__init__([observables])

Initialize self.

clear()

clear_gradients()

Clears all gradient information for each observable in the frame.

from_openmm(file_path[, pressure])

Creates an observable frame from the CSV output of an OpenMM simulation.

get(k[,d])

items()

join(*observable_frames)

Joins multiple observable frames together in the order that they appear in the args list.

keys()

pop(k[,d])

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem()

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[,d])

subset(indices)

Extracts the subset of the the array which is located at the specified indices.

update([E, ]**F)

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values()

classmethod from_openmm(file_path: str, pressure: Optional[pint.quantity.build_quantity_class.<locals>.Quantity] = None)openff.evaluator.utils.observables.ObservableFrame[source]

Creates an observable frame from the CSV output of an OpenMM simulation.

Parameters
  • file_path – The file path to the CSV file.

  • pressure – The pressure at which the observables in the csv file were collected.

Returns

Return type

The imported observables.

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

Extracts the subset of the the array which is located at the specified indices.

Parameters

indices – The indices of the entries to extract.

Returns

Return type

The subset of data.

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

Joins multiple observable frames together in the order that they appear in the args list.

Parameters

observable_frames – The observable frames to join.

Returns

Return type

The joined observable frame.

clear_gradients()[source]

Clears all gradient information for each observable in the frame.

clear() → None. Remove all items from D.
get(k[, d]) → D[k] if k in D, else d. d defaults to None.
items() → a set-like object providing a view on D’s items
keys() → a set-like object providing a view on D’s keys
pop(k[, d]) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised.

popitem() → (k, v), remove and return some (key, value) pair

as a 2-tuple; but raise KeyError if D is empty.

setdefault(k[, d]) → D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) → None. Update D from mapping/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values() → an object providing a view on D’s values