{"id":13994476,"url":"https://github.com/bjodah/chempy","last_synced_at":"2025-04-08T01:34:39.910Z","repository":{"id":32655460,"uuid":"36242853","full_name":"bjodah/chempy","owner":"bjodah","description":"⚗ A package useful for chemistry written in Python","archived":false,"fork":false,"pushed_at":"2024-04-10T15:48:50.000Z","size":17698,"stargazers_count":510,"open_issues_count":36,"forks_count":75,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-04-10T18:03:01.060Z","etag":null,"topics":["chemical-formulas","chemical-kinetics","chemical-reaction-model","chemistry","physical-chemistry","python","speciation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bjodah.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null}},"created_at":"2015-05-25T16:49:18.000Z","updated_at":"2024-04-15T08:58:01.812Z","dependencies_parsed_at":"2024-04-02T15:46:01.280Z","dependency_job_id":"7f6ae351-52c8-436b-833b-7f1e0c4cf36e","html_url":"https://github.com/bjodah/chempy","commit_stats":{"total_commits":725,"total_committers":11,"mean_commits":65.9090909090909,"dds":0.06068965517241376,"last_synced_commit":"1ef1bf6751884b57dc13dc420e1f5c634e954375"},"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjodah%2Fchempy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjodah%2Fchempy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjodah%2Fchempy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjodah%2Fchempy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bjodah","download_url":"https://codeload.github.com/bjodah/chempy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247760993,"owners_count":20991531,"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":["chemical-formulas","chemical-kinetics","chemical-reaction-model","chemistry","physical-chemistry","python","speciation"],"created_at":"2024-08-09T14:02:53.709Z","updated_at":"2025-04-08T01:34:39.894Z","avatar_url":"https://github.com/bjodah.png","language":"Python","funding_links":[],"categories":["Python","Libraries","شیمی"],"sub_categories":["General Purpose","کار با زمان و تقویم"],"readme":"ChemPy\n======\n\n.. image:: https://github.com/bjodah/chempy/actions/workflows/lint_python.yml/badge.svg\n   :target: https://github.com/bjodah/chempy/actions/workflows/lint_python.yml\n   :alt: Github Actions CI status\n.. image:: https://hackspett.bjodah.se/api/badges/1/status.svg\n   :target: https://hackspett.bjodah.se/repos/1\n   :alt: Woodpecker CI status\n.. image:: https://img.shields.io/pypi/v/chempy.svg\n   :target: https://pypi.python.org/pypi/chempy\n   :alt: PyPI version\n.. image:: https://img.shields.io/pypi/l/chempy.svg\n   :target: https://github.com/bjodah/chempy/blob/master/LICENSE\n   :alt: License\n.. image:: http://joss.theoj.org/papers/10.21105/joss.00565/status.svg\n   :target: https://doi.org/10.21105/joss.00565\n   :alt: Journal of Open Source Software DOI\n\n.. contents::\n\n\nAbout ChemPy\n------------\nChemPy is a `Python \u003chttps://www.python.org\u003e`_ package useful for\nchemistry (mainly physical/inorganic/analytical chemistry). Currently it includes:\n\n- Numerical integration routines for chemical kinetics (ODE solver front-end)\n- Integrated rate expressions (and convenience fitting routines)\n- Solver for equilibria (including multiphase systems)\n- Relations in physical chemistry:\n\n  - Debye-Hückel expressions\n  - Arrhenius \u0026 Eyring equation\n  - Einstein-Smoluchowski equation\n\n- Properties (pure python implementations from the literature)\n\n  - `water density \u003chttps://github.com/bjodah/chempy/blob/master/chempy/properties/water_density_tanaka_2001.py\u003e`_ as function of temperature\n  - `water permittivity \u003chttps://github.com/bjodah/chempy/blob/master/chempy/properties/water_permittivity_bradley_pitzer_1979.py\u003e`_ as function of temperature and pressure\n  - `water diffusivity \u003chttps://github.com/bjodah/chempy/blob/master/chempy/properties/water_diffusivity_holz_2000.py\u003e`_ as function of temperature\n  - `water viscosity \u003chttps://github.com/bjodah/chempy/blob/master/chempy/properties/water_viscosity_korson_1969.py\u003e`_ as function of temperature\n  - `sulfuric acid density \u003chttps://github.com/bjodah/chempy/blob/master/chempy/properties/sulfuric_acid_density_myhre_1998.py\u003e`_ as function of temperature \u0026 weight fraction H₂SO₄\n  - `More \u003chttps://github.com/bjodah/chempy/tree/master/chempy/properties\u003e`_ to come... (and contributions are most welcome!)\n\n\nDocumentation\n-------------\nThe easiest way to get started is to have a look at the examples in this README,\nand also the jupyter notebooks_. In addition there is auto-generated API documentation\nfor the latest `stable release here \u003chttps://bjodah.github.io/chempy/latest\u003e`_.\n\n.. _notebooks: https://github.com/bjodah/chempy/tree/master/examples\n\nInstallation\n------------\nSimplest way to install ChemPy and its (optional) dependencies is to use the\n`conda package manager \u003chttps://conda.pydata.org/docs/\u003e`_::\n\n   $ conda install -c conda-forge chempy pytest\n   $ pytest -rs -W ignore::chempy.ChemPyDeprecationWarning --pyargs chempy\n\ncurrently conda packages are only provided for Linux. On Windows and OS X\nyou will need to use ``pip`` instead::\n\n   $ python3 -m pip install chempy pytest\n   $ python3 -m pytest -rs -W ignore::chempy.ChemPyDeprecationWarning --pyargs chempy\n\nthere will a few tests which will be skipped due to some missing optional\nbackends in addition to those in SciPy (used for solving systems of non-linear\nequations and ordinary differential equations).\n\n\nOptional dependencies\n~~~~~~~~~~~~~~~~~~~~~\nIf you used ``conda`` to install ChemPy you can skip this section.\nBut if you use ``pip`` the default installation is achieved by writing::\n\n   $ python3 -m pip install --user --upgrade chempy pytest\n   $ python3 -m pytest -rs --pyargs chempy\n\nyou can skip the ``--user`` flag if you have got root permissions.\nYou may be interested in using additional backends (in addition to those provided by SciPy)\nfor solving ODE-systems and non-linear optimization problems::\n\n   $ python3 -m pip install chempy[all]\n\nNote that this option will install the following libraries\n(some of which require additional libraries to be present on your system):\n\n- `pygslodeiv2 \u003chttps://github.com/bjodah/pygslodeiv2\u003e`_: solving initial value problems, requires GSL_. (\u003e=1.16).\n- `pyodeint \u003chttps://github.com/bjodah/pyodeint\u003e`_: solving initial value problems, requires boost_ (\u003e=1.65.0).\n- `pycvodes \u003chttps://github.com/bjodah/pycvodes\u003e`_: solving initial value problems, requires SUNDIALS_ (\u003e=5.3.0).\n- `pykinsol \u003chttps://github.com/bjodah/pykinsol\u003e`_: solving non-linear root-finding, requires SUNDIALS_ (\u003e=5.3.0).\n- `pycompilation \u003chttps://github.com/bjodah/pycompilation\u003e`_: python front-end for calling compilers, requires gcc/clang/icpc.\n- `pycodeexport \u003chttps://github.com/bjodah/pycodeexport\u003e`_: package for code-generation, used when generating C++ code.\n\n.. _GSL: https://www.gnu.org/software/gsl/\n.. _boost: http://www.boost.org/\n.. _SUNDIALS: https://computation.llnl.gov/projects/sundials\n\nif you want to see what packages need to be installed on a Debian based system you may look at this\n`Dockerfile \u003cscripts/environment/Dockerfile\u003e`_.\n\nUsing Docker\n~~~~~~~~~~~~\nIf you have `Docker \u003chttps://www.docker.com\u003e`_ installed, you may use it to host a jupyter\nnotebook server::\n\n  $ ./scripts/host-env.sh host-notebook --port 8888\n\nthe first time you run the command, some dependencies will be downloaded. When the installation\nis complete there will be a link visible which you can open in your browser. You can also run\nthe test suite using the same docker-image::\n\n  $ ./scripts/host-env.sh run-tests\n\nthere will be a few skipped test (due to some dependencies not being installed by default) and\nquite a few warnings.\n\n\nExamples\n--------\nSee demonstration scripts in `examples/ \u003chttps://github.com/bjodah/chempy/tree/master/examples\u003e`_,\nand some rendered jupyter notebooks_.\nYou may also browse the documentation for more examples. Below you will find a few code snippets:\n\nParsing formulae\n~~~~~~~~~~~~~~~~\n.. code:: python\n\n   \u003e\u003e\u003e from chempy import Substance\n   \u003e\u003e\u003e ferricyanide = Substance.from_formula('Fe(CN)6-3')\n   \u003e\u003e\u003e ferricyanide.composition == {0: -3, 26: 1, 6: 6, 7: 6}  # 0 for charge\n   True\n   \u003e\u003e\u003e print(ferricyanide.unicode_name)\n   Fe(CN)₆³⁻\n   \u003e\u003e\u003e print(ferricyanide.latex_name + \", \" + ferricyanide.html_name)\n   Fe(CN)_{6}^{3-}, Fe(CN)\u003csub\u003e6\u003c/sub\u003e\u003csup\u003e3-\u003c/sup\u003e\n   \u003e\u003e\u003e print('%.3f' % ferricyanide.mass)\n   211.955\n\n\nas you see, in composition, the atomic numbers (and 0 for charge) is used as\nkeys and the count of each kind became respective value.\n\nBalancing stoichiometry of a chemical reaction\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n.. code:: python\n\n   \u003e\u003e\u003e from chempy import balance_stoichiometry  # Main reaction in NASA's booster rockets:\n   \u003e\u003e\u003e reac, prod = balance_stoichiometry({'NH4ClO4', 'Al'}, {'Al2O3', 'HCl', 'H2O', 'N2'})\n   \u003e\u003e\u003e from pprint import pprint\n   \u003e\u003e\u003e pprint(dict(reac))\n   {'Al': 10, 'NH4ClO4': 6}\n   \u003e\u003e\u003e pprint(dict(prod))\n   {'Al2O3': 5, 'H2O': 9, 'HCl': 6, 'N2': 3}\n   \u003e\u003e\u003e from chempy import mass_fractions\n   \u003e\u003e\u003e for fractions in map(mass_fractions, [reac, prod]):\n   ...     pprint({k: '{0:.3g} wt%'.format(v*100) for k, v in fractions.items()})\n   ...\n   {'Al': '27.7 wt%', 'NH4ClO4': '72.3 wt%'}\n   {'Al2O3': '52.3 wt%', 'H2O': '16.6 wt%', 'HCl': '22.4 wt%', 'N2': '8.62 wt%'}\n\n\nChemPy can also balance reactions where the reacting species are more complex and\nare better described in other terms than their molecular formula. A silly, yet\nillustrative example would be how to make pancakes without any partially used packages:\n\n.. code:: python\n\n   \u003e\u003e\u003e substances = {s.name: s for s in [\n   ...     Substance('pancake', composition=dict(eggs=1, spoons_of_flour=2, cups_of_milk=1)),\n   ...     Substance('eggs_6pack', composition=dict(eggs=6)),\n   ...     Substance('milk_carton', composition=dict(cups_of_milk=4)),\n   ...     Substance('flour_bag', composition=dict(spoons_of_flour=60))\n   ... ]}\n   \u003e\u003e\u003e pprint([dict(_) for _ in balance_stoichiometry({'eggs_6pack', 'milk_carton', 'flour_bag'},\n   ...                                                {'pancake'}, substances=substances)])\n   [{'eggs_6pack': 10, 'flour_bag': 2, 'milk_carton': 15}, {'pancake': 60}]\n\n\nChemPy can even handle reactions with linear dependencies (underdetermined systems), e.g.:\n\n.. code:: python\n\n   \u003e\u003e\u003e pprint([dict(_) for _ in balance_stoichiometry({'C', 'O2'}, {'CO2', 'CO'})])  # doctest: +SKIP\n   [{'C': x1 + 2, 'O2': x1 + 1}, {'CO': 2, 'CO2': x1}]\n\n\nthe ``x1`` object above is an instance of SymPy's Symbol_. If we prefer to get a solution\nwith minimal (non-zero) integer coefficients we can pass ``underdetermined=None``:\n\n.. code:: python\n\n   \u003e\u003e\u003e pprint([dict(_) for _ in balance_stoichiometry({'C', 'O2'}, {'CO2', 'CO'}, underdetermined=None)])\n   [{'C': 3, 'O2': 2}, {'CO': 2, 'CO2': 1}]\n\n\nnote however that even though this solution is in some sense \"canonical\",\nit is merely one of an infinite number of solutions (``x1`` from earlier may be any integer).\n\n\n.. _Symbol: http://docs.sympy.org/latest/modules/core.html#sympy.core.symbol.Symbol\n\n\nBalancing reactions\n~~~~~~~~~~~~~~~~~~~\n.. code:: python\n\n   \u003e\u003e\u003e from chempy import Equilibrium\n   \u003e\u003e\u003e from sympy import symbols\n   \u003e\u003e\u003e K1, K2, Kw = symbols('K1 K2 Kw')\n   \u003e\u003e\u003e e1 = Equilibrium({'MnO4-': 1, 'H+': 8, 'e-': 5}, {'Mn+2': 1, 'H2O': 4}, K1)\n   \u003e\u003e\u003e e2 = Equilibrium({'O2': 1, 'H2O': 2, 'e-': 4}, {'OH-': 4}, K2)\n   \u003e\u003e\u003e coeff = Equilibrium.eliminate([e1, e2], 'e-')\n   \u003e\u003e\u003e coeff\n   [4, -5]\n   \u003e\u003e\u003e redox = e1*coeff[0] + e2*coeff[1]\n   \u003e\u003e\u003e print(redox)\n   32 H+ + 4 MnO4- + 20 OH- = 26 H2O + 4 Mn+2 + 5 O2; K1**4/K2**5\n   \u003e\u003e\u003e autoprot = Equilibrium({'H2O': 1}, {'H+': 1, 'OH-': 1}, Kw)\n   \u003e\u003e\u003e n = redox.cancel(autoprot)\n   \u003e\u003e\u003e n\n   20\n   \u003e\u003e\u003e redox2 = redox + n*autoprot\n   \u003e\u003e\u003e print(redox2)\n   12 H+ + 4 MnO4- = 6 H2O + 4 Mn+2 + 5 O2; K1**4*Kw**20/K2**5\n\nWorking with units\n~~~~~~~~~~~~~~~~~~\nFunctions and objects useful\nfor working with units are available from the ``chempy.units`` module. Here is an\nexample of how ChemPy can check consistency of units:\n\n.. code:: python\n\n   \u003e\u003e\u003e from chempy import Reaction\n   \u003e\u003e\u003e r = Reaction.from_string(\"H2O -\u003e H+ + OH-; 1e-4/M/s\")\n   Traceback (most recent call last):\n   ...\n   ValueError: Unable to convert between units of \"1/M\" and \"dimensionless\"\n   \u003e\u003e\u003e r = Reaction.from_string(\"H2O -\u003e H+ + OH-; 1e-4/s\")\n   \u003e\u003e\u003e from chempy.units import to_unitless, default_units as u\n   \u003e\u003e\u003e to_unitless(r.param, 1/u.minute)\n   0.006\n\nright now the ``.units`` module wraps the quantities_ package with some minor\nadditions and work-arounds. However, there is no guarantee that the underlying\npackage will not change in a future version of ChemPy (there are many packages\nfor dealing with units in the scientific Python ecosystem).\n\n.. _quantities: http://python-quantities.readthedocs.io/en/latest/\n\n\nChemical equilibria\n~~~~~~~~~~~~~~~~~~~\nIf we want to predict pH of a bicarbonate solution we simply just need pKa and pKw values:\n\n.. code:: python\n\n   \u003e\u003e\u003e from collections import defaultdict\n   \u003e\u003e\u003e from chempy.equilibria import EqSystem\n   \u003e\u003e\u003e eqsys = EqSystem.from_string(\"\"\"HCO3- = H+ + CO3-2; 10**-10.3\n   ... H2CO3 = H+ + HCO3-; 10**-6.3\n   ... H2O = H+ + OH-; 10**-14/55.4\n   ... \"\"\")  # pKa1(H2CO3) = 6.3 (implicitly incl. CO2(aq)), pKa2=10.3 \u0026 pKw=14\n   \u003e\u003e\u003e arr, info, sane = eqsys.root(defaultdict(float, {'H2O': 55.4, 'HCO3-': 1e-2}))\n   \u003e\u003e\u003e conc = dict(zip(eqsys.substances, arr))\n   \u003e\u003e\u003e from math import log10\n   \u003e\u003e\u003e print(\"pH: %.2f\" % -log10(conc['H+']))\n   pH: 8.30\n\nhere is another example for ammonia:\n\n.. code:: python\n\n   \u003e\u003e\u003e from chempy import Equilibrium\n   \u003e\u003e\u003e from chempy.chemistry import Species\n   \u003e\u003e\u003e water_autop = Equilibrium({'H2O'}, {'H+', 'OH-'}, 10**-14)  # unit \"molar\" assumed\n   \u003e\u003e\u003e ammonia_prot = Equilibrium({'NH4+'}, {'NH3', 'H+'}, 10**-9.24)  # same here\n   \u003e\u003e\u003e substances = [Species.from_formula(f) for f in 'H2O OH- H+ NH3 NH4+'.split()]\n   \u003e\u003e\u003e eqsys = EqSystem([water_autop, ammonia_prot], substances)\n   \u003e\u003e\u003e print('\\n'.join(map(str, eqsys.rxns)))  # \"rxns\" short for \"reactions\"\n   H2O = H+ + OH-; 1e-14\n   NH4+ = H+ + NH3; 5.75e-10\n   \u003e\u003e\u003e init_conc = defaultdict(float, {'H2O': 1, 'NH3': 0.1})\n   \u003e\u003e\u003e x, sol, sane = eqsys.root(init_conc)\n   \u003e\u003e\u003e assert sol['success'] and sane\n   \u003e\u003e\u003e print(', '.join('%.2g' % v for v in x))\n   1, 0.0013, 7.6e-12, 0.099, 0.0013\n\n\nConcepts\n~~~~~~~~~\nChemPy collects equations and utility functions for working with\nconcepts such as `ionic strength \u003chttps://en.wikipedia.org/wiki/Ionic_strength\u003e`_:\n\n.. code:: python\n\n   \u003e\u003e\u003e from chempy.electrolytes import ionic_strength\n   \u003e\u003e\u003e ionic_strength({'Fe+3': 0.050, 'ClO4-': 0.150}) == .3\n   True\n\nnote how ChemPy parsed the charges from the names of the substances. There are\nalso e.g. empirical equations and convenience classes for them available, e.g.:\n\n.. code:: python\n\n   \u003e\u003e\u003e from chempy.henry import Henry\n   \u003e\u003e\u003e kH_O2 = Henry(1.2e-3, 1800, ref='carpenter_1966')\n   \u003e\u003e\u003e print('%.1e' % kH_O2(298.15))\n   1.2e-03\n\nto get more information about e.g. this class, you may can look at the `API documentation`_.\n\n.. _API documentation: https://bjodah.github.io/chempy/latest/chempy.html#module-chempy.henry\n\n\nChemical kinetics (system of ordinary differential equations)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nA common task when modelling problems in chemistry is to investigate the time dependence\nof a system. This branch of study is known as\n`chemical kinetics \u003chttps://en.wikipedia.org/wiki/Chemical_kinetics\u003e`_, and ChemPy has\nsome classes and functions for working with such problems:\n\n.. code:: python\n\n   \u003e\u003e\u003e from chempy import ReactionSystem  # The rate constants below are arbitrary\n   \u003e\u003e\u003e rsys = ReactionSystem.from_string(\"\"\"2 Fe+2 + H2O2 -\u003e 2 Fe+3 + 2 OH-; 42\n   ...     2 Fe+3 + H2O2 -\u003e 2 Fe+2 + O2 + 2 H+; 17\n   ...     H+ + OH- -\u003e H2O; 1e10\n   ...     H2O -\u003e H+ + OH-; 1e-4\"\"\")  # \"[H2O]\" = 1.0 (actually 55.4 at RT)\n   \u003e\u003e\u003e from chempy.kinetics.ode import get_odesys\n   \u003e\u003e\u003e odesys, extra = get_odesys(rsys)\n   \u003e\u003e\u003e from collections import defaultdict\n   \u003e\u003e\u003e import numpy as np\n   \u003e\u003e\u003e tout = sorted(np.concatenate((np.linspace(0, 23), np.logspace(-8, 1))))\n   \u003e\u003e\u003e c0 = defaultdict(float, {'Fe+2': 0.05, 'H2O2': 0.1, 'H2O': 1.0, 'H+': 1e-2, 'OH-': 1e-12})\n   \u003e\u003e\u003e result = odesys.integrate(tout, c0, atol=1e-12, rtol=1e-14)\n   \u003e\u003e\u003e import matplotlib.pyplot as plt\n   \u003e\u003e\u003e fig, axes = plt.subplots(1, 2, figsize=(12, 5))\n   \u003e\u003e\u003e for ax in axes:\n   ...     _ = result.plot(names=[k for k in rsys.substances if k != 'H2O'], ax=ax)\n   ...     _ = ax.legend(loc='best', prop={'size': 9})\n   ...     _ = ax.set_xlabel('Time')\n   ...     _ = ax.set_ylabel('Concentration')\n   \u003e\u003e\u003e _ = axes[1].set_ylim([1e-13, 1e-1])\n   \u003e\u003e\u003e _ = axes[1].set_xscale('log')\n   \u003e\u003e\u003e _ = axes[1].set_yscale('log')\n   \u003e\u003e\u003e _ = fig.tight_layout()\n   \u003e\u003e\u003e _ = fig.savefig('examples/kinetics.png', dpi=72)\n\n.. image:: https://raw.githubusercontent.com/bjodah/chempy/master/examples/kinetics.png\n\nProperties\n~~~~~~~~~~\nOne of the fundamental tasks in science is the careful collection of data about the world\naround us. ChemPy contains a growing collection of parametrizations from the scientific\nliterature with relevance in chemistry. Here is how you use one of these formulations:\n\n.. code:: python\n\n   \u003e\u003e\u003e from chempy import Substance\n   \u003e\u003e\u003e from chempy.properties.water_density_tanaka_2001 import water_density as rho\n   \u003e\u003e\u003e from chempy.units import to_unitless, default_units as u\n   \u003e\u003e\u003e water = Substance.from_formula('H2O')\n   \u003e\u003e\u003e for T_C in (15, 25, 35):\n   ...     concentration_H2O = rho(T=(273.15 + T_C)*u.kelvin, units=u)/water.molar_mass(units=u)\n   ...     print('[H2O] = %.2f M (at %d °C)' % (to_unitless(concentration_H2O, u.molar), T_C))\n   ...\n   [H2O] = 55.46 M (at 15 °C)\n   [H2O] = 55.35 M (at 25 °C)\n   [H2O] = 55.18 M (at 35 °C)\n\n\nCiting\n------\nIf you make use of ChemPy in e.g. academic work you may cite the following peer-reviewed publication:\n\n.. image:: http://joss.theoj.org/papers/10.21105/joss.00565/status.svg\n   :target: https://doi.org/10.21105/joss.00565\n   :alt: Journal of Open Source Software DOI\n\nDepending on what underlying solver you are using you should also cite the appropriate paper\n(you can look at the list of references in the JOSS article). If you need to reference,\nin addition to the paper, a specific point version of ChemPy (for e.g. reproducibility)\nyou can get per-version DOIs from the zenodo archive:\n\n.. image:: https://zenodo.org/badge/8840/bjodah/chempy.svg\n   :target: https://zenodo.org/badge/latestdoi/8840/bjodah/chempy\n   :alt: Zenodo DOI\n\nLicensing\n---------\nThe source code is Open Source and is released under the very permissive\n`\"simplified (2-clause) BSD license\" \u003chttps://opensource.org/licenses/BSD-2-Clause\u003e`_.\nSee `LICENSE \u003cLICENSE\u003e`_ for further details.\n\nSee also\n--------\n- `SymPy \u003chttps://github.com/sympy/sympy\u003e`_\n- `pyneqsys \u003chttps://github.com/bjodah/pyneqsys\u003e`_\n- `pyodesys \u003chttps://github.com/bjodah/pyodesys\u003e`_\n- `thermo \u003chttps://github.com/CalebBell/thermo\u003e`_\n\nContributing\n------------\nContributors are welcome to suggest improvements at https://github.com/bjodah/chempy\n(see further details `here \u003cCONTRIBUTING.rst\u003e`_).\n\n\nAuthor\n------\nBjörn I. Dahlgren, contact:\n - gmail address: bjodah\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjodah%2Fchempy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbjodah%2Fchempy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjodah%2Fchempy/lists"}