Skip to content

Menu

WorksPhysics and Astronomy

EGQCA Code: automated high-throughput thermodynamic modeling of solid solutions

Download PDFView on arXiv

Ask your agent about this work

Your agent reads this work through Valency, with its citations and similar works. Paste this at the start of a chat.

Use the Valency MCP. Work: W_65wzsacx. Fetch it with get_paper_by_id, then find its nearest works with find_similar_papers and tell me what it adds.

Works with any MCP client. Not connected yet? Connect your agent

Abstract

Modeling disordered systems from first principles across the full composition range is a long-standing computational challenge. We present a code package implementing the extended generalized quasichemical approximation (EGQCA), which describes solid solutions through the statistics of a finite set of clusters and enables their thermodynamic modeling at arbitrary compositions and temperatures. The package automates the complete workflow and interfaces with both DFT codes and universal machine-learned interatomic potentials (uMLIPs). We show that replacing DFT with uMLIPs reduces the cost of the cluster calculations by up to five orders of magnitude while preserving the thermodynamic predictions. To make computationally demanding properties tractable, we additionally introduce a cluster-selection algorithm that identifies the most relevant configurations. Together, these developments establish EGQCA as a fast and accurate framework for the thermodynamic modeling of solid solutions and a practical route toward high-throughput screening of disordered materials.

Introduction

Alloys are indispensable to a wide range of modern technologies, from the automotive [1, 2, 3] and aerospace industries [4, 5] to biomedical implants [6, 7, 8], the energy sector [9, 10], and fusion reactors [11, 12] [13, 14]. By combining different elements, their properties can be systematically tailored for specific applications, motivating extensive efforts to design new alloys with technological impact [15, 16]. Traditionally, alloy design has focused on a few base elements, with small amounts of solutes introduced to modify their properties. More recently, the focus has shifted to alloys containing several principal elements, commonly referred to as high-entropy alloys (HEAs) [17–20], greatly expanding the space of accessible compositions and material properties.

Navigating the vast compositional space of alloys remains tractable as long as the atomic arrangement is ordered. In such cases, standard density functional theory (DFT) calculations based on small unit cells enable efficient in-silico materials design. In disordered alloys, however, the constituents randomly occupy the lattice sites, and a faithful description requires large supercells, increasing the computational cost of first-principles predictions significantly. Developing efficient methods that treat disorder more realistically therefore remains an active field of research, with multiple existing approaches.

Effective-medium theories, such as the coherent potential approximation (CPA) [21–24] and the virtual crystal approximation (VCA) [25, 26], replace the random alloy by a single effective medium and thus treat the system within a mean-field picture, neglecting any ordering arising from local correlations. Capturing these microscopic effects requires structural approaches that retain the actual atomic interactions. Among these, cluster-expansion techniques combined with Monte Carlo sampling [27–29] rely on fitting an effective Hamiltonian to describe the configurational energetics, while the special quasirandom structures (SQS) method [30, 31] improves upon random supercell generation by constructing a single cell whose correlation functions reproduce those of the true random alloy at one composition as closely as possible.

The generalized quasichemical approximation (GQCA) [32] offers an alternative route to describing alloy thermodynamics across the full solubility range. The GQCA is based on representing the crystal as a set of symmetry-inequivalent clusters of fixed size, whose occurrence probabilities are determined by minimizing the free energy of the system, accounting for both mixing enthalpy and configurational entropy. The framework was later extended to incorporate vibrational contributions, leading to the extended GQCA (EGQCA) [33]. To evaluate the cluster probabilities, only the ground-state energy of each cluster and, optionally, its volume and phonon density of states are required. Once these probabilities are determined, thermodynamic and physical properties can be readily obtained as cluster-weighted averages at any composition, temperature and pressure, with negligible additional computational cost. This provides an efficient framework for capturing the thermodynamic behavior and phase stability of disordered alloys and predicting their properties, such as bandgaps [37–40], optical absorption [37, 41, 42], superconducting TcT_{\mathrm{c}} [33], transport properties [41], or bulk moduli [34, 36], across the full composition range. The method has already been successfully applied to a wide range of materials, including semiconductors [35, 41, 43], topological insulators [38], superconductors [33, 44–46], and strongly correlated materials [47].

With this work, we aim to make the EGQCA method widely available by introducing an open-source, easy-to-use code package that automates the thermodynamic assessment of solid solutions and predicts how their properties evolve with composition. Beyond these core functionalities, we extend the method to interface with state-of-the-art machine-learned interatomic potentials (MLIPs) [48–57] to reduce the computational cost of ground-state energy and phonon calculations. We also introduce a cluster-selection algorithm that ranks clusters according to their thermodynamic occurrence probabilities and identifies a small subset of the most relevant configurations. This substantially reduces the number of clusters required to describe computationally costly physical properties, such as electronic spectral functions or electron-phonon coupling.

The method can be applied to investigate phase stability and to identify optimal composition ranges for target material properties. The integration with MLIPs also extends the range of systems accessible to EGQCA. Together, these developments provide a complete workflow for thermodynamic calculations and composition-dependent property evaluation, with direct applications in high-throughput materials screening.

The paper is organized as follows. Section II introduces the EGQCA formalism for quasi-binary systems. We state the assumptions underlying the approach, derive the governing expressions, and detail the procedure by which the equilibrium cluster probabilities are determined. Section III gives a brief overview of the implementation. In Sec. IV the implementation is benchmarked against a chemically diverse set of materials and we show how MLIPs can be used to accelerate the workflow. We then describe how thermodynamic functions and the composition dependence of physical properties are obtained within the framework, apply the method to calculate the miscibility gap, and conclude by discussing the role of phonons in the EGQCA description. We summarize our findings in Sec. V and discuss the computational details in Sec. VI.

EGQCA model

The GQCA [32] describes a disordered system by partitioning it into a set of non-equivalent clusters of size nn. A solid containing NN substitutional sites is thereby represented as an assembly of MM clusters, each comprising nn atoms. The current implementation is limited to quasi-binary systems A1−xBxC\mathrm{A}_{1-x}\mathrm{B}_{x}\mathrm{C}. For a binary system the number of A and B atoms is fixed by the composition, NA=N(1−x)N_{\mathrm{A}} = N(1-x) and NB=NxN_{\mathrm{B}} = Nx. The set of non-equivalent clusters, indexed by j=1,…,Jj = 1,\ldots,J, is generated by permuting the A and B atoms over all sites and assigning a degeneracy gjg_j to combine symmetry-equivalent clusters. Each cluster is characterized by its composition xj=nj/nx_j = n_j/n, where njn_j is the number of B atoms, as well as its energy EjE_j and volume VjV_j. Since lattice vibrations can significantly affect the thermodynamics of the alloy at higher temperatures, each cluster may additionally be characterized by its vibrational free energy Aj(T)A_j(T) [33].

A cluster of type jj occurs MjM_j times in the solid solution, allowing its occurrence probability to be defined as

pj=MjM.(1)p_j = \frac{M_j}{M}. \tag*{(1)}

The equilibrium occurrence probabilities are obtained by minimizing the mixing Gibbs free energy,

ΔG=ΔH−TΔS+ΔA,(2)\Delta G = \Delta H - T\Delta S + \Delta A, \tag*{(2)}

composed of the mixing enthalpy ΔH\Delta H, mixing entropy ΔS\Delta S, and the vibrational free energy of mixing ΔA\Delta A. To evaluate ΔH\Delta H, ΔS\Delta S and ΔA\Delta A, we make two fundamental assumptions: (i) the clusters are energetically decoupled, and (ii) their occurrence is statistically independent except for the fact that they overlap at lattice sites. According to assumption (i), the total energy of a given configuration {Mj}\{M_j\} reduces to a sum of cluster energies,

E({Mj})=∑jMjEj.(3)E(\{M_j\}) = \sum_j M_j E_j. \tag*{(3)}

For large clusters, such as supercells built by stacking of unit cells, a correction is needed to take into account the overlapping of clusters. In this case, because of assumption (ii) above, each one of the NN lattice sites is shared by nn clusters, and therefore EjE_j has to be given per atom per site.

From the statistical independence, an approximate formula for the number of ways to configure the solid solution from a given set {Mj}\{M_j\} with NA/NBN_{\mathrm{A}}/N_{\mathrm{B}} atoms follows:

W({Mj})≈N!NA!NB!M!∏jMj!∏j(pj0)Mj.(4)W(\{M_j\}) \approx\frac{N!}{N_{\mathrm{A}}!N_{\mathrm{B}}!}\frac{M!}{\prod_j M_j!}\prod_j \left(p_j^0\right)^{M_j}. \tag*{(4)}

Here, pj0=gjxnj(1−x)n−njp_j^0 = g_j x^{n_j}(1-x)^{n-n_j} is the probability of randomly placing njn_j atoms of type B and n−njn-n_j atoms of type A in a cluster of size nn and degeneracy gjg_j. Applying Stirling’s approximation, the configurational entropy follows as

ΔS(x,P,T)=kBln⁡W≈−NkB[xln⁡x+(1−x)ln⁡(1−x)]\Delta S(x,P,T) = k_{\mathrm{B}}\ln W \approx-Nk_{\mathrm{B}}\left[x\ln x + (1-x)\ln(1-x)\right]
−MkB∑j=1Jpjln⁡(pjpj0).(5){}-Mk_{\mathrm{B}}\sum_{j=1}^{J}p_j\ln\left(\frac{p_j}{p_j^0}\right). \tag*{(5)}

The first term represents the ideal configurational entropy of a fully random alloy, while the second, expressed as the negative Kullback–Leibler (KL) divergence, accounts for the reduction in entropy arising from deviations of the cluster distribution from the random reference pj0p_j^0. (5) is a generalization of the Bethe-Peierls entropy [59] and, as such, falls within the Cluster Variation Method (CVM) hierarchy [60]. A derivation of (5) is included in the Appendix.

Historically, the entropy has mostly been approximated using M=N/nM = N/n [33, 36, 43], which corresponds to non-overlapping clusters. Setting M=NM = N improves the entropy estimate for overlapping clusters, as it corrects for the double counting of single lattice sites. This is the case when the clusters are supercells, for which DFT calculations can be performed directly. When clusters smaller than a unit cell are considered, cluster expansion (CE) interaction energies [61, 62] or equivalent methods [63] are necessary, and the correct geometric relationship between MM and NN must be employed. Throughout this work, we use supercells as the basic clusters.

Figure 1. Flowchart of the egqca code. In step (1), all non-equivalent clusters for a given supercell size are generated using the SUPERCELL program [58]. The egqca code then organizes each generated CIF file into a dedicated subfolder and automatically produces the corresponding input files for a subsequent DFT calculation, currently supporting FHI-aims, Quantum ESPRESSO, and VASP. In step (2), the ground-state energy of each cluster is computed, either via DFT, uMLIPs or dedicated machine-learning force fields. If the vibrational contribution to the free energy is to be included, the phonon density of states is also calculated at this stage. In step (3), with all required inputs in place, the thermodynamics of the system together with the occurrence probabilities are obtained via the EGQCA method, from which the averaged physical properties can be derived. For computationally demanding quantities, such as the superconducting transition temperature TcT_{\mathrm{c}}, which may be intractable to evaluate for a large number of clusters, the most relevant clusters can be identified in advance to provide efficient estimates.

The enthalpic contribution is determined from the excess enthalpies of the individual clusters,

Δj=Hj−n−njnHA−njnHB,(6)\Delta_j = H_j - \frac{n-n_j}{n}H_A - \frac{n_j}{n}H_B, \tag*{(6)}

which quantify the deviation of the cluster enthalpy Hj=Ej+PVjH_j = E_j + PV_j from the composition-weighted linear interpolation of the pure end-members. Here, EjE_j and VjV_j are the ground-state energy and volume per permutable site of cluster jj at pressure PP, respectively. From the excess enthalpies the mixing enthalpy can be obtained:

ΔH=M∑j=1JpjΔj.(7)\Delta H = M \sum_{j=1}^{J} p_j\Delta_j. \tag*{(7)}

To evaluate the contribution from the vibrational free energy, we define excess vibrational free energy for each cluster as

εj(T)=Aj(T)−n−njnAA(T)−njnAB(T),(8)\varepsilon_j(T) = A_j(T) - \frac{n-n_j}{n}A_A(T) - \frac{n_j}{n}A_B(T), \tag*{(8)}

where AAA_A and ABA_B denote the vibrational free energies per permutable site of the pure A and B end-members, respectively.

Within the harmonic approximation, each Aj(T)A_j(T) is obtained from the corresponding phonon density of states Dj(ω)D_j(\omega) as

Aj(T)=kBT∫0∞Dj(ω)ln⁡[2sinh⁡(ℏω2kBT)] dω,(9)A_j(T) = k_{\mathrm{B}}T \int_{0}^{\infty} D_j(\omega)\ln\left[2\sinh\left(\frac{\hbar\omega}{2k_{\mathrm{B}}T}\right)\right]\,\mathrm{d}\omega, \tag*{(9)}

and the associated contributions to the internal energy and entropy follow from the standard harmonic expressions [64].

Finally, the mixing Gibbs free energy is:

ΔG(x,T,P)=M∑j=1JpjΔj+NkBT(xln⁡x+(1−x)ln⁡(1−x))+MkBT∑j=1Jpjln⁡(pjpj0)+M∑j=1Jpjεj(T).(10)\begin{aligned} \Delta G(x,T,P) ={}& M\sum_{j=1}^{J}p_j\Delta_j \\ &+ Nk_{\mathrm{B}}T\left(x\ln x+(1-x)\ln(1-x)\right) \\ &+ Mk_{\mathrm{B}}T\sum_{j=1}^{J}p_j\ln\left(\frac{p_j}{p_j^{0}}\right) \\ &+ M\sum_{j=1}^{J}p_j\varepsilon_j(T). \tag*{(10)} \end{aligned}

Minimizing this Gibbs free energy subject to the normalization of the occurrence probabilities, ∑jJpj=1\sum_{j}^{J}p_j=1, and to the constraint that the clusters reproduce the target composition, ∑jJpjnj=nx\sum_{j}^{J}p_jn_j=nx, results in a polynomial equation:

∑j=1J(nx−nj)gje−(εj+Δj)βηnj=0.(11)\sum_{j=1}^{J}(nx-n_j)g_j e^{-(\varepsilon_j+\Delta_j)\beta}\eta^{n_j}=0. \tag*{(11)}

Here, β=1/kBT\beta= 1/k_{\mathrm{B}}T is the inverse temperature and η=xeλLβ/(1−x)\eta= x e^{\lambda_{\mathrm{L}}\beta}/(1-x), with λL\lambda_{\mathrm{L}} being the Lagrange multiplier enforcing the composition constraint. Solving this equation yields the Lagrange multiplier, from which the equilibrium probabilities follow:

pj=gjηnje−(εj+Δj)β∑i=1Jgiηnie−(εi+Δi)β(12)p_j = \frac{g_j \eta^{n_j} e^{-(\varepsilon_j+\Delta_j)\beta}}{\sum_{i=1}^{J} g_i \eta^{n_i} e^{-(\varepsilon_i+\Delta_i)\beta}} \tag*{(12)}

The vibrational contribution thus enters the cluster statistics on the same footing as the configurational energetics, through the combined exponent εj+Δj\varepsilon_j + \Delta_j. Note that setting M=NM = N in the entropy formula requires the excess free energies to be expressed per permutable site. From the equilibrium cluster probabilities, the thermodynamic properties of the solid solution can be obtained at the corresponding composition and temperature.

Beyond the mixing thermodynamics, EGQCA allows the evaluation of physical properties for which cluster-resolved quantities are available. Any cluster-resolved property Pj\mathcal{P}_j is averaged over the equilibrium cluster distribution,

P(x,T,P)=∑j=1Jpj(x,T,P)Pj(13)\mathcal{P}(x,T,P) = \sum_{j=1}^{J} p_j(x,T,P)\mathcal{P}_j \tag*{(13)}

and the spread of that property across the cluster ensemble is quantified by its standard deviation:

ΔP(x,T,P)=∑j=1Jpj(x,T,P)Pj2−P(x,T,P)2(14)\Delta\mathcal{P}(x,T,P) = \sqrt{\sum_{j=1}^{J} p_j(x,T,P)\mathcal{P}_j^2 - \mathcal{P}(x,T,P)^2} \tag*{(14)}

As the weights pjp_j carry the full composition, temperature, and pressure dependence, a single set of precomputed cluster quantities {Pj}\{\mathcal{P}_j\} suffices to map out any such property over the entire phase diagram.

Code workflow

The equations discussed above are implemented in the egqca code package [65], together with a full workflow for generating and setting up the underlying cluster data. To obtain all symmetrically inequivalent clusters, the package interfaces with the supercell program [58], organizes the CIF file for each cluster into a dedicated subfolder, and generates the corresponding input files for FHI-aims [66, 67], Quantum ESPRESSO [68, 69], and VASP [70–72]. Once the cluster energies have been obtained, the EGQCA minimization itself can be executed, as depicted in Fig. 1.

Within the EGQCA approximation, the thermodynamic properties of solid solutions can be evaluated across the entire composition range x∈[0,1]x \in[0,1] at specified temperatures and pressures. The method requires only the cluster energies as input, with cluster lattice parameters and phonon densities of states optionally included to account for additional contributions to the thermodynamics. These quantities can be readily obtained from standard density functional (perturbation) theory calculations or, at a fraction of the computational cost, from universal machine-learned interatomic potentials (uMLIPs) and system-specific potentials such as Ephemeral Data-Derived Potentials (EDDPs) [73, 74]. From these cluster properties, the thermodynamic behavior across the full solubility range can be reconstructed using the cluster statistics derived above.

In the egqca package, the calculation reduces to initializing the model with the cluster data and evaluating it over a grid of compositions at the desired temperatures:

from egqca import EGQCA
import numpy as np

m = EGQCA(
    datafile="clusters.dat",
    volume_file="volume.dat",          # optional
    pressure_GPa=10.0,                 # optional
    phonon_file_name="phonons.dos",    # optional
)

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

The EGQCA constructor method requires only the cluster list (clusters.dat), while optional arguments enable additional contributions to the free energy. Setting a finite pressure_GPa includes the PVPV term, evaluated from the cluster lattice parameters provided in volume.dat, whereas phonon_file_name incorporates vibrational contributions obtained from the phonon density of states of each cluster. Once initialized, the model retains all cluster data, allowing subsequent analyses to be performed through methods of the same object. The main method, thermodynamic_assessment, determines the equilibrium cluster probabilities across the specified composition grid for each temperature in Tlist, evaluates the mixing free energy, identifies miscibility gaps, and saves the resulting figures and data files in a dedicated output folder. Similarly, average_properties reads properties.dat and averages each column separately at each temperature:

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

Further details on the input formats and the complete workflow are provided in the Supplemental Material (SM) [75] and the package documentation [76].

The computational efficiency of EGQCA stems from the fact that the properties of each cluster need to be calculated only once, after which the thermodynamics of the solid solution can be obtained through inexpensive statistical averaging over the cluster ensemble. The computational cost is therefore dominated by the initial evaluation of the cluster ground-state energies and the physical properties Pj\mathcal{P}_j of interest. Both limitations in the preceding calculations can be substantially alleviated: the former by replacing DFT calculations with MLIPs, and the latter by reducing the number of clusters for which computationally expensive physical properties must be calculated. In the following section, we explore both strategies.

Benchmark

Machine-Learning-Assisted EGQCA

When interest is limited to thermodynamic properties, only the ground-state energies of the relaxed clusters are required. Yet even these calculations become infeasible with DFT once the number of clusters reaches into the hundreds. MLIPs provide an alternative to DFT, reducing the time required for an individual energy evaluation from hours to seconds. In high-throughput settings, universal MLIPs are particularly attractive, as they require no system-specific training, while reaching accuracies comparable to DFT [51, 52, 55, 77–80].

The field of uMLIPs is rapidly evolving, with foundational models improving continuously in both accuracy and transferability. To reflect this diversity, we benchmark three representative models — MatterSim-v1.0.0-5M [55], MACE-MPA-0-medium [56], and PET-OMATPES-L [57] — chosen to span different architectural designs, training set compositions, and underlying DFT exchange-correlation functionals. Additional models were tested and produced broadly similar results for the systems considered, although a comprehensive comparison of available uMLIPs is beyond the scope of this work.

To benchmark the uMLIP-accelerated workflow, we draw on known solid solutions and systems to which EGQCA has recently been applied across a broad range of material classes. To ensure that the conclusions are not limited to a particular material class or cluster complexity, the selected set is deliberately diverse, encompassing intermetallics, semiconductors, and insulators, described by both small and larger cluster sizes as well as systems for which phonon calculations are available as an additional benchmark.

As a first test case, we computed in a high-throughput manner the lattice parameters of several known intermetallic solid solutions using the foundational models MACE-MPA-0-medium, MatterSim-v1.0.0-5M and PET-OMATPES-L, and compared the results to experiment (Fig. 2). All three models are in close agreement with the experimental data, achieving a total mean relative error (MRE) below 1%, averaged over all systems. PET-OMATPES-L performs best on average, although it deviates noticeably for Cu1−x_{1-x}Nix_x and develops an unphysical kink in V1−x_{1-x}Crx_x near x=0.7x = 0.7. MACE-MPA-0-medium and MatterSim-5M agree closely for most systems despite their different architectures and training sets. This comparison also shows that running several models side by side is a useful first check on the reliability of the predictions. A more detailed breakdown of the MRE of each model is given in the SM [75].

Having established that the models reproduce the lattice parameters of intermetallic compounds, we now turn to a more demanding case and consider the quasi-binary nitride alloys Inx_xGa1−x_{1-x}N and Alx_xGa1−x_{1-x}N [36]. These systems are particularly challenging due to the lattice mismatch between their constituent compounds, especially InN and GaN, which introduces substantial local strain and bond-length distortions. In Inx_xGa1−x_{1-x}N, these effects also lead to pronounced compositional fluctuations and a strong tendency toward phase separation, making the accurate description of their structural properties particularly demanding.

Figure 3 shows the lattice parameters obtained with DFT at the PBE level using FHI-aims [66, 67] alongside PET-OMATPES-L, with experimental data taken from Refs. [92, 93] for comparison. Both methods reproduce the observed compositional trends, with PET-OMATPES-L showing even closer agreement with the experimental lattice parameters. This difference may be related to the r2SCAN reference data in the training set, as uMLIPs trained on PBE-level data perform comparably to direct DFT-PBE calculations, as shown in the SM [75].

To further assess the performance of uMLIPs in structurally more complex systems, we consider the layered alloy (Bi1−x_{1-x}Sbx_x)2_2Se3_3. Unlike the nitride alloys discussed above, this system presents an additional challenge, as the preferred crystal structure changes with composition, from the rhombohedral structure of Bi2_2Se3_3 to the orthorhombic structure of bulk Sb2_2Se3_3 [95]. Experimentally, the rhombohedral phase is accessible only over a limited composition range. In bulk samples, Sb solubility is restricted to x≃0.32x \simeq0.32 [94, 96], whereas thin films can be grown up to x≃0.5x \simeq0.5 [97], with the precise solubility limit depending on the substrate [98, 99].

We employ a 2×2×22 \times2 \times2 rhombohedral supercell, which preserves the symmetry of the underlying crystal structure while remaining computationally affordable through the use of MLIPs. In Fig. 4, we compare the volumes predicted by uMLIPs, and DFT from Mota et al. [38] against experimental data [94]. For this layered system, the uMLIP predictions deviate substantially from both experiment and the DFT reference, with considerable differences also observed among the individual models. While MatterSim-5M and PET-OMATPES-L reproduce the qualitative compositional dependence, MACE-MPA-0-medium exhibits a pronounced kink in the Sb-rich region, suggesting that its predictions become unreliable at these compositions.

These discrepancies with experiment can be related to the underlying physics of the system. In particular, the largest deviations occur in the compositional region where the rhombohedral phase competes with the orthorhombic structure. Furthermore, the volume of layered materials is strongly influenced by weak van der Waals interactions between the layers, which are not adequately described by models trained on DFT data without non-local corrections. The difference between the results of Mota et al. and the uMLIPs can be attributed to their use of the DFT-1/2 method [100, 101] together with the smaller cluster set derived from the 2×2×12 \times2 \times1 supercell.

The limitations observed for (Bi1−x_{1-x}Sbx_x)2_2Se3_3 reflect a broader challenge associated with the transferability of uMLIPs. Most existing models are trained predominantly on bulk materials near equilibrium, and their predictive accuracy can deteriorate when applied to configurations that are poorly represented in their training sets [102, 103]. Similar caution is therefore warranted for systems outside this domain, including two-dimensional materials, surfaces, structures under pressure, and configurations far from the thermodynamic convex hull. Since such limitations are not always apparent a priori, comparing several independent uMLIPs provides a simple first check. Deviating predictions among models are a clear warning sign that the results cannot be trusted without further verification, for example by performing DFT calculations for a representative subset of clusters.

Figure 2. High-throughput screening of the lattice parameters of several solid solutions. Computed with MACE-MPA-0-medium, MatterSim-5M and PET-OMATPES-L with comparison to experiment. Ag1−x_{1-x}Aux_x and Cu1−x_{1-x}Nix_x are in the FCC phase, all other materials are in the BCC phase. For each material, the EGQCA average (solid line) and standard deviation (shaded area) were taken at 1300 K. Experimental data taken from Ag1−x_{1-x}Aux_x [81], Cu1−x_{1-x}Nix_x [82], Mo1−x_{1-x}Wx_x [83], Nb1−x_{1-x}Tax_x [84, 85], Nb1−x_{1-x}Zrx_x [85, 86], Ta1−x_{1-x}Hfx_x [84, 87, 88], Ta1−x_{1-x}Zrx_x [84, 86, 87], Ti1−x_{1-x}Vx_x [89, 90], V1−x_{1-x}Crx_x [91] and were digitized when necessary using PlotDigitizer (https://plotdigitizer.com).

Cluster reduction

One of the main advantages of the EGQCA method is that it allows any physical property to be investigated across the entire composition range. In practice, however, its applicability is limited by the cost of evaluating that property for each cluster. To overcome this, we exploit the fact that clusters with the same number of substituted atoms often exhibit similar physical properties, allowing the full cluster ensemble to be represented by a much smaller subset of configurations. We developed a dedicated cluster-selection algorithm that ranks clusters according to their occurrence probabilities integrated over the composition range and selects the most relevant configurations at each cluster composition xjx_j. To preserve coverage of the full composition range, at least one cluster per xjx_j is retained.

Possible routes to improve the description are to fine-tune a uMLIP or to train an interatomic potential specifically for the system. However, for disordered systems, this remains challenging due to the limited availability of suitable training data and the large number of possible atomic configurations. Nonetheless, here we trained a dedicated EDDP [73, 74] on PBE+D4 [104, 105] data to describe the R3ˉ\bar{3}m structure of (Bi1−x_{1-x}Sbx_x)2_2Se3_3 over the entire composition range, with the results shown in Fig. 4. The EDDP reproduces the experimental volumes across the measured range and significantly improves upon the DFT reference of Mota et al. [38]. This improved agreement can be attributed both to the larger cluster set derived from the 2×2×22 \times2 \times2 supercell, which the EDDP makes computationally accessible, and to training data that explicitly account for van der Waals interactions, which are essential for accurately describing the interlayer separation.

We applied this approach to Nb-Ti in the BCC β\beta-phase at 300 GPa, where high pressure is necessary to dynamically stabilize the pure Ti reference cluster. Ground-state energies and densities of states were obtained from DFT calculations for each cluster, with the DOS at the Fermi level NεFN_{\varepsilon_F} serving as a key observable to test the validity of the cluster reduction algorithm. Importantly, clusters sharing the same number of substituted atoms exhibit similar NεFN_{\varepsilon_\mathrm{F}} values, confirming that the electronic structure of the Nb-Ti system is governed primarily by composition rather than the exact arrangement of atoms within a cluster. As shown in Fig. 5, a reduced set of just 17 clusters, out of the original 331, is sufficient to reproduce the compositional dependence of NεFN_{\varepsilon_\mathrm{F}}. Increasing the set to 44 clusters yields only marginal improvement. These results demonstrate the effectiveness of the cluster reduction algorithm for Nb1−x_{1-x}Tix_x.

Figure 3. Lattice parameters of Alx_xGa1−x_{1-x}N and Inx_xGa1−x_{1-x}N. EGQCA average (solid line) and standard deviation (shaded area) for the lattice parameter of Alx_xGa1−x_{1-x}N and Inx_xGa1−x_{1-x}N at T=950T = 950 K as computed with DFT and the PET-OMATPES-L model. The experimental data for Inx_xGa1−x_{1-x}N is taken from Ref. [92], that for Alx_xGa1−x_{1-x}N from Ref. [93] and was extracted using PlotDigitizer (https://plotdigitizer.com).

Figure 4. Volume of (Bi1−x_{1-x}Sbx_x)2_2Se3_3. EGQCA average (solid line) and standard deviation (shaded area) for the volume of (Bi1−x_{1-x}Sbx_x)2_2Se3_3 at T=300T = 300 K as predicted by the MatterSim-5M, MACE-MPA-0-medium, PET-OMATPES-L models, and a system-specific EDDP. The predictions are compared to experimental data (Devidas) [94] and to DFT results (Mota) [38], for which we recomputed the EGQCA average with our code from the published cluster data.

Figure 5. DOS at the Fermi level of Nb1−x_{1-x}Tix_x. EGQCA average of the DOS at the Fermi level for Nb1−x_{1-x}Tix_x under 300 GPa pressure at 800 K for all clusters of the 2×2×22 \times2 \times2 supercell compared to the reduced subsets of 17 and 44 clusters, respectively.

Notably, this reduced set can be identified already with uMLIPs. We use MatterSim-5M, whose training data cover pressures up to 1000 GPa [55]. Applying the algorithm to its energies selects largely the same clusters, with 15 of the 17 shared for the smaller subset and 37 of 44 for the larger one, showing that uMLIPs reliably pick out the configurations that dominate the thermodynamics of the system.

Miscibility gap

A key strength of EGQCA is that it provides direct access to the phase stability of solid solutions, allowing us to determine whether an alloy remains homogeneous or separates into phases of different composition. The central quantity in this context is the miscibility gap, which defines the composition range where a homogeneous solid solution is thermodynamically unfavorable with respect to phase separation. Determining the miscibility gap is essential for materials design, as it identifies the compositions that can be experimentally realized as a single homogeneous phase. However, phase separation can even be beneficial, as it can be exploited to engineer microstructures with improved mechanical properties, including hardness, strength, and ductility [106]. Predicting miscibility gaps is therefore essential for both identifying suitable synthesis conditions and for designing materials in which controlled phase separation is desirable.

The formation of a miscibility gap is governed by the competition between the enthalpy and entropy of mixing. When mixing is energetically unfavorable, a homogeneous solid solution may lower its free energy by separating into two phases of different compositions. At sufficiently high temperatures, the entropy of mixing favors the homogeneous phase, whereas at lower temperatures the enthalpic contribution can dominate, giving rise to a miscibility gap. The stability of the solid solution is therefore determined by the shape of the mixing Gibbs free energy ΔG(x,T)\Delta G(x,T), from which two important boundaries can be identified: the binodal and spinodal lines.

Figure 6. Miscibility gap and free energy at T=900T = 900 K of Inx_xGa1−x_{1-x}N. Calculated from DFT and MatterSim-5M data. The predicted critical temperatures are TcmDFT=1531.9T_{\mathrm{cm}}^{\mathrm{DFT}} = 1531.9 K and TcmMatterSim=1440.0T_{\mathrm{cm}}^{\mathrm{MatterSim}} = 1440.0 K for DFT and MatterSim-5M, respectively. The vertical lines indicate the location of the spinodal and binodal points at T=900T = 900 K.

The binodal line defines the equilibrium compositions of the two coexisting phases and is obtained through the common-tangent construction applied to ΔG(x,T)\Delta G(x,T). The spinodal line, in contrast, marks the limit of stability against infinitesimal compositional fluctuations and is determined by the inflection points of the free-energy curve, where ∂2ΔG/∂x2=0\partial^2\Delta G/\partial x^2 = 0. Together, these boundaries divide the composition range into three distinct regimes. Outside the binodal, the homogeneous solid solution is thermodynamically stable. Between the binodal and spinodal, the system is metastable: small compositional fluctuations are unfavorable, but sufficiently large fluctuations can drive phase separation through nucleation and growth. For regions inside of the spinodal line, the free-energy curvature becomes negative, and even infinitesimal fluctuations lower the free energy (ignoring gradient terms), leading to spontaneous phase separation without a nucleation barrier, a process known as spinodal decomposition. As the temperature increases, the binodal line and spinodal line approach each other and eventually meet at the critical temperature TcmT_{\mathrm{cm}}, above which the miscibility gap disappears and the solid solution becomes stable across the entire composition range.

Both boundaries can be determined directly from ΔG(x,T)\Delta G(x,T), which is already obtained as part of the standard thermodynamic assessment in EGQCA. Within the approximation that

neglects vibrational contributions, only the ground-state energies of the clusters are required, making the evaluation of miscibility gaps essentially free once these energies are available. Combining EGQCA with uMLIPs therefore provides an efficient route to predicting phase stability, substantially reducing the computational cost associated with generating the cluster data.

To demonstrate this capability, we return to the Inx_xGa1−x_{1-x}N system discussed above. As shown in Fig. 6, MatterSim-5M reproduces the miscibility gap predicted by DFT at the PBE level remarkably well. It gives the same critical composition, xc=0.39x_{\mathrm{c}} = 0.39, and the critical temperatures differ by only about 6%. The agreement extends even further, as both approaches predict nearly identical shapes for the mixing Gibbs free energy, with MatterSim-5M yielding slightly lower values at intermediate compositions. The other two uMLIPs, PET-OMATPES-L and MACE-MPA-0-medium, yield qualitatively similar miscibility gaps as shown in Fig. 5 in the SM. Importantly, this agreement is obtained at substantially reduced computational cost. MatterSim-5M completes the calculation in just 74.0 s on a single CPU core of a standard workstation, compared to 1836.6 core-hours for the full DFT workflow, including convergence tests and structural relaxation. This represents a reduction of nearly five orders of magnitude in computational effort, demonstrating the potential of uMLIPs for high-throughput investigations of alloy thermodynamics.

While the results for Inx_xGa1−x_{1-x}N show that ground-state energies alone can already yield an accurate description of alloy thermodynamics, lattice vibrations can play an equally important role in determining phase stability at finite temperatures [107–109]. In particular, differences in the vibrational free energies of the alloy configurations and their end-members can significantly modify the mixing Gibbs free energy, shifting the miscibility gap and its critical temperature [110, 111]. Accounting for these contributions is therefore essential for a reliable description of many alloy systems.

To address this, the egqca package supports the inclusion of vibrational contributions through Eq. (9). The phonon DOS can be calculated either with DFT or with MLIPs. For DFT, the egqca package can provide the necessary input files for each cluster, whereas the MLIP approach is entirely included within the package. The implementation builds on the ase.Phonons 3 class, which calculates the harmonic force constants through finite differences, using the chosen interatomic potential to evaluate the atomic forces. The resulting phonon density of states is then used to calculate the vibrational free energy of each cluster, which enters the mixing Gibbs free energy within the EGQCA framework. This allows the effects of lattice vibrations on phase stability to be incorporated without additional computational expense of conventional first-principles phonon calculations.

The importance of vibrational contributions has already been demonstrated within the EGQCA framework for Nb1−x_{1-x}Vx_x using DFT [33]. In this system, calculations based on ground-state energies alone overestimate the experimentally reported critical temperature of the miscibility gap, 1077 K [113], by about 15%. Including vibrational contributions substantially lowers the critical temperature, bringing the DFT predictions into agreement with experiment. We use this system to assess whether uMLIPs can also capture the influence of lattice vibrations on alloy thermodynamics.

Figure 7a and Figure 7b compare the miscibility gaps calculated with PET-OMATPES-L against the DFT results, without and with vibrational contributions, respectively. In both cases, the uMLIP reproduces the overall shape of the DFT miscibility gap and, importantly, captures the reduction in critical temperature upon including phonons. The resulting prediction of Tcm=1290T_{\mathrm{cm}} = 1290 K differs from experiment by approximately 20 %. MatterSim-5M and MACE-MPA-0-medium likewise capture the phonon-induced reduction of TcmT_{\mathrm{cm}} (Supplementary Fig. 6). Together with the Inx_xGa1−x_{1-x}N results, this suggests that selected uMLIPs can reproduce qualitative thermodynamic trends in solid solutions, including changes in phase stability associated with configurational and vibrational contributions.

Figure 7. Miscibility gap of Nb1−x_{1-x}Vx_x. Calculated with PET-OMATPES-L and compared to DFT [33], recomputed with the present entropy expression (M=NM = N). The left panel (a) shows the miscibility gaps without phonon contribution, while in the right panel (b) phonon contributions are included.

The combination of EGQCA and uMLIPs opens up possibilities beyond modeling individual solid solutions. The miscibility gaps considered here describe phase separation within a given phase, but the same framework can, in principle, be applied to different competing structures. By evaluating and comparing their Gibbs free energies, it becomes possible to construct complete phase diagrams across composition, temperature, and pressure, including transitions between different crystal structures. The computational efficiency of uMLIPs makes such investigations particularly attractive for high-throughput applications.

Summary

We have introduced the egqca code package, an easy-to-use framework for describing the thermodynamics of solid solutions across the full range of solubility. It treats the contributions in disordered systems on an equal footing through the mixing enthalpy, the configurational entropy, and the vibrational free energy. The entire workflow is integrated into a single package, covering everything from cluster generation and ground-state energy evaluation - either directly through universal machine-learned interatomic potentials or by generating the corresponding DFT input files - to the statistical modeling of physical properties as a function of composition.

Coupling egqca to universal MLIPs addresses the bottleneck of evaluating ground-state energies when the cluster space grows into the thousands or when the individual clusters themselves become large. Beyond the energy evaluation itself, uMLIPs can be useful for pre-relaxing structures or performing convergence tests with respect to cluster size. The Inx_xGa1−x_{1-x}N miscibility gap illustrates what this means in practice, with a workflow of well over a thousand core-hours collapsing to under two minutes while the physics remains essentially unchanged.

Our benchmarks show that uMLIPs accurately reproduce composition-dependent properties such as lattice parameters, miscibility gaps, and their vibrational corrections for a broad range of systems. For certain chemically and structurally complex cases, however, the model predictions can deviate from the experimental data. In such cases, the reliability of the results can be assessed by comparing several independent potentials with one another and with DFT calculations for a few representative clusters. Where uMLIPs fail and DFT is too expensive, MLIPs trained specifically for the system offer a route to retain high accuracy at a manageable computational cost.

Furthermore, the egqca package provides an algorithm that ranks clusters by their integrated probability weight and selects the most relevant ones at each composition. Retaining only these dominant clusters preserves the essential physics while reducing the expansion enough to make demanding observables accessible across the full composition range. For Nb1−xTix\mathrm{Nb}_{1-x}\mathrm{Ti}_x under pressure this reduces the set from 331 to 17 clusters while still capturing the compositional dependence of NεFN_{\varepsilon_F}.

Taken together, these features make egqca a fast and reliable tool for the thermodynamics of solid solutions over the full solubility range. It applies across chemically diverse systems and gives access to quantities ranging from electronic properties to the thermodynamics of phase stability. Future developments will extend the formalism to multi-component systems and to the explicit modeling of multiple phases, opening a route towards efficiently computed phase diagrams.

Methods

Nb1−xTix\mathrm{Nb}_{1-x}\mathrm{Ti}_x DFT calculations: The electronic properties of Nb1−xTix\mathrm{Nb}_{1-x}\mathrm{Ti}_x at 300 GPa were investigated from first principles in a 2×2×22 \times2 \times2 supercell. Electronic-structure calculations were performed within DFT [114, 115] using the Quantum ESPRESSO package [68, 69]. The electron–ion interaction was described using scalar-relativistic optimized norm-conserving Vanderbilt (ONCV) pseudopotentials [116, 117] from the PseudoDojo library [118], with exchange and correlation effects treated using the PBE functional [119]. The plane-wave kinetic-energy cutoff was set to 75 Ry, with a corresponding charge-density cutoff of 300 Ry. Brillouin-zone integrations were performed using unshifted 8×8×88 \times8 \times8 Monkhorst–Pack k-point meshes [120], with metallic occupations described by Methfessel–Paxton smearing [121] of 0.01 Ry. A self-consistency threshold of 10−1010^{-10} Ry was adopted for the electronic calculations.

Structural optimizations were carried out at a fixed external pressure of 300 GPa using the BFGS algorithm [122–125]. Both the lattice parameter and internal atomic coordinates were relaxed, while preserving the cubic symmetry of the underlying BCC supercell. To ensure consistent structural parameters, the relaxation workflow employed successive variable-cell optimizations, using the converged lattice parameter and atomic positions from each step as input for the next. These were followed by a fixed-cell relaxation of the internal coordinates and a final self-consistent electronic calculation using the optimized structure.

InxGa1−xN\mathrm{In}_x\mathrm{Ga}_{1-x}\mathrm{N} and AlxGa1−xN\mathrm{Al}_x\mathrm{Ga}_{1-x}\mathrm{N} DFT calculations: Density functional theory calculations were performed with the all-electron, atom-centered orbital code FHI-aims [66, 67] (version 250822.1), using the PBE-GGA exchange and correlation functional [119] and the atomic ZORA scalar-relativistic treatment. The 2020 intermediate species defaults were used for the basis sets and integration grids of Al, In, Ga and N. Calculations were spin-unpolarized. The clusters were derived from the 8-atom conventional cell of zinc-blende GaN (space group F4ˉ\bar{4}3m), giving five symmetry-inequivalent configurations. The Brillouin zone was sampled with a k-point density of 4 Å along each reciprocal lattice vector. A Gaussian occupation smearing of 0.1 eV was applied. Both the k-point density and the smearing were checked for convergence on the GaN and InN end members. Self-consistency thresholds were 10−910^{-9} eV for the total energy, 10−310^{-3} eV for the sum of eigenvalues and 10−810^{-8} for the charge density. Core states below −200-200 eV were kept frozen during the SCF cycle. Lattice parameters (with fixed cell angles) and atomic positions were relaxed with the trust-radius method using analytical forces and stress, until all residual forces were below 5×10−35 \times10^{-3} eV/Å.

EDDPs: Ephemeral data-derived potentials (EDDPs) combine a generalized Lennard-Jones descriptor with a lightweight neural network [73, 74]. Here, the potential was trained on DFT energies computed with CASTEP [126] using PBE+D4, a plane-wave cutoff of 340 eV, QC5 pseudopotentials, and a k-point spacing of 2π×0.052\pi\times0.05 Å−1^{-1}. The initial training data consisted of 3160 randomly perturbed supercells of up to 20 atoms, based on the R3ˉ\bar{3}m Bi2_2Se3_3 structure and with substitution of Sb for Bi along the (Bi1−x_{1-x}Sbx_x)2_2Se3_3 tie line. The potential was then refined with five cycles of active learning, in which EDDP minima were evaluated with DFT and added to the training set, resulting in a total of 3500 structures. This final potential was then used to model the 40-atom supercells used within the EGQCA.

uMLIPs: All structural relaxations with universal machine-learned interatomic potentials (uMLIPs) were performed with the egqca Python package [65], which interfaces the uMLIPs through the Atomic Simulation Environment (ASE, version 3.28.0) [112] and automates the relaxation of all clusters. We used MACE-MPA-0-medium [56] via mace-torch 0.3.15, MatterSim-v1.0.0-5M [55] via mattersim 1.2.3, and PET-OMAT PES-L [57] via upet 0.2.2. Atomic positions and the cell were relaxed together using the Frechet-CellFilter at zero external pressure, except for Nb-Ti where 300 GPa was used. The FIRE optimizer was used with a convergence criterion of fmax⁡=10−4f_{\max} = 10^{-4} eV/Å on the atomic and cell degrees of freedom. During relaxation, the cell metric was constrained to the Bravais lattice of the parent structure, while the atoms relaxed freely.

EGQCA: All EGQCA calculations were performed with the egqca Python package [65]. It generates the clusters, interfaces the DFT codes (FHI-aims, Quantum ESPRESSO and VASP) and the uMLIPs for the cluster relaxations, collects the cluster energies and lattice parameters, and carries out the thermodynamic assessment. Symmetry-inequivalent configurations of the substitutional sublattice, together with their degeneracies gjg_j, were generated with the Supercell program [58].

Appendix: the GQCA Entropy expression

As usual, we will use Boltzmann equation for the entropy SS of a microcanonical ensemble,

S=kBln⁡W(15)S = k_B \ln W \tag*{(15)}

in which kBk_B is Boltzmann constant and WW is the number of microstates, or microscopic configurations, in which the components (i.e., atomic species, for instance) of the system can be arranged.

As described in the main paper, NN is the number of (permutable) sites in the lattice, each occupied by one of two possible species, AA and BB. The total number of each species will be indicated by NAN_A, and NBN_B, respectively, with NA+NB=NN_A + N_B = N. The atomic fractions will be denoted as xx for BB and 1−x1 - x for AA, such that NB=NxN_B = Nx and NA=N(1−x)N_A = N(1 - x). Now, if all sites are occupied independently by the NN atomic nuclei, they can be arranged in a total of

Wpoint=N!NA!NB!(16)W_{\mathrm{point}} = \frac{N!}{N_A!N_B!} \tag*{(16)}

ways. Points, however, cannot be occupied independently unless we have an ideal solution. The GQCA accounts for correlations between atoms by treating the lattice as an ensemble of M=qNM = qN clusters of atoms and correcting for the overcounting of lattice points shared between clusters. We will consider that each cluster is a geometric figure (a pair, a triangle, a cube, etc.) consisting of nn lattice sites. All clusters have the same geometry, differing only by their site occupations. A key factor is that the clusters overlap with each other. The factor qq is the cluster coordination number, or the number of clusters per lattice point. For instance, for a 2D square lattice, and considering the nearest-neighbor (NN) pair as cluster, q=2q = 2, and for an fcc lattice, still using the NN pair as cluster, q=6q = 6. Now, considering for a moment that all MM clusters are independent, the number of ways of arranging them throughout the lattice is

Wcluster=M!∏jMj!(17)W_{\mathrm{cluster}} = \frac{M!}{\prod_j M_j!} \tag*{(17)}

in which MjM_j is the number of clusters of type jj. By cluster type we mean clusters with the same composition but different site occupations. For instance, if the cluster is a NN pair in a binary AA–BB alloy, there will by four types of clusters: AA, AB, BA and BB. In this way, we are considering that the pairs AB and BA are different (i.e., non-degenerate). If we consider that some pairs are energetically degenerate and symmetrically equivalent, we can in principle separate the pairs by classes and rewrite WclusterW_{\mathrm{cluster}} as

Wcluster=M!∏jMj!∏j(gj)Mj,(18)W_{\mathrm{cluster}} = \frac{M!}{\prod_j M_j!}\prod_j (g_j)^{M_j}, \tag*{(18)}

because, once a cluster is assigned to a class, there are gjg_j ways to distribute the atomic species between its nn points, and there are MjM_j clusters in class jj. It should be noted that, in Eq. (17), the index jj runs through all types of (non-degenerate) clusters, while, in Eq. (18), the index jj runs through all classes of degenerate clusters. In the binary example used previously, using the NN pair as cluster, we would have three classes: AA, AB and BB, with degeneracies 1, 2, and 1, respectively. Since we are dealing with a binomial distribution, the degeneracies follow the relationship

∑jgj=2n.(19)\sum_j g_j = 2^n . \tag*{(19)}

The MM clusters are not independent, though, because they overlap at lattice sites. Eq. (18) must be duly corrected to take that into account. Because the clusters overlap, each lattice site is shared among nqnq clusters, and, therefore, from Eq. (18) we must discount the configurations of nq−1nq - 1 points from WclusterW_{\mathrm{cluster}}, leaving the configurations for only one point in the final expression. This means that the total number of configurations of a distribution of MM overlapping clusters in the lattice will be given by

W=WclusterWpointnq−1.(20)W = \frac{W_{\mathrm{cluster}}}{W_{\mathrm{point}}^{nq-1}} . \tag*{(20)}

Other corrections, such as triplets, quadruplets, and other subclusters should also be included to take multi-site correlations into account. When corrections for all subclusters belonging to the maximal cluster are taken into account, we arrive at the Cluster Variation Method (CVM) entropy expression. The GQCA includes only point corrections. From Eq. (20), and using Eqs. (17) and (18), this leads to

W=M!∏jMj!∏j(gj)Mj(N!NA!NB!)1−nq(21)W = \frac{M!}{\prod_j M_j!}\prod_j (g_j)^{M_j}\left(\frac{N!}{N_A!N_B!}\right)^{1-nq} \tag*{(21)}

Introducing now the cluster class probabilities pjp_j, given by

pj=MjM,(22)p_j = \frac{M_j}{M} , \tag*{(22)}

with

∑jpj=1,(23)\sum_j p_j = 1 , \tag*{(23)}

and using Stirling’s approximation

ln⁡u!=uln⁡u−u+O(ln⁡u)(24)\ln u! = u \ln u - u + O(\ln u) \tag*{(24)}

in Boltzmann equation for the entropy, we arrive at

S=−kBM∑jpjln⁡pjgjS = - k_B M \sum_j p_j \ln\frac{p_j}{g_j}
−kBN(1−nq)[xln⁡x+(1−x)ln⁡(1−x)],(25){}- k_B N(1-nq)[x \ln x + (1-x)\ln(1-x)] , \tag*{(25)}

where jj runs through all cluster classes. Eq. (25), can be modified by introducing the random class cluster probabilities pj0p_j^0, given by

pj0=gj1n−njxnj,(26)p_j^0 = g_j 1^{n-n_j}x^{n_j} , \tag*{(26)}

in which njn_j is the number of BB nuclei in a cluster of class jj, with 0≤nj≤n0 \le n_j \le n. Eq. (26) gives the probability of randomly placing njn_j nuclei of type BB and n−njn-n_j of type AA in a cluster of class jj with degeneracy gjg_j. These are also called “a priori” cluster probabilities. One constraint comes from the balance on the total number of each species:

∑jpjnj=nx(27)\sum_j p_j n_j = nx \tag*{(27)}

(with a similar equation for AA), which simply states that the total number of nuclei of any type in the lattice must remain constant. Isolating gjg_j from Eq. (26) and substituting it into Eq. (25), together with Eq. (27), leads, after simplification using M=NqM=Nq, to

S=−kBM∑jpjln⁡pjpj0−kBN[xln⁡x+(1−x)ln⁡(1−x)](28)S=-k_BM\sum_j p_j\ln\frac{p_j}{p_j^0}-k_BN[x\ln x+(1-x)\ln(1-x)] \tag*{(28)}

Eq. (28) is the usual form for the entropy in GQCA, being equivalent to Eq. (5). It can be readily seen that Eq. (4) will result in the same expression for the entropy.

In general, because the clusters overlap throughout the lattice, each point takes part in nqnq clusters (remember that qq is the cluster coordination number, i.e., the number of clusters per lattice point in the lattice, and nn is the number of points in a cluster). On the other hand, as stated in the main text, if a stacking of unit cells (that is, a supercell) is used as cluster, and the clusters overlap with each other at lattice sites, each point will be part of nn clusters. In this case, therefore, we have nq=nnq=n, or q=1q=1, which means that M=NM=N. For other kinds of cluster, in particular for smaller clusters, such as pairs or tetrahedra, qq will not be, in general, equal to unity, but, as always, it will come from the geometry of the lattice.

Author Contributions

PNF conceived the work. DS, LW, LTFE, and PNF developed the code. LTFE revised the thermodynamic fundamentals and derivations. DS and LW ran the EGQCA benchmark. DS and PNF performed the DFT calculations. KB trained the EDDPs. RM assisted with the ML models. DS, LW, and PNF wrote the first draft. SDC, EM, EK, CP, MA, CH participated in the discussions. PNF supervised this project. All authors revised the manuscript.

Declaration of competing interest

All authors declare no financial or non-financial competing interests.

Acknowledgments

We thank Lara Kühl Teles and Marcelo Marques for insightful discussions. PNF acknowledges support from the Austrian Science Fund (FWF) under project DOI 10.55776/ESP8588124. DS, LW, and CH acknowledge support from the Austrian Science Fund (FWF) under project DOI 10.55776/PAT1157425. KB acknowledges support from the UK Engineering and Physical Sciences Research Council [EP/W524633/1]. The computational results have been achieved using local workstations at TU Graz, Austrian Scientific Computing (ASC) infrastructure, and LUMI. KB acknowledges the EuroHPC Joint Undertaking for awarding this project access to the EuroHPC supercomputer LUMI, hosted by CSC (Finland) and the LUMI consortium through a EuroHPC Regular Access call.

Data availability

All data used to prepare this manuscript are freely available on Zenodo (https://doi.org/10.5281/zenodo.24534160).

Code availability

The underlying code for this study is available on github (https://github.com/egqca/egqca) and as python package eggqca (https://pypi.org/project/egqca/).

Declaration of generative AI and AI-assisted technologies in the writing process

In preparing this paper, the authors used large language models to help improve readability and language. After using these tools, the authors reviewed and edited the content as needed and take full responsibility for the content of the published article.

WORKFLOW

Building on the theory introduced in the main text, we developed an easy-to-use Python package to streamline the simulation of alloys. The egqca code package provides an end-to-end solution, combining the creation of all non-equivalent clusters, ground state energy calculations at the level of machine-learning interatomic potentials (MLIPs), such as universal MLIPs (uMLIPs), and the thermodynamic averaging into one framework. Beyond the energies obtained from the machine learning models, the code is also able to produce input files for DFT calculations with FHI-aims [1, 2], Quantum ESPRESSO [3, 4], and VASP [5, 6, 7] to acquire more accurate results. The code is designed for quasi-binary alloys of the form A1−xBxC\mathrm{A}_{1-x}\mathrm{B}_{x}\mathrm{C}, and supports optional pressure-volume and vibrational free-energy contributions. The workflow consists of three steps, as shown in Fig. 1 in the main text:

Clusters: The standard EGQCA workflow starts from a CIF file in which the substituting species is defined on the same crystallographic site as the original species with zero occupancy. The function set_up_clusters_and_dft() performs the initial setup from this CIF file. It calls the external supercell [8] executable to generate all non-equivalent clusters for each substitution number njn_j. In this step, also the clusters.dat file is created, which constitutes the main input file for the EGQCA model. It contains columns with the cluster id, the substitution number njn_j, the total number of atoms, the composition xjx_j, the degeneracy gjg_j and the ground state energy EjE_j (in Ry). At this point, the ground state energies are still marked as missing; they are filled in after the DFT or uMLIP calculations have been finished. The generated clusters are placed in folders of the form $S/*S_*i_*w* where S∗S* is the number of substituted atoms, i∗i* is the cluster index, and w∗w* is the degeneracy of that cluster. For each cluster, the code creates the subdirectory vc-relax and optionally writes DFT relaxation input files for either Quantum ESPRESSO, FHI-aims or VASP if the corresponding parameters are specified. Quantum ESPRESSO input generation requires a pseudopotential directory, VASP the path to the POTCAR directory and FHI-aims input generation requires a species defaults directory.

from egqca import set_up_clusters_and_dft

aims_par = {
    "species_dir": "/path/to/fhi-aims/species_defaults",
    "xc": "pbe",
    "relax_geometry": "bfgs 1e-3",
    "relax_unit_cell": "full",
    "compute_forces": True,
    }

set_up_clusters_and_dft(
    supercell_program="/path/to/supercell",
    path_to_cif="/path/to/structure.cif",
    supercell_size=2x2x1,
    out_dir="/path/to/egqca_calculation/",
    aims_par=aims_par,                         # optional
    kpts=(6, 6, 6),                            # optional
    )

There are also functions to set up the dedicated input-files for band-structure and phonon calculations.

Relaxation: For each cluster the ground state energy and optionally the phonon density of states (DOS) is needed, which can be obtained either with DFT or MLIPs. The egqca package interfaces directly with uMLIPs and EDDPs to obtain these quantities. The machine-learning workflow is intended to estimate relaxed structures, energies, lattice parameters, and phonon densities of states using machine-learning interatomic potentials. The main entry point is:

from egqca import run_ml_relaxation

out_dir = "/path/to/egqca_calculation/"

run_ml_relaxation(
    out_dir,
    ML_model="mattersim-5m",
    save_relaxed_structure=True,
    relaxation_constraint="hexagonal",
    bravais_supercell = (2,2,1),
    calc_phonons=True,
    )

For every generated cluster, the ML workflow reads the corresponding CIF structure, assigns a machine-learning calculator, and performs a cell and geometry relaxation using ASE [9]. The default optimizer is FIRE. Symmetry constraints are applied through relaxation_constraint, which either preserves the space group of each cluster via ASE’s FixSymmetry, or, given a Bravais-lattice key or crystal-system name, restricts the cell metric and stress to the symmetry-allowed subspace of the requested lattice type through our FixBravaisCell constraint. Supported ML backends include UPET-based models, MatterSim, MACE, GRACE, and EDDPs. Any other MLIP with an ASE calculator interface providing energies, forces, and stresses can be used by passing it as a custom calculator. The ML dependencies are not part of the minimal installation and must be installed separately through the package extras. The resulting ML-generated files can be used in the same EGQCA thermodynamic workflow as DFT-derived input files. This allows rapid screening, comparison with DFT results, identification of the most important clusters or construction of approximate thermodynamic phase diagrams before performing more expensive first-principles calculations. The ML workflow can also calculate phonon density-of-states files using ASE phonon utilities and the selected ML potential. These phonon DOS files can subsequently be included in the EGQCA calculation to estimate vibrational free-energy contributions.

EGQCA: After the DFT or ML relaxation steps are complete, the thermodynamic model is initialized through the EGQCA class. This class reads the cluster information from clusters.dat and stores the cluster energies, compositions, degeneracies, and metadata required for the statistical thermodynamic calculation. If the energy column in clusters.dat contains the keyword missing, the class can automatically extract the total energies from the DFT output files located in the specified cluster subfolders. Optional files such as volume.dat and phonon density-of-states files can also be supplied at this stage to include pressure-volume and vibrational free-energy contributions.

from egqca import EGQCA

out_dir = "/path/to/egqca_calculation/"

model = EGQCA(
    datafile=out_dir + "DFT/clusters.dat",
    dft_out_file_name="scf.out",
    dft_out_file_subfolder="vc-relax",
    volume_file=out_dir + "DFT/volume.dat",  # optional
    pressure_GPa=300.0,  # optional
    phonon_file_name="phonon.dos",  # optional
)

The thermodynamic assessment follows naturally:

import numpy as np

x_grid = np.arange(0, 1.0, 1.0e-3)
Tlist = [600.0, 800.0, 1000.0, 1400.0]

model.thermodynamic_assessment(x_grid, Tlist)

Additional cluster-resolved properties can be averaged with:

model.average_properties("path/to/properties.dat")

Here, properties.dat contains a cluster ID column followed by one or more properties. The code computes the probability-weighted mean and standard deviation as functions of composition and temperature. The cluster reduction workflow identifies a smaller subset of clusters that still captures the dominant thermodynamic behavior of the full EGQCA ensemble. This is in particular useful when subsequent calculations, such as the superconducting TcT_{\mathrm{c}}, are too expensive to perform for every generated structure.

import numpy as np
Runtime of the MatterSim-5M, MACE-MPA-0-medium and PET-OMAT PES-L model compared to the DFT calculation

Figure 1 (PDF p. 17). Runtime of the MatterSim-5M, MACE-MPA-0-medium and PET-OMATPES-L model compared to the DFT calculation for all clusters of Inx_xGa1−x_{1-x}N.

x_grid = np.arange(0.0, 1.0, 1.0e-3)
Tlist = [600.0, 800.0, 1000.0, 1400.0]

# reduced sets containing the top 2 %, 5 % and 10 % of clusters
# per substitution number
S_clusters = model.cluster_importance(x_grid, Tlist,
    top_percentage=[0.02, 0.05, 0.1])

# S_clusters[T][percentage] -> array of the selected cluster IDs
print(S_clusters[1000.0][0.05])

The reduction is based on the equilibrium occurrence probabilities pj(x,T)p_j(x,T) obtained from the EGQCA model. At each temperature, it estimates the importance of every cluster by integrating its occurrence probability over composition. Clusters with the largest integrated probability weights are then selected separately within each substitution number njn_j. This ensures that the reduced set still contains representative clusters at every cluster composition xjx_j.

RUNTIME

The uMLIPs reach accuracies comparable to DFT, while being orders of magnitude faster. In Fig. 1, the total runtime of the three tested foundational models compared to DFT for the evaluation of all clusters of the Inx_xGa1−x_{1-x}N system is shown. The former finish within minutes, while DFT takes over 1800 core hours for structural relaxation and convergence of the parameters.

Fig. 2 shows a histogram of the runtime for all 1056 clusters of the 2 × 2 × 2 supercell for (Bi1−x_{1-x}Sbx_x)2_2Se3_3. There is a difference in the runtime between the models, with simpler models generally being faster. For this particular system, PET-OMATPES-L and MACE-MPA-0-medium contain some substantially slower outliers, which is an indicator for poor convergence of the corresponding clusters.

Histogram of the runtimes of MatterSim-5M, MACE-MPA-0-medium and PET-OMATPES-L for all clusters of $(\mathrm{Bi}_{1-x}\mathrm{Sb}_x)_2\mathrm{Se}_3$

Figure 2 (PDF p. 18). Histogram of the runtimes of MatterSim-5M, MACE-MPA-0-medium and PET-OMATPES-L for all clusters of (Bi1−xSbx)2Se3(\mathrm{Bi}_{1-x}\mathrm{Sb}_x)_2\mathrm{Se}_3. The dashed vertical lines indicate the mean runtime of the corresponding model.

Lattice parameter of $\mathrm{Al}_x\mathrm{Ga}_{1-x}\mathrm{N}$ and $\mathrm{In}_x\mathrm{Ga}_{1-x}\mathrm{N}$

Figure 3 (PDF p. 18). Lattice parameter of AlxGa1−xN\mathrm{Al}_x\mathrm{Ga}_{1-x}\mathrm{N} and InxGa1−xN\mathrm{In}_x\mathrm{Ga}_{1-x}\mathrm{N} at T=950T = 950 K for MatterSim-5M, MACE-MPA-0-medium and PET-OMATPES-L compared to DFT data and experimental data taken from Ref. [10] (InxGa1−xN\mathrm{In}_x\mathrm{Ga}_{1-x}\mathrm{N}) and from Ref. [11] (AlxGa1−xN\mathrm{Al}_x\mathrm{Ga}_{1-x}\mathrm{N}).

InxGa1−xN\mathrm{In}_x\mathrm{Ga}_{1-x}\mathrm{N} and AlxGa1−xN\mathrm{Al}_x\mathrm{Ga}_{1-x}\mathrm{N}

Fig. 3 contains the EGQCA prediction for the lattice parameters of InxGa1−xN\mathrm{In}_x\mathrm{Ga}_{1-x}\mathrm{N} and AlxGa1−xN\mathrm{Al}_x\mathrm{Ga}_{1-x}\mathrm{N}, similar to Fig. 3 in the main text, but additionally including the results from MACE-MPA-0-medium and MatterSim-5M. Fig. 4 shows the occurrence probabilities for the five clusters of InxGa1−xN\mathrm{In}_x\mathrm{Ga}_{1-x}\mathrm{N}, as also shown in the flowchart (Fig. 1) in the main text.

Miscibility gap

In Fig. 5, we revisit the miscibility gap of InxGa1−xN\mathrm{In}_x\mathrm{Ga}_{1-x}\mathrm{N} from the main text and additionally include the results for PET-OMATPES-L and MACE-MPA-0-medium. The results are qualitatively unchanged, with PET-OMATPES-L (MACE-MPA-0-medium) predicting a slightly higher (lower) TcmT_{\rm cm} when compared to DFT. Analogously, Fig. 6 extends the

Occurrence probabilities of $\mathrm{In}_x\mathrm{Ga}_{1-x}\mathrm{N}$

Figure 4 (PDF p. 18). Occurrence probabilities of InxGa1−xN\mathrm{In}_x\mathrm{Ga}_{1-x}\mathrm{N} obtained from the DFT calculations.

Miscibility gap and free energy at $T = 900$ K of $\mathrm{In}_x\mathrm{Ga}_{1-x}\mathrm{N}$

Figure 5 (PDF p. 18). Miscibility gap and free energy at T=900T = 900 K of InxGa1−xN\mathrm{In}_x\mathrm{Ga}_{1-x}\mathrm{N}. Calculated from DFT, MatterSim-5M, PET-OMATPES-L and MACE-MPA-0-medium data.

Nb1−xVx\mathrm{Nb}_{1-x}\mathrm{V}_x miscibility gap of the main text by the results for MatterSim-5M and MACE-MPA-0-medium. Both models likewise capture the reduction of TcmT_{\rm cm} upon including vibrational contributions.

High-throughput screening

We quantified the accuracy of the high-throughput screening of the lattice parameter of the intermetallics by looking at the mean-relative error:

MRE=1N∑i∣amodel(xi)−aexp(xi)∣aexp(xi).(29)\mathrm{MRE} = \frac{1}{N}\sum_i \frac{\left|a_{\mathrm{model}}(x_i)-a_{\mathrm{exp}}(x_i)\right|}{a_{\mathrm{exp}}(x_i)}. \tag*{(29)}

The model curve is evaluated at the experimental composition xix_i by linear interpolation. An overview of the MREs for each compound and uMLIP is given in Table I.

CompoundPhaseNNMACE-MPA-0-mediumMatterSim-5MPET-OMATPES-L
Ag1−x_{1-x}Aux_xFCC132.0102.1460.900
Cu1−x_{1-x}Nix_xFCC50.2960.3011.217
Mo1−x_{1-x}Wx_xBCC70.2370.7510.221
Nb1−x_{1-x}Tax_xBCC20.4850.5530.353
Nb1−x_{1-x}Zrx_xBCC70.5100.3700.325
Ta1−x_{1-x}Hfx_xBCC110.4690.5230.331
Ta1−x_{1-x}Zrx_xBCC60.5770.7280.489
Ti1−x_{1-x}Vx_xBCC121.4000.7650.869
V1−x_{1-x}Crx_xBCC111.0101.0211.188
All materials740.9510.9310.708

Table I. Mean relative error (MRE) of the EGQCA lattice parameter aa at T=1300T = 1300 K with respect to experiment, for every material and every machine-learning interatomic potential. NN is the number of experimental points for each material. In the last row all N=74N = 74 points are combined.

Miscibility gaps of Nb$_{1-x}$V$_x$ without and with phonon contributions

Figure 6 (PDF p. 19). Miscibility gap of Nb1−x_{1-x}Vx_x. Calculated with PET-OMATPES-L, MatterSim-5M and MACE-MPA-0-medium and compared to DFT [12], recomputed with the present entropy expression (M=NM = N). The left panel (a) shows the miscibility gaps without phonon contribution, while in the right panel (b) phonon contributions are included.

References

  1. [1]V. Blum, R. Gehrke, F. Hanke, P. Havu, V. Havu, X. Ren, K. Reuter, and M. Scheffler, Computer Physics Communications 180, 2175–2196 (2009).
  2. [2]S. Lehtola, C. Steigmann, M. J. Oliveira, and M. A. Marques, SoftwareX 7, 1–5 (2018).
  3. [3]P. Giannozzi, S. Baroni, N. Bonini, M. Calandra, R. Car, C. Cavazzoni, D. Ceresoli, G. L. Chiarotti, M. Cococcioni, I. Dabo, A. D. Corso, S. de Gironcoli, S. Fabris, G. Fratesi, R. Gebauer, U. Gerstmann, C. Gougoussis, A. Kokalj, M. Lazzeri, L. Martin-Samos, N. Marzari, F. Mauri, R. Mazzarello, S. Paolini, A. Pasquarello, L. Paulatto, C. Sbraccia, S. Scandolo, G. Sclauzero, A. P. Seitsonen, A. Smogunov, P. Umari, R. M. Wentzcovitch, Journal of Physics: Condensed Matter 21, 395502 (2009).
  4. [4]P. Giannozzi, O. Andreussi, T. Brumme, O. Bunau, M. B. Nardelli, M. Calandra, R. Car, C. Cavazzoni, D. Ceresoli, M. Cococcioni, N. Colonna, I. Carnimeo, A. D. Corso, S. de Gironcoli, P. Delugas, R. A. Di Stasio, A. Ferretti, A. Floris, G. Fratesi, G. Fugallo, R. Gebauer, U. Gerstmann, F. Giustino, T. Gorni, J. Jia, M. Kawamura, H.-Y. Ko, A. Kokalj, E. Küçükbenli, M. Lazzeri, M. Marsili, N. Marzari, F. Mauri, N. L. Nguyen, H.-V. Nguyen, A. O. de la Roza, L. Paulatto, S. Poncé, D. Rocca, R. Sabatini, B. Santa, M. Schlipf, A. P. Seitsonen, A. Smogunov, I. Timrov, T. Thonhauser, P. Umari, N. Vast, X. Wu, and S. Baroni, Journal of Physics: Condensed Matter 29, 465901 (2017).
  5. [5]G. Kresse and J. Furthmüller, Phys. Rev. B 54, 169 (1996).
  6. [6]G. Kresse and J. Furthmüller, Computational materials science 6, 15 (1996).
  7. [7]J. Furthmüller, J. Hafner, and G. Kresse, Phys. Rev. B 53, 7334 (1996).
  8. [8]K. Okhotnikov, T. Charpentier, and S. Cadars, Journal of Cheminformatics 8, 10.1186/s13321-016-0129-3 (2016).
  9. [9]A. Hjorth Larsen, J. Jørgensen, M. Blomqvist, I. E. Castelli, R. Christensen, M. Dułak, J. Friis, M. N. Groves, B. Hammer, C. Hargus, E. D. Hermes, P. C. Jennings, P. Bjerre Jensen, J. Kermode, J. R. Kitchin, E. Leonhard Kolbsjerg, J. Kubal, K. Kaasbjerg, S. Lysgaard, J. Bergmann Maronsson, T. Maxson, T. Olsen, L. Pastewka, A. Peterson, C. Rosgaard, J. Schiøtz, O. Schütt, M. Strange, K. S. Thygesen, T. Vegge, L. Vilhelmsen, M. Walter, Z. Zeng, and K. W. Jacobsen, Journal of Physics: Condensed Matter 29, 273002 (2017).
  10. [10]V. D. C. García, I. E. O. Hinostroza, A. E. Echavarría, E. L. Luna, A. G. Rodríguez, and M. A. Vidal, Journal of Crystal Growth 418, 120 (2015).
  11. [11]T. Koizumi, H. Okumura, K. Balakrishnan, H. Harima, T. Inoue, Y. Ishida, T. Nagatomo, S. Nakashima, and S. Yoshida, Journal of Crystal Growth 201-202, 341 (1999).
  12. [12]P. Ferreira, R. Lucrezi, I. Guilhon, M. Marques, L. Teles, C. Heil, and L. Eleno, Materials Today Physics 48, 101547 (2024).

AI tools statement

This work lists 1 AI tool.

  • large language models · AI tool

    Roles
    Writing — review & editing
    Verification
    self-declared at submission

Recorded on the work at submission, not per version. Names and roles are shown as submitted; roles use the CRediT taxonomy.

How AI tools are recorded

Paper details

Cite this paper

Publication

Published
Version
Latest

Data & code

Code, data, proofs and workflows the authors linked for testing, review and reproduction. These links are part of this work’s metadata and are released under the same license as the rest of that metadata. Valency doesn’t host the files; each keeps the license set where it’s hosted.

Pick where to look, or just type