openfe_analysis.utils.serialization

Functions

omm_quantity_string_to_offunit(expression)

Convert an OpenMM Quantity string to an OpenFF Unit.

Classes

UnitedYamlLoader(*args, **kwargs)

A YamlLoader that can read !Quantity tags and return them as OpenFF Units.

openfe_analysis.utils.serialization.omm_quantity_string_to_offunit(expression)

Convert an OpenMM Quantity string to an OpenFF Unit.

Parameters:

expression (str) – The string expression to convert to an OpenFF Unit.

Returns:

An OpenFF unit Quantity.

Return type:

openff.units.Quantity

Notes

Inspired by openmmtools.utils.utils.quantity_from_string.

class openfe_analysis.utils.serialization.UnitedYamlLoader(*args, **kwargs)

A YamlLoader that can read !Quantity tags and return them as OpenFF Units.

Notes

Modified from openmmtools.storage.iodrivers._DictYamlLoader.

static quantity_constructor(loader, node)