Metadata-Version: 2.4
Name: exogibbs
Version: 0.2.4
Summary: Differentiable Thermochemical Equilibrium Solver for Exoplanet Atmospheres
Author-email: Hajime Kawahara <divrot@gmail.com>
Maintainer-email: Hajime Kawahara <divrot@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/HajimeKawahara/exogibbs
Project-URL: Repository, https://github.com/HajimeKawahara/exogibbs
Project-URL: Issues, https://github.com/HajimeKawahara/exogibbs/issues
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: interpax
Requires-Dist: jax<0.7,>=0.4.30
Requires-Dist: tqdm
Requires-Dist: pandas
Requires-Dist: thermochem
Dynamic: license-file

# ExoGibbs
 [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/HajimeKawahara/exogibbs)

Differentiable Thermochemical Equilibrium, powered by JAX. 

The optimization scheme is based on the Lagrange multiplier, similar to [NASA/CEA algorithm](https://ntrs.nasa.gov/api/citations/19950013764/downloads/19950013764.pdf). 
The terminology follows Smith and Missen, [Chemical Reaction Equilibrium Analysis](https://aiche.onlinelibrary.wiley.com/doi/10.1002/aic.690310127) (1983, Wiley-Interscience). 

## Basic Use

```python
from exogibbs.presets.ykb4 import prepare_ykb4_setup
from exogibbs.api.equilibrium import equilibrium_profile, EquilibriumOptions

# chemical setup
chem = prepare_ykb4_setup()

# Thermodynamic conditions
Pref = 1.0  # bar, reference pressure
opts = EquilibriumOptions(epsilon_crit=1e-11, max_iter=1000)

res = equilibrium_profile(
    chem,
    temperature_profile,
    pressure_profile,
    chem.element_vector,
    Pref=Pref,
    options=opts,
)
nk_result = res.x #mixing ratio
```

ExoGibbs is designed to plug into [ExoJAX](https://github.com/HajimeKawahara/exojax) and enable gradient-based equilibrium retrievals. 
It is still in a very beta stage, so please use it at your own risk.
