Atmodeller
About
Atmodeller is a Python package for thermochemical equilibrium modelling of planetary interiors and atmospheres, built on JAX. It can also be used as a generic thermochemical equilibrium engine for other applications.
Atmodeller computes the chemical equilibrium between a planet's interior and atmosphere, solving gas-phase speciation, condensate stability and volatile solubility in silicate melt together, with real-gas equations of state for high pressures. It is designed for researchers in planetary science, exoplanet science and geochemistry who need these calculations, either standalone or as one component of a larger model. Applications include magma oceans, volcanic outgassing, and the atmospheres of super-Earths and sub-Neptunes. Users assemble a model from the species, solubility laws and equations of state they need, so the effect of each modelling choice can be explored. Because it is built on JAX, a batch of conditions is solved in one call and derivatives of the solution with respect to its inputs are available, which supports parameter sweeps, Monte Carlo sampling and gradient-based Bayesian inference.
It is released under the Apache License, Version 2.0.
Documentation
The documentation is available online, with options to download it in EPUB or PDF format:
https://atmodeller.readthedocs.io/
Quick install
Atmodeller is a Python package that requires Python 3.11 or later. It runs on Linux, macOS and Windows, and continuous integration tests Linux and macOS. It is recommended to install Atmodeller in a dedicated Python environment. Before installation, create and activate the environment, then run:
pip install atmodeller
Downloading the source code is also recommended if you'd like access to the example notebooks in notebooks/examples/.
Citation
If you use Atmodeller, or data from Atmodeller, please cite:
- Bower, D. J., Thompson, M. A., Hakim, K., Tian, M., and Sossi, P. A. (2025), Diversity of low-mass planet atmospheres in the C–H–O–N–S–Cl system with interior dissolution, nonideality and condensation: Application to TRAPPIST-1e and sub-Neptunes, The Astrophysical Journal, 995(1), 59, doi: https://www.doi.org/10.3847/1538-4357/ae1479. ArXiv e-print 2507.00499.
If you use version 2 of Atmodeller, please also cite:
- Bower, D. J. and Sossi, P. A. (2026), Atmodeller: A JAX-based Python package for thermochemical equilibrium of planetary interiors and atmospheres, Journal of Open Source Software, submitted.
The data from the first study above are also available for download at https://doi.org/10.17605/OSF.IO/PC5TD.
Logo
You are welcome to use the Atmodeller logo in presentations, posters, and other materials. The logo is available to download in three sizes: 200 × 200, 800 × 800 and 1200 × 1200 pixels.
Unlike the source code, the logo is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0). Citing Atmodeller (see Citation) satisfies the attribution requirement, so no separate credit is needed for the logo.
Basic usage
Several Jupyter notebooks providing examples are in the notebooks/examples/ directory. A simple example of how to use Atmodeller is provided below:
from atmodeller import (
ChemicalSpecies,
EquilibriumModel,
Parameters,
Planet,
ReservoirSpecies,
console_logger,
earth,
get_solubility_models,
)
# Log to the console. For more detail, use console_logger(logging.DEBUG)
logger = console_logger()
# Get the available solubility models
solubility_models = get_solubility_models()
print("solubility models =", solubility_models.keys())
# Gas species
H2_g = ChemicalSpecies.create_gas("H2")
H2O_g = ChemicalSpecies.create_gas("H2O")
O2_g = ChemicalSpecies.create_gas("O2")
# H2O dissolved in the silicate melt
H2O_d = ReservoirSpecies.create_dissolved(
"H2O", solubility=solubility_models["H2O_peridotite_sossi23"]
)
planet = Planet.from_species((H2_g, H2O_g, O2_g), silicate_melt_species=(H2O_d,))
oceans = 1
h_kg = earth.oceans_to_hydrogen_mass(oceans)
o_kg = 6.25774e20
mass_constraints = {"H": h_kg, "O": o_kg}
parameters = Parameters(planet, mass_constraints=mass_constraints)
model = EquilibriumModel(parameters)
# Solve with the default initial guess
output = model.solve_with_default()
# Check the solve was successful
output.solver_stats_to_logger()
# Quick look at the solution
output.quick_look()
# Get the complete solution as a nested dictionary
solution = output.to_dict(to_numpy=True)
print("H2O partial pressure (bar) =", solution["gas"]["species"]["partial_pressure"]["H2O_g"])
# Write the complete solution to Excel
output.to_excel("example_single")
Contributing
Community development of Atmodeller is strongly encouraged, and bug fixes and new features are welcome. Please open an issue to report a bug or request a feature. For questions, ideas, or to share how you are using Atmodeller, start a thread in Discussions. To submit changes, see CONTRIBUTING.md.
Funding
Atmodeller was created as part of a SERI-funded ERC Starting grant '2ATMO' granted to P. Sossi (Contract no. MB22.00033), with additional funding provided through a Swiss National Science Foundation (SNSF) Eccellenza Professorship (#203668).
M. Thompson was supported by NASA through the NASA Hubble Fellowship grant #HST-HF2-51545 awarded by the Space Telescope Science Institute, United States, which is operated by the Association of Universities for Research in Astronomy, Inc., for NASA under contract NAS5-26555.
K. Hakim acknowledges the FED-tWIN research programme STELLA (Prf-2021-022) funded by the Belgian Science Policy Office (BELSPO) and the research grant G014425N funded by the Research Foundation Flanders (FWO).
Metadata
Release files for atmodeller 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| atmodeller-2.0.0.tar.gz | 11.4 MB | Without provenance | Details for atmodeller-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| atmodeller-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for atmodeller-2.0.0-py3-none-any.whl |
Total release size: 20.7 MB
Release files / atmodeller-2.0.0.tar.gz
| Download URL | atmodeller-2.0.0.tar.gz |
|---|---|
| Size | 11.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a21b7028cf14c520381837ebbe1975c529e73eca0b304fd902a84b31268b1878
|
|
BLAKE2b-256 checksum How to use checksums |
a3405426d4f3df20a5a35080a529a009bd373f8554543dceb728c3eb4be3004a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / atmodeller-2.0.0-py3-none-any.whl
| Download URL | atmodeller-2.0.0-py3-none-any.whl |
|---|---|
| Size | 9.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
448399a73b85c187b778fd00e20a9c0ef39bc517c03a56bd0ed5efe0e4140888
|
|
BLAKE2b-256 checksum How to use checksums |
59b9661baa0d352d22c8b665cfcd13895ebc2ba0905a7b184ea9ef08e3bd17c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for atmodeller 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.