Changelog
All notable changes to this project are documented here. To ensure that they are using the most up-to-date version of the PyGCC software, users should update PyGCC on their local computers using the following command:
pip install --upgrade pygcc
v1.5.3 (27/06/2026)
Added
outputfmt(polycoeffsmode): when only two temperature bounds [Tmin_K, Tmax_K] are supplied via*TK_range, the GWB and PHREEQC blocks now expand them to an 8-point grid internally socurve_fithas enough data for the 6- and 5-parameter polynomials respectively.outputfmt(polycoeffsmode):TminK/TmaxKin GWB output are now derived from the valid (non-placeholder) temperature range rather than the full grid extent._build_messagenow reports supplemental minerals that were injected from built-in thermodynamic data inread_db.py(Fluorapatite, Hydroxyapatite, Ankerite, Acmite, Annite, Phlogopite, Molybdenite, Molybdite), grouped by their reference source.solidsolution_thermo(solidsolution_type='All'): basaltic glass calculation is now included and optional — skipped whenglass_oxide_wtis not supplied, instead of raising aValueError.readSourcePHREEQCdb:get_phasesnow handles LLNL-style PHREEQC databases (e.g.llnl.dat) where a commented-out alternative formula line appears between the mineral name and the actual reaction. The parser skips comment and blank lines to reach the real reaction.
Changed
Fixed
Fixed
write_databasecrashing withKeyErrorwhen usingllnl.datas a PHREEQC source database. Three sub-fixes were required: (1)sourcedic_logKnow preserves original (un-normalized) keys for species that appear in both SOLUTION_SPECIES/SOLUTION_MASTER_SPECIES and PHASES (60+ dual-membership species in llnl.dat such asAlF3,Sb(OH)3); (2)write_PHREEQCdb’s minerals loop wrapscalcRxnlogKin atry/except KeyError— when a mineral’s solid-state data is absent from the direct-access database (e.g. because speq21.dat only has the aqueous complex), the mineral is silently skipped rather than crashing; (3) allcurve_fitcalls throughoutwrite_PHREEQCdbandoutputfmtare now guarded by ann_valid >= n_paramscheck (5 for PHREEQC analytic, 6 for GWB polycoeffs) so a single-temperature database (T=[25]) no longer crashes — when too few valid logK points exist the closest-to-25 °C value is written aslog_konly, without the-analyticexpression.Fixed header garbling when a pygcc-generated GWB database is reused as the source for a subsequent
write_databasecall. The writer was appending(degC)and(bar)directly to the marker strings without a space (temperatures(degC),pressures(bar)), which the reader’sin [...]check did not match — causing the search loop to consume up to 1000 lines into the species section before giving up. Fixed in both the writer (now emitstemperatures (degC)/pressures (bar)) and the reader (accepts both forms for backward compatibility). Same fix applied to the EQ36 writer.Fixed
calclogKclaysproducing all-NaN logK for 7Å (serpentine) and 14Å (chlorite) clay minerals whenInt_Mg_fractdefaulted to 1. The default moved all Mg to the interlayer site, making octahedral Mg zero and producing a divide-by-zero in theR1+1denominator.I_Mgis now capped atTot_Oxy(0 for non-smectite minerals), keeping all Mg in the octahedral/brucitic site where it belongs.Fixed
write_database(T=[0, 300], P=..., clay_thermo=True, logK_form='polycoeffs')raisingValueError: ydata must not be empty!. The rhoEG size mismatch when T was internally expanded from 2 to 8 points was corrected, and theInt_Mg_fractcap (above) prevented all-NaN clay logK that leftcurve_fitwith no valid data.
Removed
v1.5.2 (12/05/2026)
Added
can now handle newer dataset format of GWB, such as ‘jul22’, ‘jan26’
Changed
Fixed
fixed compilation error in v.1.5.1 and associated water equation of state issues.
Removed
v1.5.1 (08/10/2025)
Added
Changed
Fixed
fixed compilation error in v.1.5.0 and associated water equation of state issues.
Removed
v1.5.0 (29/09/2025)
Added
We added PHREEQC integration with pygcc, including the following databases distributed with the program (‘llnl.dat’, ‘phreeqc.dat’,and ‘pitzer.dat’).
Changed
Fixed
Removed
v1.4.0 (05/06/2025)
Added
We introduced the keyword heatcap_approx to allow users to specify either ‘Maier-Kelley’ or ‘constant’ for heat capacity calculations in clay mineral thermodynamic properties. This provides flexibility in choosing between a temperature-dependent Maier-Kelley formulation or a constant heat capacity approximation.
Changed
Fixed
fixed error in writing ptizer database for Toughreact, particularly in source database, like data0.hmw with no lamda values.
Removed
v1.3.7 (11/05/2025)
Added
Changed
Fixed
fixed compilation error in v.1.3.7.
Removed
v1.3.6 (11/05/2025)
Added
Changed
Fixed
we fixed calculation errors in logK values and reaction parameters for clay thermodynmanics and introduced partitioning parameters such as “Int_Mg_fract” and “Int_Li_fract” to help users specify the fraction of Mg and Li in the interlayer sheet.
Removed
v1.3.5 (12/04/2025)
Added
Changed
Fixed
we have fixed the dimer error enforced on other mineral databases.
we revised concentration_converter function
Removed
v1.3.3 (25/01/2025)
Added
Changed
Fixed
we have fixed the extrapolation error at higher pressures related to Helgeson_activity function.
Removed
v1.3.1 (11/11/2024)
Added
we added flexible direct-access modifying option that reads a csv file and makes a new direct-access database. Test = dbaccess_modify(in_filename = ‘geotpd_data_block_cr.csv’, dbaccess = ‘./speq23.dat’)
Changed
Fixed
we have fixed the calculation error when generating pflotran databased with GWB source database (starting from mar21 format).
Removed
v1.3.0 (03/05/2024)
Added
we have incorporated the NaCl-H2O phase relationship equations of Driesner and Heinrich (2007) which was utilized in the Syverson, et al. (2023) Geology paper for geothermobarometer calculation.
Changed
Fixed
Removed
v1.2.0 (10/09/2023)
Added
we have included the thermodynamic databases speq23 and speq23_dimer. To utilize these databases in pygcc, users are now required to specify their selection. For example, users can set “dbaccessdb = speq21_dimer”, “dbaccessdb = speq23”, “dbaccessdb = speq23_dimer”.
Changed
modified the default speq21 database to reinstate the thermodynamics data for SiO2(aq) to the values presented in Shock et al. (1989)
modified the database creation to include dimer - Si2O4(aq) - for scenarios where SiO2(aq) from Sverjensky et al. (2014) - speq21_dimer.dat is used. Users who intend to utilize speq21_dimer or speq23_dimer databases should verify that the dimer reaction is present in their source database. Note that source databases, including the default ‘thermo.com.tdat’ and ‘thermo_latest.tdat’ have been updated to include dimer reactions.”
Fixed
In previous versions, errors related to deprecated functionality were encountered when using Python versions greater than 3.9.6.
Removed
v1.1.4 (25/11/2022)
Added
Mineral “Graphite” was added to the thermo.2021.dat database. Other modifications were made to the formula of some carboxylic acids in the database
A debug message has been added to the
write_databaseclass, with a default value of False, to print out options included in generating the database. The print option can be turned on by specifying “print_msg = True”The source databases included with pygcc downloads can now be specified using the file names rather their full paths, such as “sourcedb = thermo.com”, “sourcedb = thermo.2021”, “sourcedb = thermo_latest”, etc.
Pitzer activity model format for ToughReact is now included
Created an option to use the GWB source database to generate the EQ36 database, i.e., convert GWB database to EQ36 database.
Changed
modified the default output database for ToughReact from “thermo_ToughReact%sbars” to “thermo%sbars”
modified the creation of output folder to specify subfolders for ToughReact, GWB, EQ36 and PFLOTRAN
modified the code so that the density extrapolation prompt message is only activated in cases where the density is less than 350 g/cm3
Fixed
v1.1.2 and v1.1.3 have errors that are now fixed
Removed
v1.1.1 (19/09/2022)
Added
Changed
modified the naming of log10_co2_gamma in the
Henry_duan_sunanddrummondgammafunctions to activity coefficientscorrected dielectric constants units in
water_dielecclass implementation of water dielectric constantsmodified pressure region for
Helgeson_activityfunction to include pressures above 5 kbar
Fixed
Removed
v1.1.0 (21/06/2022)
Added
Changed
modified
db_readerfunction to support jul17 and jan19 gwb legacy formats
Fixed
Removed
v1.0.6 (15/05/2022)
Added
Added the Holland and Power heat capacity equation using the SUPCRTBL database, tagged as
heatcaphp.A
supcrtaqfunction option has been added, allowing users to specify input units for direct-access or sequential-access thermodynamic databases. The keyword “InUnit” can take ‘cal’ or ‘KJ’ and convert to ‘cal’ which is used in thesupcrtaqfunction.Added “supcrtbl.dat”, a sequential-access thermodynamic database containing Holland and Power datasets
documented in SUPCRTBL by Zimmer et al. (2016) SUPCRTBL: A revised and extended thermodynamic dataset and software package of SUPCRT92. Computer and Geosciences 90:97-111.Added an option in
calcRxnlogKto automatically identify species class based on species’ last letter/ number. This means that species ending with ‘(aq)’, ‘+’, ‘-’ or last letter/number isdigit are classified as aqueous species whereas others are gases or mineral species. This is used in case the user does not provide aspecielist, which has become an optional input into thecalcRxnlogKclass functionAdded the capability to generate the most recent database version of GWB (mar21) formats.
Added an option in
solidsolution_thermoclass function “Al_Si” to allow the user to specify how Al and Si will be expressed in the solid solution reactions. The keyword can take ‘Arnorsson_Stefansson’ which expresses them as ‘Al(OH)4-’ and ‘H4SiO4(aq)’ while ‘pygcc’ expresses them as ‘Al3+’ and ‘SiO2(aq)’
Changed
modified
mineral_eoskeyword toheatcap_methodmodified
Mintypekeyword toClayMintypecombined functions like
heatcaphp,heatcap_Bermanandheatcapusgscalinto a single class functionheatcapupdated the online documentation to reflected the functions removed
Fixed
Removed
The
heatcap,heatcap_Bermanandheatcapusgscalfunctions are no longer in use
v1.0.5 (22/03/2022)
Added
Changed
Issues with polycoeffs logK in GWB database generation have been resolved. The polynomial coefficients were rounded off to shorter significant factors in the previous implementation, which hampered the ability to generate the correct logK values. This update fixed that by extending the significant factors.
Fixed
v1.0.4 (10/03/2022)
Added
A new option was implemented to automatically specify the structuring layer for
calclogKclayswith the goal of achieving charge balance of 14 for the ‘7A’ group, 22 for the ‘10A’ group and 28 for the ‘14A’ group.
Changed
Fixed
v1.0.3 (17/02/2022)
Added
Added the importlib_metadata dependencies.
Changed
Fixed
v1.0.2 (02/02/2022)
Added
Changed
Modified the
iapws95class function because the previous implementation had issues with using fsolve solver to solve for an array of data to find the roots of any function.
Fixed
v1.0.1 (01/02/2022)
Added
Python tutorial files have been added.
Changed
Fixed
v1.0.0 (31/01/2022)
This is the first release of
pygcc!