openforcefield.utils.utils.attach_units

openforcefield.utils.utils.attach_units(unitless_dict, attached_units)[source]

Attach units to dict entries for which units are specified.

Parameters
unitless_dictdict

Dictionary, where some items are to have units applied.

attached_unitsdict [str

attached_units[parameter_name] is the simtk.unit.Unit combination that should be attached to corresponding parameter parameter_name

Returns
unit_bearing_dictdict

Updated dict with simtk.unit.Unit units attached to values for which units were specified for their keys