openff.units.openmm.to_openmm(quantity: Quantity) openmm_unit.Quantity[source]

Convert an OpenFF Quantity to an OpenMM Quantity

openmm.unit.quantity.Quantity from OpenMM and openff.units.Quantity from this package both represent a numerical value with units. The units available in the two packages differ; when a unit is missing from the target package, the resulting quantity will be in base units (kg/m/s/A/K/mole), which are shared between both packages. This may cause the resulting value to be slightly different to the input due to the limited precision of floating point numbers.