[CHNOSZ-commits] r271 - in pkg/CHNOSZ: . inst vignettes
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Oct 30 14:06:24 CET 2017
Author: jedick
Date: 2017-10-30 14:06:24 +0100 (Mon, 30 Oct 2017)
New Revision: 271
Modified:
pkg/CHNOSZ/DESCRIPTION
pkg/CHNOSZ/inst/NEWS
pkg/CHNOSZ/vignettes/anintro.Rmd
Log:
anintro.Rmd: add "The basics"
Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION 2017-10-30 03:40:13 UTC (rev 270)
+++ pkg/CHNOSZ/DESCRIPTION 2017-10-30 13:06:24 UTC (rev 271)
@@ -1,6 +1,6 @@
Date: 2017-10-30
Package: CHNOSZ
-Version: 1.1.0-69
+Version: 1.1.0-70
Title: Thermodynamic Calculations for Geobiochemistry
Author: Jeffrey Dick
Maintainer: Jeffrey Dick <j3ffdick at gmail.com>
Modified: pkg/CHNOSZ/inst/NEWS
===================================================================
--- pkg/CHNOSZ/inst/NEWS 2017-10-30 03:40:13 UTC (rev 270)
+++ pkg/CHNOSZ/inst/NEWS 2017-10-30 13:06:24 UTC (rev 271)
@@ -1,4 +1,4 @@
-CHANGES IN CHNOSZ 1.1.0-69 (2017-10-30)
+CHANGES IN CHNOSZ 1.1.0-70 (2017-10-30)
---------------------------------------
MAJOR CHANGES:
Modified: pkg/CHNOSZ/vignettes/anintro.Rmd
===================================================================
--- pkg/CHNOSZ/vignettes/anintro.Rmd 2017-10-30 03:40:13 UTC (rev 270)
+++ pkg/CHNOSZ/vignettes/anintro.Rmd 2017-10-30 13:06:24 UTC (rev 271)
@@ -94,7 +94,7 @@
timeit <- NULL
```
-# First steps
+# Overview
This document introduces the usage of CHNOSZ, a package for the [R software environment](http://r-project.org).
For more information on R, see "[An Introduction to R](https://cran.r-project.org/manuals.html)" and the [contributed documentation](https://cran.r-project.org/other-docs.html) for R.
@@ -175,8 +175,53 @@
data(thermo) ## clear system settings
```
-# Thermodynamic database and chemical formulas
+# The basics
+* Use <span style="color:green">`info()`</span> to search the thermodynamic database
+
+```{r info_adenine}
+info("adenine")
+iadenine <- info("adenine")
+info(iadenine)
+```
+
+* Use <span style="color:green">`thermo.refs()`</span> to look up references
+```{r refs_adenine}
+thermo.refs(iadenine)
+```
+
+* Use <span style="color:green">`subcrt()`</span> to calculate standard molal thermodynamic properties
+
+```{r bsad_adenine, fig.margin=TRUE, fig.width=4, fig.height=4, small.mar=TRUE, dpi=dpi, out.width="100%", echo=FALSE, message=FALSE, results="hide", fig.cap="Nucleobase equal-activity diagram.", cache=TRUE, pngquant=pngquant, timeit=timeit}
+basis("CHNOSe")
+species(c("adenine", "cytosine", "guanine", "thymine", "uracil"))
+a <- affinity(H2O = c(-12, -0), Eh = c(-0.5, 0), T = 100)
+diagram(a)
+```
+
+```{r subcrt_adenine}
+subcrt("adenine", T = 100)
+```
+
+```{r equil_adenine, fig.margin=TRUE, fig.width=4, fig.height=4, small.mar=TRUE, dpi=dpi, out.width="100%", echo=FALSE, message=FALSE, results="hide", fig.cap="Nucleobase metastable equilibrium activities.", cache=TRUE, pngquant=pngquant, timeit=timeit}
+basis("e-", 3.6)
+a <- affinity(H2O = c(-12, 0), T = 100)
+e <- equilibrate(a)
+diagram(e, ylim=c(-8, 0))
+```
+
+* Use <span style="color:red">`basis()`</span> – <span style="color:red">`species()`</span> – <span style="color:green">`affinity()`</span> – <span style="color:green">`diagram()`</span> (BSAD) to construct activity diagrams
+
+```{r bsad_adenine, eval=FALSE}
+```
+
+* Use <span style="color:green">`equilibrate()`</span> to calculate equilibrium activities
+
+```{r equil_adenine, eval=FALSE}
+```
+
+# Thermodynamic database
+
An attempt has been made to provide a primary database (OBIGT) that has no major inconsistencies.
As the database includes datasets from many sources, it can not be guaranteed to be fully internally consistent.
For crucial problems, check not only the accuracy of entries in the database, but also the *suitability of the data* for your problem.
More information about the CHNOSZ-commits
mailing list