ObservableFrame
- class openff.evaluator.utils.observables.ObservableFrame(observables: Optional[Dict[Union[str, ObservableType], 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, ObservableType], ObservableArray]] = None)[source]
Methods
__init__
([observables])clear
()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[Quantity] = None) 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.
- Return type
The imported observables.
- subset(indices: Iterable[int]) 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.
- Return type
The subset of data.
- classmethod join(*observable_frames: ObservableFrame) 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.
- Return type
The joined observable frame.
- clear_gradients()[source]
Clears all gradient information for each observable in the frame.
- 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.