Skip tests on CRAN that fail for M1mac and ATLAS (heat capacity and the second derivative of H2O density in ‘tinytest/test-AD.R’).
In the next major release of CHNOSZ (to be version 2.0.0), units of
Joules instead of calories will be used by default for the thermodynamic
properties output by
subcrt(). That is,
be the default setting. User scripts that implicitly depend on the
current default setting of
E.units("cal") will need to be modified
to produce expected results after this change is made.
AD() function, which provides an implementation of the
Akinfiev and Diamond
(2003) equation of state for aqueous nonelectrolytes, now calculates
entropy, heat capacity, and volume in addition to the previously
available Gibbs energy.
For minerals with thermodynamic parameters in the equations of
info() with a numeric argument now lists values of
V at 25 °C and 1 bar (these
were previously shown as
NA). Thanks to Evgeniy Bastrakov for
suggesting both of these changes.
Add H2WO4(aq) and Cp coefficients of scheelite (CaWO4) from Liu et al. (2021).
Add pyrobitumen (C54H42) from Helgeson et al. (2009) to ‘organic_cr.csv’.
Move Ar, Xe, CH4, and CO2 from ‘organic_aq.csv’ to ‘inorganic_aq.csv’.
Fix formula of CaCl2 in ‘DEW.csv’. Thanks to Grayson Boyer.
Remove ‘OldAA.csv’ (superseded thermodynamic parameters for amino acids). This file is now available in the JMDplots package.
Tests are now run using the tinytest package.
Add an add argument to
basis() to allow adding a
species to an existing set of basis species.
AkDi() function has been renamed to
AD(), and all
variables and data files likewise use the acronym AD. In
particular, the Akinfiev-Diamond model is activated for an aqueous
species by using
abbrv = "AD" in
Names of functions, variables, and data files now use capitalized ‘Berman’, not ‘berman’.
In ‘vignettes/multi-metal.Rmd’ (“Diagrams with multiple metals”), add a link to the associated paper (Dick, 2021).
used in tests.
def2gi(), and example files in
eqdata(), a script for extracting data from EQ3/6
Add ‘demo/Pourbaix.R’ (Eh-pH diagrams with isosolubility lines, after Pourbaix, 1974). This demo depends on the following two changes.
solubility() to enable calculating overall (i.e.
minimum) solubility for multiple minerals. Calculations for multiple
minerals are also now used in ‘demo/zinc.R’.
Restore lty.aq and lty.cr arguments to
diagram() to control plotting of aq-aq and cr-cr field boundaries.
Add no.organics argument to
OBIGT() to load the
thermodynamic database without organic species.
‘OBIGT/Berman_cr.csv’: Where possible, use standard abbreviations for mineral names (including hematite (Hem) and magnetite (Mag)), as listed by Whitney and Evans (2010).
‘OBIGT/organic_aq.csv’: Add properties of aqueous fatty acids, saccharides, and other species, and add associated ‘demo/E_coli.R’ (Gibbs energy of biomass synthesis in E. coli, after LaRowe and Amend, 2016).
‘OBIGT/inorganic_aq.csv’: Add properties of aqueous Nb and Ta species from Akinfiev et al., 2020.
‘OBIGT/inorganic_cr.csv’: Move alunite here from ‘SUPCRT92.csv’.
‘thermo/protein.csv’: Rename ‘CDC2_HUMAN’ to ‘CDK1_HUMAN’ (UniProt: P06493).
Automatic detection of dissociation reactions was fragile and has
been removed from
solubility(). The new default (
= FALSE) is to not consider dissociation reactions.
In the return value of
previously only contained affinities (extracted from the
element of the
eout argument). Now it has the values for the
predominant species extracted from the values actually used to make the
plotvals list in the output), i.e. affinities divided
by the balancing coefficients if
eout is the output of
affinity, or activities if
eout is the output of
equilibrate. Therefore it can now be used to draw contours or a
color image showing the activities of the predominant species. This is
used for a diagram in a new preprint
Revise multi-metal.Rmd: Improve mineral abbreviations and placement of labels; use updated DFT energies from Materials Project; add Mosaic Stacking 2 (minerals and aqueous species); add Keff calculation (Robinson et al., 2021); add ΔGpbx color scale.
Rename ‘demo/berman.R’ to ‘demo/potassium.R’.
Remove unused limSolve package from Suggests in DESCRIPTION.
thermo()$opt$ionize.aa to control calculation of
properties of ionized proteins in
Fix bug where protein ionization calculations with
ionize.aa() were incorrectly affected by the setting of
The Akinfiev-Diamond model is now activated by setting
= "AkDi" for any aqueous species, instead of setting the charge
z) to NA. This simplifies the more common use case of adding a
custom aqueous species to OBIGT with mostly NA parameters.
Remove ‘bases2’ argument from
mosaic() (old backward
An add argument has been added to
With the default of
add = FALSE, loading new species now
causes any existing species definition to be deleted. To add
species to an existing system, use ‘add = TRUE’. With this change,
scripts can be made more concise because
TRUE) is no longer needed to clear the species definition in a series
of calculations for different systems.
The naming convention for methane has changed. The name
methane now applies exclusively to the gas; the formula
CH4 without a state continues to represent the aqueous species.
This behavior is consistent with inorganic gases but differs from most
organic substances, where the name refers to the aqueous species. This
change was made because in the past there was no way to use
subcrt() with a single character argument to identify gaseous
methane, which is common in geochemistry. (Note that
"gas") can still be used.) A hack to revert to the old behavior, where
methane refers primarily to the aqueous species, is
mod.OBIGT(info("CH4"), name = "methane").
The all-uppercase acronym OBIGT is used everywhere it
appears in file, function, and object names. In particular, the
thermodynamic database now is located at
mod.OBIGT() replace the previous
The new default of
NULL for limit.water in
diagram() causes the main diagram to be overlaid on the fields of
water stability (white) and instability (gray). Change this to
TRUE to obtain the previous default of masking all parts of the
diagram outside of the water stability field.
Add function mash() for combining two diagrams for different systems (i.e., simple overlay of diagrams for two single-metal systems).
Add function mix() for combining two single-metal diagrams with a third diagram for bimetallic species. This can be used to produce diagrams for a binary system with fixed composition of the metals.
Add function rebalance() for making a new diagram by secondary balancing between two systems.
Add a stable argument to
mosaic() to use previously
calculated stabilities of species (e.g. minerals) for the changing basis
species. This allows
mosaic() calculations to be linked in series
(or "stacked"), for instance to sequentially add metals (Fe, then Cu) to
Add vignette multi-metal.Rmd for examples that use these new features to make diagrams for systems with multiple metals (specifically Fe-V and Fe-Cu).
Dates in the ‘date’ column have been converted to use ISO 8601
extended format (e.g. 2020-08-16). The accessory function
to render the current date using the previous format, has been removed.
Update species parameters for the 2019 version of the Deep Earth Water (DEW) model (Huang and Sverjensky, 2019).
‘inorganic_aq.csv’, ‘inorganic_aq.csv’: Add arsenopyrite, loellingite, westerveldite, and aqueous As(OH)3 and AsO(OH)3 from Perfetti et al., 2008.
‘inorganic_aq.csv’: Add Co-chloride species from Liu et al., 2018.
‘inorganic_aq.csv’: Add metal carbonate and bicarbonate complexes and FeSO4 from St Clair et al., 2019.
‘inorganic_cr.csv’: Add wustite, manganese, and Mn oxides (manganosite, pyrolusite, bixbyite, and hausmannite) from Robie and Hemingway, 1995.
‘inorganic_cr.csv’: Add huebnerite (MnWO4) from Liu and Xiao, 2020.
Add GHS and Cp at 25 °C for almandine, dickite, fluorphlogopite, glaucophane, grunerite, halloysite, larnite, pyrope (‘SUPCRT92.csv’) and bromellite (‘inorganic_cr.csv’) from Robie and Hemingway, 1995.
‘inorganic_cr.csv’: Correct formulas for number of H2O in some As-bearing minerals.
‘SUPCRT92.csv’: Change lowercase to uppercase "A" (Angstrom) in names of minerals with suffixes indicating interlayer spacing (amesite, clinochlore, cronstedtite, daphnite).
Remove bracketed suffixes in references (e.g. [S92] was used to indicate that the data first appeared in SUPCRT92).
Use uncompressed data files (i.e. ‘.csv’, not ‘.csv.xz’) and rename ‘DEW_aq.csv’ to ‘DEW.csv’.
The package is now installed with the bibtex file for the OBIGT database (‘docs/OBIGT.bib’), which is used by the logKcalc package (https://github.com/jedick/logKcalc).
‘thermo/element.csv’: Add entropies for Am, Pu, Cm, Np from Thoenen et al., 2014 (The PSI/Nagra Chemical Thermodynamic Database 12/07).
Add ‘demo/comproportionation.R’: Gibbs energy of sulfur comproportionation, after Amend et al., 2020.
Add ‘demo/zinc.R’: Solubilities of multiple minerals (zincite and sphalerite).
Revise and simplify ‘anintro.Rmd’ and ‘equilibrium.Rmd’ (converted from ‘equilibrium.Rnw’).
Revise ‘OBIGT.Rmd’ to reduce the size of the HTML file and make deep linking to individual sections work.
Add ‘viglink’ Rd macro so HTML versions of Rd files can link to vignettes.
Remove vignette ‘hotspring.Rnw’ and demos ‘bison.R’ and ‘bugstab.R’. The material is now in the ‘bison.Rmd’ vignette and ‘bugstab.R’ demo in the JMDplots package (https://github.com/jedick/JMDplots).
New demo ‘berman.R’, extracted from ‘berman.Rd’.
Revise demo ‘mosaic.R’ to use
mash() to show S and C
species together, make better use of transparency, and
to adjust positions of labels.
Change default resolution in
affinity() from 128 to 256.
This greatly improves the appearance of diagrams made with the default
which.pmax() was rewritten to speed up identification of
predominant species, and the drawing of field boundaries in
was made more efficient. The latter change has prompted the removal of
the ‘lty.aq’ and ‘lty.cr’ arguments from
Add a bottom argument to
ratlab() to allow changing
the ion in the denominator to something other than H+.
The ‘srt’, dx (new), and ‘dy’ arguments in
diagram() can now be used to rotate and adjust the position of
field labels, not only line labels. This and other arguments
(‘cex’, ‘col’, ‘col.names’, ‘font’,
‘family’, ‘bold’, ‘italic’) can have length > 1 to
apply different settings to each species.
Add a min.area argument to
diagram() to specify the
minimum area of fields that should be labeled. This is useful for
removing labels from small fields on crowded diagrams.
The list returned by
diagram() now includes a
predominant.values component, which has the affinities of the
predominant species at each grid point. This can be used as shown in the
multi-metal.Rmd vignette to compute the Pourbaix energy
(ΔGpbx) for a metastable material.
subcrt(): replace ‘action.unbalanced’ argument with
autobalance, which now provides the ability to prevent
Setting the water model with
water() updates the literature
thermo.refs() shows CHNOSZ version and date.
affinity() use degree symbol
(°C) in messages.
thermo()$... in messages and
mosaic() now allows a blend argument of length > 1 to
apply a specific setting to each group of basis species.
Fix ‘palply.Rd’ for new warning about “Non-file
package-anchored link(s) in documentation object” in
wjd() (implementation of Gibbs energy minimization
method from White et al., 1958)
wjd.R and supporting data file.
Add "QCa" as a keyword for preset species in
(glutamine, cysteine, acetic acid, H2O, O2).
Add T and P arguments to
require that species have non-NA values of standard Gibbs energy at this
temperature and pressure.
Change defaults in
mod.buffer() to be more suitable for
mineral buffers (
state = "cr" and
logact = 0).
Remove extdata/supcrt (scripts to read SUPCRT data files).
Convert this NEWS file to Rd format.