Units of Joules instead of calories are now used by default for the
thermodynamic properties output by
subcrt(). That is,
E.units("J") is the default setting. Scripts that implicitly
depend on the previous default setting of
E.units("cal") may need
to be modified to produce expected output.
model column has been added to the OBIGT thermodynamic
database. This specifies the model for calculating standard thermodynamic
properties. Currently available models are ‘H2O’ (water), ‘HKF’
(revised Helgeson-Kirkham-Flowers model for aqueous species), ‘CGL’
(heat capacity equation for crystalline, gas, and liquid species),
‘Berman’ (Berman model for minerals), ‘AD’ (Akinfiev-Diamond
model for aqueous species), and ‘DEW’ (Deep Earth Water model, a
variation of HKF). All OBIGT data files that can be read using
add.OBIGT() must have this column; there is no back-compatibility
support for data files in the old format.
Backward compatibility for OBIGT data files without an
E_units column has been removed.
Order-of-magnitude (OOM) scaling of heat capacity coefficients for the CGL model in OBIGT data files has been removed. OOM scaling of HKF and DEW model parameters is still in place.
Change license from GPL (>= 2) to GPL-3.
Move aqueous CH4 back to ‘organic_aq.csv’ and move gaseous CH4 from ‘inorganic_gas.csv’ to ‘organic_gas.csv’.
OBIGT(no.organics = TRUE) to prune the database of
organic compounds except CH4. The ability to remove hundreds
of more complex organic compounds while keeping CH4 is useful for
some calculations for abiotic reactions in hydrothermal systems.
Merge ‘biotic_aq.csv’ into ‘organic_aq.csv’.
‘OBIGT/inorganic_cr.csv’: Add cobalt monoxide (CoO), guite (Co3O4), and zinc from Robie and Hemingway (1995).
‘OBIGT/organic_aq.csv’: Correct formulas of Na(Mal)-, K(Mal)-, and Dy(Mal)+. Thanks to Grayson Boyer.
logB.to.OBIGT() to fit selected thermodynamic parameters
(‘G’ and ‘S’ at 25 °C and ‘c1’, ‘c2’, and
‘omega’ HKF coefficients) to formation constants of aqueous species
as a function of temperature.
Add vignette custom_data.Rmd with description of database
format, data-entry conventions, and examples of customizing the
thermodynamic database using
stack_mosaic() to create stacked mosaic diagrams, where
the species formed in the first layer become the basis species for the
species formed in the second layer. This function implements the
procedure for making mosaic diagrams for bimetallic systems described in
loga_aq argument to
mosiac() (also present in new
stack_mosaic()) to control the activity of mosaiced
aqueous basis species. This obviates a workaround that was previously
used in the Mosaic Stacking 2 section of multi-metal.Rmd.
add.alpha() to add alpha value to a color specified in
any notation accepted by
rank.affinity() to calculate means of affinity
rankings for specified groups of proteins, intended for evolutionary
comparisons. The output of the new function can be used by
Add an as.residue argument to
normalize amino acid compositions by protein length.
Add a check to
add.protein() that all new protein IDs
(protein name + organism name) are unique.
affinity(), print a message to indicate whether
ionization calculations for proteins are being done.
seq2aa() allows an empty sequence (zero counts of amino
acids), useful for intializing a data frame of amino acid composition.
NaCl() has been rewritten to include pH dependence (i.e.
formation of HCl as well as NaCl) by using
equilibrate() instead of algebraic equations.
Ion size parameters used in the ‘Bdot’ equation have been
moved from the code for
‘extdata/thermo/Bdot_acirc.csv’, which is read into
thermo()$Bdot_acirc and can be changed by the user.
The two preceding features are used in a new demo
to show speciation of Y-Cl complexes as a function of NaCl concentration,
pH, T, and P, after
Guan et al. (2020).
AD() are no longer exported.
subcrt() should be used for all calculations of thermodynamic
EOSregress() and the associated demo and vignette.
Remove parallel calculations in
stringsAsFactors = FALSE to a
cbind() call in
mix(), needed for R < 4.0.0. Thanks to Xiaojia Jiang for the bug
In multi-metal.Rmd, work around absence of
hcl.colors() in R < 3.6.0.
diagram(): Improve handling of length > 1
lwd arguments for predominance diagrams. Because
field boundaries are drawn for the first species, then that species is
removed before drawing boundaries for the second species, and so on,
species for which different-colored or -styled lines are desired should
be placed at the top of the species list. This change makes possible one
less call to
diagram() in Mosaic Stacking 1 and 2 in
multi-metal.Rmd, and now the entire chalcopyrite field in Mosaic
Stacking 2 is bounded by a thick orange line, instead of just the border
Improve handling of non-integer coefficients in
expr.species(). For example, the result for FeS1.33 was previously
incorrectly formatted as FeS.33 but is now correctly formatted as
reaction component of the output of
subcrt() contains the
model for each species.
subcrt() produces an error if an aqueous species with the
model is requested but the DEW water model isn't
Add a zap argument to
mod.OBIGT() to clear
parameters of preexisting species (used by
loga.protein = 0 the default
(changed from -3).
Add tests ‘stack_mosaic.R’ and ‘stack_solubility.R’ (these create PDF files for visual inspection of results).
axis.label() produces labels with units delimited by
parentheses instead of a comma.
seq2aa() now has the sequence argument first and a
default of NA for protein (the protein name).
Remove unused ‘cutoff’ value in
Move ibasis argument to first position in
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.