[CHNOSZ-commits] r160 - in pkg/CHNOSZ: . R data demo inst inst/extdata/cpetc inst/extdata/thermo man vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Feb 18 08:17:19 CET 2017


Author: jedick
Date: 2017-02-18 08:17:18 +0100 (Sat, 18 Feb 2017)
New Revision: 160

Removed:
   pkg/CHNOSZ/inst/extdata/cpetc/BKM60_Fig7.csv
   pkg/CHNOSZ/inst/extdata/thermo/groups_big.csv
   pkg/CHNOSZ/inst/extdata/thermo/groups_small.csv
Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/R/transfer.R
   pkg/CHNOSZ/R/util.plot.R
   pkg/CHNOSZ/data/OBIGT.csv
   pkg/CHNOSZ/demo/activity_ratios.R
   pkg/CHNOSZ/inst/NEWS
   pkg/CHNOSZ/inst/extdata/thermo/OBIGT-2.csv
   pkg/CHNOSZ/man/CHNOSZ-package.Rd
   pkg/CHNOSZ/man/EOSregress.Rd
   pkg/CHNOSZ/man/data.Rd
   pkg/CHNOSZ/man/diagram.Rd
   pkg/CHNOSZ/man/extdata.Rd
   pkg/CHNOSZ/man/transfer.Rd
   pkg/CHNOSZ/man/util.data.Rd
   pkg/CHNOSZ/man/util.plot.Rd
   pkg/CHNOSZ/vignettes/anintro.Rmd
   pkg/CHNOSZ/vignettes/eos-regress.Rmd
   pkg/CHNOSZ/vignettes/vig.bib
Log:
eos-regress.Rmd: add "Making a pseudospecies: H4SiO4"


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2017-02-17 19:16:30 UTC (rev 159)
+++ pkg/CHNOSZ/DESCRIPTION	2017-02-18 07:17:18 UTC (rev 160)
@@ -1,6 +1,6 @@
 Date: 2017-02-18
 Package: CHNOSZ
-Version: 1.0.8-49
+Version: 1.0.8-50
 Title: Chemical Thermodynamics and Activity Diagrams
 Author: Jeffrey Dick
 Maintainer: Jeffrey Dick <j3ffdick at gmail.com>

Modified: pkg/CHNOSZ/R/transfer.R
===================================================================
--- pkg/CHNOSZ/R/transfer.R	2017-02-17 19:16:30 UTC (rev 159)
+++ pkg/CHNOSZ/R/transfer.R	2017-02-18 07:17:18 UTC (rev 160)
@@ -805,12 +805,9 @@
   # call feldspar("closed")
   # or feldspar("open")
   # setup conditions for feldspar reaction
-  #basis(c('Al+3','SiO2','K+','H2O','H+','O2'))
   basis(delete=TRUE)
-  # SLS89 use H4SiO4 instead of SiO2 - use the secondary database
-  add.obigt()
-  basis(c('Al+3','pseudo-H4SiO4_25C','K+','H2O','H+','O2'))
-  # some of SLS89's initial conditions
+  basis(c('Al+3','pseudo-H4SiO4','K+','H2O','H+','O2'))
+  # some of SLS94's initial conditions
   basis(c('K+','H4SiO4'),c(-6,-6))
   # the candidate species
   species(delete=TRUE)
@@ -822,7 +819,7 @@
   # identify the basis species whose activities will
   # be plotted by transfer()
   plot <- c(2,3) 
-  # return to SLS89 initial conditions
+  # return to SLS94 initial conditions
   basis('pH',4)
   # start with miniscule amounts of all species
   species(1:5,-999)

Modified: pkg/CHNOSZ/R/util.plot.R
===================================================================
--- pkg/CHNOSZ/R/util.plot.R	2017-02-17 19:16:30 UTC (rev 159)
+++ pkg/CHNOSZ/R/util.plot.R	2017-02-18 07:17:18 UTC (rev 160)
@@ -210,27 +210,6 @@
   for(i in 1:l) mtext(main[i], line=line+l-i, ...)
 }
 
-
-residualsplot <- function(residuals,property="Cp",model="big") {
-  # a barchart useful for plotting residuals 
-  # (see 'xadditivy' vignette)
-  # plot horizontal bars stacked with largest on top
-  # put them in order of increasing size
-  residuals <- residuals[order(abs(residuals))]
-  bp <- barplot(residuals,horiz=TRUE,axisnames=FALSE)
-  # to plot names, first find the sign of the residual
-  ispos <- residuals > 0
-  # put some padding around the names
-  nr <- paste("",names(residuals),"")
-  # align left or right depending on sign of residual
-  text(0,bp[ispos],nr[ispos],adj=1)
-  text(0,bp[!ispos],nr[!ispos],adj=0)
-  # assemble stuff for the title
-  title(main=paste("residuals in",property,"using",model,"model"))
-  # add axis label
-  mtext(axis.label(property),1,3)
-}
-
 # get colors for range of ZC values 20170206
 ZC.col <- function(z) {
   # scale values to [1, 1000]

Modified: pkg/CHNOSZ/data/OBIGT.csv
===================================================================
--- pkg/CHNOSZ/data/OBIGT.csv	2017-02-17 19:16:30 UTC (rev 159)
+++ pkg/CHNOSZ/data/OBIGT.csv	2017-02-18 07:17:18 UTC (rev 160)
@@ -1833,6 +1833,7 @@
 oxaloacetate-2,NA,C4H2O5-2,aq,CS16,NA,21.Dec.16,-190600,-230300,57.2,-60.7,66.1,11.7014,19.7949,0.1041,-3.5973,-29.4812,-4.8417,2.3465,-2
 "pyruvic acid",NA,CH3COCOOH,aq,CS16,NA,21.Dec.16,-117000,-140300,62.1,36.3,64.6,10.5381,17.1584,0.7032,-3.4883,37.4903,-1.3746,-0.176,0
 pyruvate,NA,CH3COCOO-,aq,CS16,NA,21.Dec.16,-113600,-137400,60.4,-3.7,51.5,9.0836,13.862,1.4526,-3.3521,11.2428,-4.1508,0.7144,-1
+pseudo-H4SiO4,NA,H4SiO4,aq,CHNOSZ,NA,18.Feb.17,-312565,-346409,51.4246,-40.0964,52.1998,89.2031,-176.5071,-452.1431,101.36051,67.0854,-52.0776,0.1215745,0
 acanthite,Acn,Ag2S,cr1,HDN+78,NA,5.May.78,-9446,-7550,34.3,NA,34.2,15.63,8.6,0,0,0,0,0,450
 acanthite,Acn,Ag2S,cr2,HDN+78,NA,5.May.78,-9235.197,-7024.866,35.3543,NA,34.2,1.819,53,0,0,0,0,0,620
 acanthite,Acn,Ag2S,cr3,HDN+78,NA,5.May.78,-8227.324,-4960.457,38.898,NA,34.2,21.6,0,0,0,0,0,0,1000

Modified: pkg/CHNOSZ/demo/activity_ratios.R
===================================================================
--- pkg/CHNOSZ/demo/activity_ratios.R	2017-02-17 19:16:30 UTC (rev 159)
+++ pkg/CHNOSZ/demo/activity_ratios.R	2017-02-18 07:17:18 UTC (rev 160)
@@ -10,16 +10,14 @@
 ## Steinmann et al., 1994 (http://ccm.geoscienceworld.org/content/42/2/197)
 ## Garrels and Christ, p. 361 (http://www.worldcat.org/oclc/517586)
 ## https://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc/html/final-75.html
-# use add.obigt to make H4SiO4 pseudospecies available as a basis species
-add.obigt()
-basis(c("Al+3", "pseudo-H4SiO4_25C", "K+", "H2O", "H+", "O2"))
+# the pseudospecies H4SiO4 is used as a basis species
+# (see the vignette "Regressing thermodynamic data")
+basis(c("Al+3", "pseudo-H4SiO4", "K+", "H2O", "H+", "O2"))
 species(c("gibbsite", "muscovite", "kaolinite", "pyrophyllite", "k-feldspar"))
 a <- affinity(H4SiO4 = c(-6, -2, res), `K+` = c(-3, 6, res))
 diagram(a, ylab = ratlab("K+"), fill = fill)
 title(main = syslab(c("K2O", "Al2O3", "SiO2", "H2O")))
 legend("bottomleft", describe.property(c("T", "P"), c(25, 1)), bty = "n")
-# reset database
-data(thermo)
 
 ## H2O-CaO-MgO-SiO2 at 300 degree C and 1000 bar
 ## Helgeson et al., 1969, p. 136 (http://www.worldcat.org/oclc/902423149)

Modified: pkg/CHNOSZ/inst/NEWS
===================================================================
--- pkg/CHNOSZ/inst/NEWS	2017-02-17 19:16:30 UTC (rev 159)
+++ pkg/CHNOSZ/inst/NEWS	2017-02-18 07:17:18 UTC (rev 160)
@@ -1,4 +1,4 @@
-CHANGES IN CHNOSZ 1.0.8-49 (2017-02-18)
+CHANGES IN CHNOSZ 1.0.8-50 (2017-02-18)
 ---------------------------------------
 
 DOCUMENTATION:
@@ -6,7 +6,8 @@
 - Replace anintro.Rnw (using Sweave) with rewritten anintro.Rmd (using
   knitr with Tufte style).
 
-- Add eos-regress.Rmd (Regressing thermodynamic data).
+- Add eos-regress.Rmd (Regressing thermodynamic data), including
+  section on Making a pseudospecies: H4SiO4.
 
 - New demos: bugstab.R (potential diagrams for microbial proteins in
   colorectal cancer), activity_ratios.R (mineral stability diagrams
@@ -76,12 +77,14 @@
 - OBIGT.csv: Add data for citric acid cycle metabolites from Canovas and
   Shock, 2016.
 
+- OBIGT.csv: Add H4SiO4 pseudospecies (pseudo-H4SiO4); see calculations
+  in eos-regress.Rmd.
+
+- OBIGT-2.csv: Rename H4SiO4 to pseudo-H4SiO4_Ste01 (Steffánson, 2001).
+
 - extdata: Add fasta/rubisco.fasta and cpetc/*.csv files SS98_Fig5a,
   SS98_Fig5b, PM90 (all used by anintro.Rmd).
 
-- OBIGT-2.csv: Make pseudospecies for H4SiO4: rename existing H4SiO4 to
-  pseudo-H4SiO4_highT, and add pseudo-H4SiO4_25C.
-
 CLEANUP AND BUG FIXES:
 
 - subcrt() returns `loggam` using the common logarithm; add

Deleted: pkg/CHNOSZ/inst/extdata/cpetc/BKM60_Fig7.csv
===================================================================
--- pkg/CHNOSZ/inst/extdata/cpetc/BKM60_Fig7.csv	2017-02-17 19:16:30 UTC (rev 159)
+++ pkg/CHNOSZ/inst/extdata/cpetc/BKM60_Fig7.csv	2017-02-18 07:17:18 UTC (rev 160)
@@ -1,425 +0,0 @@
-type,pH,Eh
-normal,8.9,0.216
-normal,9,0.266
-normal,8.3,0.277
-normal,8.11,0.299
-normal,7.98,0.328
-normal,7.66,0.291
-normal,7.61,0.32
-normal,7.68,0.322
-normal,7.65,0.337
-normal,7.82,0.348
-normal,7.64,0.359
-normal,7.49,0.359
-normal,7.41,0.358
-normal,7.29,0.343
-normal,7.3,0.333
-normal,7.33,0.325
-normal,7.36,0.321
-normal,7.11,0.311
-normal,7.1,0.32
-normal,7.46,0.39
-normal,7.46,0.397
-normal,7.58,0.4
-normal,7.39,0.419
-normal,7.97,0.38
-normal,8.15,0.399
-normal,7.98,0.41
-normal,7.99,0.426
-normal,7.7,0.445
-normal,7.67,0.453
-normal,7.75,0.471
-normal,7.58,0.497
-normal,7.7,0.512
-normal,7.6,0.583
-normal,7.18,0.495
-normal,7.33,0.435
-normal,7.13,0.453
-normal,6.91,0.441
-normal,6.97,0.425
-normal,6.8,0.427
-normal,7.09,0.412
-normal,7.08,0.401
-normal,7.15,0.392
-normal,6.98,0.399
-normal,6.96,0.389
-normal,6.83,0.389
-normal,6.79,0.395
-normal,6.79,0.404
-normal,6.8,0.41
-normal,6.71,0.408
-normal,7.11,0.38
-normal,7.19,0.371
-normal,7.11,0.367
-normal,7.23,0.359
-normal,6.9,0.363
-normal,6.82,0.366
-normal,6.57,0.386
-normal,6.44,0.37
-normal,6.51,0.359
-normal,6.63,0.35
-normal,6.28,0.362
-normal,6.21,0.366
-normal,5.97,0.373
-normal,6.19,0.408
-normal,6.04,0.401
-normal,5.92,0.403
-normal,5.99,0.408
-normal,6.03,0.412
-normal,5.96,0.415
-normal,5.98,0.425
-normal,6.18,0.431
-normal,6.15,0.437
-normal,6.3,0.444
-normal,6.28,0.45
-normal,6.57,0.452
-normal,6.69,0.44
-normal,6.59,0.422
-normal,6.57,0.416
-normal,6.7,0.48
-normal,6.61,0.484
-normal,6.61,0.478
-normal,6.87,0.508
-normal,6.67,0.535
-normal,6.7,0.564
-normal,6.49,0.57
-normal,6.49,0.587
-normal,6.52,0.6
-normal,6.18,0.614
-normal,6.19,0.588
-normal,6.1,0.579
-normal,5.97,0.595
-normal,6.29,0.519
-normal,6.38,0.463
-normal,6.19,0.472
-normal,6.23,0.48
-normal,6.21,0.491
-normal,6.14,0.491
-normal,6.09,0.493
-normal,6.01,0.501
-normal,6.01,0.49
-normal,6.01,0.48
-normal,6.04,0.475
-normal,6.06,0.471
-normal,6.05,0.464
-normal,5.98,0.435
-normal,5.85,0.438
-normal,5.85,0.45
-normal,5.82,0.46
-normal,5.74,0.44
-normal,5.75,0.405
-normal,5.67,0.39
-normal,5.4,0.386
-normal,5.39,0.415
-normal,5.23,0.44
-normal,5.48,0.441
-normal,5.49,0.446
-normal,5.51,0.452
-normal,5.45,0.46
-normal,5.53,0.465
-normal,5.6,0.478
-normal,5.75,0.497
-normal,5.77,0.517
-normal,5.99,0.551
-normal,5.91,0.562
-normal,5.62,0.559
-normal,5.69,0.603
-normal,5.79,0.622
-normal,5.39,0.534
-normal,5.42,0.501
-normal,5.41,0.494
-normal,5.41,0.486
-normal,5.41,0.479
-normal,5.33,0.48
-normal,5.27,0.49
-normal,5.28,0.494
-normal,5.28,0.499
-normal,5.24,0.505
-normal,5.22,0.44
-normal,5.3,0.452
-normal,5.19,0.459
-normal,5.15,0.464
-normal,5.1,0.471
-normal,5.16,0.475
-normal,4.98,0.412
-normal,4.69,0.414
-normal,4.66,0.405
-normal,4.51,0.437
-normal,5.08,0.514
-normal,5.12,0.521
-normal,5.1,0.559
-normal,5.2,0.564
-normal,5.22,0.58
-normal,5.08,0.634
-normal,4.88,0.637
-normal,4.8,0.655
-normal,5.08,0.69
-normal,5.41,0.693
-normal,4.82,0.734
-normal,4.49,0.678
-normal,4.37,0.649
-normal,4.24,0.621
-normal,3.72,0.619
-normal,3.08,0.602
-normal,3.48,0.595
-normal,3.6,0.598
-normal,3.85,0.598
-normal,3.67,0.579
-normal,3.47,0.579
-normal,3.34,0.581
-normal,3.29,0.574
-normal,3.3,0.55
-normal,3.51,0.551
-normal,4.39,0.594
-normal,4.49,0.584
-normal,4.71,0.572
-normal,4.79,0.558
-normal,4.69,0.554
-normal,4.3,0.572
-normal,4.11,0.57
-normal,4.03,0.555
-normal,3.95,0.542
-normal,3.88,0.561
-normal,3.85,0.555
-normal,3.82,0.55
-normal,3.78,0.544
-normal,4.68,0.52
-normal,4.72,0.514
-normal,4.78,0.509
-normal,4.89,0.513
-normal,4.78,0.499
-normal,4.38,0.521
-normal,4.19,0.51
-normal,4.33,0.509
-normal,4.3,0.505
-normal,4.3,0.499
-normal,4.28,0.49
-normal,4.24,0.479
-normal,4.4,0.494
-normal,4.45,0.491
-normal,4.49,0.486
-normal,4.52,0.476
-normal,4.48,0.475
-normal,4.4,0.461
-normal,4.32,0.467
-normal,4.25,0.446
-normal,4.17,0.442
-normal,4.06,0.456
-normal,4.16,0.463
-normal,4.05,0.468
-normal,3.99,0.474
-normal,3.95,0.47
-normal,4.1,0.494
-normal,4.06,0.49
-normal,3.99,0.494
-normal,3.91,0.498
-normal,4,0.513
-normal,3.96,0.516
-normal,3.96,0.524
-normal,3.91,0.524
-normal,3.86,0.523
-normal,3.89,0.519
-normal,3.84,0.514
-normal,3.77,0.509
-normal,3.81,0.459
-normal,3.7,0.465
-normal,3.76,0.471
-normal,3.65,0.48
-normal,3.69,0.486
-normal,3.7,0.491
-normal,3.7,0.495
-normal,3.5,0.478
-normal,2.84,0.501
-normal,3.23,0.493
-normal,3.33,0.494
-normal,3.31,0.504
-normal,3.27,0.509
-normal,3.25,0.513
-normal,3.21,0.513
-normal,3.14,0.513
-normal,3.43,0.499
-normal,3.51,0.502
-normal,3.55,0.494
-normal,3.5,0.509
-normal,3.55,0.51
-normal,3.52,0.516
-normal,3.41,0.523
-normal,3.4,0.528
-normal,3.43,0.535
-normal,3.29,0.532
-normal,3.55,0.532
-normal,3.6,0.536
-normal,3.67,0.532
-normal,3.7,0.523
-normal,3.61,0.524
-normal,3.63,0.527
-normal,3.33,0.536
-wet,3.69,0.432
-wet,3.74,0.409
-wet,4.01,0.406
-wet,3.8,0.39
-wet,3.68,0.372
-wet,3.83,0.349
-wet,3.8,0.335
-wet,4.08,0.244
-wet,4.14,0.247
-wet,4.27,0.268
-wet,4.72,0.304
-wet,4.62,0.323
-wet,4.54,0.354
-wet,4.84,0.315
-wet,4.96,0.308
-wet,5.13,0.301
-wet,5.1,0.289
-wet,5.07,0.274
-wet,4.9,0.247
-wet,5.11,0.203
-wet,5.12,0.197
-wet,4.99,0.334
-wet,5.08,0.331
-wet,5.04,0.326
-wet,5.11,0.323
-wet,5.15,0.322
-wet,5.07,0.343
-wet,4.96,0.354
-wet,4.78,0.354
-wet,4.81,0.36
-wet,4.85,0.365
-wet,4.77,0.373
-wet,4.78,0.379
-wet,4.71,0.377
-wet,4.64,0.38
-wet,4.72,0.383
-wet,4.77,0.386
-wet,4.7,0.388
-wet,4.74,0.391
-wet,4.81,0.392
-wet,4.75,0.395
-wet,4.59,0.402
-wet,4.03,0.433
-wet,5.35,0.364
-wet,5.3,0.368
-wet,5.83,0.339
-wet,5.61,0.334
-wet,5.68,0.321
-wet,5.41,0.312
-wet,5.47,0.3
-wet,5.55,0.29
-wet,5.81,0.276
-wet,5.51,0.237
-wet,5.67,0.207
-wet,6.36,0.225
-wet,6.08,0.271
-wet,5.97,0.29
-wet,6.05,0.297
-wet,6.22,0.315
-wet,6.6,0.308
-wet,6.35,0.278
-wet,6.33,0.27
-wet,6.75,0.246
-wet,7.27,0.275
-wet,7.27,0.223
-wet,6.95,0.203
-wet,7.37,0.177
-wet,6.8,0.173
-wet,6.04,0.161
-wet,6.71,0.162
-wet,6.65,0.169
-wet,6.58,0.173
-wet,6.49,0.165
-wet,6.54,0.161
-wet,6.46,0.155
-wet,6.39,0.151
-wet,6.47,0.148
-wet,6.57,0.141
-wet,6.71,0.141
-wet,6.82,0.139
-wet,6.93,0.132
-wet,6.71,0.128
-wet,6.79,0.125
-wet,7.17,0.144
-wet,7.39,0.125
-wet,7.83,0.095
-wet,8.36,0.073
-waterlogged,7.01,-0.352
-waterlogged,6.67,-0.333
-waterlogged,6.35,-0.327
-waterlogged,6.47,-0.301
-waterlogged,6.38,-0.284
-waterlogged,6.87,-0.281
-waterlogged,6.91,-0.27
-waterlogged,6.67,-0.269
-waterlogged,7.1,-0.282
-waterlogged,7.38,-0.303
-waterlogged,5.59,-0.292
-waterlogged,5.6,-0.28
-waterlogged,5.87,-0.254
-waterlogged,6.17,-0.224
-waterlogged,5.96,-0.213
-waterlogged,5.87,-0.216
-waterlogged,6.07,-0.202
-waterlogged,6.48,-0.203
-waterlogged,6.77,-0.167
-waterlogged,7.08,-0.126
-waterlogged,6.28,-0.087
-waterlogged,5.47,-0.101
-waterlogged,5.28,-0.111
-waterlogged,5.29,-0.124
-waterlogged,5.36,-0.068
-waterlogged,5.89,-0.029
-waterlogged,5.6,-0.021
-waterlogged,5.68,0.003
-waterlogged,5.59,0.005
-waterlogged,5.32,0.004
-waterlogged,5.08,-0
-waterlogged,7.46,0.079
-waterlogged,7.45,0.066
-waterlogged,7.55,0.053
-waterlogged,7.25,0.038
-waterlogged,7.15,0.064
-waterlogged,7.18,0.079
-waterlogged,7.07,0.086
-waterlogged,6.97,0.079
-waterlogged,6.96,0.087
-waterlogged,6.87,0.088
-waterlogged,6.82,0.081
-waterlogged,7.08,0.054
-waterlogged,6.97,0.06
-waterlogged,7.03,0.034
-waterlogged,6.91,0.035
-waterlogged,6.76,0.013
-waterlogged,6.88,-0.003
-waterlogged,6.88,-0.021
-waterlogged,7.21,-0.021
-waterlogged,7.59,0.005
-waterlogged,5.76,0.024
-waterlogged,5.3,0.043
-waterlogged,5.37,0.056
-waterlogged,5.09,0.056
-waterlogged,5.05,0.045
-waterlogged,5.73,0.065
-waterlogged,5.88,0.084
-waterlogged,6.15,0.094
-waterlogged,6.14,0.086
-waterlogged,6.48,0.081
-waterlogged,6.5,0.066
-waterlogged,5.2,0.114
-waterlogged,5.48,0.101
-waterlogged,5.5,0.118
-waterlogged,5.45,0.129
-waterlogged,5.33,0.121
-waterlogged,5.87,0.109
-waterlogged,5.8,0.124
-waterlogged,5.75,0.128
-waterlogged,5.43,0.146
-waterlogged,5.47,0.154
-waterlogged,5.37,0.152
-waterlogged,5.32,0.155
-waterlogged,5.26,0.143
-waterlogged,5.18,0.159
-waterlogged,6.68,0.116
-waterlogged,5.55,0.173
-waterlogged,5.51,0.166
-waterlogged,5.1,0.187
-waterlogged,4.88,0.199
-waterlogged,7.12,0.083

Modified: pkg/CHNOSZ/inst/extdata/thermo/OBIGT-2.csv
===================================================================
--- pkg/CHNOSZ/inst/extdata/thermo/OBIGT-2.csv	2017-02-17 19:16:30 UTC (rev 159)
+++ pkg/CHNOSZ/inst/extdata/thermo/OBIGT-2.csv	2017-02-18 07:17:18 UTC (rev 160)
@@ -229,7 +229,7 @@
 YbCl2+,NA,YbCl2+,aq,MWW09,NA,03.Jul.10,-216360,NA,-19.22,-4.55,-0.6,1.9985,-2.9017,6.8906,-2.659,11.1191,-3.9614,0.8351,1
 LuCl2+,NA,LuCl2+,aq,MWW09,NA,03.Jul.10,-222750,NA,-30.31,11.26,-1.23,1.9757,-2.9572,6.9124,-2.6567,21.9175,-0.7409,1.0031,1
 Ti(OH)4,NA,Ti(OH)4,aq,Ste01,NA,31.Aug.06,-313690.248565966,-361331.022944551,5.23900573613767,48.4942638623327,40.6,7.36687380497132,10.210086042065,1.15296367112811,-3.20100382409178,51.2762906309751,-1.27652963671128,0.0149856596558317,0
-pseudo-H4SiO4_highT,NA,H4SiO4,aq,Ste01,NA,31.Aug.06,-312919.933078394,-348676.147227533,45.1003824091778,15.0095602294455,52.3,18.7299235181644,-21.2600382409178,18.6199808795411,-1.20004780114723,58.0305927342256,-20.789913957935,0.0869024856596558,0
+pseudo-H4SiO4_Ste01,NA,H4SiO4,aq,Ste01,NA,31.Aug.06,-312919.933078394,-348676.147227533,45.1003824091778,15.0095602294455,52.3,18.7299235181644,-21.2600382409178,18.6199808795411,-1.20004780114723,58.0305927342256,-20.789913957935,0.0869024856596558,0
 arsenolite,NA,As2O3,cr,PGS+96,NA,25.Aug.06,-137640,-156930,25.67,23.15,51.12,20.9,17.73,-2.7,0,0,0,0,548
 claudetite,NA,As2O3,cr,PGS+96,NA,25.Aug.06,-137730,-156600,27.09,23.19,47.26,23.86,10.74,-3.44,0,0,0,0,588
 orpiment,NA,As2S3,cr,PGS+96,NA,25.Aug.06,-20550,-20700,39.1,27.53,70.5,22.73,13.82,0.605,0,0,0,0,580
@@ -289,4 +289,3 @@
 starkeyite,NA,MgSO4*4H2O,cr,GM09,NA,24.Nov.15,-514770,-596580,62.12,NA,NA,0,0,0,0,0,0,0,400
 hexahydrite,NA,MgSO4*6H2O,cr,GM09,NA,24.Nov.15,-629130,-737880,83.29,NA,NA,48.56,1.6,-10.68,0,0,0,0,400
 epsomite,NA,MgSO4*7H2O,cr,GM09,NA,24.Nov.15,-686190,-809920,88.74,NA,NA,52.29,1.78,-11.67,0,0,0,0,400
-pseudo-H4SiO4_25C,NA,H4SiO4,aq,CHNOSZ,NA,17.Feb.17,-312565.4,-346408.5,51.42456,-40.096352,52.19983,NA,NA,NA,NA,NA,NA,NA,0

Deleted: pkg/CHNOSZ/inst/extdata/thermo/groups_big.csv
===================================================================
--- pkg/CHNOSZ/inst/extdata/thermo/groups_big.csv	2017-02-17 19:16:30 UTC (rev 159)
+++ pkg/CHNOSZ/inst/extdata/thermo/groups_big.csv	2017-02-18 07:17:18 UTC (rev 160)
@@ -1,25 +0,0 @@
-,[-CH3],[-CH2-],[-CH2OH],[-CO-],[-COOH]
-ethane,2,,,,
-propane,2,1,,,
-butane,2,2,,,
-methanol,1,-1,1,,
-ethanol,1,,1,,
-1-propanol,1,1,1,,
-1-butanol,1,2,1,,
-1-pentanol,1,3,1,,
-3-pentanol,1,3,1,,
-2-propanol,1,1,1,,
-2-butanol,1,2,1,,
-2-pentanol,1,3,1,,
-acetone,2,,,1,
-butanone,2,1,,1,
-3-pentanone,2,2,,1,
-2-heptanone,2,4,,1,
-acetaldehyde,2,-1,,1,
-"acetic acid",1,,,,1
-"propanoic acid",1,1,,,1
-"butanoic acid",1,2,,,1
-"2-methylpropanoic acid",3,-1,,,1
-"2,4-dimethyl-3-pentanone",6,-2,,1,
-"lactic acid",,1,1,,1
-"citric acid",-2,4,1,,3

Deleted: pkg/CHNOSZ/inst/extdata/thermo/groups_small.csv
===================================================================
--- pkg/CHNOSZ/inst/extdata/thermo/groups_small.csv	2017-02-17 19:16:30 UTC (rev 159)
+++ pkg/CHNOSZ/inst/extdata/thermo/groups_small.csv	2017-02-18 07:17:18 UTC (rev 160)
@@ -1,26 +0,0 @@
-,C-(H)3C,C-(H)2(C)2,O-(H)(C),C-(H)2(O)(C),C-(H)(O)(C)2,CH3corr(tert),C-(H)3(CO),CO-(C)2,C-(HorO)(H)(CO)(C),CO-(HorO)(C),O-(H)(CO),C-(H)(CO)(C)2
-ethane,2,,,,,,,,,,,
-propane,2,1,,,,,,,,,,
-butane,2,2,,,,,,,,,,
-methanol,1,,1,,,,,,,,,
-ethanol,1,,1,1,,,,,,,,
-1-propanol,1,1,1,1,,,,,,,,
-1-butanol,1,2,1,1,,,,,,,,
-1-pentanol,1,3,1,1,,,,,,,,
-3-pentanol,2,2,1,,1,,,,,,,
-2-propanol,2,,1,,1,2,,,,,,
-2-butanol,2,1,1,,1,1,,,,,,
-2-pentanol,2,2,1,,1,1,,,,,,
-acetone,,,,,,,2,1,,,,
-butanone,2,,,,,,,1,1,,,
-3-pentanone,2,,,,,,,1,2,,,
-2-heptanone,2,2,,,,,,1,2,,,
-acetaldehyde,1,,,,,,,,,1,,
-"acetic acid",1,,,,,,,,,1,1,
-"propanoic acid",1,,,,,,,,1,1,1,
-"butanoic acid",1,1,,,,,,,1,1,1,
-"2-methylpropanoic acid",2,,,,,2,,,,1,1,1
-"2,4-dimethyl-3-pentanone",4,,,,,4,,1,,,,2
-"lactic acid",1,,1,,,1,,,1,1,1,
-"citric acid",,,1,,,,1,,,3,3,2
-"isocitric acid",,,1,,,,,,2,3,3,1

Modified: pkg/CHNOSZ/man/CHNOSZ-package.Rd
===================================================================
--- pkg/CHNOSZ/man/CHNOSZ-package.Rd	2017-02-17 19:16:30 UTC (rev 159)
+++ pkg/CHNOSZ/man/CHNOSZ-package.Rd	2017-02-18 07:17:18 UTC (rev 160)
@@ -10,7 +10,7 @@
 
 \section{Getting Help}{
 The major features of the package are outlined in the Overview given below, with links to specific help topics.
-If you are a new user, the \sQuote{anintro} vignette (An introduction to CHNOSZ) may offer a more comfortable way to get started with using the package.
+See the vignette \emph{An Introduction to CHNOSZ} for more in-depth example of the usage the functions.
 The help pages have been given either keywords or \dQuote{concept index entries} which are visible to \code{\link{help.search}} (aka \code{??}).
 Use \code{??primary} to browse the most commonly used functions and \code{??secondary} to see other high-level, but less often-used functions.
 \code{??protein} shows functions for working with proteins, and \code{??extra} lists functions with extra functionality (beyond the main workflow).

Modified: pkg/CHNOSZ/man/EOSregress.Rd
===================================================================
--- pkg/CHNOSZ/man/EOSregress.Rd	2017-02-17 19:16:30 UTC (rev 159)
+++ pkg/CHNOSZ/man/EOSregress.Rd	2017-02-18 07:17:18 UTC (rev 160)
@@ -94,7 +94,6 @@
 For charged species, the variables \code{Cp_s_var} and \code{V_s_var} can be used in the regressions.
 They correspond to the solvation contribution to heat capacity or volume, respectively, in the HKF EOS, divided by the value of \eqn{\omega}{omega} at the reference temperature and pressure.
 Because these variables are themselves a function of \code{omega.PrTr}, an iterative procedure is needed to perform the regression.
-See the \code{EOSregress} vignette for an example.
 
 Note that variables \code{QBorn} and \code{V_s_var} are both negated, so that the value of \eqn{\omega}{omega} has its proper sign in the corresponding equations.
 }
@@ -104,7 +103,7 @@
 }
 
 \seealso{
-The \code{EOSregress.Rmd} vignette has more references and examples.
+The vignette \emph{Regressing thermodynamic data} has more references and examples, including an iterative method to retrieve \code{omega.PrTr}.
 }
 
 \references{

Modified: pkg/CHNOSZ/man/data.Rd
===================================================================
--- pkg/CHNOSZ/man/data.Rd	2017-02-17 19:16:30 UTC (rev 159)
+++ pkg/CHNOSZ/man/data.Rd	2017-02-18 07:17:18 UTC (rev 160)
@@ -92,6 +92,13 @@
      \item The standard molal properties and equations-of-state parameters of four phase species (see below) of Fe(cr) were generated from heat capacity data given by Robie and Hemingway, 1995. 
   } 
 
+  Notes on the secondary database added by \code{add.obigt} (OBIGT-2.csv):
+
+  \itemize{
+     \item \samp{pseudo-H4SiO4} and \samp{pseudo-H4SiO4_Ste01} are approximate pseudospecies for H4SiO4. \samp{pseudo-H4SiO4} has thermodynamic properties that give zero properties for the reaction H4SiO4 = SiO2 + 2H2O at 25 \eqn{^{\circ}}{°}C, and HKF coefficients that are applicable to moderate temperatures (see the vignette `eos-regress.Rmd`). \samp{pseudo-H4SiO4_Ste01}, taken from Steffánson, 2001, is applicable near 300 \eqn{^{\circ}}{°}C (see Figure 3 of that paper). \samp{pseudo-H4SiO4} can be used to make diagrams with H4SiO4 as a basis species, instead of SiO2(aq).
+  } 
+
+
   These modifications are indicated in \code{OBIGT.csv} by having \samp{CHNOSZ} as one of the sources of data. Note also that some data appearing in the \acronym{slop98.dat} file (Shock et al., 1998) were corrected or modified as noted in that file, and are indicated in \code{OBIGT.csv} by having \samp{SLOP98} as one of the sources of data.
 
   In order to represent thermodynamic data for minerals with phase transitions, the different phases of these minerals are represented as phase species that have states denoted by \samp{cr1}, \samp{cr2}, etc. The standard molar thermodynamic properties at 25 \eqn{^{\circ}}{°}C and 1 bar (\eqn{T_r}{Pr} and \eqn{P_r}{Pr}) of the \samp{cr2} phase species of minerals were generated by first calculating those of the \samp{cr1} phase species at the transition temperature (\eqn{T_{tr}}{Ttr}) and 1 bar then taking account of the volume and entropy of transition (the latter can be retrieved by combining the former with the Clausius-Clapeyron equation and values of \eqn{(dP/dT)} of transitions taken from the \acronym{SUPCRT92} data file) to calculate the standard molar entropy of the \samp{cr2} phase species at \eqn{T_{tr}}{Ttr}, and taking account of the enthalpy of transition (\eqn{{\Delta}H^{\circ}}{DeltaH0}, taken from the \acronym{SUPCRT92} data file) to calculate the standard molar enthalpy of the \samp{cr2} phase species at \eqn{T_{tr}}{Ttr}. The standard molar properties of the \samp{cr2} phase species at \eqn{T_{tr}}{Ttr} and 1 bar calculated in this manner were combined with the equations-of-state parameters of the species to generate values of the standard molar properties at 25 \eqn{^{\circ}}{°}C and 1 bar. This process was repeated as necessary to generate the standard molar properties of phase species represented by \samp{cr3} and \samp{cr4}, referencing at each iteration the previously calculated values of the standard molar properties of the lower-temperature phase species (i.e., \samp{cr2} and \samp{cr3}). A consequence of tabulating the standard molar thermodynamic properties of the phase species is that the values of \eqn{(dP/dT)} and \eqn{{\Delta}H^{\circ}}{DeltaH0} of phase transitions can be calculated using the equations of state and therefore do not need to be stored in the thermodynamic database. However, the transition temperatures (\eqn{T_{tr}}{Ttr}) generally can not be assessed by comparing the Gibbs energies of phase species and are tabulated in the database.
@@ -246,6 +253,8 @@
 
   Shock, E. L. et al. {1998} \emph{SLOP98.dat} (computer data file). http://geopig.asu.edu/supcrt92_data/slop98.dat, accessed on 2005-11-05. Current location: \url{http://geopig.asu.edu/sites/default/files/slop98.dat}.
 
+  Stefánsson, Andri (2001) Dissolution of primary minerals of basalt in natural waters. I. Calculation of mineral solubilities from 0°C to 350°C \emph{Chem. Geol.} \bold{172}, 225--250. \url{http://dx.doi.org/10.1016/S0009-2541(00)00263-1}
+
   Wagman, D. D., Evans, W. H., Parker, V. B., Schumm, R. H., Halow, I., Bailey, S. M., Churney, K. L. and Nuttall, R. L. (1982) The NBS tables of chemical thermodynamic properties. Selected values for inorganic and C\eqn{_1}{1} and C\eqn{_2}{2} organic substances in SI units. \emph{J. Phys. Chem. Ref. Data} \bold{11} (supp. 2), 1--392. \url{https://srd.nist.gov/JPCRD/jpcrdS2Vol11.pdf}
 
 }

Modified: pkg/CHNOSZ/man/diagram.Rd
===================================================================
--- pkg/CHNOSZ/man/diagram.Rd	2017-02-17 19:16:30 UTC (rev 159)
+++ pkg/CHNOSZ/man/diagram.Rd	2017-02-18 07:17:18 UTC (rev 160)
@@ -146,7 +146,7 @@
 
 \seealso{ 
 Other examples are present in the help for \code{\link{protein}} and \code{\link{buffer}}, and even more can be found in \code{\link{demos}}.
-See the vignette hotspring.Rnw for an example of the \code{strip} charts.
+See the vignette \emph{Hot-spring proteins in CHNOSZ} for an example of the \code{strip} charts.
 }
 
 \examples{

Modified: pkg/CHNOSZ/man/extdata.Rd
===================================================================
--- pkg/CHNOSZ/man/extdata.Rd	2017-02-17 19:16:30 UTC (rev 159)
+++ pkg/CHNOSZ/man/extdata.Rd	2017-02-18 07:17:18 UTC (rev 160)
@@ -33,7 +33,6 @@
     \item \code{RT71.csv} pH titration measurements for unfolded lysozyme (\samp{LYSC_CHICK}) taken from Roxby and Tanford, 1971. pH is in the first column, net charge in the second. See \code{\link{ionize.aa}} for an example that uses this file.
     \item \code{SOJSH.csv} Experimental equilibrium constants for the reaction NaCl(aq) = Na+ + Cl- as a function of temperature and pressure taken from Fig. 1 of Shock et al., 1992. Data were extracted from the figure using g3data (\url{http://www.frantz.fi/software/g3data.php}). See \code{\link{water}} for an example that uses this file.
     \item \code{Cp.CH4.HW97.csv}, \code{V.CH4.HWM96.csv} Apparent molar heat capacities and volumes of CH4 in dilute aqueous solutions reported by Hnedkovsky and Wood, 1997 and Hnedkovsky et al., 1996. See \code{\link{EOSregress}} for examples that use these files.
-    \item \code{BKM60_Fig7.dat} Eh-pH values for normal, wet and waterlogged soils from Fig. 7 of Baas Becking et al., 1960. See the \sQuote{anintro} vignette for an example that uses this file.
     \item \code{SC10_Rainbow.csv} Values of temperature (\eqn{^{\circ}}{°}C), pH and logarithms of activity of \eqn{\mathrm{CO_2}}{CO2}, \eqn{\mathrm{H_2}}{H2}, \eqn{\mathrm{NH_4^+}}{NH4+}, \eqn{\mathrm{H_2S}}{H2S} and \eqn{\mathrm{CH_4}}{CH4} for mixing of seawater and hydrothermal fluid at Rainbow field (Mid-Atlantic Ridge), taken from Shock and Canovas, 2010.
     \item \code{SS98_Fig5a.csv}, \code{SS98_Fig5b.csv} Values of logarithm of fugacity of \eqn{\mathrm{O_2}}{O2} and pH as a function of temperature for mixing of seawater and hydrothermal fluid, digitized from Figs. 5a and b of Shock and Schulte, 1998.
     \item \code{rubisco.csv} UniProt IDs for Rubisco, ranges of optimal growth temperature of organisms, domain and name of organisms, and URL of reference for growth temperature, from Dick, 2014.
@@ -41,7 +40,7 @@
 
   Files in \code{fasta} contain protein sequences:
   \itemize{
-    \item \code{EF-Tu.aln} consists of aligned sequences (394 amino acids) of elongation factor Tu (EF-Tu). The sequences correspond to those taken from UniProtKB for ECOLI (\emph{Escherichia coli}), THETH (\emph{Thermus thermophilus}) and THEMA (\emph{Thermotoga maritima}), and reconstructed ancestral sequences taken from Gaucher et al., 2003 (maximum likelihood bacterial stem and mesophilic bacterial stem, and alternative bacterial stem). See the \sQuote{formation} vignette for an example that uses this file.
+    \item \code{EF-Tu.aln} consists of aligned sequences (394 amino acids) of elongation factor Tu (EF-Tu). The sequences correspond to those taken from UniProtKB for ECOLI (\emph{Escherichia coli}), THETH (\emph{Thermus thermophilus}) and THEMA (\emph{Thermotoga maritima}), and reconstructed ancestral sequences taken from Gaucher et al., 2003 (maximum likelihood bacterial stem and mesophilic bacterial stem, and alternative bacterial stem)
     \item \code{rubisco.csv} Sequences of Rubisco obtained from UniProt (see Dick, 2014).
   }
 
@@ -59,7 +58,7 @@
     \item \code{DS11.csv}, \code{DS13.csv}
       These two files contain amino acid compositions of metagenomically encoded proteins, averaged together according to functional annotation (DS11) or taxonomic affiliation (DS13).
       The data are from Dick and Shock, 2011 and 2013.
-      They are used in the vignette \file{hotspring.Rnw}.
+      They are used in the vignette \emph{Hot-spring proteins in CHNOSZ}.
     \item \code{microbial.aa.csv}
       Overall protein compositions of microbial species reported to be positively or negatively enriched in colorectal cancer.
       This file is taken from Dick, 2016.
@@ -92,8 +91,6 @@
   \itemize{
     \item \code{OBIGT-2.csv} contains supplementary thermodynamic data in the same format as the primary database in \code{data/OBIGT.csv}. Data for some entries in the primary database are taken from different literature sources in this file. The default action of \code{\link{add.obigt}} is to add the contents of this file to CHNOSZ's working database in \code{thermo$obigt}. See \code{\link{diagram}} and the code of \code{\link{anim.TCA}} for examples that use this file.
     \item \code{obigt_check.csv} contains the results of running \code{\link{check.obigt}} to check the internal consistency of entries in the primary and supplementary databases.
-    \item \code{groups_big.csv} Group contribution matrix: five structural groups on the columns ([-CH3],[-CH2-],[-CH2OH],[-CO-],[-COOH]) and 24 compounds on the rows (alkanes, alcohols, ketones, acids, multiply substituted compounds).
-    \item \code{groups_small.csv} Group contribution matrix: twelve bond-specific groups on the columns, and 25 compounds on the rows (as above, plus isocitrate). Group identity and naming conventions adapted from Benson and Buss (1958) and Domalski and Hearing (1993). See the \sQuote{xadditivity} vignette for examples that use this file and \code{groups_big.csv}.
     \item \code{RH98_Table15.csv} Group stoichiometries for high molecular weight crystalline and liquid organic compounds taken from Table 15 of Richard and Helgeson, 1998. The first three columns have the \code{compound} name, \code{formula} and physical \code{state} (\samp{cr} or \samp{liq}). The remaining columns have the numbers of each group in the compound; the names of the groups (columns) correspond to species in \code{\link{thermo}$obigt}. The compound named \samp{5a(H),14a(H)-cholestane} in the paper has been changed to \samp{5a(H),14b(H)-cholestane} here to match the group stoichiometry given in the table. See \code{\link{RH2obigt}} for a function that uses this file.
     \item \code{DLEN67.csv} Standard Gibbs energies of formation, in kcal/mol, from Dayhoff et al., 1967, for nitrogen (N2) plus 17 compounds shown in Fig. 2 of Dayhoff et al., 1964, at 300, 500, 700 and 1000 K.
   }

Modified: pkg/CHNOSZ/man/transfer.Rd
===================================================================
--- pkg/CHNOSZ/man/transfer.Rd	2017-02-17 19:16:30 UTC (rev 159)
+++ pkg/CHNOSZ/man/transfer.Rd	2017-02-18 07:17:18 UTC (rev 160)
@@ -71,12 +71,10 @@
 \examples{\dontshow{data(thermo)}
 ## react potassium feldspar in a closed system
 ## after Steinmann et al., 1994 and Helgeson et al., 1969
-# load the secondary database to use pseudo-H4SiO4 as a basis species
-add.obigt()
-basis(c("Al+3", "pseudo-H4SiO4_25C", "K+", "H2O", "H+", "O2"), c(0, -6, -6, 0, 0, 0))
+basis(c("Al+3", "pseudo-H4SiO4", "K+", "H2O", "H+", "O2"), c(0, -6, -6, 0, 0, 0))
 species(c("k-feldspar", "muscovite", "pyrophyllite", "kaolinite", "gibbsite"))
 a <- affinity(H4SiO4=c(-6, -2), "K+"=c(-3, 8))
-diagram(a, fill="heat")
+diagram(a, fill="heat", ylab=ratlab("K+"))
 basis("pH", 4)
 species(1:5, c(-4, rep(-999, 4)))
 tr <- transfer(190, dmode="coupled", plot=c(2, 3), devmax=1, alphamax=-1.5)
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/chnosz -r 160


More information about the CHNOSZ-commits mailing list