Move read.fasta()
, count.aa()
, and aasum()
to
canprot package with different names.
Remove seq2aa()
.
Remove add.alpha()
. Now grDevices::adjustcolor()
is
used in stack_mosaic()
to add transparency.
Add FAQ question: Why are mineral stability boundaries curved on mosaic diagrams?
check.EOS()
now uses values of Born coefficients X
and Q that are consistent with either SUPCRT92 or DEW, depending
on the model
defined in OBIGT (HKF or DEW, respectively).
Add aqueous uranyl complexes from Migdisov et al. (2024) and related U-bearing minerals from Grenthe et al. (2020).
Except for HUO4-, aqueous uranium species from Shock et al. (1997) have been moved to ‘SLOP98.csv’.
Remove ispecies
from output of check.OBIGT()
to avoid
superfluous diffs.
Move americium complexes from ‘slop98.dat’ back to ‘inorganic_aq.csv’ (entropy of the element Am has been available for checking GHS self-consistency since version 1.4.0).
Add alkylamines, benzylamines, and aminiums from Robinson et al. (2024).
‘OBIGT/inorganic_cr.csv’: Add cerianite (CeO2) and chromite (FeCr2O4) from Robie and Hemingway (1995).
Add ‘demo/total_S.R’ (total activity of S–pH diagram for Fe-S-O-C minerals).
Restore lines
to the output of diagram()
for the x
and y values of predominance field boundaries.
OBIGT: Restore steam (H2O,g) in ‘inorganic_gas.csv’.
OBIGT: Fix sign of c parameter for nesquehonite. Thanks to James Leong and Grayson Boyer.
Add ‘demo/uranyl.R’, total (carbonate|sulfate)-pH diagrams for uranyl species, after Migdisov et al. (2024).
Adjust axis.label()
to show sum symbol for
mosaic()
-ed basis species used as a plot variable.
Rename ‘demo/total_S.R’ to ‘demo/sum_S.R’, change axes, and add solubility contours for Fe and Au.
Add ‘OBIGT/IGEM24.csv’ with updated data for Au and Cu complexes and SO4-2-bearing species from researchers at IGEM RAS.
For better readability, formulas of species are no longer
subscripted by axis.label()
(via expr.species()
). An
example of the new formatting is log fO2). Similar formatting
for other expressions has been used in the vignettes.
Add FAQ.Rmd vignette with the following questions: How is
‘CHNOSZ’ pronounced?, How should CHNOSZ be cited?, What
thermodynamic models are used in CHNOSZ?, When and why do equal-activity
boundaries depend on total activity?, How can minerals with polymorphic
transitions be added to the database?, How can I make a diagram with the
trisulfur radical ion (S3-)?, In OBIGT, what is the meaning of
T
for solids, liquids, and gases?, and How can mineral pH buffers
be plotted?
Add use.polymorphs argument to subcrt()
to allow
turning off automatic identification of stable polymorphs. This is used
in the FAQ (How can minerals with polymorphic transitions be added to the
database?).
Restore ‘EOSregress.R’ and its reverse dependencies eos-regress.Rmd and ‘demo/adenine.R’. Thanks to Kris Fecteau and Kirt Robinson for the suggestion.
mosaic()
now handles the situation where the alternate basis
species include one of the axis variables on a diagram (by changing the
argument names in its internal calls to affinity()
) and adjusts
the labels for the diagram accordingly (e.g. “total C”,
“total S”, etc.). Thanks to Evgeniy Bastrakov for the suggestion.
The environment variable CHNOSZ_BUILD_LARGE_VIGNETTES is used to control dpi in knitr chunk options. Setting this variable results in larger vignettes that are used for the CHNOSZ website; if this variable is unset (as in CRAN checks), a smaller package is built.
rank.affinity()
now returns average group rankings as
percentage values.
subcrt()
now outputs ΔG° and issues a warning above the
temperature limit for CP equations for minerals and other ‘CGL’
species. The temperature limit for CP equations is stored as the
opposite (negative) value in OBIGT. The previous behavior of outputting
NA for ΔG° and issuing a message is now reserved for phase stability
limits (i.e., melting, vaporization, or decomposition). See FAQ.Rmd
for details.
Add carrollite (Cu0.92Co2.07S4) from von der Heyden et al. (2024).
Modify cattierite (CoS2) and linnaeite (Co3S4) to use parameters from Pankratz et al. (1987) as listed by Williams-Jones and Vasyukova (2022).
Add 36 charged amino acids from Kitadai (2015) and update several others (Arg+, Arg-, Asp-, Glu-, His+, Lys+, Lys-, and Tyr-). Thanks to Grayson Boyer.
In OBIGT()
, load ‘Berman_cr.csv’ before
‘inorganic_cr.csv’ so that info("Fe2O3")
matches hematite
rather than maghemite.
Rename checkGHS()
and checkEOS()
to
check.GHS()
and check.EOS()
and change the default for
return.difference to TRUE.
Fix bugs in subcrt()
where exceed.Ttr and
IS arguments were not applied to automatically balanced
reactions.
Fix bug in dPdTtr()
where OBIGT database parameters were not
converted to Joules. This allows re-activating the tests for quartz
(which depend on the computed transition temperature) in
‘test-subcrt.R’.
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.
A 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’.
Modify 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/inorganic_cr.csv’: Modify linnaeite (Co3S4) to use 25 °C parameters from Robie and Hemingway (1995) and heat capacity coefficients from Pankratz et al. (1987).
‘OBIGT/inorganic_cr.csv’: Modify Co-pentlandite (Co9S8) to use parameters from Pankratz et al. (1987) as listed by Williams-Jones and Vasyukova (2022).
‘OBIGT/organic_aq.csv’: Correct formulas of Na(Mal)-, K(Mal)-, and Dy(Mal)+. Thanks to Grayson Boyer.
Add 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 add.OBIGT()
, mod.OBIGT()
, and
logB.to.OBIGT()
.
Add 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
multi-metal.Rmd.
Add loga_aq
argument to mosiac()
(also present in new
function 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 add.alpha()
to add alpha value to a color specified in
any notation accepted by col2rgb()
.
Add function 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
diagram()
.
Add an as.residue argument to add.protein()
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.
In 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 affinity()
and
equilibrate()
instead of algebraic equations.
Ion size parameters used in the ‘Bdot’ equation have been
moved from the code for nonideal()
to
‘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 yttrium.R
to show speciation of Y-Cl complexes as a function of NaCl concentration,
pH, T, and P, after
Guan et al. (2020).
cgl()
, hkf()
, and AD()
are no longer exported.
subcrt()
should be used for all calculations of thermodynamic
properties.
Remove EOSregress()
and the associated demo and vignette.
Remove parallel calculations in read.fasta()
and count.aa()
.
Remove revisit()
, findit()
, uniprot.aa()
,
nucleic.formula()
, and nucleic.complement()
.
Add stringsAsFactors = FALSE
to a cbind()
call in
mix()
, needed for R < 4.0.0. Thanks to Xiaojia Jiang for the bug
report.
In multi-metal.Rmd, work around absence of
hcl.colors()
in R < 3.6.0.
diagram()
: Improve handling of length > 1 col
,
lty
and 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
with bornite.
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
FeS1.33.
The reaction
component of the output of
subcrt()
contains the model
for each species.
subcrt()
produces an error if an aqueous species with the
‘DEW’ model
is requested but the DEW water model isn't
activated.
Add a zap argument to mod.OBIGT()
to clear
parameters of preexisting species (used by logB.to.OBIGT()
).
In affinity()
, make 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 thermo()$opt
.
Move ibasis argument to first position in
describe.basis()
.
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, E.units("J")
will
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.
The 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
Berman (1988),
info()
with a numeric argument now lists values of G
,
H
, S
, Cp
, and 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 aqueous species in the system Ca-Mg-Na-K-Al-Si-O-H-C-Cl from Miron et al. (2016) and Miron et al. (2017) to ‘GEMSFIT.csv’.
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.
The 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 thermo()$OBIGT
.
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).
Remove maxdiff()
and expect_maxdiff()
, previously
used in tests.
Remove read.blast()
, id.blast()
,
write.blast()
, def2gi()
, and example files in
‘extdata/bison’.
Remove eqdata()
, a script for extracting data from EQ3/6
output files.
Add ‘demo/Pourbaix.R’ (Eh-pH diagrams with isosolubility lines, after Pourbaix, 1974). This demo depends on the following two changes.
Revise 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’: Add willemite (Zn2SiO4) from Robie and Hemingway, 1995 and Barin et al., 1977 (heat capacity equation).
‘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 (dissociate
= FALSE
) is to not consider dissociation reactions.
In the return value of diagram()
, predominant.values
previously only contained affinities (extracted from the values
element of the eout
argument). Now it has the values for the
predominant species extracted from the values actually used to make the
plot (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
(Dick, 2021).
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.
Add option thermo()$opt$ionize.aa
to control calculation of
properties of ionized proteins in affinity()
.
Fix bug where protein ionization calculations with
ionize.aa()
were incorrectly affected by the setting of
E.units()
.
The Akinfiev-Diamond model is now activated by setting abbrv
= "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
compatibility feature).
An add argument has been added to species()
.
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 species(delete =
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 info()
or subcrt()
with a single character argument to identify gaseous
methane, which is common in geochemistry. (Note that info("CH4",
"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 thermo()$OBIGT
, and
functions add.OBIGT()
and mod.OBIGT()
replace the previous
add.obigt()
and mod.obigt()
.
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
a diagram.
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 today()
,
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 amorphous Mn(OH)2 from Wagman et al., 1982 (GHS) and Senoh et al., 1998 (estimated Cp values).
‘inorganic_cr.csv’: Add huebnerite (MnWO4) from Liu and Xiao, 2020.
‘inorganic_cr.csv’: Add linnaeite (Co3S4) and Co-pentlandite (Co9S8) from Vaughan and Craig, 1978 and cattierite (CoS2) and cobalt from Robie and Hemingway, 1995.
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 dy
argument
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
settings.
which.pmax()
was rewritten to speed up identification of
predominant species, and the drawing of field boundaries in diagram()
was made more efficient. The latter change has prompted the removal of
the ‘lty.aq’ and ‘lty.cr’ arguments from diagram()
.
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
autobalancing.
Setting the water model with water()
updates the literature
references in thermo()$OBIGT
.
thermo.refs()
shows CHNOSZ version and date.
subcrt()
and affinity()
use degree symbol
(°C) in messages.
Change thermo$...
to thermo()$...
in messages and
comments.
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 R CMD
check
.
Remove wjd()
(implementation of Gibbs energy minimization
method from White et al., 1958)
and demo wjd.R
and supporting data file.
Add "QCa" as a keyword for preset species in basis()
(glutamine, cysteine, acetic acid, H2O, O2).
Add T and P arguments to retrieve()
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.