CHNOSZ-package: Chemical Thermodynamics and Activity Diagrams

Description Getting Help Warning Overview Acknowledgements Known Bugs


CHNOSZ is a package for thermodynamic calculations, primarily with applications in geochemistry and compositional biology. It can be used to calculate the standard molal thermodynamic properties and chemical affinities of reactions relevant to geobiochemical processes, and to visualize the equilibrium activities of species on chemical speciation and predominance diagrams.

Getting Help

The major features of the package are outlined in the Overview given below, with links to specific help topics. See the vignette An Introduction to CHNOSZ (anintro.Rmd) for more in-depth example of the usage the functions. The help pages have been given either keywords or “concept index entries” which are visible to (aka ??). Use ??primary to browse the most commonly used functions and ??secondary to see other high-level, but less often-used functions. ??protein shows functions for working with proteins, and ??extra lists functions with extra functionality (beyond the main workflow). For help on the thermodynamic database, use ??"thermodynamic data". Finally, ??utilities (one of the standard R keywords) can be used to locate utility functions in the package; these include useful tools for modifying the database, converting units, reading protein sequence files, parsing chemical formulas, etc.


All thermodynamic data and examples are provided on an as-is basis. It is up to you to check not only the accuracy of the data, but also the suitability of the data AND computational techniques for your problem. By combining data taken from different sources, it is possible to build an inconsistent and/or nonsensical calculation. An attempt has been made to provide a primary database (OBIGT) that is internally consistent, but no guarantee can be made. If there is any doubt about the accuracy or suitability of data for a particular problem, please consult the primary sources (see thermo.refs).


Major features in CHNOSZ:

Here are some tips for new users:


This package would not exist without the leadership and encouragement of Professor Harold C. Helgeson. Hal and his students and collaborators are in some way responsible for many of the equations and data contained in this package. A direct contribution of code is the file H2O92D.f, taken from the SUPCRT92 distribution, with minor modifications (masking of WRITE and STOP statements) made for compatibility with an R environment and for allowing sub-zero degrees C calculations (keep valTP flag TRUE). The revised Helgeson-Kirkham-Flowers equations of state are used in this package, together with the thermodynamic properties and parameters for many species taken from numerous papers coauthored by Helgeson.

Work on this package at U.C. Berkeley from ~2003–2008 was supported by research grants to HCH from the U.S. National Science Foundation and Department of Energy. In 2009–2011, development of this package was based upon work supported by the National Science Foundation under grant EAR-0847616. The files in extdata/bison are derived from BLAST calculations made on the Saguaro high performance computer at Arizona State University.

Known Bugs

subcrt does not correctly identify the stable polymorph of some minerals at high temperature.

The values generated by buffer may not be applied correctly by affinity in calculating the affinities of the formation reactions. (The values returned by affinity(..., return.buffer=TRUE) do appear to be correct in the examples).

There is an unidentified inconsistency in transfer causing the reaction boundaries in one of the examples (apc("closed")) to be offset from the stability diagram. On the other hand, feldspar("closed") appears to work correctly.

CHNOSZ documentation built on Aug. 29, 2017, 3:01 p.m.