{"id":21401162,"url":"https://github.com/uibcdf/pyunitwizard","last_synced_at":"2025-07-13T21:31:40.829Z","repository":{"id":37502289,"uuid":"333659295","full_name":"uibcdf/PyUnitWizard","owner":"uibcdf","description":"Assistant to work with physical quantities, units, and python libraries such as Pint, openmm.unit or unyt.","archived":false,"fork":false,"pushed_at":"2024-06-21T21:31:25.000Z","size":6259,"stargazers_count":2,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-23T08:32:03.779Z","etag":null,"topics":["python","quantities"],"latest_commit_sha":null,"homepage":"https://www.uibcdf.org/PyUnitWizard/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uibcdf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-01-28T05:49:22.000Z","updated_at":"2024-06-21T21:31:28.000Z","dependencies_parsed_at":"2023-10-16T16:19:24.820Z","dependency_job_id":"471a7496-47dd-4bfa-a9c6-5472fa1ee468","html_url":"https://github.com/uibcdf/PyUnitWizard","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uibcdf%2FPyUnitWizard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uibcdf%2FPyUnitWizard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uibcdf%2FPyUnitWizard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uibcdf%2FPyUnitWizard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uibcdf","download_url":"https://codeload.github.com/uibcdf/PyUnitWizard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225919233,"owners_count":17545210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","quantities"],"created_at":"2024-11-22T15:26:25.068Z","updated_at":"2025-07-13T21:31:40.814Z","avatar_url":"https://github.com/uibcdf.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyUnitWizard\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![](https://img.shields.io/badge/Python-3.10%20%7C%203.11%20%7C%203.12-blue.svg)](https://www.python.org/downloads/) \n[![Documentation](https://github.com/uibcdf/PyUnitWizard/actions/workflows/sphinx_docs_to_gh_pages.yaml/badge.svg)](https://github.com/uibcdf/PyUnitWizard/actions/workflows/sphinx_docs_to_gh_pages.yaml)\n[![CI](https://github.com/uibcdf/PyUnitWizard/actions/workflows/CI.yaml/badge.svg)](https://github.com/uibcdf/PyUnitWizard/actions/workflows/CI.yaml)\n[![codecov](https://codecov.io/github/uibcdf/PyUnitWizard/graph/badge.svg?token=9ZMA4YZLOR)](https://codecov.io/github/uibcdf/PyUnitWizard)\n[![Install with conda](https://img.shields.io/badge/Install%20with-conda-brightgreen.svg)](https://conda.anaconda.org/uibcdf/pyunitwizard)\n[![Installation on ubuntu-latest](https://github.com/uibcdf/PyUnitWizard/actions/workflows/install_ubuntu_latest.yaml/badge.svg)](https://github.com/uibcdf/PyUnitWizard/actions/workflows/install_ubuntu_latest.yaml)\n[![Installation on macos-latest](https://github.com/uibcdf/PyUnitWizard/actions/workflows/install_macos_latest.yaml/badge.svg)](https://github.com/uibcdf/PyUnitWizard/actions/workflows/install_macos_latest.yaml)\n\n\nThere are several Python libraries to work with physical quantities in the\nmarket, such as pint, unyt or openmm.unit. Imagine that your project or\nworkflow requires the interaction with more than one of these tools, or that\nyou are not sure if you will work with a different quantities library in the\nfuture. Wouldn't having a unique API to work with different forms of physical\nquantities be a relief? PyUnitWizard just does that. It is the wizard you need\nin your code to change the form of your quantities with no effort.\n\n## Example\n\n```ipython\nIn [1]: import pyunitwizard as puw\n\nIn [2]: puw.configure.load_libraries(['pint', 'openmm.unit'])\n   ...: puw.configure.set_default_form('pint')\n   ...: puw.configure.set_standard_units(['nm', 'ps', 'kcal', 'mole'])\n   ...: \n\nIn [3]: q = puw.quantity(2.5, 'nanometers/picoseconds')\n\nIn [4]: puw.get_form(q)\nOut[4]: 'pint'\n\nIn [5]: puw.get_value(q)\nOut[5]: 2.5\n\nIn [6]: puw.get_unit(q)\nOut[6]: \u003cUnit('nanometer / picosecond')\u003e\n\nIn [7]: puw.dimensionality(q)\nOut[7]: {'[L]': 1, '[M]': 0, '[T]': -1, '[K]': 0, '[mol]': 0, '[A]': 0, '[Cd]': 0}\n\nIn [8]: q2 = puw.convert(q, to_unit='angstroms/femtoseconds', to_form='openmm.unit')\n\nIn [9]: print(q2)\n0.025000000000000005 A/fs\n\nIn [10]: puw.get_form(q2)\nOut[10]: 'openmm.unit'\n\nIn [11]: puw.compatibility(q, q2)\nOut[11]: True\n\nIn [12]: q3 = puw.standardize(q2)\n\nIn [13]: print('q3 is now a {} quantity expressed in {}.'.format(puw.get_form(q3), puw.get_unit(q3)))\nq3 is now a pint quantity expressed in nanometer / picosecond.\n```\n\n## Units Python libraries\n- [openmm.unit](https://github.com/openmm/openmm/tree/master/wrappers/python/simtk/unit)\n- [Pint](https://pint.readthedocs.io/en/stable/)\n- [unyt](https://unyt.readthedocs.io/en/stable/)\n\n## License\n\nThis project is under an MIT License. [A copy of the license text is included in this repository](LICENSE).\n\n### Copyright\n\nCopyright (c) 2021-2022 [The Mexico Children's Hospital Federico Gómez](http://himfg.com.mx/), [its Unit of Research on Computational\nBiology and Drug Design](http://uibcdf.org), and [authors](https://github.com/uibcdf/OpenExplorer/graphs/contributors).\n\n## Acknowledgements\n\nProject based on the [Computational Molecular Science Python Cookiecutter](https://github.com/molssi/cookiecutter-cms) version 1.5.\n\n## Contributors\n\nA complete list of contributors can be found checking [the insights section of this\nrepository](https://github.com/uibcdf/OpenExplorer/graphs/contributors).\n\nThe main project authors and contributors are:\n\n- Daniel Ibarrola Sánchez\n- Liliana M. Moreno Vargas\n- Diego Prada Gracia\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuibcdf%2Fpyunitwizard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuibcdf%2Fpyunitwizard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuibcdf%2Fpyunitwizard/lists"}