Skip to main content

EGQCA

Extended Generalized Quasichemical Approximation for (quasi-)binary alloys $A_{1-x}B_xC$, with optional vibrational and PV (enthalpy) contributions.

EGQCA computes thermodynamic properties of an alloy at arbitrary composition $x$ and temperature $T$ by statistically averaging over a set of small clusters. From the cluster energies it gives the mixing free energy, enthalpy and entropy, the cluster occurrence probabilities, the miscibility gap (binodal and spinodal), and composition-averaged properties such as lattice parameters.

The method is described in doi:10.1016/j.mtphys.2024.101547.

Features

  • Generation of all non-equivalent clusters of a supercell from a CIF file (via the supercell program)
  • Input files for DFT relaxations with FHI-aims, Quantum ESPRESSO or VASP, and automatic extraction of the energies and lattice parameters
  • Relaxation and phonons with machine-learned interatomic potentials (UPET, MACE, MatterSim, GRACE, or any ASE calculator)
  • Gibbs free energy with mixing energy, configurational entropy, vibrational free energy from phonon DOS, and PV term
  • Miscibility gap, averaged properties and cluster reduction

Installation

pip install egqca

The ML relaxation needs the package of the chosen model family. Install each into its own environment, as their dependencies can conflict:

pip install "egqca[upet]"        # UPET / PET models
pip install "egqca[mace]"        # MACE
pip install "egqca[mattersim]"   # MatterSim
pip install "egqca[grace]"       # GRACE

Python 3.10 or newer is required.

To install the development version from source:

git clone https://github.com/egqca/egqca
cd egqca
pip install -e .

Quick start

With existing input files, a calculation looks like this:

import numpy as np
import egqca

m = egqca.EGQCA(
    datafile="clusters.dat",
    compound="A$_{1-x}$B$_x$C",
    volume_file="volume.dat",          # optional, for the PV term
    pressure_GPa=0.0,                  # optional
    phonon_file_name="ph_dos",         # optional, folder with <cluster_id>.dos files
)

x_grid = np.arange(1e-6, 1.0, 1.0e-3)
m.thermodynamic_assessment(x_grid, Tlist=[600, 800, 1000, 1400])
m.average_properties("volume.dat")

Example

examples/NbV/ covers the full workflow with ML potentials for bcc Nb$_{1-x}$V$_x$ with 8-atom clusters:

Script Step
01_generate_clusters.py generate the 22 non-equivalent clusters
02_ml_relaxation_phonons.py ML relaxation and phonons with pet-omatpes-l
03_run_egqca.py EGQCA without phonons, with phonons, and with phonons + PV

The results of step 2 are included, so 03_run_egqca.py runs directly.

Documentation

The documentation in docs/ covers the cluster setup, DFT input files, the ML workflow, the entropy approximation, property averaging and cluster reduction. Build it locally from a source checkout with

pip install -e ".[docs]"
mkdocs serve

Citation

If you use EGQCA, please cite doi:10.1016/j.mtphys.2024.101547.

License

EGQCA is released under the MIT License.

The ML packages and model weights it can use have their own licenses. Some model weights (e.g. MACE-OMAT-0, MACE-MATPES-0, MACE-MH) are for non-commercial use only. Check the license of the model you use.

Metadata

Release files for egqca 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for egqca 1.0.0
File Size Uploaded Provenance Actions
egqca-1.0.0.tar.gz 153.0 kB With provenance Details for egqca-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for egqca 1.0.0
File Interpreter ABI Platform Actions
egqca-1.0.0-py3-none-any.whl Python 3 none any Details for egqca-1.0.0-py3-none-any.whl

Total release size: 276.4 kB

Release files / egqca-1.0.0.tar.gz

Download URL egqca-1.0.0.tar.gz
Size 153.0 kB
Tags Source
SHA-256 checksum
How to use checksums
be9259532cd3877ecde34c34cf66b8797834eb1475ccd17039c72e47feb972cd
BLAKE2b-256 checksum
How to use checksums
83570e9ba2c8114b6524acf3532add7114e81765c9623d2076b350bb95e1402d
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 25, 2026.

Transparency log

Release files / egqca-1.0.0-py3-none-any.whl

Download URL egqca-1.0.0-py3-none-any.whl
Size 123.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc9852cdde63f8c0904cc25cbb22c17c8c0c958d5a9f0ed9006075a68f1fb342
BLAKE2b-256 checksum
How to use checksums
1aac902865bbd2e2348d07708f7a0075d56f839f34bb879c65b69404f7fbe85e
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 25, 2026.

Transparency log

Security for egqca 1.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for egqca-1.0.0.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 25, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page