GLiquid: DFT-Referenced Thermodynamic Modeling
GLiquid fits DFT-referenced liquid free energies to binary phase diagrams. From those fits it interpolates ternary liquidus surfaces and predicts liquid parameters for unassessed systems with a bundled machine-learning model. Browse the fitted and predicted systems in the interactive matrix.
Installation
GLiquid supports Python 3.10–3.13. Install it into a fresh environment:
conda create --name gliquid-env python=3.12
conda activate gliquid-env
pip install gliquid
Optional extras:
| Extra | Install | Adds |
|---|---|---|
ml |
pip install "gliquid[ml]" |
ML predictions of liquid parameters (ProductionModelRunner) |
mpds |
pip install "gliquid[mpds]" |
downloading phase diagrams from MPDS that are not already cached |
notebook |
pip install "gliquid[notebook]" |
Jupyter and the interactive widgets used in the notebooks |
Data and notebooks
The package does not include per-system data (DFT convex hulls and digitized phase diagrams). Clone the repository for the example notebooks and the cached data they use:
git clone https://github.com/willwerj/gliquid_python.git
Then point GLiquid at the clone's cache/ folder:
import gliquid.config as cfg
cfg.set_cache_dir("path/to/gliquid_python/cache")
Without this, systems are fetched as needed and saved to ./gliquid_cache.
API keys
To fit systems not in the repo cache, you'll need both MP and MPDS API keys. If you only interpolate from the fitted parameters in our published dataset (interactive matrix), you only need the MP API key.
- Materials Project (DFT data): get a key at materialsproject.org.
- MPDS (phase diagrams): needs the
mpdsextra and an MPDS account (paid subscription at mpds.io).
import os
os.environ["NEW_MP_API_KEY"] = "your Materials Project key"
os.environ["MPDS_API_KEY"] = "your MPDS key"
Quick start
from gliquid.binary import BinaryLiquid, BLPlotter
bl = BinaryLiquid.from_cache("Cu-Mg")
fits = bl.fit_parameters(n_opts=5)
best = min(fits, key=lambda fit: fit["mae"])
print(f"liquidus MAE {best['mae']:.0f} K, MAPE {best['mape']:.1f}%")
BLPlotter(bl).show("fit+liq")
The notebooks walk through fitting (fitting_demo), ternary interpolation
(interpolation_demo) and adjusting a prediction to experiment (GaRu_adjustment,
PbTb_adjustment). To run them locally, install the notebook extra and start Jupyter from
the notebooks folder.
Google Colab
Open colab_demo.ipynb for a complete example that runs without API keys. Each of the other notebooks has a commented Colab setup cell at the top; uncomment it to run that notebook on Colab. For use in Colab, install GLiquid without extras: Colab already has XGBoost and the notebook widgets.
Citing
If GLiquid contributes to published work, please cite it using CITATION.cff (GitHub's "Cite this repository" button).
Contributing
Pull requests are welcome. CONTRIBUTING.md covers development setup and running the tests. Release history is in CHANGELOG.md.
License
Acknowledgements
This project is made possible by funding from the U.S. Department of Energy (DOE) Office of Science, Basic Energy Sciences Award No. DE-SC0021130 and the National Science Foundation (NSF) Award No. OAC-2209423.
Metadata
Release files for gliquid 0.3.4
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 |
|---|---|---|---|---|
| gliquid-0.3.4.tar.gz | 8.2 MB | With provenance | Details for gliquid-0.3.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gliquid-0.3.4-py3-none-any.whl | Python 3 | none | any | Details for gliquid-0.3.4-py3-none-any.whl |
Total release size: 15.4 MB
Release files / gliquid-0.3.4.tar.gz
| Download URL | gliquid-0.3.4.tar.gz |
|---|---|
| Size | 8.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
25a9b799ab851ee529db81e87ab8cad966a3b4c4b956a66c511c8998088e1657
|
|
BLAKE2b-256 checksum How to use checksums |
672dfe8d1a281685878ddd2e6f7e35c95117a295d47bfa758991bec3a52eeaca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.
Transparency logRelease files / gliquid-0.3.4-py3-none-any.whl
| Download URL | gliquid-0.3.4-py3-none-any.whl |
|---|---|
| Size | 7.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0fcc93e7024acb3072dd3dbba29691531e13afd4a77f42ed8a1d21e1e9ac37da
|
|
BLAKE2b-256 checksum How to use checksums |
12d8cdde05430d8834b93e4aa215140f78b32e8d81a2eb0cdc8db38763dc74c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.
Transparency logSecurity for gliquid 0.3.4
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for gliquid-0.3.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.
Transparency logA 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.