Perple_X Updates

This page lists recent changes and bugs in Perple_X. If a bug is indicated for a program that you do not use, you need not concern yourself with the bug.

Previous logs are at:


7.2.6 - July 24, 2026

7.2.6 primarily restructures the mc_fit_plot MATLAB script for analyzing and plotting the results of mc_fit thermobarometric inversions. The restructuring required extensive modification of the mc_fit documentation. Additionally, several auxiliary MATLAB scripts based on mc_fit_plot have been added to provide alternative visualizations of mc_fit inversion problems.

The sections below describe the revised mc_fit_plot workflow, three of the auxiliary plotting scripts introduced in 7.2.6, the documentation update, and technical changes to the mc_fit program.

mc_fit_plot:

NIL16 garnet + clinopyroxene problem

Fig. 1 Uncertainty analysis for the NIL16 inversion problem. Left panel: best central model (preferred solution), perturbed model population, and data uncertainty. Right panel: filtered central model population and aleatoric and total uncertainties. See Fig. 3 for illustration of the filter.

Thermobarometric uncertainty has two components: data uncertainty arising from analytical and thermodynamic uncertainty and aleatoric uncertainty arising from non-uniqueness of the inverse problem (Fig. 1).

In mc_fit, the central model analysis identifies the best central model. The subsequent perturbation analysis on the best central model quantifies data uncertainty and imprecision of the misfit function. Aleatoric uncertainty is then estimated from central models that lie within that imprecision.

Prior to 7.2.6, mc_fit_plot reproduced this logic in two runs: the first quantified data uncertainty and misfit imprecision; the second filtered central models within the imprecision of the best central model (Fig. 3) to estimate aleatoric uncertainty. The total uncertainty was then obtained manually as the quadrature sum of the data and aleatoric uncertainties.

In 7.2.6, mc_fit_plot automates this sequence by analyzing perturbation results first and then filtering central-model results to retain statistically indistinguishable models. This eliminates the second mc_fit_plot run and manual calculations.

mc_fit_data_uncertainty_components_plot:

NIL16 garnet + clinopyroxene problem

Fig. 2 The thermodynamic and analytical components of the data uncertainty (left panel of Fig. 1) for the NIL16 inversion.

mc_fit_data_uncertainty_components_plot is a new auxiliary script that analyzes and plots the analytical and thermodynamic components of the data uncertainty for a thermobarometric problem (Fig. 2).

mc_fit_imprecision_band_plot:

NIL16 imprecision band

Fig. 3 Misfit scatter in the \(T-\ln(\mathrm{misfit})\) plane for the NIL16 inversion (Fig. 1). Left panel: the misfit scatter of the perturbed model population defines the misfit imprecision band for the best central model. Right panel: central models that lie within the imprecision band are statistically indistinguishable from the best central model. The scatter of these models (right panel of Fig. 1) defines the aleatoric uncertainty of the inverse solution.

mc_fit_imprecision_band_plot is a new auxiliary script that shows the model scatter from the perturbation analysis used to derive the misfit imprecision (left panel, Fig. 3) and superimposes the imprecision band on the unfiltered central model population (right panel, Fig. 3). This visualization is useful for understanding how the aleatoric uncertainty is estimated.

mc_fit_permutation_plot:

VC1_no_bulk permutations

Fig. 4 Comparison of the solution for the full eight phase assemblage of the VC1_no_bulk inversion with the solutions obtained for the unique seven-phase permutations of the full assemblage.

mc_fit_permutation_plot is a new auxiliary script that analyzes and plots multiple permutations of a thermobarometric problem. The script facilitates hypothesis testing.

Documentation:

The mc_fit documentation has been revised to accommodate the new mc_fit_plot and auxiliary MATLAB scripts. The Strategy, mc_fit_plot, and Examples chapters and the Glossary have been expanded (bloated) to clarify the mc_fit logic and workflow. A new chapter mc_fit_plot options details the user-configurable options for the mc_fit_plot scripts.

Bugs and modifications:

  • The 7.1.15+ revisions of mc_fit effectively zeroed the contribution of thermodynamic error in the perturbation analysis, with the result that the reported uncertainties reflected only analytical data. The bug has been corrected and had no effect on the identification of the best central model.

  • The fit-all-data criterion was implemented incorrectly in mc_fit in that compositional residuals were compared to the relative uncertainty rather than the absolute uncertainty. As a result, more models were classified as fitting all observational data than was actually the case. The bug has been corrected and had no effect on the central and perturbation analyses unless the must_fit_all_data option was set to true.

  • Mixed-case MATLAB script and function names have been converted to lower case.

  • The original mc_fit_plot sequential logic persists as mc_fit_plot_legacy.

  • In mc_fit_plot it is assumed that the misfit function is lognormal. Therefore, the imprecision of the misfit function is \(\pm \mathrm{sigma\_level}\,\epsilon_{\ln(\mathrm{misfit})}\), where \(\epsilon_{\ln(\mathrm{misfit})}\) is the standard deviation of the logarithm of the perturbation analysis misfit values and \(\mathrm{sigma\_level}\) scales the imprecision interval for the desired coverage. The default value of sigma_level is 1, which corresponds to 68% coverage.


7.2.5 - June 1, 2026

pssect bug and modifications

A patch intended to correct the coding error in revision 7.2.2 was inadvertently retained in the 7.2.4 code. The patch perpetuated the original pssect error. Correction courtesy of Peter Horvath (Furman).

Revision 7.2.5 also introduces minor bug fixes and modifications to the plot extra data facility of pssect. Courtesy of George Helffrich (ELSI).


7.2.4 - May 22, 2026

pssect/werami bug

A coding error in revision 7.2.2 potentially caused these programs to generate an internal list of solution models that was inconsistent with the list used by vertex, resulting in an unhandled exception or incorrect phase labeling. Correction courtesy of George Helffrich (ELSI) and Debaditya Bandyopadhyay (Academia Sinica).


7.2.3 - May 9, 2026

Mowing the grass

  • *ver.dat and *.f file names have been changed from mixed-case to lowercase to simplify file maintenance across operating systems.

    Linux warning

    Linux filenames are case-sensitive: a) old mixed-case file references in input files will cause file-not-found errors or b) if legacy mixed-case *.dat files are present, stale data may be used. The only formerly mixed-case Perple_X program name was MC_fit (now mc_fit); the MC_fit_plot Matlab script remains mixed-case pending a mc_fit documentation update.

  • hpha622ver.dat: adds molecular volatile EoS codes (courtesy of Greg Dumond, UArk).

  • frendly modification: solution-specific make definitions are now evaluated in frendly as standard make definitions (courtesy of Guillaume Siron, Besançon).


7.2.2 - April 2, 2026

Solution model errors/inconsistencies related to the 7.2.0 update have been corrected in solution_model.dat (courtesy of Emilien Oliot, Montpellier). Specifics:

  • Ilm(W24) was written in solution model code 6 format, which does not allow multiple order parameters. The model has been rewritten in code 688 format.

  • In the 7.2.0 solution_model.dat file, the Weller et al. (2024) clinopyroxene and orthopyroxene models were incorrectly named Cpx(W25) and Opx(W25). The names have been changed to Cpx(W24) and Opx(W24), as in the original 7.2.0 update text.

  • The 7.2.0 update text listed Bi(W24) as a new model. This was incorrect; the new biotite model was Bi(G25) (Green et al. 2025).

  • oAmph(DP) was modified in 7.2.0 to refer to a non-existent _q-type make definition, fanth_q. The model has been corrected to refer directly to fanth, which is modified by an internal DQF correction.

Solution model I/O console diagnostics written to the console at the start of vertex and meemum calculations have been reorganized for clarity.

Solution model reformulation failure: In 7.1.13, during an attempt to make solution model reformulation for simple chemical systems more robust, a snippet of code in routine reforn (rlib.f) was deleted. The snippet was useful and has been restored.

Null phase bugs in mobile component calculations: A null phase has a composition that lies entirely within the mobile-component composition space (e.g., an H-O fluid in calculations as a function of hydrogen and oxygen chemical potentials). Beginning with revision 7.1.8, Perple_X added error traps to prevent inconsistent use of fluid EoS and/or fluid-species data. These traps incorrectly blocked calculations involving legitimate null phase data. The traps have been corrected (courtesy of Jesse Walters, Graz, and Animesh Gorai, IISc). Specifics:

  • routine cmodel (rlib.f) now allows solution models to reference phases used to define activities or fugacities when these are used as independent variables.

  • routine getscp (rlib.f) now sets the compositional normalization constant of null phase data to unity to avoid division by zero errors.

  • routine soload (rlib.f) now allows null phase pseudocompounds to be loaded into arrays for the static LP problem.

  • routine savdyn (rlib.f) now allows null phase compositions to be loaded into arrays for the dynamic LP problem.


7.2.1 - March 9, 2026

Corrects solution_model.dat and all curated THERMOCALC thermodynamic data files to include the make definitions required by the oAmph(DP) and cAmph(DP) solution models. Correction courtesy of Zhaoyi Wang (USTB, Beijing).


7.2.0 - March 1, 2026

Maintaining backward compatibility with the numerous incarnations of THERMOCALC (aka HPx-eos) solution models has been a logistical nightmare. To mitigate this problem, 7.2.0 modifies the make definition system to reduce the number of definitions specified in Perple_X thermodynamic data files and to eliminate the potential for unintended interference from made entities in calculated phase relations. Additionally, 7.2.0 emulates THERMOCALC’s ability to modify the properties of endmembers with configurational disordering internally. These changes largely decouple the models in the solution model file from the make definitions in the thermodynamic data file. The changes are discussed in detail below.

What you really(!) need to know

  • 7.2.0 includes changes to the thermodynamic data and solution model file format that cannot be read by older versions of Perple_X.

  • 7.2.0 can be used with all Perple_X files generated after June 2010.

  • Problem definition files created with 7.1.20- may not generate identical results with the 7.2.0+ thermodynamic and solution model files because of changes in solution model and endmember names. This issue is critical for the THERMOCALC models for ilmenite and spinel:

    • Ilm(DS6) has been eliminated.

    • Use Ilm(WPH) for all ds6.33- thermodynamic data files.

    • Do not use Ilm(WPH) with ds6.34+ thermodynamic data files.

    • When using Ilm(WPH), do not exclude ilm (this is contrary to previous best practice).

    • Use Ilm(W24) for all ds6.34+ thermodynamic data files.

    • Do not use Ilm(W24) with ds6.33- thermodynamic data files.

    • Use Sp(WPC) for all ds6.22- thermodynamic data files.

    • Do not use Sp(WPC) with ds6.33+ thermodynamic data files.

    • Use Sp(HGP) for all ds6.33+ thermodynamic data files.

    • Do not use Sp(HGP) with ds6.22- thermodynamic data files.

    • When using Sp(HGP), do not exclude sp and herc (this is contrary to previous best practice).

  • Solution models Omph(GHP), oAmph(DP), and cAmph(DP) require different DQF corrections for ds5 and ds6 thermodynamic datasets. In 7.2.0, these corrections are no longer provided in the thermodynamic data files. Rather, they are specified at the end of each solution model. As provided, the 7.2.0 solution model file specifies the ds6 corrections. To use these models with a ds5 thermodynamic data file, comment out the ds6 corrections and un-comment the ds5 corrections.

  • The solution models for talc, brucite, phase-A, and clinohumite, T, B, A-phase, and Chum, respectively, have been renamed T(F), B(F), A-phase(F), and Chum(F).

Technical details

7.2.0 distinguishes three types of make definitions:

  • Standard make definitions, as in previous versions of Perple_X, specified in the thermodynamic data file header, e.g.:

    begin_makes
                        | standard make definitions
    qfm   = 2 mt + 3 q - 3 fa
        DQF(J/mol) = 0
    oen   = 1 mgts + 1 acm - 1 jd
        DQF(J/mol) = -15000 + 0.15 * p_bar
    ...
    end_makes
    

    An entity made in this manner exists independently of any solution model.

  • Solution-specific make definitions, signaled by the suffix _q (e.g., wL_q), exist only within the context of a solution model. Such entities are defined in the thermodynamic data file header, e.g.:

    begin_makes
                        | solution-specific make definitions
    wL_q    = 1 h2oL
        DQF(J/mol) = 0
    siL_q   = 8/5 silL
        DQF(J/mol) = 0
    faL_q   = 2 faL
        DQF(J/mol) = 0
    ...
    end_makes
    

    but must be invoked at the end of the solution model in which they are to be used, e.g.:

    begin_dqf_corrections
    DQF(wL_q)   =  0
    DQF(siL_q)  = -7800
    DQF(faL_q)  = -8200  - 1.4 * P_bar
    ...
    end_dqf_corrections
    

    DQF increments are cumulative. Thus, the specification in a solution model customizes the made endmember in the context of the solution model. Allowing this customization reduces the number of make definitions that must be specified in the thermodynamic data file. The solution-specific nature of _q-type make definitions limits their potential to interfere in calculated phase relations. For example, a common problem in Perple_X calculations involving TC melt models is that the h2oL endmember becomes stable with respect to real water at high pressure and low temperature. This problem is circumvented in 7.2.0 by making wL_q = 1 h2oL, and then excluding h2oL from the calculation.

  • Modifications of endmembers with configurational disordering are specified within a solution model but apply globally. For example, in Ilm(WPH):

    begin_special_operations
    spop(ilm) disorder         dqf(J/mol) = 1992.8  -  2.1 * T_K
    spop(hem) disorder         dqf(J/mol) = 0
    end_special_operations
    

    spop(name) identifies a real (i.e., not made) entity to be modified and used in the solution model; the keyword that follows (disorder or inverse, normal or order, and equilibrium) indicates the nature of the base modification and a DQF correction to be applied to the base. The name of the endmember used for output is subsequently modified by pre-pending the first character of the modification keyword. Thus, spop(ilm) modifies and renames the ilm endmember to dilm to represent the properties of disordered ilmenite.

    Formerly, use of Ilm(WPH) required the creation of a new endmember ilm_nol by duplicating the ilm entry and stripping the order-disorder model from it. dilm was then made from ilm_nol by adding a DQF to both remove the order-disorder model effects from the reference constants to obtain the true base function and to account for the additional DQF specified in the TC model. After this was done, it was necessary, or at least advisable, to exclude both ilm and ilm_nol. In 7.2.0, these exclusions are unnecessary because spop(ilm) replaces ilm with dilm and no intermediate entity, such as ilm_nol, is created.

Minor patches and modifications

  • Original update text: Solution models: Opx(W24), Cpx(W24), Ilm(W24), and Bi(W24) from Weller et al. (2024) added to solution_model.dat.

  • 7.2.2 revised text: Solution models: Opx(W24), Cpx(W24), and Ilm(W24) from Weller et al. (2024) and Bi(G25) from Green et al. (2025) added to solution_model.dat.

  • TC ds6.36 thermodynamic dataset added as hp636ver.dat.

  • An optional solvus_tolerance keyword can be placed in the final section of a solution model. When present, this keyword locally overrides the solvus_tolerance set globally by the solvus_tolerance option in perplex_option.dat.

  • Trap added (routine savdyn, rlib.f) to prevent phase compositions from moving out of the thermodynamic composition space in calculations as a function of mobile components. This behavior is theoretically correct because a mobile component may cease to be a constituent of a stable phase as its chemical potential falls; however, Perple_X’s ill-advised compositional normalization triggers misleading diagnostic messages when such conditions occur. A more robust solution to this problem will be implemented in the future.

  • Allow made entities in the mobile/saturated phase component composition space.

  • Allow an optional version tag (720) read from the first line of thermodynamic data files. The tag is used to test whether make definitions in a thermodynamic data file are compatible with the solution model file in use.


Known current problems

Special component error

Perple_X thermodynamic data files may identify certain components as special, typically H2O and CO2. Such components are associated with a user selected internal equation of state. If a thermodynamic data file specifies more than one special component, and the user calculates phase relations of a system consisting entirely of the second special component, Perple_X will terminate with the error message:

**error ver013** ##### is an incorrect component name, valid names are: ...

where ##### are blank characters. A workaround solution to this problem is to specify the first special component in the problem definition file and set its amount to zero.