The CHNOSZ package for R provides an integrated set of tools for thermodynamic calculations in aqueous geochemistry and geobiochemistry. It has functions for writing balanced reactions to form species from user-selected basis species and for calculating the standard molal properties of species and reactions, including the standard Gibbs energy and equilibrium constant (details). Calculations of the non-equilibrium chemical affinity and equilibrium chemical activity of species can be portrayed on diagrams as a function of temperature, pressure, or activity of basis species; in two dimensions, this gives a maximum affinity or predominance diagram. The diagrams have formatted chemical formulas and axis labels, and water stability limits can be added to Eh-pH, logfO2-T, and other diagrams with a redox variable. The package has been developed to handle common calculations in aqueous geochemistry, such as solubility due to complexation of metal ions, mineral buffers of redox or pH, and changing the basis species across a diagram ("mosaic diagrams"). CHNOSZ also implements a group additivity algorithm for the standard thermodynamic properties of proteins.
add.OBIGT("SUPCRT92")
basis(c("Fe", "H2", "H2S", "H2O"),
c("cr", "aq", "aq", "liq"))
species(c("hematite", "pyrite",
"pyrrhotite", "magnetite"))
a <- affinity(H2S = c(-4, -1.5),
H2 = c(-6, -1), T = 300, P = 700)
diagram(a, fill = "terrain")
title(main = "Fe-O-H-S")
legend("bottomright",
c("300 °C, 700 bar"))
More diagrams
All examples
thermo.refs()
dumpdata("alldata.csv")
install.packages("CHNOSZ")
library(CHNOSZ)
examples()
install.packages("CHNOSZ",
repos = "https://R-Forge.R-project.org")
CHNOSZ and logKcalc are free software made available under the GPL. The maintainer of these packages is Jeffrey Dick. Please contact him at j3ffdick@gmail.com.
But wait, there's more! Swipe across or click the next tab for R Packages for Geochemical Biology: canprot, chem16S, and JMDplots.
Last updated: 2024-03-03