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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Oct 20 17:05:27 CEST 2017


Author: jedick
Date: 2017-10-20 17:05:27 +0200 (Fri, 20 Oct 2017)
New Revision: 262

Removed:
   pkg/CHNOSZ/inst/extdata/OBIGT/CHNOSZ_aq.csv
   pkg/CHNOSZ/inst/extdata/thermo/Ste01.csv
Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/R/info.R
   pkg/CHNOSZ/R/subcrt.R
   pkg/CHNOSZ/data/refs.csv
   pkg/CHNOSZ/demo/activity_ratios.R
   pkg/CHNOSZ/demo/adenine.R
   pkg/CHNOSZ/demo/go-IU.R
   pkg/CHNOSZ/inst/NEWS
   pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_aq.csv.xz
   pkg/CHNOSZ/man/extdata.Rd
   pkg/CHNOSZ/man/nonideal.Rd
   pkg/CHNOSZ/man/subcrt.Rd
   pkg/CHNOSZ/vignettes/anintro.Rmd
   pkg/CHNOSZ/vignettes/eos-regress.Rmd
   pkg/CHNOSZ/vignettes/obigt.Rmd
   pkg/CHNOSZ/vignettes/vig.bib
Log:
cleanup: remove OBIGT/CHNOSZ_aq.csv


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2017-10-18 16:07:00 UTC (rev 261)
+++ pkg/CHNOSZ/DESCRIPTION	2017-10-20 15:05:27 UTC (rev 262)
@@ -1,6 +1,6 @@
-Date: 2017-10-18
+Date: 2017-10-20
 Package: CHNOSZ
-Version: 1.1.0-60
+Version: 1.1.0-61
 Title: Thermodynamic Calculations for Geobiochemistry
 Author: Jeffrey Dick
 Maintainer: Jeffrey Dick <j3ffdick at gmail.com>

Modified: pkg/CHNOSZ/R/info.R
===================================================================
--- pkg/CHNOSZ/R/info.R	2017-10-18 16:07:00 UTC (rev 261)
+++ pkg/CHNOSZ/R/info.R	2017-10-20 15:05:27 UTC (rev 262)
@@ -79,9 +79,8 @@
   # a match to thermo$obigt$state is also required if 'state' is not NULL
   # (first occurence of a match to species is returned otherwise)
   thermo <- get("thermo")
-  # all matches for the species
-  matches.species <- thermo$obigt$name==species | 
-    thermo$obigt$abbrv==species | thermo$obigt$formula==species
+  # find matches for species name, abbreviation or formula
+  matches.species <- thermo$obigt$name==species | thermo$obigt$abbrv==species | thermo$obigt$formula==species
   # since thermo$obigt$abbrv contains NAs, convert NA results to FALSE
   matches.species[is.na(matches.species)] <- FALSE
   # turn it in to no match if it's a protein in the wrong state
@@ -126,11 +125,14 @@
     matches.species <- matches.state
   }
   # all of the species that match
-  ispecies <- which(matches.species)
-  # we return only the first species that matches
-  ispecies.out <- ispecies[1]
-  # let user know if there is more than one state for this species
-  if(length(ispecies) > length(ispecies.out)) {
+  ispecies.out <- ispecies <- which(matches.species)
+  # processing for more than one match
+  if(length(ispecies) > 1) {
+    # if a single name matches, use that one (useful for distinguishing pseudo-H4SiO4 and H4SiO4) 20171020
+    matches.name <- matches.species & thermo$obigt$name==species
+    if(sum(matches.name)==1) ispecies.out <- which(matches.name)
+    else ispecies.out <- ispecies[1]  # otherwise, return only the first species that matches
+    # let user know if there is more than one state for this species
     mystate <- thermo$obigt$state[ispecies.out]
     ispecies.other <- ispecies[!ispecies %in% ispecies.out]
     otherstates <- thermo$obigt$state[ispecies.other]

Modified: pkg/CHNOSZ/R/subcrt.R
===================================================================
--- pkg/CHNOSZ/R/subcrt.R	2017-10-18 16:07:00 UTC (rev 261)
+++ pkg/CHNOSZ/R/subcrt.R	2017-10-20 15:05:27 UTC (rev 262)
@@ -532,7 +532,8 @@
       out[[i]] <- cbind(out[[i]],data.frame(logQ=logQ,A=A))
     }
     # 20120114 only prepend T, P, rho columns if we have more than one T
-    if(length(T) > 1) {
+    # 20171020 or if the 'property' argument is missing (it's nice to see everything using e.g. subcrt("H2O", T=150))
+    if(length(T) > 1 | missing(property)) {
       # 20090329 added checks for converting T, P units
       if(convert) T.out <- outvert(T,"K") else T.out <- T
       if(convert) P.out <- outvert(P,"bar") else P.out <- P

Modified: pkg/CHNOSZ/data/refs.csv
===================================================================
--- pkg/CHNOSZ/data/refs.csv	2017-10-18 16:07:00 UTC (rev 261)
+++ pkg/CHNOSZ/data/refs.csv	2017-10-20 15:05:27 UTC (rev 262)
@@ -145,7 +145,7 @@
 CHNOSZ.1,"J. M. Dick",2017,"CHNOSZ package documentation","GHS (T<sub>r</sub>) of the phase that is stable at 298.15 K was combined with H<sub>tr</sub> and the Cp coefficients to calculate the metastable GHS (T<sub>r</sub>) of the phases that are stable at higher temperatures.",http://chnosz.net
 CHNOSZ.2,"J. M. Dick",2017,"CHNOSZ package documentation","alanate and glycinate: GHS as used by @DLH06",http://chnosz.net
 CHNOSZ.3,"J. M. Dick",2017,"CHNOSZ package documentation","metal-amino acid complexes: GHS were recalculated by adding the differences between values from @AH97b and @DLH06 for alanate or glycinate to the properties of the complexes reported by @SK95.",http://chnosz.net
-CHNOSZ.4,"J. M. Dick",2017,"CHNOSZ package documentation",pseudo-H<sub>4</sub>SiO<sub>4</sub>,http://chnosz.net
+CHNOSZ.4,"J. M. Dick",2017,"CHNOSZ package documentation","pseudo-H<sub>4</sub>SiO<sub>4</sub>; GHS and HKF parameters calculated as shown in the vignette, [*Regressing thermodynamic data*](eos-regress.html)",http://chnosz.net
 CHNOSZ.5,"J. M. Dick",2017,"CHNOSZ package documentation","AuCl4- renamed to AuCl4-3",http://chnosz.net
 CHNOSZ.6,"J. M. Dick",2017,"CHNOSZ package documentation","dipeptides not included in slop files after slop98.dat",http://chnosz.net
 CHNOSZ.7,"J. M. Dick",2017,"CHNOSZ package documentation","charge of NpO2(Oxal), La(Succ)+, NH4(Succ)-, and NpO2(Succ) as listed by @PSK99",http://chnosz.net

Modified: pkg/CHNOSZ/demo/activity_ratios.R
===================================================================
--- pkg/CHNOSZ/demo/activity_ratios.R	2017-10-18 16:07:00 UTC (rev 261)
+++ pkg/CHNOSZ/demo/activity_ratios.R	2017-10-20 15:05:27 UTC (rev 262)
@@ -10,8 +10,6 @@
 ## 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
-# make the pseudospecies H4SiO4 available for use as a basis species
-add.obigt("CHNOSZ_aq", "pseudo-H4SiO4")
 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))

Modified: pkg/CHNOSZ/demo/adenine.R
===================================================================
--- pkg/CHNOSZ/demo/adenine.R	2017-10-18 16:07:00 UTC (rev 261)
+++ pkg/CHNOSZ/demo/adenine.R	2017-10-20 15:05:27 UTC (rev 262)
@@ -56,10 +56,10 @@
 )
 # error bars (arrows trick from https://stackoverflow.com/questions/13032777/scatter-plot-with-error-bars)
 arrows(AdH$T, AdH$Cp - AdH$Cp_SD, AdH$T, AdH$Cp + AdH$Cp_SD, length = 0.05, angle = 90, code = 3)
-# get LH06 predictions using HKF model
-# this version of adenine parameters has been superseded by LCT17
-# but are still available as optional data
-add.obigt("CHNOSZ", "adenine-old")
+# get LH06 predictions using HKF model;
+# this version of adenine parameters has been superseded by LCT17,
+# so we add them by hand
+mod.obigt("adenine-old", formula="C5H5N5", a1=21.5046, a2=8.501, a3=-2.6632, a4=-5.3561, c1=87.88, c2=-15.87, omega=0.065)
 LH06 <- subcrt("adenine-old", T = TK)$out$adenine
 lines(TK, LH06$Cp, lty = 3)
 # density model (parameters from LCT17 Table 11)

Modified: pkg/CHNOSZ/demo/go-IU.R
===================================================================
--- pkg/CHNOSZ/demo/go-IU.R	2017-10-18 16:07:00 UTC (rev 261)
+++ pkg/CHNOSZ/demo/go-IU.R	2017-10-20 15:05:27 UTC (rev 262)
@@ -40,12 +40,18 @@
 lines(T, -r4$out$logK, col="red")
 ## add labels, legend, and title
 text(182.5, -3.17, "SUPCRT92\n(CHNOSZ default)", srt=48, cex=0.7, font=2)
-text(147, -3.1, "SUPCRTBL", srt=45.5, cex=0.7, font=2, col="red")
+text(154, -3.04, "circa SUPCRTBL", srt=45, cex=0.7, font=2, col="red")
 legend("topleft", lty=c(1, 2, 2, 1), col=c("black", "black", "red", "red"), bty="n", cex=0.9,
-       legend=c("Kln,Bhm:HDNB78; SiO2:SHS89", "Kln:Ber88", "+ Bhm:HRA91", "+ SiO2:AS04"))
+       legend=c("Kln,Bhm:HDNB78; SiO2(aq):SHS89", "Kln:Ber88 (SUPCRTBL uses HP11)", "+ Bhm:HRA91", "+ SiO2(aq):AS04"))
 legend("bottomright", pch=1, legend="Hemley et al., 1980", bty="n", cex=0.9)
 mtitle(c("Kaolinite - Boehmite", "After Zhu and Lu, 2009 Fig. A1"), cex=0.95)
-# doi:10.1016/j.gca.2009.03.015
+# Zhu and Lu, 2009: doi:10.1016/j.gca.2009.03.015
+# Helgeson et al., 1978 (HDNB78): http://www.worldcat.org/oclc/13594862
+# Shock et al., 1989 (SHS89): doi:10.1016/0016-7037(89)90341-4
+# Berman, 1988 (Ber88): doi:10.1093/petrology/29.2.445
+# Holland and Powell, 2011 (HP11): 10.1111/j.1525-1314.2010.00923.x
+# Hemingway et al., 1991 (HRA91): http://pubs.er.usgs.gov/publication/70016664
+# Apps and Spycher, 2004 (AS04): Bechtel SAIC Company, LLC ANL-NBS-HS-000043 REV 00 (DOC.20041118.0004)
 
 ###########
 ### plot 2: dawsonite solubility
@@ -103,31 +109,31 @@
 res <- 300
 # we "blend" the transitions with pH, unlike LZ11's diagram where
 # it appears the S-basis species are switched in an on/off fashion
-m <- mosaic(bases, pH=c(2, 14, res), Eh=c(-0.6, 0.8, res), blend=TRUE)
+m <- mosaic(bases, pH=c(0, 14, res), Eh=c(-0.8, 0.8, res), blend=TRUE)
 # adjust colors and names
 fill <- rev(heat.colors(nrow(species())))
 fill[11:15] <- "darkgrey"
 m$A.species$species$name <- gsub(",alpha", "", m$A.species$species$name)
 diagram(m$A.species, fill=fill)
 dprop <- describe.property(c("T", "P"), c(25, 1))
-legend("topright", legend=dprop, bty="n")
+legend("bottomleft", legend=dprop, bty="n")
 t1 <- quote("As-O-H-S, "~list(sum(S)==10^-3*M, sum(As)==10^-5*M))
 t2 <- "After Lu and Zhu, 2011 Fig. 2b"
+# doi:10.1007/s12665-010-0652-x
 mtitle(as.expression(c(t1, t2)), cex=0.95)
-# doi:10.1007/s12665-010-0652-x
 
 ###########
 ### plot 4: aqueous Al species
 ###########
 add.obigt("SUPCRTBL")
 basis(c("Al+3", "F-", "H+", "O2", "H2O"))
+AlOH <- c("Al(OH)4-", "Al(OH)3", "Al(OH)2+", "AlOH+2")
 Al <- "Al+3"
-AlOH <- c("Al(OH)4-", "AlOH+2", "Al(OH)2+", "Al(OH)3")
 AlF <- c("AlF+2", "AlF2+", "AlF3", "AlF4-")
 AlOHF <- c("Al(OH)2F2-", "Al(OH)2F", "AlOHF2")
-species(c(Al, AlOH, AlF, AlOHF), "aq")
+species(c(AlOH, Al, AlF, AlOHF), "aq")
 a <- affinity(pH=c(0, 10), `F-`=c(-1, -9), T=200)
-diagram(a, fill=cm.colors(nrow(species())))
+diagram(a, fill=rev(cm.colors(nrow(species()))))
 dprop <- describe.property(c("T", "P"), c(200, "Psat"))
 legend("topright", legend=dprop, bty="n")
 mtitle(c("Aqueous aluminum species",

Modified: pkg/CHNOSZ/inst/NEWS
===================================================================
--- pkg/CHNOSZ/inst/NEWS	2017-10-18 16:07:00 UTC (rev 261)
+++ pkg/CHNOSZ/inst/NEWS	2017-10-20 15:05:27 UTC (rev 262)
@@ -1,4 +1,4 @@
-CHANGES IN CHNOSZ 1.1.0-60 (2017-10-18)
+CHANGES IN CHNOSZ 1.1.0-61 (2017-10-20)
 ---------------------------------------
 
 MAJOR CHANGES:
@@ -105,10 +105,6 @@
   and volume data (Lowe et al., 2017). Add demo/adenine.R comparing
   the updates with the previous data (LaRowe and Helgeson, 2006).
 
-- Data file CHNOSZ_aq.csv is no longer added to the database by default.
-  It is now intended to hold optional data. Currently it contains
-  pseudo-H4SiO4 and adenine-old.
-
 - Remove H2O(gas) from the database (taken from SUPCRT92), as it gives
   inconsistent results for metastable steam (Zavarin et al., 2016,
   LLNL-TR-701407, doi: 10.2172/1325873).
@@ -165,6 +161,9 @@
   empty files (291 KB), and 2) changing the theme from "cosmo" to
   "default" (151 KB).
 
+- Remove extdata/OBIGT/CHNOSZ_aq.csv and move the entry for
+  pseudo-H4SiO4 to inorganic_aq.csv.
+
 CHANGES IN CHNOSZ 1.1.0 (2017-05-04)
 ------------------------------------
 

Deleted: pkg/CHNOSZ/inst/extdata/OBIGT/CHNOSZ_aq.csv
===================================================================
--- pkg/CHNOSZ/inst/extdata/OBIGT/CHNOSZ_aq.csv	2017-10-18 16:07:00 UTC (rev 261)
+++ pkg/CHNOSZ/inst/extdata/OBIGT/CHNOSZ_aq.csv	2017-10-20 15:05:27 UTC (rev 262)
@@ -1,3 +0,0 @@
-name,abbrv,formula,state,ref1,ref2,date,G,H,S,Cp,V,a1.a,a2.b,a3.c,a4.d,c1.e,c2.f,omega.lambda,z.T
-pseudo-H4SiO4,NA,H4SiO4,aq,CHNOSZ.4,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
-adenine-old,NA,C5H5N5,aq,LH06a.2,NA,03.Mar.17,74770,31235,53.41,56.24,89.59,21.5046,8.501,-2.6632,-5.3561,87.88,-15.87,0.065,0

Modified: pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_aq.csv.xz
===================================================================
--- pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_aq.csv.xz	2017-10-18 16:07:00 UTC (rev 261)
+++ pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_aq.csv.xz	2017-10-20 15:05:27 UTC (rev 262)
@@ -1,4 +1,4 @@
-ý7zXZ  æÖ´F !   t/å£á½Œ‚"] 7Iýúb‹¿ñ9²¶Ë¦¨•TB;qý"½qù¦cL;ù"ß“<²ëbï¨gò;ø¥Kä‡¥Šfœ‘1Æw?oz†ÆCþ­aì]IØŽ¨Ý5i†÷“š§mgàöYã¨b[*·Ïâ\%©°g͐]:å
+ý7zXZ  æÖ´F !   t/å£á¾)‚q] 7Iýúb‹¿ñ9²¶Ë¦¨•TB;qý"½qù¦cL;ù"ß“<²ëbï¨gò;ø¥Kä‡¥Šfœ‘1Æw?oz†ÆCþ­aì]IØŽ¨Ý5i†÷“š§mgàöYã¨b[*·Ïâ\%©°g͐]:å
 ðDÁŒ¨Nâªg5qàêZ«Ì!^Kþ\1,“»ßÂ"±æCç
 L4›„)Gìúɯ¦mL’ø¾ðÒUVÉäôCŸC¤‚ÍÚMwÄNe œ%EBs…3_HͪK7O"L»Ù!+6Ë:lµ`³pŸÈþ…þ}²ÍõÞašo"æv¢9AÆ÷~…I}¾¢‰ÞÏÞ.Q–’äÏ/gc+˜ñf$E»)ÉLaՍ|«!«×RŠ_T".ƱãÆ« LVšêYÈjWÀ¢Ð…£Ž‹pë3?7¡t¡
 ê
@@ -251,4 +251,4 @@
 îqC¢I‡æ›Q²ÒÂ^©&è6H«ü±s™ ?«~„2͸ÂÁnI÷3ºQw)P_¨Bj
 ˆx¹Š¡a¶œüBÈ!ºÙ#Ý|S¬ ^N­ûø´`D|ö²O¤ËÊpy…qxX_d³Ù­¦×U ýlû+fÏÔÙûύp±¡1wÏLN;Ó<ŽÐmC²þÍϼˀPምÿK܍«Ç‡†d:	2P‡œïT<ä¨~êÒhM‡ØË1;`Å0Ê…xòäh¦SÑ"7f‘´´òÙlN Ÿ‘‘R5”«L^¬÷„[J
 n¦ÿ~Ô¨®àY:Ô¥¶f’$FªUßÄÇHM¸êxkÜtMÁ¬ð‰²ÙÞTdN¤gÒ!O3ñ¼¹#îˆ]ïæŠ]¬“µ
-ãPù‘œÇþÚi¶}GÉŽ}ùÏíTG7ùö«­`¬]Nû~[í¯V1ìiÊø[ÿLÃ]:×üÖMÜ&Þ‡ô³:Gï¨ ´bZ˜]nÓ_u©Àÿû§¬>ÇÝåØ)]šÞo9õFù苤•ÍYË@)ø#]_%´ÂÒÒ³ÖšŠ~lÿ¼àHû`ÌÙ±’´j&!ÕŸâBMòš¾é¿O¸èk~œÓ:Žñö:ß õ25:ÓóÆP¢”ÆèkÛà—	àw‡X°_¿½´ëŒÉèV0d¥Yý#ãVˆ|`E ð g놹M9’ö–ƽVl(RlsŸHçç'Ñ&hzþ®aê~ì'V°BÆ|„ÎìqpŸ°RÐ1Ûzƒ&OSžò_mëòh‚J·ÝK]Ê®£h•,Ã%«Kÿ¤¼Ã ‹®‡C)…ؼÊml‘ö³gF>$0î…ðÔ!a€(¢IEšYƒôR´;ºã—Š#W†>OñÉ&Îj_-,   '[2ðì*Óæ ¾„û‘m<ú±Ägû    YZ
\ No newline at end of file
+ãPù‘œÇþÚi¶}GÉŽ}ùÏíTG7ùö«­`¬]Nû~[í¯V1ìiÊø[ÿLÃ]:×üÖMÜ&Þ‡ô³:Gï¨ ´bZ˜]nÓ_u©Àÿû§¬>ÇÝåØ)]šÞo9õFù苤•ÍYË@)ø#]_%´ÂÒÒ³ÖšŠ~lÿ¼àHû`ÌÙ±’´j&!ÕŸâBMòš¾é¿O¸èk~œÓ:Žñö:ß õ25:ÓóÆP¢”ÆèkÛà—	àw‡X°_¿½´ëŒÉèV0d¥Yý#ãVˆ|`E ð g놹M9’ö–ƽVl(RlsŸHçç'Ñ&hzþ®aê~ì'V°BÆ|„ÎìqpŸ°RÐ1Ûzƒ&OSžò_mëòh‚J·ÝK]Ê®£h•,Ã%«Kÿ¤¼Ã ‹®‡C)…ؼÊml‘ö³gF>$0î…ðÔ!a€(¢IEšYƒôR´;ºã—Š#W†>OñÉ&ÎjÔ’.eÄbQ~:°ÊÑé­‡†¶B;¸ÍgU¨’[c2B0Ÿé’·Ë‰#—ë:ðÇ©ªpµËçÊ ¤0jTbòýÄÅk(‡	é#V    'Ú|KŒ¾ …ªü€÷ñ7±Ägû    YZ
\ No newline at end of file

Deleted: pkg/CHNOSZ/inst/extdata/thermo/Ste01.csv
===================================================================
--- pkg/CHNOSZ/inst/extdata/thermo/Ste01.csv	2017-10-18 16:07:00 UTC (rev 261)
+++ pkg/CHNOSZ/inst/extdata/thermo/Ste01.csv	2017-10-20 15:05:27 UTC (rev 262)
@@ -1,2 +0,0 @@
-name,abbrv,formula,state,ref1,ref2,date,G,H,S,Cp,V,a1.a,a2.b,a3.c,a4.d,c1.e,c2.f,omega.lambda,z.T
-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

Modified: pkg/CHNOSZ/man/extdata.Rd
===================================================================
--- pkg/CHNOSZ/man/extdata.Rd	2017-10-18 16:07:00 UTC (rev 261)
+++ pkg/CHNOSZ/man/extdata.Rd	2017-10-20 15:05:27 UTC (rev 262)
@@ -99,7 +99,7 @@
 
   Files in \code{thermo} contain additional thermodynamic data and group additivity definitions:
   \itemize{
-    \item \code{Ste01.csv} and \code{BZA10.csv} contain supplementary thermodynamic data taken from Stefansson (2001) and Bazarkina et al. (2010). They can be added to the database in the current session using \code{\link{add.obigt}}. See \code{\link{add.obigt}} and the vignette \code{eos-regress.Rmd} for examples that use these files.
+    \item \code{BZA10.csv} contains supplementary thermodynamic data taken from Bazarkina et al. (2010). The data can be added to the database in the current session using \code{\link{add.obigt}}. See \code{\link{add.obigt}} for an example that uses 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{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. See \code{demo("wjd")} and the vignette \code{wjd.Rmd} for examples that use this file.
@@ -157,8 +157,6 @@
 
 Shock, E. L. and Schulte, M. D. (1998) Organic synthesis during fluid mixing in hydrothermal systems. \emph{J. Geophys. Res.} \bold{103}, 28513--28527. \url{https://doi.org/10.1029/98JE02142}
 
-Stefánsson, A. (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{https://doi.org/10.1016/S0009-2541(00)00263-1}
-
 Tai, S. L., Boer, V. M., Daran-Lapujade, P., Walsh, M. C., de Winde, J. H., Daran, J.-M. and Pronk, J. T. (2005) Two-dimensional transcriptome analysis in chemostat cultures: Combinatorial effects of oxygen availability and macronutrient limitation in \emph{Saccharomyces cerevisiae}. \emph{J. Biol. Chem.} \bold{280}, 437--447. \url{https://doi.org/10.1074/jbc.M410573200}
 
 YeastGFP project. Yeast GFP Fusion Localization Database, http://yeastgfp.ucsf.edu; Current location: \url{http://yeastgfp.yeastgenome.org}

Modified: pkg/CHNOSZ/man/nonideal.Rd
===================================================================
--- pkg/CHNOSZ/man/nonideal.Rd	2017-10-18 16:07:00 UTC (rev 261)
+++ pkg/CHNOSZ/man/nonideal.Rd	2017-10-20 15:05:27 UTC (rev 262)
@@ -38,6 +38,7 @@
 
 If \code{method} is \samp{Helgeson}, the \dQuote{B-dot} equation is used.
 This equation seems to have been originally proposed by Huckel, 1925; parameters were derived for use at high temperature and pressure by Helgeson, 1969; Helgeson et al., 1981; Manning, 2013.
+The distance of closest approach (the \dQuote{ion size parameter}) is set to 3.72 Angstrom, which is appropriate for NaCl-dominated solutions (Helgeson et al., 1981 Table 2).
 In addition to \code{IS} and \code{T}, this method depends on values of \code{P}, \code{A_DH}, and \code{B_DH} given in the arguments.
 The calculation of \dQuote{B-dot}, also used in the equations, is made within \code{nonideal} by calling the \code{Bdot} function.
 For some uses, it is desirable to set the \dQuote{B-dot} parameter to zero; this can be done by setting the method to \code{Helgeson0}.

Modified: pkg/CHNOSZ/man/subcrt.Rd
===================================================================
--- pkg/CHNOSZ/man/subcrt.Rd	2017-10-18 16:07:00 UTC (rev 261)
+++ pkg/CHNOSZ/man/subcrt.Rd	2017-10-20 15:05:27 UTC (rev 262)
@@ -66,7 +66,7 @@
 Minerals with polymorphic transitions (denoted by having states \samp{cr} (lowest T phase), \samp{cr2}, \samp{cr3} etc.) can be defined generically by \samp{cr} in the \code{state} argument with a character value for \code{species}.
 \code{subcrt} in this case simultaneously calculates the requested properties of all the phases of each such mineral (phase species) and, using the values of the transition temperatures calculated from those at P = 1 bar given in the thermodynamic database together with functions of the entropies and volumes of transitions (see \code{\link{dPdTtr}}), determines the stable phase of the mineral at any grid point and substitutes the properties of this phase at that point for further calculations.
 If individual phase species of minerals are specified (by \samp{cr}, \samp{cr2} etc. in \code{state}), and \code{exceed.Ttr} is \code{FALSE} (the default), the Gibbs energies of these minerals are assigned values of NA at conditions beyond their transition temperature, where another of the phases is stable.
-If you set \code{exceed.Ttr} to \code{TRUE} while investigating the properties of phases of minerals identified generically (by \samp{cr}) the function will identify the stable phase on the basis not of the transition temperatures but of the calculated Gibbs energies of the phase species.
+If you set \code{exceed.Ttr} to \code{TRUE} to calculate the properties of mineral polymorphs (i.e., using \samp{cr}) the function will identify the stable polymorph using the calculated Gibbs energies of the phase species instead of the tabulated transition temperatures.
 This is not generally advised, since the computed standard molal properties of a phase species lose their physical meaning beyond the transition temperatures of the phase.
 
 If \code{logact} is provided, the chemical affinities of reactions are calculated.

Modified: pkg/CHNOSZ/vignettes/anintro.Rmd
===================================================================
--- pkg/CHNOSZ/vignettes/anintro.Rmd	2017-10-18 16:07:00 UTC (rev 261)
+++ pkg/CHNOSZ/vignettes/anintro.Rmd	2017-10-20 15:05:27 UTC (rev 262)
@@ -1827,9 +1827,27 @@
 browseURL(ref$URL)  ## opens a link to worldcat.org
 ```
 
+## Optional data
+
+Thermodynamic properties of minerals in the default database are mostly taken from @HDNB78.
+These are identified by the state `cr`, and `cr2`, `cr3`, etc. for higher-temperature polymorphs.
+Optionally, thermodynamic properties of minerals can be calculated using the equations and dataset of @Ber88; these minerals are identified in the database by having the state `cr_Berman`.
+
+Two other optional datasets can be activated by using <span style="color:red">`add.obigt()`</span>:
+
+<span style="color:red">`add.obigt("SUPCRTBL")`</span> -- This loads updated thermodynamic parameters for aqueous SiO<sub>2</sub>, aluminum and arsenic species, and minerals, as compiled in the [SUPCRTBL package](http://www.indiana.edu/~hydrogeo/supcrtbl.html) [@ZZL_16].
+SUPCRTBL also includes modifications to SUPCRT92 for calculating thermodynamic properties of minerals using the @HP11 dataset, but that is not available in CHNOSZ.
+Instead, the Berman mineral data can be used with similar results; see [<span style="color:blue">`demo(go-IU)`</span>](../demo/goIU.R).
+
+<span style="color:red">`add.obigt("DEW")`</span> -- These are aqueous species, with modified parameters, that are intended for use with the [Deep Earth Water](http://www.dewcommunity.org/) (DEW) model [@SHA14].
+You should also run <span style="color:red">`water("DEW")`</span> to activate the equations in the model; then, they will be used by <span style="color:green">`subcrt()`</span> and <span style="color:green">`affinity()`</span>.
+Examples are in [<span style="color:blue">`demo(DEW)`</span>](../demo/DEW.R).
+
+Detailed lists of sources for these Optional Data are in the vignette [<span style="color:blue">*Thermodynamic data in CHNOSZ*</span>](obigt.html) (look under **Solids** / **Berman**, **Optional Data** / **SUPCRTBL** and **Optional Data** / **DEW**).
+
 ## Adding data
 
-Use <span style="color:red">`add.obigt()`</span> to add data from a user-specified file to the database in the current session.
+You can also use <span style="color:red">`add.obigt()`</span> to add data from a user-specified file to the database in the current session.
 The file must be a CSV (comma separated value) file with column headers that match those in the main database.
 To show the required format, take a look at `BZA10.csv`, a supplemental data file provided in CHNOSZ.
 Missing values are indicated by `NA`:

Modified: pkg/CHNOSZ/vignettes/eos-regress.Rmd
===================================================================
--- pkg/CHNOSZ/vignettes/eos-regress.Rmd	2017-10-18 16:07:00 UTC (rev 261)
+++ pkg/CHNOSZ/vignettes/eos-regress.Rmd	2017-10-20 15:05:27 UTC (rev 262)
@@ -1,5 +1,5 @@
 ---
-title: "Regressing Thermodynamic Data"
+title: "Regressing thermodynamic data"
 subtitle: "EOSregress in [CHNOSZ](http://www.chnosz.net)"
 author: "Jeffrey M. Dick"
 date: "`r Sys.Date()`"
@@ -386,15 +386,13 @@
 
 We just made a new `r h4sio4` pseudospecies.
 In February 2017, the database in CHNOSZ was updated with a `pseudo-H4SiO4` that was made using this procedure.
-This `pseudo-H4SiO4` can be activated using the <span style="color:red">`add.obigt()`</span> function.
-Data given for `r h4sio4` by @Ste01 (`H4SiO4_Ste01`) are contained in a supplemental file, which as well can be read using <span style="color:red">`add.obigt()`</span>:
+For comparison, the parameters of `r h4sio4` given by @Ste01, which are contained in an optional data file, can be read using <span style="color:red">`add.obigt()`</span>:
 ```{r width180, include=FALSE}
 options(width = 180)
 ```
 ```{r info_H4SiO4, message=FALSE}
-add.obigt("CHNOSZ_aq", "pseudo-H4SiO4")
-add.obigt(system.file("extdata/thermo/Ste01.csv", package = "CHNOSZ"))
-info(info(c("new-H4SiO4", "pseudo-H4SiO4", "H4SiO4_Ste01")))
+add.obigt("SUPCRTBL", "H4SiO4")
+info(info(c("new-H4SiO4", "pseudo-H4SiO4", "H4SiO4")))
 ```
 ```{r width80, include=FALSE}
 ```
@@ -403,21 +401,22 @@
 s1 <- subcrt(c("pseudo-H4SiO4", "SiO2", "H2O"), c(-1, 1, 2))
 plot(s1$out$T, s1$out$G, type = "l", ylim = c(-100, 600),
   xlab = axis.label("T"), ylab = axis.label("DG0"))
-s2 <- subcrt(c("H4SiO4_Ste01", "SiO2", "H2O"), c(-1, 1, 2))
+s2 <- subcrt(c("H4SiO4", "SiO2", "H2O"), c(-1, 1, 2))
 lines(s2$out$T, s2$out$G, lty = 2)
 abline(h = 0, lty = 3)
 legend("topright", legend = c("pseudo-H4SiO4 (CHNOSZ)",
-  "H4SiO4_Ste01", "\t(Stefánsson, 2001)"), lty = c(1, 2, NA), bty = "n")
+  "H4SiO4 (Stefánsson, 2001)"), lty = c(1, 2, NA), bty = "n")
 text(225, 250, describe.reaction(s1$reaction))
 ```
 
-Let's compare CHNOSZ's `pseudo-H4SiO4` (with the same properties as the `new-H4SiO4` we just made) and `H4SiO4_Ste01` from Stefánsson (2001) with the calculated properties of `r sio2` + 2 `r h2o` as a function of temperature:
+Let's compare CHNOSZ's `pseudo-H4SiO4` (with the same properties as the `new-H4SiO4` we just made) and `H4SiO4` from Stefánsson (2001) with the calculated properties of `r sio2` + 2 `r h2o` as a function of temperature:
 ```{r subcrt_H4SiO4, eval=FALSE}
 ```
 
-The large differences for `H4SiO4_Ste01` at low temperature agree with the comparison to Shock et al. (1989) shown in Figure 3 of Stefánsson (2001).
-Therefore, `H4SiO4_Ste01` should not be used _in CHNOSZ_ for making low-temperature mineral activity diagrams.
-Instead, the pseudospecies with properties calculated here, `pseudo-H4SiO4`, is preferable for use _in CHNOSZ_---see <span style="color:blue">`?transfer`</span> and <span style="color:blue">`demo(activity_ratios)`</span>.
+The large differences for `H4SiO4` at low temperature agree with the comparison to Shock et al. (1989) shown in Figure 3 of Stefánsson (2001).
+Therefore, Stefánsson's `r h4sio4` should not be used with the _default_ database in CHNOSZ for making mineral activity diagrams.
+Instead, the pseudospecies with properties calculated here, `pseudo-H4SiO4`, is preferable for use with the _default_ database in CHNOSZ---see <span style="color:blue">`?transfer`</span> and <span style="color:blue">`demo(activity_ratios)`</span>.
+On the other hand, Stefánsson's `r h4sio4` is compatible with `r sio2` in the _optional_ SUPCRTBL data file [@ZZL_16].
 
 # Other possibilities
 

Modified: pkg/CHNOSZ/vignettes/obigt.Rmd
===================================================================
--- pkg/CHNOSZ/vignettes/obigt.Rmd	2017-10-18 16:07:00 UTC (rev 261)
+++ pkg/CHNOSZ/vignettes/obigt.Rmd	2017-10-20 15:05:27 UTC (rev 262)
@@ -242,14 +242,6 @@
 ```{r optreflist, results="asis", echo=FALSE}
 ```
 
-### `r setfile("CHNOSZ_aq.csv")`
-```{r CHNOSZ_aq, results="asis", echo=FALSE}
-cat("The primary aqueous silica species in CHNSOZ is SiO<sub>2</sub> ([Shock et al., 1989](https://doi.org/10.1016/0016-7037(89)90341-4)). The pseudospecies H<sub>4</sub>SiO<sub>4</sub> is used to make activity diagrams with *a*<sub>H<sub>4</sub>SiO<sub>4</sub></sub> as a variable. The GHS and HKF parameters for this pseudospecies were calculated using CHNOSZ; see the vignette [*Regressing thermodynamic data*](eos-regress.html) for more information.<hr>")
-```
-
-```{r optreflist, results="asis", echo=FALSE}
-```
-
 ## All at once
 
 ### Aqueous species
@@ -334,13 +326,6 @@
 ```{r reflist2, results="asis", echo=FALSE}
 ```
 
-#### `r setfile("CHNOSZ_aq.csv")`
-```{r CHNOSZ_aq, results="asis", echo=FALSE}
-```
-
-```{r reflist2, results="asis", echo=FALSE}
-```
-
 # Total count of species
 
 `r length(used)` of `r nrow(thermo$obigt)` entries in `thermo$obigt` and `r length(optused)` optional data entries are documented here.

Modified: pkg/CHNOSZ/vignettes/vig.bib
===================================================================
--- pkg/CHNOSZ/vignettes/vig.bib	2017-10-18 16:07:00 UTC (rev 261)
+++ pkg/CHNOSZ/vignettes/vig.bib	2017-10-20 15:05:27 UTC (rev 262)
@@ -170,6 +170,16 @@
   url       = {http://www.worldcat.org/oclc/583263},
 }
 
+ at Article{HDNB78,
+  author        = {Helgeson, Harold C. and Delany, Joan M. and Nesbitt, H. Wayne and Bird, Dennis K.},
+  journal       = {American Journal of Science},
+  title         = {{S}ummary and critique of the thermodynamic properties of rock-forming minerals},
+  year          = {1978},
+  volume        = {278A},
+  pages         = {1--229},
+  url           = {http://www.worldcat.org/oclc/13594862},
+}
+
 @Article{HKF81,
   author     = {Helgeson, Harold C. and Kirkham, David H. and Flowers, George C.},
   journal    = {American Journal of Science},
@@ -204,14 +214,14 @@
 }
 
 @Article{LH06a,
-  author        = {LaRowe, Douglas E. and Helgeson, Harold C.},
-  journal       = {Geochimica et Cosmochimica Acta},
-  title         = {{B}iomolecules in hydrothermal systems: {C}alculation of the standard molal thermodynamic properties of nucleic-acid bases, nucleosides, and nucleotides at elevated temperatures and pressures},
-  year          = {2006},
-  volume        = {70},
-  number        = {18},
-  pages         = {4680--4724},
-  doi           = {10.1016/j.gca.2006.04.010},
+  author    = {LaRowe, Douglas E. and Helgeson, Harold C.},
+  journal   = {Geochimica et Cosmochimica Acta},
+  title     = {{B}iomolecules in hydrothermal systems: {C}alculation of the standard molal thermodynamic properties of nucleic-acid bases, nucleosides, and nucleotides at elevated temperatures and pressures},
+  year      = {2006},
+  volume    = {70},
+  number    = {18},
+  pages     = {4680--4724},
+  doi       = {10.1016/j.gca.2006.04.010},
 }
 
 @Article{LH06b,
@@ -431,30 +441,41 @@
 }
 
 @Article{Ste01,
-  author    = {Stefánsson, Andri},
-  journal   = {Chemical Geology},
-  title     = {{D}issolution of primary minerals of basalt in natural waters. {I}. {C}alculation of mineral solubilities from 0°C to 350°{C}},
-  year      = {2001},
-  volume    = {172},
-  pages     = {225--250},
-  doi       = {10.1016/S0009-2541(00)00263-1},
+  author        = {Stefánsson, Andri},
+  journal       = {Chemical Geology},
+  title         = {{D}issolution of primary minerals of basalt in natural waters. {I}. {C}alculation of mineral solubilities from 0°{C} to 350°{C}},
+  year          = {2001},
+  volume        = {172},
+  pages         = {225--250},
+  doi           = {10.1016/S0009-2541(00)00263-1},
 }
 
+ at Article{SHA14,
+  author        = {Sverjensky, Dimitri A. and Harrison, Brandon and Azzolini, David},
+  journal       = {Geochimica et Cosmochimica Acta},
+  title         = {{W}ater in the deep {E}arth: {T}he dielectric constant and the solubilities of quartz and corundum to 60 kb and 1,200 $^\circ${C}},
+  year          = {2014},
+  volume        = {129},
+  pages         = {125--145},
+  doi           = {10.1016/j.gca.2013.12.019},
+  issn          = {0016-7037},
+}
+
 @Article{TS01,
-  author    = {Tagirov, Boris and Schott, Jacques},
-  journal   = {Geochimica et Cosmochimica Acta},
-  title     = {Aluminum speciation in crustal fluids revisited},
-  year      = {2001},
-  volume    = {65},
-  number    = {21},
-  pages     = {3965--3992},
-  doi       = {10.1016/S0016-7037(01)00705-0},
+  author        = {Tagirov, Boris and Schott, Jacques},
+  journal       = {Geochimica et Cosmochimica Acta},
+  title         = {{A}luminum speciation in crustal fluids revisited},
+  year          = {2001},
+  volume        = {65},
+  number        = {21},
+  pages         = {3965--3992},
+  doi           = {10.1016/S0016-7037(01)00705-0},
 }
 
 @Article{TH88,
   author    = {Tanger, IV, John C. and Helgeson, Harold C.},
   journal   = {American Journal of Science},
-  title     = {Calculation of the thermodynamic and transport properties of aqueous species at high pressures and temperatures: {R}evised equations of state for the standard partial molal properties of ions and electrolytes},
+  title     = {{C}alculation of the thermodynamic and transport properties of aqueous species at high pressures and temperatures: {R}evised equations of state for the standard partial molal properties of ions and electrolytes},
   year      = {1988},
   volume    = {288},
   number    = {1},
@@ -469,7 +490,7 @@
   year      = {2002},
   volume    = {31},
   number    = {2},
-  pages     = {387 -- 535},
[TRUNCATED]

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


More information about the CHNOSZ-commits mailing list