_images/logo.svg

A Python Units Wizard that streamlines work with physical quantities.#


Install it#

conda install -c uibcdf pyunitwizard

Use it#

import pyunitwizard as puw

distance_A = puw.quantity('1.0 angstroms', form='pint')
form_A = puw.get_form(distance_A)

distance_B = puw.convert(distance_A, to_unit='nm', to_form='openmm.unit')
form_B = puw.get_form(distance_B)

compatibility = puw.are_compatible(distance_A, distance_B)

print (f"{distance_A} is a {form_A} quantity while {distance_B} is a {form_B} quantity.")
print (f"Are they dimensionally compatible? {compatibility}")
1.0 angstrom is a pint quantity while 0.1 nm is a openmm.unit quantity.
Are they dimensionally compatible? True

Empower your scientific library#

Integrating PyUnitWizard into your library gives its users full control over how physical quantities are represented, standardized, and managed. This flexibility ensures unit consistency, seamless interoperability with external tools, and smooth integration of your software into complex computational workflows.

Supported quantity libraries#

Citation#

Citing the Zenodo DOI of PyUnitWizard in addition to the scientific paper is a way to ensure that others can reproduce your results, as they will know exactly which version of the software you used.


Coming soon…

BibTeX