[CHNOSZ-commits] r36 - in pkg/CHNOSZ: . R demo inst inst/doc inst/extdata/thermo inst/tests man vignettes
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jan 1 14:42:16 CET 2013
Author: jedick
Date: 2013-01-01 14:42:16 +0100 (Tue, 01 Jan 2013)
New Revision: 36
Modified:
pkg/CHNOSZ/DESCRIPTION
pkg/CHNOSZ/R/util.data.R
pkg/CHNOSZ/R/util.formula.R
pkg/CHNOSZ/demo/sources.R
pkg/CHNOSZ/inst/CHECKLIST
pkg/CHNOSZ/inst/NEWS
pkg/CHNOSZ/inst/doc/anintro.pdf
pkg/CHNOSZ/inst/doc/equilibrium.pdf
pkg/CHNOSZ/inst/doc/hotspring.pdf
pkg/CHNOSZ/inst/doc/wjd.pdf
pkg/CHNOSZ/inst/extdata/thermo/obigt_check.csv
pkg/CHNOSZ/inst/tests/test-util.R
pkg/CHNOSZ/man/diagram.Rd
pkg/CHNOSZ/man/equilibrate.Rd
pkg/CHNOSZ/man/protein.Rd
pkg/CHNOSZ/man/revisit.Rd
pkg/CHNOSZ/man/transfer.Rd
pkg/CHNOSZ/vignettes/anintro.Rnw
pkg/CHNOSZ/vignettes/anintro.lyx
pkg/CHNOSZ/vignettes/equilibrium.Rnw
pkg/CHNOSZ/vignettes/equilibrium.lyx
pkg/CHNOSZ/vignettes/flowchart.dia
pkg/CHNOSZ/vignettes/flowchart.pdf
pkg/CHNOSZ/vignettes/wjd.Rnw
pkg/CHNOSZ/vignettes/wjd.lyx
Log:
prepare version 0.9-9 for release on CRAN
Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION 2012-12-31 07:25:08 UTC (rev 35)
+++ pkg/CHNOSZ/DESCRIPTION 2013-01-01 13:42:16 UTC (rev 36)
@@ -1,6 +1,6 @@
-Date: 2012-12-31
+Date: 2013-01-01
Package: CHNOSZ
-Version: 0.9.8-10
+Version: 0.9-9
Title: Chemical Thermodynamics and Activity Diagrams
Author: Jeffrey M. Dick
Maintainer: Jeffrey M. Dick <jmdick at asu.edu>
Modified: pkg/CHNOSZ/R/util.data.R
===================================================================
--- pkg/CHNOSZ/R/util.data.R 2012-12-31 07:25:08 UTC (rev 35)
+++ pkg/CHNOSZ/R/util.data.R 2013-01-01 13:42:16 UTC (rev 36)
@@ -181,7 +181,9 @@
npr <- sapply(x$key, function(x) length(which(thermo$protein$ref==x)) )
npr[npr==0] <- ""
# count the times each source is listed in stress.csv
- nst <- sapply(x$key, function(x) length(which(thermo$stress[2,]==x)) )
+ stressfile <- system.file("extdata/abundance/stress.csv", package="CHNOSZ")
+ stressdat <- read.csv(stressfile, check.names=FALSE, as.is=TRUE)
+ nst <- sapply(x$key, function(x) length(which(stressdat[2,]==x)) )
nst[nst==0] <- ""
# append the counts to the table to be shown
x <- c(x,list(ns1=ns1,ns2=ns2,npr=npr,nst=nst))
@@ -357,8 +359,9 @@
# or NA if the difference is within the tolerance
# 20110808 jmd
# get calculated value based on H and S
- if(is.na(ghs$formula)) {
- msgout("checkGHS: formula of ", ghs$name, "(", ghs$state, ") is NA\n")
+ ina <- is.na(ghs$formula)
+ if(any(ina)) {
+ msgout("checkGHS: formula of ", ghs$name[ina], "(", ghs$state[ina], ") is NA\n")
Se <- NA
} else Se <- entropy(as.character(ghs$formula))
refval <- ghs[,8]
@@ -430,9 +433,9 @@
out2 <- checkfun("OBIGT-2")
out <- rbind(out1,out2)
# set differences within a tolerance to NA
- out$DCp[out$DCp < 1] <- NA
- out$DV[out$DV < 1] <- NA
- out$DG[out$DG < 500] <- NA
+ out$DCp[abs(out$DCp) < 1] <- NA
+ out$DV[abs(out$DV) < 1] <- NA
+ out$DG[abs(out$DG) < 500] <- NA
# take out species where all reported differences are NA
ina <- is.na(out$DCp) & is.na(out$DV) & is.na(out$DG)
out <- out[!ina,]
Modified: pkg/CHNOSZ/R/util.formula.R
===================================================================
--- pkg/CHNOSZ/R/util.formula.R 2012-12-31 07:25:08 UTC (rev 35)
+++ pkg/CHNOSZ/R/util.formula.R 2013-01-01 13:42:16 UTC (rev 36)
@@ -90,8 +90,8 @@
# calculate the standard molal entropy at Tref of elements in chemical formulas
formula <- i2A(get.formula(formula))
ielem <- match(colnames(formula), thermo$element$element)
- if(any(is.na(ielem))) stop(paste("element(s)",
- colnames(formula)[is.na(ielem)], "not available in thermo$element"))
+ if(any(is.na(ielem))) warning(paste("element(s)",
+ paste(colnames(formula)[is.na(ielem)], collapse=" "), "not available in thermo$element"))
entropy <- as.numeric( formula %*% (thermo$element$s[ielem] / thermo$element$n[ielem]) )
return(entropy)
}
Modified: pkg/CHNOSZ/demo/sources.R
===================================================================
--- pkg/CHNOSZ/demo/sources.R 2012-12-31 07:25:08 UTC (rev 35)
+++ pkg/CHNOSZ/demo/sources.R 2013-01-01 13:42:16 UTC (rev 36)
@@ -17,7 +17,9 @@
# sources of protein compositions
protein.source <- thermo$protein$ref
# sources of stress response proteins
-stress.source <- as.character(thermo$stress[2,])
+stressfile <- system.file("extdata/abundance/stress.csv", package="CHNOSZ")
+stressdat <- read.csv(stressfile, check.names=FALSE, as.is=TRUE)
+stress.source <- as.character(stressdat[2,])
# if the sources are all accounted for
# these all produce character(0)
print("missing these sources for elemental properties:")
Modified: pkg/CHNOSZ/inst/CHECKLIST
===================================================================
--- pkg/CHNOSZ/inst/CHECKLIST 2012-12-31 07:25:08 UTC (rev 35)
+++ pkg/CHNOSZ/inst/CHECKLIST 2013-01-01 13:42:16 UTC (rev 36)
@@ -16,12 +16,6 @@
co <- check.obigt()
write.csv(co, "obigt_check.csv", row.names=FALSE, na="")
-- when creating vignettes use a vig.bib that has curly braces around capital letters
-
-- remove deugging <<- assignments inside functions
-
-- remove debugging print()s (usually placed in first column)
-
- especially on Windows:
data files are uncompressed on installation? (from BuildResaveData: no)
anim.*() produce pngs / movies (ImageMagick dependency)?
Modified: pkg/CHNOSZ/inst/NEWS
===================================================================
--- pkg/CHNOSZ/inst/NEWS 2012-12-31 07:25:08 UTC (rev 35)
+++ pkg/CHNOSZ/inst/NEWS 2013-01-01 13:42:16 UTC (rev 36)
@@ -1,5 +1,5 @@
-CHANGES IN CHNOSZ 0.9.8-10 (2012-12-31)
---------------------------------------
+CHANGES IN CHNOSZ 0.9-9 (2013-01-01)
+------------------------------------
MAJOR CHANGES:
@@ -25,6 +25,8 @@
There is some impact on the calculated Gibbs energies of charged
species.
+NEW FUNCTIONS:
+
- Add wjd() implementing the steepest descent algorithm for free energy
minimization described by White et al., 1958. Also add supporting
functions element.potentials(), invertible.combs() for finding
@@ -32,11 +34,9 @@
is.near.equil(), and run.wjd().
- Add guess() as another supporting function for wjd(), to produce
- initial guesses of moles of species satisfying elemental bulk
- composition, and a Suggests dependency on 'limSolve'.
+ initial guesses of moles of species satisfying a given elemental
+ bulk composition, and a Suggests dependency on 'limSolve'.
-NEW FUNCTIONS:
-
- New function i2A() for generating a stoichiometric matrix from indices
of species in the thermodynamic database.
@@ -55,8 +55,8 @@
- In equilibrate(), the argument 'logact' (inherited from diagram()),
specifying the logarithm of activity of the balanced quantity, has
- been renamed to 'loga.balance'. The function now has 'loga.equil'
- in its result, containing the equilibrium logarithms of activities
+ been renamed to 'loga.balance'. In the result, rename 'logact' to
+ 'loga.equil', containing the equilibrium logarithms of activities
of the species of interest.
- The 'residue' argument of diagram() has been changed to 'normalize'
@@ -163,7 +163,7 @@
- get.expr(), for reading abundances or expression levels of proteins
from variously formatted data files, is renamed to read.expr(), with
- retrieval of amino acid compositions of proteins split into more.aa().
+ retrieval of amino acid compositions of proteins moved to more.aa().
- Replace ionize() with a completely rewritten and much easier to use
ionize.aa() for calculating the additive ionization properties of
@@ -290,7 +290,8 @@
- Add a release CHECKLIST to the installation directory of the package.
-- Use UTF-8 degree symbol in second argument of \eqn{}{}.
+- Replace "degrees" with UTF-8 degree symbol in second argument of
+ \eqn{}{}; add \encoding{UTF-8} to affected Rd files.
OTHER CHANGES:
@@ -309,8 +310,8 @@
- In c2s(), use 'collapse' argument of paste() instead of a for loop.
-- Change R dependency to R >= 2.12.0, for useDynLib in NAMESPACE to
- find the shared library on Windows.
+- Change R dependency to R >= 2.12.0, required for useDynLib in
+ NAMESPACE to find the shared library on Windows.
CHANGES IN CHNOSZ 0.9-7 (2011-08-23)
------------------------------------
Modified: pkg/CHNOSZ/inst/doc/anintro.pdf
===================================================================
(Binary files differ)
Modified: pkg/CHNOSZ/inst/doc/equilibrium.pdf
===================================================================
(Binary files differ)
Modified: pkg/CHNOSZ/inst/doc/hotspring.pdf
===================================================================
(Binary files differ)
Modified: pkg/CHNOSZ/inst/doc/wjd.pdf
===================================================================
(Binary files differ)
Modified: pkg/CHNOSZ/inst/extdata/thermo/obigt_check.csv
===================================================================
--- pkg/CHNOSZ/inst/extdata/thermo/obigt_check.csv 2012-12-31 07:25:08 UTC (rev 35)
+++ pkg/CHNOSZ/inst/extdata/thermo/obigt_check.csv 2013-01-01 13:42:16 UTC (rev 36)
@@ -1,105 +1,262 @@
"table","ispecies","name","state","DCp","DV","DG"
-"OBIGT",26,"S2O3-2","aq",,,939
+"OBIGT",14,"CO3-2","aq",,-1.04,
+"OBIGT",20,"HPO4-2","aq",,-1.02,
+"OBIGT",49,"BO2-","aq",,-19.31,
"OBIGT",62,"Cu+2","aq",3.62,,
-"OBIGT",104,"ethylbenzene","aq",,2.16,
+"OBIGT",81,"ethane","aq",-9.4,,
+"OBIGT",82,"propane","aq",-15.14,-1.45,
+"OBIGT",104,"ethylbenzene","aq",-2.52,2.16,
"OBIGT",105,"n-propylbenzene","aq",,5.63,
-"OBIGT",106,"n-butylbenzene","aq",,6.55,562
-"OBIGT",107,"n-pentylbenzene","aq",,4.34,
-"OBIGT",108,"n-hexylbenzene","aq",,4.93,
-"OBIGT",109,"n-heptylbenzene","aq",,5.51,
-"OBIGT",110,"n-octylbenzene","aq",,6.1,
-"OBIGT",254,"urea","aq",,23.32,
-"OBIGT",297,"CeNO3+2","aq",,,874
+"OBIGT",106,"n-butylbenzene","aq",-10.62,6.55,
+"OBIGT",107,"n-pentylbenzene","aq",-14.71,4.34,
+"OBIGT",108,"n-hexylbenzene","aq",-18.81,4.93,
+"OBIGT",109,"n-heptylbenzene","aq",-22.9,5.51,
+"OBIGT",110,"n-octylbenzene","aq",-27,6.1,
+"OBIGT",254,"urea","aq",-23.26,23.32,
+"OBIGT",281,"LaSO4+","aq",-6.02,,
"OBIGT",324,"NdF2+","aq",16.64,6.19,
-"OBIGT",370,"EuF+","aq",4.11,,
-"OBIGT",371,"EuF2","aq",9.75,,
-"OBIGT",372,"EuF3-","aq",17.18,,
-"OBIGT",373,"EuF4-2","aq",26.07,,
-"OBIGT",374,"EuCl+","aq",,19.2,
-"OBIGT",375,"EuCl2","aq",,40.4,
-"OBIGT",376,"EuCl3-","aq",,64.47,
-"OBIGT",377,"EuCl4-2","aq",,91.04,
-"OBIGT",478,"TmCO3+","aq",,,22940
+"OBIGT",370,"EuF+","aq",4.11,-19.19,
+"OBIGT",371,"EuF2","aq",9.75,-40.4,
+"OBIGT",372,"EuF3-","aq",17.18,-64.45,
+"OBIGT",373,"EuF4-2","aq",26.07,-91.02,
+"OBIGT",374,"EuCl+","aq",-4.11,19.2,
+"OBIGT",375,"EuCl2","aq",-9.84,40.4,
+"OBIGT",376,"EuCl3-","aq",-17.19,64.47,
+"OBIGT",377,"EuCl4-2","aq",-26.15,91.04,
"OBIGT",516,"propanoic acid","aq",1.42,,
"OBIGT",539,"formate","aq",1.96,,
"OBIGT",541,"propanoate","aq",1.68,,
-"OBIGT",607,"Fe(For)+","aq",,,587
-"OBIGT",608,"Fe(For)2","aq",,,639
-"OBIGT",673,"Na(But)","aq",,,698
-"OBIGT",675,"K(But)","aq",,,696
-"OBIGT",680,"Mg(But)2","aq",,,1397
-"OBIGT",709,"Yb(But)+2","aq",,,665
-"OBIGT",728,"Fe(Pent)2","aq",,,532
-"OBIGT",822,"Fe(Gly)2","aq",,,537
-"OBIGT",848,"Fe(Alan)2","aq",,,553
-"OBIGT",929,"CsBr","aq",,,533
-"OBIGT",940,"NaHSiO3","aq",,,2595
-"OBIGT",950,"ZnCl3-","aq",,,2264
-"OBIGT",954,"AgNO3","aq",,,1596
-"OBIGT",955,"MnSO4","aq",,,1203
-"OBIGT",969,"AuCl4-3","aq",,,117800
-"OBIGT",974,"InCl+2","aq",,,7342
-"OBIGT",991,"InF+2","aq",,,7347
-"OBIGT",1015,"WO4-2","aq",,,19984
+"OBIGT",548,"n-decanoate","aq",-1.93,,
+"OBIGT",564,"oxalate","aq",-3.19,,
+"OBIGT",591,"alanate","aq",-24.28,,
+"OBIGT",898,"UO4-2","aq",,-1.11,
+"OBIGT",935,"Ag(CO3)2-3","aq",,-1.56,
+"OBIGT",953,"AgCl4-3","aq",,-1.31,
+"OBIGT",1006,"CuCl4-2","aq",,-1.07,
+"OBIGT",1008,"ReO4-","aq",-1.26,,
+"OBIGT",1017,"PO4-3","aq",,-1.72,
"OBIGT",1019,"Al+3","aq",1.74,,
-"OBIGT",1032,"In+3","aq",,,7335
-"OBIGT",1079,"S5O6-2","aq",,,664
-"OBIGT",1165,"MgOH+","aq",,,11632
-"OBIGT",1190,"TlOH","aq",,,5739
-"OBIGT",1241,"HZrO2+","aq",,,6616
-"OBIGT",1252,"HHfO2+","aq",,,6529
-"OBIGT",1282,"RuOH+2","aq",,,648
+"OBIGT",1027,"UO2+2","aq",-1.1,,
+"OBIGT",1028,"Th+4","aq",,-1.14,
+"OBIGT",1047,"P2O7-4","aq",,-2.11,
+"OBIGT",1048,"HP2O7-3","aq",,-1.42,
+"OBIGT",1057,"AsO4-3","aq",,-1.65,
+"OBIGT",1068,"SO3-2","aq",,-1.02,
+"OBIGT",1102,"VO4-3","aq",,-1.63,
+"OBIGT",1114,"Zr+4","aq",,-1.18,
+"OBIGT",1121,"Hf+4","aq",,-1.18,
+"OBIGT",1126,"U+4","aq",,-1.13,
+"OBIGT",1142,"Ce+4","aq",,-1.13,
+"OBIGT",1143,"Pr+4","aq",,-1.12,
+"OBIGT",1144,"Nd+4","aq",,-1.12,
+"OBIGT",1145,"Pm+4","aq",,-1.13,
+"OBIGT",1146,"Sm+4","aq",,-1.14,
+"OBIGT",1147,"Eu+4","aq",,-1.14,
+"OBIGT",1148,"Gd+4","aq",,-1.16,
+"OBIGT",1149,"Tb+4","aq",,-1.15,
+"OBIGT",1150,"Dy+4","aq",,-1.15,
+"OBIGT",1151,"Ho+4","aq",,-1.15,
+"OBIGT",1152,"Er+4","aq",,-1.15,
+"OBIGT",1153,"Tm+4","aq",,-1.16,
+"OBIGT",1154,"Yb+4","aq",,-1.16,
+"OBIGT",1155,"Lu+4","aq",,-1.17,
+"OBIGT",1164,"BeO2-2","aq",,-1.17,
+"OBIGT",1210,"MnO2-2","aq",,-1.05,
+"OBIGT",1221,"CoO2-2","aq",,-1.14,
+"OBIGT",1226,"NiO2-2","aq",,-1.16,
+"OBIGT",1230,"CuO2-2","aq",,-1.09,
+"OBIGT",1234,"ZnO2-2","aq",,-1.17,
+"OBIGT",1249,"CdO2-2","aq",,-1.08,
+"OBIGT",1267,"RuCl4-2","aq",,-1.09,
+"OBIGT",1270,"Ru(SO4)3-4","aq",,-1.8,
+"OBIGT",1277,"RuCl5-2","aq",,-1.49,
+"OBIGT",1278,"RuCl6-3","aq",,-2.39,
+"OBIGT",1281,"Ru(SO4)3-3","aq",,-1.3,
+"OBIGT",1287,"RhCl4-2","aq",,-1.14,
+"OBIGT",1290,"Rh(SO4)3-4","aq",,-1.82,
"OBIGT",1294,"RhCl2+","aq",,4.67,
-"OBIGT",1300,"RhOH+2","aq",,,789
-"OBIGT",1311,"PtCl+","aq",,1.25,
-"OBIGT",1312,"PtCl2","aq",,2.29,
-"OBIGT",1313,"PtCl3-","aq",,1.78,
-"OBIGT",1338,"Na(Mal)-","aq",,,17018
-"OBIGT",1339,"K(Mal)-","aq",,,17013
+"OBIGT",1299,"Rh(SO4)3-3","aq",,-1.33,
+"OBIGT",1305,"PdCl4-2","aq",,-1.05,
+"OBIGT",1308,"Pd(SO4)3-4","aq",,-1.8,
+"OBIGT",1311,"PtCl+","aq",-3.52,1.25,
+"OBIGT",1312,"PtCl2","aq",-7.11,2.29,
+"OBIGT",1313,"PtCl3-","aq",-10.48,1.78,
+"OBIGT",1314,"PtCl4-2","aq",-13.86,,
+"OBIGT",1317,"Pt(SO4)3-4","aq",,-1.79,
+"OBIGT",1324,"Li(Mal)-","aq",,-3.22,
+"OBIGT",1328,"Al(Mal)+","aq",,-2.19,
+"OBIGT",1329,"Pb(Mal)","aq",,1.16,
+"OBIGT",1333,"Pb(Succ)","aq",,1.49,
+"OBIGT",1334,"Na(Oxal)-","aq",,-3.14,
+"OBIGT",1335,"K(Oxal)-","aq",,-2.75,
+"OBIGT",1336,"Fe(Oxal)+","aq",,-2.19,
+"OBIGT",1338,"Na(Mal)-","aq",,-3.11,
+"OBIGT",1339,"K(Mal)-","aq",,-2.63,
+"OBIGT",1341,"La(Mal)+","aq",,-1.92,
+"OBIGT",1342,"Gd(Mal)+","aq",,-1.73,
+"OBIGT",1343,"Lu(Mal)+","aq",,-2.25,
+"OBIGT",1344,"Yb(Mal)+","aq",,-2.05,
+"OBIGT",1345,"Th(Mal)+2","aq",-1.29,-4.79,
+"OBIGT",1347,"Ce(Mal)+","aq",,-1.75,
"OBIGT",1348,"Nd(Mal)+","aq",4.52,,
-"OBIGT",1414,"Y(Mal)+","aq",,,29999
+"OBIGT",1349,"Sm(Mal)+","aq",,-1.77,
+"OBIGT",1350,"Pr(Mal)+","aq",,-1.75,
+"OBIGT",1351,"Eu(Mal)+","aq",,-1.87,
+"OBIGT",1352,"Tb(Mal)+","aq",,-1.92,
+"OBIGT",1353,"Dy(Mal)+","aq",,-1.89,
+"OBIGT",1354,"Tm(Mal)+","aq",,-2.08,
+"OBIGT",1355,"Ho(Mal)+","aq",,-2.08,
+"OBIGT",1356,"Er(Mal)+","aq",,-2.11,
+"OBIGT",1357,"Sc(Mal)+","aq",,-1.97,
+"OBIGT",1358,"Fe(Mal)+","aq",,-1.97,
+"OBIGT",1359,"Na(Succ)-","aq",,-2.82,
+"OBIGT",1360,"K(Succ)-","aq",,-2.39,
+"OBIGT",1366,"Th(Succ)+2","aq",-1.21,-4.47,
+"OBIGT",1371,"NH4(Oxal)-","aq",,-2.62,
+"OBIGT",1376,"Al(Oxal)+","aq",,-2.62,
+"OBIGT",1377,"Yb(Oxal)+","aq",,-2.02,
+"OBIGT",1378,"Ce(Oxal)+","aq",,-1.8,
+"OBIGT",1379,"Nd(Oxal)+","aq",,-1.8,
+"OBIGT",1380,"Eu(Oxal)+","aq",,-1.89,
+"OBIGT",1381,"Gd(Oxal)+","aq",,-1.8,
+"OBIGT",1382,"Ru(Oxal)+","aq",,-2.41,
+"OBIGT",1383,"Pa(Oxal)+2","aq",-1.25,-4.63,
+"OBIGT",1384,"Th(Oxal)+2","aq",-1.27,-4.69,
+"OBIGT",1385,"U(Oxal)+2","aq",-1.25,-4.63,
+"OBIGT",1386,"Np(Oxal)+2","aq",-1.27,-4.69,
+"OBIGT",1389,"Am(Oxal)+","aq",,-1.8,
+"OBIGT",1390,"Cm(Oxal)+","aq",,-1.8,
+"OBIGT",1391,"Y(Oxal)+","aq",,-2.11,
+"OBIGT",1396,"La(Oxal)+","aq",,-1.87,
+"OBIGT",1397,"Tb(Oxal)+","aq",,-1.92,
+"OBIGT",1398,"Er(Oxal)+","aq",,-2.05,
+"OBIGT",1399,"Lu(Oxal)+","aq",,-2.19,
+"OBIGT",1400,"Cr(Oxal)+","aq",,-2.58,
+"OBIGT",1401,"Ga(Oxal)+","aq",,-2.66,
+"OBIGT",1402,"Sc(Oxal)+","aq",,-2.13,
+"OBIGT",1403,"In(Oxal)+","aq",,-2.19,
+"OBIGT",1404,"Pu(Oxal)+","aq",-1.2,-4.44,
+"OBIGT",1405,"NpO2(Oxal)","aq",,-1.94,
+"OBIGT",1406,"Sm(Oxal)+","aq",,-1.84,
+"OBIGT",1407,"Cs(Mal)-","aq",,-2.39,
+"OBIGT",1408,"NH4(Mal)-","aq",,-2.54,
+"OBIGT",1413,"In(Mal)+","aq",,-2.11,
+"OBIGT",1414,"Y(Mal)+","aq",,-2.02,
+"OBIGT",1422,"La(Succ)+","aq",,-1.52,
+"OBIGT",1423,"NH4(Succ)-","aq",,-2.26,
+"OBIGT",1425,"Fe(Succ)+","aq",,-1.92,
+"OBIGT",1426,"Sc(Succ)+","aq",,-1.77,
+"OBIGT",1429,"NpO2(Succ)","aq",,-3.16,
+"OBIGT",1430,"Sm(Succ)+","aq",,-1.48,
+"OBIGT",1431,"Er(Succ)+","aq",,-1.68,
+"OBIGT",1432,"U(Succ)+2","aq",-1.15,-4.27,
+"OBIGT",1436,"La(Glut)+","aq",,-1.23,
+"OBIGT",1437,"Y(Glut)+","aq",,-1.46,
+"OBIGT",1438,"Sc(Glut)+","aq",,-1.5,
+"OBIGT",1439,"Th(Glut)+2","aq",-1.09,-4.05,
+"OBIGT",1442,"Fe(Glut)+","aq",,-1.05,
+"OBIGT",1443,"Sm(Glut)+","aq",,-1.2,
+"OBIGT",1446,"Er(Glut)+","aq",,-1.4,
+"OBIGT",1448,"Ba(Adip)","aq",,1.19,
+"OBIGT",1455,"Pb(Adip)","aq",,1.25,
+"OBIGT",1456,"Sc(Adip)+","aq",,-1.22,
+"OBIGT",1458,"Th(Adip)+2","aq",-1.02,-3.76,
+"OBIGT",1459,"U(Adip)+2","aq",-1,-3.71,
+"OBIGT",1461,"Li(Oxal)-","aq",,-3.3,
+"OBIGT",1465,"Li(Succ)-","aq",,-2.94,
+"OBIGT",1467,"Na(Glut)-","aq",,-2.34,
+"OBIGT",1468,"K(Glut)-","aq",,-2.05,
+"OBIGT",1469,"Li(Glut)-","aq",,-2.66,
+"OBIGT",1474,"Na(Adip)-","aq",,-2.05,
+"OBIGT",1475,"K(Adip)-","aq",,-1.76,
+"OBIGT",1476,"Li(Adip)-","aq",,-2.38,
"OBIGT",1482,"CF4","aq",5.9,,
-"OBIGT",1493,"ethanethiol","aq",,,753
+"OBIGT",1489,"AsH3","aq",-2.67,,
"OBIGT",1495,"n-butanethiol","aq",2.19,,
-"OBIGT",1636,"dHUMP-","aq",1.84,,
-"OBIGT",1744,"HNicMP(ox)","aq",,9.54,
-"OBIGT",1752,"ribose-5-phosphate","aq",,7.48,
-"OBIGT",1755,"H4NADP(red)","aq",1.73,,
-"OBIGT",1757,"H2NADP(red)-2","aq",1.72,,
-"OBIGT",1758,"HNADP(red)-3","aq",1.9,,
-"OBIGT",1765,"xylose","aq",1.18,,
-"OBIGT",1766,"arabinose","aq",1.18,,
-"OBIGT",1767,"lyxose","aq",1.11,,
-"OBIGT",1768,"xylulose","aq",1.11,,
-"OBIGT",1769,"ribulose","aq",1.11,,
-"OBIGT",1770,"glucose","aq",1.31,,
-"OBIGT",1771,"mannose","aq",1.46,,
-"OBIGT",1773,"fructose","aq",1.3,,
-"OBIGT",1774,"sorbose","aq",1.3,,
-"OBIGT",1775,"cyclohexane","aq",9.35,6.64,
-"OBIGT",1783,"Ti(OH)4","aq",,,849
-"OBIGT",1833,"antigorite","cr1",,,812
-"OBIGT",1867,"clinochlore,7a","cr1",,,666
-"OBIGT",1911,"ferrosilite","cr1",,,694
-"OBIGT",1912,"ferrosilite","cr2",,,694
-"OBIGT",1927,"greenalite","cr",,,142507
-"OBIGT",2188,"triphenylene","cr",,,541
-"OBIGT",2375,"n-nonacontane","liq",,,635
-"OBIGT",2382,"2-methyloctane","liq",10,,
-"OBIGT",2653,"5,6-dithiadecane","liq",2,,
-"OBIGT",2708,"3,5-dimethylphenol","gas",,,628
+"OBIGT",1621,"dH2TMP","aq",,-1,
+"OBIGT",1623,"dHUMP-","aq",1.84,,
+"OBIGT",1715,"citric acid","aq",,-112.81,
+"OBIGT",1716,"H2-citrate","aq",,-106.64,
+"OBIGT",1717,"H-citrate-2","aq",,-97.98,
+"OBIGT",1718,"citrate-3","aq",,-81.71,
+"OBIGT",1731,"HNicMP(ox)","aq",,9.54,
+"OBIGT",1739,"ribose-5-phosphate","aq",,7.48,
+"OBIGT",1742,"H4NADP(red)","aq",1.73,,
+"OBIGT",1744,"H2NADP(red)-2","aq",1.72,,
+"OBIGT",1745,"HNADP(red)-3","aq",1.9,,
+"OBIGT",1752,"xylose","aq",1.18,,
+"OBIGT",1753,"arabinose","aq",1.18,,
+"OBIGT",1754,"lyxose","aq",1.11,,
+"OBIGT",1755,"xylulose","aq",1.11,,
+"OBIGT",1756,"ribulose","aq",1.11,,
+"OBIGT",1757,"glucose","aq",1.31,,
+"OBIGT",1758,"mannose","aq",1.46,,
+"OBIGT",1760,"fructose","aq",1.3,,
+"OBIGT",1761,"sorbose","aq",1.3,,
+"OBIGT",1762,"cyclohexane","aq",9.35,6.64,
+"OBIGT",1787,"Gly-Ala-Gly","aq",,-126.09,
+"OBIGT",1788,"Gly-Arg+-Gly","aq",,-182.01,
+"OBIGT",1789,"Gly-Asn-Gly","aq",,-145.77,
+"OBIGT",1790,"Gly-Asp-Gly","aq",,-139.16,
+"OBIGT",1791,"Gly-Cys-Gly","aq",,-139.2,
+"OBIGT",1792,"Gly-Gln-Gly","aq",,-158.09,
+"OBIGT",1793,"Gly-Glu-Gly","aq",,-155.4,
+"OBIGT",1794,"Gly-Gly-Gly","aq",,-107.83,
+"OBIGT",1795,"Gly-His-Gly","aq",,-167.84,
+"OBIGT",1796,"Gly-Ile-Gly","aq",,-172.24,
+"OBIGT",1797,"Gly-Leu-Gly","aq",,-171.74,
+"OBIGT",1798,"Gly-Lys+-Gly","aq",,-175.45,
+"OBIGT",1799,"Gly-Met-Gly","aq",,-172.45,
+"OBIGT",1800,"Gly-Phe-Gly","aq",,-188.52,
+"OBIGT",1801,"Gly-Pro-Gly","aq",,-140.68,
+"OBIGT",1802,"Gly-Ser-Gly","aq",,-125.79,
+"OBIGT",1803,"Gly-Thr-Gly","aq",,-141.19,
+"OBIGT",1804,"Gly-Tyr-Gly","aq",,-190.24,
+"OBIGT",1805,"Gly-Val-Gly","aq",,-155.72,
+"OBIGT",1806,"[GXGBB]","aq",,-98.93,
+"OBIGT",1844,"antigorite","cr1",,,812
+"OBIGT",1878,"clinochlore,7a","cr1",,,666
+"OBIGT",1897,"daphnite,14a","cr",,,-836
+"OBIGT",1922,"ferrosilite","cr1",,,694
+"OBIGT",1923,"ferrosilite","cr2",,,694
+"OBIGT",1938,"greenalite","cr",,,142507
+"OBIGT",1953,"hydromagnesite","cr",,,-2569
+"OBIGT",2090,"n-octadecane","cr",-2.63,,
+"OBIGT",2091,"n-nonadecane","cr",-13.32,,
+"OBIGT",2092,"n-eicosane","cr",-2.79,,
+"OBIGT",2093,"n-heneicosane","cr",-8.61,,
+"OBIGT",2094,"n-docosane","cr",-2.63,,
+"OBIGT",2095,"n-tricosane","cr",-5.22,,
+"OBIGT",2096,"n-tetracosane","cr",-2.02,,
+"OBIGT",2097,"n-pentacosane","cr",-2.93,,
+"OBIGT",2098,"n-hexacosane","cr",-1.29,,
+"OBIGT",2099,"n-heptacosane","cr",-1.23,,
+"OBIGT",2151,"carbazole","cr",-43.39,,
+"OBIGT",2192,"triphenylene","cr",,,541
+"OBIGT",2487,"deoxyadenosine","cr",,,-2977
+"OBIGT",2494,"acetamide","cr",-67.91,,
+"OBIGT",2610,"n-nonacontane","liq",,,635
+"OBIGT",2617,"2-methyloctane","liq",10,,
+"OBIGT",3030,"5,6-dithiadecane","liq",2,,
+"OBIGT",3104,"ethylene","gas",-4.59,,
+"OBIGT",3114,"3,5-dimethylphenol","gas",,,628
"OBIGT-2",33,"AgCl2-","aq",1.65,,
-"OBIGT-2",37,"AgHS","aq",,,1151
+"OBIGT-2",36,"AgCl","aq",,-1.88,
+"OBIGT-2",39,"Cu+","aq",-5.84,-1.78,
"OBIGT-2",41,"Cu(HS)2-","aq",,14.75,
"OBIGT-2",44,"CuHS","aq",7.38,,
"OBIGT-2",97,"MgAsO4-","aq",1.3,,
+"OBIGT-2",100,"MnAsO4-","aq",-1.45,,
"OBIGT-2",119,"methyldiethanolamine","aq",1.61,,
+"OBIGT-2",135,"aminophenols","aq",-1.55,,
"OBIGT-2",137,"pyruvate","aq",8.37,2.23,
"OBIGT-2",140,"oxaloacetate-2","aq",1.21,,
"OBIGT-2",144,"fumaric acid","aq",,6.38,
"OBIGT-2",150,"citric acid","aq",,2.62,
+"OBIGT-2",153,"citrate-3","aq",,-1.34,
"OBIGT-2",154,"succinyl thioester","aq",,13.76,
"OBIGT-2",155,"succinyl thioester-1","aq",1.2,,
-"OBIGT-2",252,"realgar","cr",3.14,,
-"OBIGT-2",292,"jarosite","cr",,,20697
-"OBIGT-2",293,"natrojarosite","cr",,,17554
+"OBIGT-2",254,"realgar","cr",3.14,,
+"OBIGT-2",262,"Tb(OH)3","cr",,,-777
+"OBIGT-2",294,"jarosite","cr",,,20697
+"OBIGT-2",295,"natrojarosite","cr",,,17554
Modified: pkg/CHNOSZ/inst/tests/test-util.R
===================================================================
--- pkg/CHNOSZ/inst/tests/test-util.R 2012-12-31 07:25:08 UTC (rev 35)
+++ pkg/CHNOSZ/inst/tests/test-util.R 2013-01-01 13:42:16 UTC (rev 36)
@@ -3,7 +3,9 @@
test_that("unavailable elements cause errors in mass() and entropy()", {
# the suppressWarnings here refer to the warnings generated by makeup() about the missing elements
expect_error(suppressWarnings(mass("Xxx")), "element\\(s\\) Xxx not available in thermo\\$element")
- expect_error(suppressWarnings(entropy("Xxx")), "element\\(s\\) Xxx not available in thermo\\$element")
+ # 20130101: the error here was changed to a warning to restore functionality of check.obigt()
+ # (species in the database include those with Am Cm Np Pu, not listed in thermo$element)
+ #expect_error(suppressWarnings(entropy("Xxx")), "element\\(s\\) Xxx not available in thermo\\$element")
})
test_that("GHS() and ZC() give warnings and errors in some situation", {
Modified: pkg/CHNOSZ/man/diagram.Rd
===================================================================
--- pkg/CHNOSZ/man/diagram.Rd 2012-12-31 07:25:08 UTC (rev 35)
+++ pkg/CHNOSZ/man/diagram.Rd 2013-01-01 13:42:16 UTC (rev 36)
@@ -219,7 +219,7 @@
"AlF+2", "AlF2+", "AlF3", "AlF4-", "Al(OH)2F2-", "Al(OH)2F",
"AlOHF2"), "aq")
a <- affinity(pH=c(0, 10), "F-"=c(-1, -9), T=200)
-diagram(a)
+diagram(a, fill="heat")
title(main=paste("Aqueous aluminium species, T=200 C, P=Psat\n",
"after Tagirov and Schott, 2001"))
# restore thermodynamic database to default
@@ -260,7 +260,7 @@
species(c("oxaloacetate-2", "malate-2", "fumarate-2",
"a-ketoglutarate-2", "citrate-3"))
a <- affinity(O2=c(-80, -60), H2O=c(-5, 5))
-diagram(a, dotted=1)
+diagram(a, dotted=1, fill="heat")
e <- equilibrate(a)
diagram(e, add=TRUE, names=NULL, col="purple")
e <- equilibrate(a, normalize=TRUE)
Modified: pkg/CHNOSZ/man/equilibrate.Rd
===================================================================
--- pkg/CHNOSZ/man/equilibrate.Rd 2012-12-31 07:25:08 UTC (rev 35)
+++ pkg/CHNOSZ/man/equilibrate.Rd 2013-01-01 13:42:16 UTC (rev 36)
@@ -9,7 +9,8 @@
}
\usage{
- equilibrate(aout, balance=NULL, loga.balance=NULL, normalize=FALSE, ispecies=1:length(aout$values))
+ equilibrate(aout, balance=NULL, loga.balance=NULL, normalize=FALSE,
+ ispecies=1:length(aout$values))
balance(aout, balance=NULL)
equil.boltzmann(Astar, n.balance, loga.balance)
equil.reaction(Astar, n.balance, loga.balance)
Modified: pkg/CHNOSZ/man/protein.Rd
===================================================================
--- pkg/CHNOSZ/man/protein.Rd 2012-12-31 07:25:08 UTC (rev 35)
+++ pkg/CHNOSZ/man/protein.Rd 2013-01-01 13:42:16 UTC (rev 36)
@@ -179,7 +179,7 @@
basis(c("CO2", "NH3", "H2S", "O2"), as.numeric(logact))
species(paste(proteins, "ECOLI", sep="_"))
a <- affinity(pH=c(5, 10), T=c(10, 40))
-diagram(a, normalize=FALSE)
+diagram(a, normalize=FALSE, fill="heat")
title(main="Relative stabilities of sigma factors in E. coli")
ptext <- c(describe.property("T", 25),
describe.basis(ibasis=c(2, 6), oneline=TRUE))
Modified: pkg/CHNOSZ/man/revisit.Rd
===================================================================
--- pkg/CHNOSZ/man/revisit.Rd 2012-12-31 07:25:08 UTC (rev 35)
+++ pkg/CHNOSZ/man/revisit.Rd 2013-01-01 13:42:16 UTC (rev 36)
@@ -133,7 +133,7 @@
mtitle(c(t1, t2))
# chemical affinities as a function of two other variables
a <- affinity(NH3=c(-10, 10, 40), T=c(0, 80, 40))
-diagram(a)
+diagram(a, fill="heat")
# show a legend with input constraints
db <- describe.basis(ibasis=5)
legend("bottomright", db)
@@ -180,7 +180,7 @@
# calculate affinities in logfO2-logaH2O space
a <- affinity(O2=c(-85,-65), H2O=c(-10,0), iprotein=ip)
# show the predominances
-diagram(a, normalize=TRUE)
+diagram(a, normalize=TRUE, fill="heat")
# calculate the equilibrium activities
e <- equilibrate(a, loga.balance=0, normalize=TRUE)
# show the coefficient of variation
Modified: pkg/CHNOSZ/man/transfer.Rd
===================================================================
--- pkg/CHNOSZ/man/transfer.Rd 2012-12-31 07:25:08 UTC (rev 35)
+++ pkg/CHNOSZ/man/transfer.Rd 2013-01-01 13:42:16 UTC (rev 36)
@@ -70,7 +70,7 @@
basis(c("Al+3", "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)
+diagram(a, fill="heat")
basis("pH", 4)
species(1:5, c(-4, rep(-999, 4)))
tr <- transfer(550, dmode="coupled", plot=c(2, 3), devmax=0.2)
Modified: pkg/CHNOSZ/vignettes/anintro.Rnw
===================================================================
--- pkg/CHNOSZ/vignettes/anintro.Rnw 2012-12-31 07:25:08 UTC (rev 35)
+++ pkg/CHNOSZ/vignettes/anintro.Rnw 2013-01-01 13:42:16 UTC (rev 36)
@@ -1032,7 +1032,7 @@
\subsection{findit}
\texttt{findit()} performs a gridded search, on successively smaller
-hypercubes, for the conditions that maximize one of the statistics
+hypercubes, for the conditions that optimize one of the statistics
returned by \texttt{revisit()}. In this example containing five species,
with \texttt{balance=1}, four compositional variables are the maximum
that can be considered ($\mathrm{NH_{3}}$ is excluded because it
@@ -1081,7 +1081,7 @@
balancing constraints or chemical activity (or even temperature) limits,
and would probably increase \texttt{niter} and/or \texttt{res} in
\texttt{findit()}. Note that the results of a high-dimensional optimization
-such as this one may be bogus if the resolution is not high enough,
+such as this one may be misleading if the resolution is not high enough,
or the initial hypercube is too small. Even after a successful simulation,
it remains a matter of discussion what the optimized chemical activities
of the basis species and the amino acids signify.
Modified: pkg/CHNOSZ/vignettes/anintro.lyx
===================================================================
--- pkg/CHNOSZ/vignettes/anintro.lyx 2012-12-31 07:25:08 UTC (rev 35)
+++ pkg/CHNOSZ/vignettes/anintro.lyx 2013-01-01 13:42:16 UTC (rev 36)
@@ -3803,7 +3803,7 @@
findit()
\family default
performs a gridded search, on successively smaller hypercubes, for the
- conditions that maximize one of the statistics returned by
+ conditions that optimize one of the statistics returned by
\family typewriter
revisit()
\family default
@@ -4014,8 +4014,8 @@
\family default
.
Note that the results of a high-dimensional optimization such as this one
- may be bogus if the resolution is not high enough, or the initial hypercube
- is too small.
+ may be misleading if the resolution is not high enough, or the initial
+ hypercube is too small.
Even after a successful simulation, it remains a matter of discussion what
the optimized chemical activities of the basis species and the amino acids
signify.
Modified: pkg/CHNOSZ/vignettes/equilibrium.Rnw
===================================================================
--- pkg/CHNOSZ/vignettes/equilibrium.Rnw 2012-12-31 07:25:08 UTC (rev 35)
+++ pkg/CHNOSZ/vignettes/equilibrium.Rnw 2013-01-01 13:42:16 UTC (rev 36)
@@ -40,13 +40,7 @@
\author{Jeffrey M. Dick}
\maketitle
-\begin{abstract}
-The purpose of this document is to describe using a specific example
-the theoretical basis for the calculations of equilibrium activities
-of species in the CHNOSZ software package.\end{abstract}
-
-
\section{Background; terminology}
\emph{Species of interest} (or simply \emph{species}) are chosen by
@@ -579,7 +573,8 @@
Take-home: when making predominance diagrams, confidently use the
maximum affinity method when \texttt{normalize=TRUE} (as done here
-for proteins) otherwise it is at your own risk.
+for proteins); otherwise it is advisable to compute the equilibrium
+distribution.
\section{Document Information}
Modified: pkg/CHNOSZ/vignettes/equilibrium.lyx
===================================================================
--- pkg/CHNOSZ/vignettes/equilibrium.lyx 2012-12-31 07:25:08 UTC (rev 35)
+++ pkg/CHNOSZ/vignettes/equilibrium.lyx 2013-01-01 13:42:16 UTC (rev 36)
@@ -102,21 +102,6 @@
Dick
\end_layout
-\begin_layout Standard
-\begin_inset Branch stuff
-status open
-
-\begin_layout Abstract
-The purpose of this document is to describe using a specific example the
- theoretical basis for the calculations of equilibrium activities of species
- in the CHNOSZ software package.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
\begin_layout Section
Background; terminology
\end_layout
@@ -2125,7 +2110,8 @@
\family typewriter
normalize=TRUE
\family default
- (as done here for proteins) otherwise it is at your own risk.
+ (as done here for proteins); otherwise it is advisable to compute the equilibri
+um distribution.
\end_layout
\end_inset
Modified: pkg/CHNOSZ/vignettes/flowchart.dia
===================================================================
(Binary files differ)
Modified: pkg/CHNOSZ/vignettes/flowchart.pdf
===================================================================
(Binary files differ)
Modified: pkg/CHNOSZ/vignettes/wjd.Rnw
===================================================================
--- pkg/CHNOSZ/vignettes/wjd.Rnw 2012-12-31 07:25:08 UTC (rev 35)
+++ pkg/CHNOSZ/vignettes/wjd.Rnw 2013-01-01 13:42:16 UTC (rev 36)
@@ -52,7 +52,7 @@
CHNOSZ documentation has details of the implementation that are not
covered in this vignette. The functions demonstrated here are not
intended for aqueous solutions or heterogeneous phase equilibria,
-which have been the subject of other reviews \citep[e.g.][]{NPW+79}.
+which are covered in some reviews \citep[e.g.][]{NPW+79}.
The arguments of \texttt{wjd()} have default values to simulate the
example problem given by \citealp{WJD58}. In their words, ``The
@@ -65,7 +65,7 @@
of the species, at the given temperature, are provided in dimensionless
form, i.e. $\Delta G^{\circ}/RT$. Note that White et al., 1958 use
the terminology ``free energy'' and the notation $F^{\circ}$. The
-term ``Gibbs energy'' and corresponding notation is used here.
+term ``Gibbs energy'' and corresponding notation are used here.
<<libraryCHNOSZ, echo=FALSE>>=
library(CHNOSZ)
@@ -347,9 +347,9 @@
is.near.equil(wjd(Y=Ys[[i]], Gfrac=1e-9), tol=0.0001)
})
@
-We're back to passing all of the equilibrium tests (well, almost)
-based on uniformity of chemical potentials of the elements. What are
-the standard deviations of the resulting species abundances?
+We're back to passing all but one of the equilibrium tests based on
+uniformity of chemical potentials of the elements. What are the standard
+deviations of the resulting species abundances?
<<sd.species>>=
Xs <- sapply(iYs, function(i) wjd(Y=Ys[[i]], Gfrac=1e-9)$X)
@@ -431,14 +431,13 @@
We triggered a single ``not near equilibrium'' message, but overall
-it seems well behaved. And, as expected, it is strikingly similar
-to Fig. 2 of \citet{DLE64}, with a nearly asymptotic crossing of
-curves at about 28\% carbon, together with an increase in aromatic
-compounds (e.g. naphthalene, anthracene) going toward higher carbon
-content. Unlike the figure in \citet{DLE64}, there appears to be
-a second major crossing of curves at about 43\% carbon, corresponding
-to a rise in CO. (For a higher resolution, try setting \texttt{xCs
-<- seq(8, 47, 1)}.)
+it seems well behaved. And, as expected, it is similar to Fig. 2 of
+\citet{DLE64}, with a major crossing of curves at about 28\% carbon,
+together with an increase in aromatic compounds (e.g. naphthalene,
+anthracene) going toward higher carbon content. Unlike the figure
+in \citet{DLE64}, there appears to be a second major crossing of
+curves at about 43\% carbon, corresponding to a rise in CO. (For a
+higher resolution, try setting \texttt{xCs <- seq(8, 47, 1)}.)
\section{Running Down: Using a Thermodynamic Database}
Modified: pkg/CHNOSZ/vignettes/wjd.lyx
===================================================================
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/chnosz -r 36
More information about the CHNOSZ-commits
mailing list