Skip to content

MAGEMin - C-library

MAGEMin is an open-source parallel code written in C that minimizes the Gibbs free energy of multiphase and multicomponent systems. The main objective of MAGEMin is to provide a stable, consistent and fast phase equilibrium prediction routine.

The function receives bulk-rock composition, pressure and temperature to compute the most stable phase equilibrium. Presently, MAGEMin provides the thermodynamic dataset used natively in THERMOCALC. The thermodynamic datasets are directly translated into C routines and implemented without transformation of variables or coordinate systems, thus eliminating inconsistencies.

The list of all available thermodynamic datasets is presented below.

Warning

The C backend of MAGEMin is not the most user-friendly way to use MAGEMin toolset. We strongly encourage users to try out MAGEMinApp.jl and MAGEMin_C.jl. The only case where using the C backend of MAGEMin is possibly the best solution is when calling MAGEMin as an external library from a pre-existing C or C++ code.

Available thermodynamic databases

AcronymNameVersionPrimary Reference
mpMetapelitev1.3.0White et al., 2014a, 2014b
umUltramaficv1.3.2Evans & Frost, 2021
mbMetabasitev1.3.5Green et al., 2016
mtlMantlev1.5.5Holland et al., 2013
igIgneousv1.6.2Green et al., 2025 (updated from Holland et al., 2018)
igadIgneous alkalinev1.6.2Weller et al., 2024
sb11Mantle (Stixrude & Lithgow-Bertelloni)v1.7.7Stixrude & Lithgow-Bertelloni, 2011
sb21Mantle (Stixrude & Lithgow-Bertelloni)v1.7.7Stixrude & Lithgow-Bertelloni, 2021
sb24Mantle (Stixrude & Lithgow-Bertelloni)v1.8.0Stixrude & Lithgow-Bertelloni, 2024
umeUltramafic extendedEvans & Frost, 2021 + Green et al., 2016
mpeExtended metapeliteWhite et al., 2014 + Green et al., 2016 + Franzolin et al., 2011 + Diener et al., 2007
mbeExtended metabasiteGreen et al., 2016 + Diener et al., 2007 + Rebay et al., 2022

The metapelitic model (extended with MnO, White et al., 2014) allows to compute the mineral assemblage from low temperature to supra-solidus conditions.

  • Added March 2023, `MAGEMin v1.3.0`
  • White et al., 2014a, 2014b (see http://hpxeosandthermocalc.org)
  • K2O-Na2O-CaO-FeO-MgO-Al2O3-SiO2-H2O-TiO2-O-MnO chemical system
  • Pure stoichiometric phases quartz (q), cristobalite (crst), tridymite (trd), coesite (coe), stishovite (stv), kyanite (ky), sillimanite (sill), andalusite (and), rutile (ru), corundum (cor) and sphene (sph).
  • Solution phases spinel (spl), biotite (bi), cordierite (cd), orthopyroxene (opx), epidote (ep), garnet (g), ilmenite (ilm), silicate melt (liq), muscovite (mu), ternary feldspar (pl4T), sapphirine (sa), staurolite (st), magnetite (mt), chlorite (chl), chloritoid (ctd) and margarite (ma).

Important

The datasets are only calibrated for a limited range of P, T and bulk-rock conditions. If you go too far outside those ranges, MAGEMin (or most other thermodynamic software packages for that matter) may not converge or give bogus results.

Warning

For most users, we recommend starting with the relevant single-system database (mp, um, mb, ig, igad, or mtl) before exploring extended/composite databases. When using an extended database, all phases are active by default and the user must select the adequate subset.

References

  • Green, ECR, Holland, TJB, Powell, R, Weller, OM, & Riel, N (2025). Journal of Petrology, 66, doi: 10.1093/petrology/egae079

  • Weller, OM, Holland, TJB, Soderman, CR, Green, ECR, Powell, R, Beard, CD & Riel, N (2024). New Thermodynamic Models for Anhydrous Alkaline-Silicate Magmatic Systems. Journal of Petrology, 65, doi: 10.1093/petrology/egae098

  • Holland, TJB, Green, ECR & Powell, R (2022). A thermodynamic modelfor feldspars in KAlSi3O8-NaAlSi3O8-CaAl2Si2O8 for mineral equilibrium calculations. Journal of Metamorphic Geology, 40, 587-600, doi: 10.1111/jmg.12639

  • Tomlinson, EL & Holland, TJB (2021). A Thermodynamic Model for the Subsolidus Evolution and Melting of Peridotite. Journal of Petrology,62, doi: 10.1093/petrology/egab012

  • Holland, TJB, Green, ECR & Powell, R (2018). Melting of Peridotitesthrough to Granites: A Simple Thermodynamic Model in the System KNCFMASHTOCr. Journal of Petrology, 59, 881-900, doi: 10.1093/petrology/egy048

  • Green, ECR, White, RW, Diener, JFA, Powell, R, Holland, TJB & Palin, RM (2016). Activity-composition relations for the calculationof partial melting equilibria in metabasic rocks. Journal of Metamorphic Geology, 34, 845-869, doi: 10.1111/jmg12211

  • White, RW, Powell, R, Holland, TJB, Johnson, TE & Green, ECR (2014). New mineral activity-composition relations for thermodynamic calculations in metapelitic systems. Journal of Metamorphic Geology, 32, 261-286, doi: 10.1111/jmg.12071

  • Holland, TJB & Powell, RW (2011). An improved and extended internally consistent thermodynamic dataset for phases of petrological interest, involving a new equation of state for solids. Journal of Metamorphic Geology, 29, 333-383, doi: 10.1111/j.1525-1314.2010.00923.x