https://github.com/mvdh7/pytzer
The Pitzer model for chemical activities and equilibria in aqueous solutions in Python
https://github.com/mvdh7/pytzer
chemical-activities chemical-speciation chemistry equilibrium jax oceanography pitzer-model seawater
Last synced: about 2 months ago
JSON representation
The Pitzer model for chemical activities and equilibria in aqueous solutions in Python
- Host: GitHub
- URL: https://github.com/mvdh7/pytzer
- Owner: mvdh7
- License: gpl-3.0
- Created: 2018-06-18T10:33:43.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2025-01-16T10:43:44.000Z (about 1 year ago)
- Last Synced: 2025-08-23T05:39:03.826Z (7 months ago)
- Topics: chemical-activities, chemical-speciation, chemistry, equilibrium, jax, oceanography, pitzer-model, seawater
- Language: Python
- Homepage: https://pytzer.hseao3.group
- Size: 6.34 MB
- Stars: 17
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pytzer

[](https://github.com/mvdh7/pytzer/blob/main/.misc/coverage.txt)
[](https://pypi.org/project/pytzer/)
[](https://anaconda.org/conda-forge/pytzer)
[](https://doi.org/10.5281/zenodo.2637914)
[](https://www.gnu.org/licenses/gpl-3.0)
[](https://github.com/astral-sh/ruff)
Pytzer is a Python implementation of the Pitzer model for chemical activities in aqueous solutions [[P91](https://pytzer.hseao3.group/refs/#p)] plus solvers to determine the equilibrium state of the system.
**Pytzer is in beta! Use at your own peril.**
- [Pytzer](#pytzer)
- [Installation](#installation)
- [For general use](#for-general-use)
- [Documentation](#documentation)
- [Citation](#citation)
## Installation
### For general use
Install with pip (any OS):
pip install pytzer
On Mac or Linux, you can alternatively install from conda-forge:
conda install conda-forge::pytzer
However, the above will not work on Windows, because jax is not on conda-forge for Windows - so use pip instead.
Once installed, you will need to set the environment variable `JAX_ENABLE_X64=True`. For example, using conda:
conda env config vars set JAX_ENABLE_X64=True
## Documentation
A work in progress at [pytzer.hseao3.group](https://pytzer.hseao3.group).
## Citation
Pytzer is maintained by [Dr Matthew P. Humphreys](https://hseao3.group) at the [NIOZ Royal Netherlands Institute for Sea Research](https://www.nioz.nl/en) (Texel, the Netherlands).
For now, the appropriate citation is:
> Humphreys, Matthew P. and Schiller, Abigail J. (2024). Pytzer: the Pitzer model for chemical activities and equilibria in aqueous solutions in Python (beta). *Zenodo.* [doi:10.5281/zenodo.2637914](https://doi.org/10.5281/zenodo.2637914).
Please report which version of Pytzer you are using. You can find this in Python with:
```python
import pytzer as pz
pz.hello()
```