[CHNOSZ-commits] r779 - in pkg/CHNOSZ: . man vignettes
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Mar 12 13:03:20 CET 2023
Author: jedick
Date: 2023-03-12 13:03:20 +0100 (Sun, 12 Mar 2023)
New Revision: 779
Modified:
pkg/CHNOSZ/DESCRIPTION
pkg/CHNOSZ/man/util.units.Rd
pkg/CHNOSZ/vignettes/anintro.Rmd
Log:
Don't convert PM90 heat capacity to calories in anintro.Rmd
Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION 2023-03-11 13:34:27 UTC (rev 778)
+++ pkg/CHNOSZ/DESCRIPTION 2023-03-12 12:03:20 UTC (rev 779)
@@ -1,6 +1,6 @@
-Date: 2023-03-11
+Date: 2023-03-12
Package: CHNOSZ
-Version: 1.9.9-70
+Version: 1.9.9-71
Title: Thermodynamic Calculations and Diagrams for Geochemistry
Authors at R: c(
person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"),
Modified: pkg/CHNOSZ/man/util.units.Rd
===================================================================
--- pkg/CHNOSZ/man/util.units.Rd 2023-03-11 13:34:27 UTC (rev 778)
+++ pkg/CHNOSZ/man/util.units.Rd 2023-03-12 12:03:20 UTC (rev 779)
@@ -69,11 +69,12 @@
convert(-80, "E0")
convert(-80, "E0", pH = 5)
convert(-80, "E0", pH = 5, logaH2O = -5)
-# Calorie to/from joule
-convert(10, "J")
-convert(10, "cal")
-# cm3bar to joules
-convert(10, "joules")
+# Convert from calories to Joules
+convert(1, "J") # 1 cal = 4.184 J
+# Convert from Joules to calories
+convert(1, "cal") # 1 J = 0.239 cal
+# Convert cm3bar to Joules
+convert(10, "joules") # 10 cm3.bar = 1 J
## Setting the units
# Make K the units for temperature arguments to subcrt() and affinity()
Modified: pkg/CHNOSZ/vignettes/anintro.Rmd
===================================================================
--- pkg/CHNOSZ/vignettes/anintro.Rmd 2023-03-11 13:34:27 UTC (rev 778)
+++ pkg/CHNOSZ/vignettes/anintro.Rmd 2023-03-12 12:03:20 UTC (rev 779)
@@ -343,7 +343,7 @@
convert(CH4dat$G, "J")
```
-As expected, we find that converting the database value to J/mol gives the same result as running <span style="color:green">`subcrt()`</span> with the default units of J.
+Note that converting the database value to J/mol gives the same result as running `subcrt("CH4", T = 25)` with the default <span style="color:red">`E.units()`</span> setting of J.
Use <span style="color:red">`reset()`</span> to restore the units and all other settings for CHNOSZ to their defaults:
```{r reset}
@@ -1154,14 +1154,14 @@
```
Let's compare experimental values of heat capacity of four proteins, from @PM90, with those calculated using group additivity.
-After dividing Privalov and Makhatadze's experimental values by the lengths of the proteins to get per-residue values, we convert those to calories, then plot them.
+We divide Privalov and Makhatadze's experimental values by the lengths of the proteins to get per-residue values, then plot them.
```{r protein_Cp, fig.margin=TRUE, fig.width=4, fig.height=4, small.mar=TRUE, dpi=dpi, out.width="100%", echo=FALSE, message=FALSE, fig.cap='The heat capacity calculated by group additivity closely approximates experimental values for aqueous proteins. For a related figure showing the effects of ionization in the calculations, see <span style="color:blue">`?ionize.aa`</span>.', cache=TRUE, pngquant=pngquant, timeit=timeit}
PM90 <- read.csv(system.file("extdata/cpetc/PM90.csv", package = "CHNOSZ"))
plength <- protein.length(colnames(PM90)[2:5])
Cp_expt <- t(t(PM90[, 2:5]) / plength)
-matplot(PM90[, 1], convert(Cp_expt, "cal"), type = "p", pch = 19,
- xlab = axis.label("T"), ylab = axis.label("Cp0"), ylim = c(28, 65))
+matplot(PM90[, 1], Cp_expt, type = "p", pch = 19,
+ xlab = axis.label("T"), ylab = axis.label("Cp0"), ylim = c(110, 280))
for(i in 1:4) {
pname <- colnames(Cp_expt)[i]
aq <- subcrt(pname, "aq", T = seq(0, 150))$out[[1]]
More information about the CHNOSZ-commits
mailing list