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")
Install logKcalc from GitHub. Here are the vignettes from the package:
Install canprot from GitHub or CRAN. Here you can browse the HTML help pages and vignettes from the package:
Install JMDplots from GitHub. See below for selected vignettes or all vignettes from the package.
![]() |
Chemical characteristics of human microbiomes (2023) preprint ![]() |
![]() | Geochemical influence on protein evolution (2023) preprint |
![]() | Chemical links between redox conditions and community reference proteomes (2023) |
![]() | Water as a reactant in the differential expression of proteins in cancer (2021) |
CHNOSZ, logKcalc, canprot, and JMDplots are free software made available under the GPL. The maintainer of these packages is Jeffrey Dick. Please contact him at j3ffdick@gmail.com.
Last updated: 2023-05-30