You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What. Reviewing how others serialize and exchange quantities (#83, "Alternatives and prior experience") surfaced conversions PyUnitWizard could offer. They would let a user move quantities between ecosystems in one call, and let PyUnitWizard's own serialization codec (#82) interoperate instead of standing alone.
Target
Kind
What conversion would mean
Why
openff-units
form (a pint subclass with its own registry)
convert(q, to_form="openff.units") and back
Molecular force-field ecosystem. Blocked today by cross-registry support (#84).
ASDF quantity tag
serialized form
read and write the value + unit node, with ndarray blocks
Astronomy's archival format; asdf-astropy already maps it for astropy, and a PyUnitWizard bridge would reach every backend
CF / UDUNITS unit strings
string dialect
parse and emit the units attribute of NetCDF and Zarr
Lets the codec write a CF units attribute next to its verified manifest, so CF tools keep working
UCUM codes
string dialect
parse and emit UCUM (mol/L, %, case-sensitive; M is mega, not molar)
The portable spelling used in clinical and biomedical exchange (HL7/FHIR, LOINC); proposed as the third-party spelling in #83
QUDT (and OBO UO) identifiers
semantic annotation
map a unit to its QUDT unit IRI and an optional quantity-kind IRI
Distinguishes Hz/Bq and J/N·m, which dimensions cannot; pint does not model kinds (pint#676, closed)
OpenMM (existing)
form
already supported
Listed for completeness; openff-units has its own to_openmm/from_openmm
How. Each item should be justified by a measured consumer case before it is implemented, following the lesson of #83's prior-art section. They can be optional extras loaded through DepDigest. Suggested order:
cross-registry pint (a prerequisite, and a defect today);
Why here. PyUnitWizard is already the interoperability layer across pint, openmm.unit, unyt, astropy, physipy and quantities (devguide/interop_future_directions.md, "Ecosystem integrations"). Conversions written in each consumer diverge, and that divergence is where units get lost.
Related: #83 (review and design record), #82 (codec), #81.
What. Reviewing how others serialize and exchange quantities (#83, "Alternatives and prior experience") surfaced conversions PyUnitWizard could offer. They would let a user move quantities between ecosystems in one call, and let PyUnitWizard's own serialization codec (#82) interoperate instead of standing alone.
convert(q, to_form="openff.units")and backquantitytagvalue+unitnode, with ndarray blocksasdf-astropyalready maps it for astropy, and a PyUnitWizard bridge would reach every backendunitsattribute of NetCDF and Zarrunitsattribute next to its verified manifest, so CF tools keep workingmol/L,%, case-sensitive;Mis mega, not molar)to_openmm/from_openmmHow. Each item should be justified by a measured consumer case before it is implemented, following the lesson of #83's prior-art section. They can be optional extras loaded through DepDigest. Suggested order:
Why here. PyUnitWizard is already the interoperability layer across pint, openmm.unit, unyt, astropy, physipy and quantities (
devguide/interop_future_directions.md, "Ecosystem integrations"). Conversions written in each consumer diverge, and that divergence is where units get lost.Related: #83 (review and design record), #82 (codec), #81.