openforcefield.utils.utils.extract_serialized_units_from_dict¶
-
openforcefield.utils.utils.
extract_serialized_units_from_dict
(input_dict)[source]¶ Create a mapping of (potentially unit-bearing) quantities from a dictionary, where some keys exist in pairs like {‘length’: 8, ‘length_unit’:’angstrom’}.
- Parameters
- input_dictdict
Dictionary where some keys are paired like {‘X’: 1.0, ‘X_unit’: angstrom}.
- Returns
- unitless_dictdict
input_dict, but with keys ending in
_unit
removed.- attached_unitsdict str
attached_units[parameter_name]
is the simtk.unit.Unit combination that should be attached to corresponding parameterparameter_name
. For example ``attached_units[‘X’] = simtk.unit.angstrom.