[CHNOSZ-commits] r58 - in pkg/CHNOSZ: . R data inst inst/tests man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Nov 24 23:13:51 CET 2013


Author: jedick
Date: 2013-11-24 23:13:51 +0100 (Sun, 24 Nov 2013)
New Revision: 58

Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/R/basis.R
   pkg/CHNOSZ/R/info.R
   pkg/CHNOSZ/R/util.units.R
   pkg/CHNOSZ/data/OBIGT.csv
   pkg/CHNOSZ/inst/NEWS
   pkg/CHNOSZ/inst/tests/test-info.R
   pkg/CHNOSZ/man/swap.basis.Rd
Log:
info(): don't set state of "O2" to gas


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2013-10-05 07:17:54 UTC (rev 57)
+++ pkg/CHNOSZ/DESCRIPTION	2013-11-24 22:13:51 UTC (rev 58)
@@ -1,6 +1,6 @@
-Date: 2013-10-05
+Date: 2013-11-24
 Package: CHNOSZ
-Version: 1.0.1-2
+Version: 1.0.2
 Title: Chemical Thermodynamics and Activity Diagrams
 Author: Jeffrey M. Dick
 Maintainer: Jeffrey Dick <j3ffdick at gmail.com>

Modified: pkg/CHNOSZ/R/basis.R
===================================================================
--- pkg/CHNOSZ/R/basis.R	2013-10-05 07:17:54 UTC (rev 57)
+++ pkg/CHNOSZ/R/basis.R	2013-11-24 22:13:51 UTC (rev 58)
@@ -94,21 +94,21 @@
 # to load a preset basis definition by keyword
 preset.basis <- function(key=NULL) {
   # the available keywords
-  basis.key <- c('CHNOS','CHNOS+','CHNOSe','CHNOPS+','MgCHNOPS+','FeCHNOS','FeCHNOS+')
+  basis.key <- c("CHNOS", "CHNOS+", "CHNOSe", "CHNOPS+", "MgCHNOPS+", "FeCHNOS", "FeCHNOS+")
   # just list the keywords if none is specified
   if(is.null(key)) return(basis.key)
   # delete any previous basis definition
   basis(delete=TRUE)
   # match the keyword to the available ones
   ibase <- match(key, basis.key)
-  if(is.na(ibase)) stop(paste(key,"is not a keyword for preset basis species"))
-  if(ibase==1) species <- c('CO2','H2O','NH3','H2S','O2')
-  else if(ibase==2) species <- c('CO2','H2O','NH3','H2S','O2','H+')
-  else if(ibase==3) species <- c('CO2','H2O','NH3','H2S','e-','H+')
-  else if(ibase==4) species <- c('CO2','H2O','NH3','H3PO4','H2S','e-','H+')
-  else if(ibase==5) species <- c('Mg+2','CO2','H2O','NH3','H3PO4','H2S','e-','H+')
-  else if(ibase==6) species <- c('Fe2O3','CO2','H2O','NH3','H2S','O2')
-  else if(ibase==7) species <- c('Fe2O3','CO2','H2O','NH3','H2S','O2','H+')
+  if(is.na(ibase)) stop(paste(key, "is not a keyword for preset basis species"))
+  if(ibase==1) species <- c("CO2", "H2O", "NH3", "H2S", "oxygen")
+  else if(ibase==2) species <- c("CO2", "H2O", "NH3", "H2S", "oxygen", "H+")
+  else if(ibase==3) species <- c("CO2", "H2O", "NH3", "H2S", "e-", "H+")
+  else if(ibase==4) species <- c("CO2", "H2O", "NH3", "H3PO4", "H2S", "e-", "H+")
+  else if(ibase==5) species <- c("Mg+2", "CO2", "H2O", "NH3", "H3PO4", "H2S", "e-", "H+")
+  else if(ibase==6) species <- c("Fe2O3", "CO2", "H2O", "NH3", "H2S", "oxygen")
+  else if(ibase==7) species <- c("Fe2O3", "CO2", "H2O", "NH3", "H2S", "oxygen", "H+")
   # get the preset logact
   logact <- preset.logact(species)
   # load the species and return the result
@@ -117,7 +117,7 @@
 
 # logarithms of activities for preset basis definitions
 preset.logact <- function(species) {
-  bases <- c('H2O','CO2','NH3','H2S','O2','H+','e-','Fe2O3')
+  bases <- c('H2O','CO2','NH3','H2S','oxygen','H+','e-','Fe2O3')
   logact <- c(0,-3,-4,-7,-80,-7,-7,0)
   ibase <- match(species, bases)
   logact <- logact[ibase]

Modified: pkg/CHNOSZ/R/info.R
===================================================================
--- pkg/CHNOSZ/R/info.R	2013-10-05 07:17:54 UTC (rev 57)
+++ pkg/CHNOSZ/R/info.R	2013-11-24 22:13:51 UTC (rev 58)
@@ -75,11 +75,6 @@
   }
   # all of the species that match
   ispecies <- which(matches.species)
-  # special treatment for O2/oxygen: we prefer the gas
-  if(species %in% c("O2", "oxygen") & is.null(state)) {
-    igas <- match("gas", thermo$obigt$state[ispecies])
-    ispecies <- c(ispecies[igas], ispecies[-igas])
-  }
   # we return only the first species that matches
   # unless they are 'cr1' 'cr2' etc. and we requested state 'cr'
   if(identical(state, "cr")) ispecies.out <- ispecies

Modified: pkg/CHNOSZ/R/util.units.R
===================================================================
--- pkg/CHNOSZ/R/util.units.R	2013-10-05 07:17:54 UTC (rev 57)
+++ pkg/CHNOSZ/R/util.units.R	2013-11-24 22:13:51 UTC (rev 58)
@@ -127,7 +127,7 @@
   }
   else if(units %in% c('e0','logfo2')) {
     # convert between Eh and logfO2
-    supcrt.out <- subcrt(c('H2O','O2','H+','e-'),c(-1,0.5,2,2),T=T,P=P,convert=FALSE)
+    supcrt.out <- subcrt(c("H2O", "oxygen", "H+", "e-"), c(-1, 0.5, 2, 2), T=T, P=P, convert=FALSE)
     if(units=='logfo2') value <- 2*(supcrt.out$out$logK + logaH2O + 2*pH + 2*(convert(value,'pe',T=T)))
     if(units=='e0') value <- convert(( -supcrt.out$out$logK - 2*pH + value/2 - logaH2O )/2, 'Eh',T=T)
   }

Modified: pkg/CHNOSZ/data/OBIGT.csv
===================================================================
--- pkg/CHNOSZ/data/OBIGT.csv	2013-10-05 07:17:54 UTC (rev 57)
+++ pkg/CHNOSZ/data/OBIGT.csv	2013-11-24 22:13:51 UTC (rev 58)
@@ -61,23 +61,23 @@
 Ag+2,Ag+2,Ag+2,aq,SH88,NA,16.Feb.88,64300,64200,-21,-5.3,-19.3,-0.4299,-8.831,9.221,-2.4139,15.2224,-4.1142,1.3201,2
 Hg+2,Hg+2,Hg+2,aq,SH88,NA,1.Jul.87,39360,40670,-8.68,2.2,-19.6,-0.528,-9.0707,9.3152,-2.404,18.0613,-2.5865,1.1512,2
 Cu+2,Cu+2,Cu+2,aq,SH88,NA,07.Nov.97,15675,15700,-23.2,-5.7,-24.6,-1.1021,-10.4726,9.8662,-2.3461,20.3,-4.39,1.4769,2
-He,helium,He,aq,SHS89,NA,13.Jul.87,4658,-150,14.02,37.3,13,3.4722,0.6967,5.4762,-2.8078,26.0707,4.5634,-0.2123,0
-Ar,argon,Ar,aq,SHS89,NA,1.Sep.06,3900,-2870,14.3,52.8,31.71,6.003,6.8698,3.0499,-3.063,35.6471,7.316,-0.3073,0
-Xe,xenon,Xe,aq,SHS89,NA,13.Jul.87,3225,-4510,14.62,64.8,42.6,7.5196,10.5793,1.5919,-3.2163,42.1036,10.1652,-0.2214,0
-H2,hydrogen,H2,aq,SHS89,NA,13.Jul.87,4236,-1000,13.8,39.9,25.2,5.1427,4.7758,3.8729,-2.9764,27.6251,5.093,-0.209,0
-O2,oxygen,O2,aq,SHS89,NA,26.Jun.87,3954,-2900,26.04,56,30.38,5.7889,6.3536,3.2528,-3.0417,35.353,8.3726,-0.3943,0
-NH3,ammonia,NH3,aq,SSW01,SHS89,11.Oct.07,-6383,-19440,25.77,15.63,24.43,5.0911,2.797,8.6248,-2.8946,28.0865,-6.4728,-0.0769,0
-CO2,"carbon dioxide",CO2,aq,SSW01,SHS89,11.Oct.07,-92250,-98900,28.1,51.09,32.8,6.2466,7.4711,2.8136,-3.0879,38.4529,5.3534,-0.1934,0
-H2S,"hydrogen sulfide",H2S,aq,SSW01,SHS89,11.Oct.07,-6673,-9001,30,42.88,34.92,6.5097,6.7724,5.9646,-3.059,27.8951,6.7164,-0.1471,0
+He,NA,He,aq,SHS89,NA,13.Jul.87,4658,-150,14.02,37.3,13,3.4722,0.6967,5.4762,-2.8078,26.0707,4.5634,-0.2123,0
+Ar,NA,Ar,aq,SHS89,NA,1.Sep.06,3900,-2870,14.3,52.8,31.71,6.003,6.8698,3.0499,-3.063,35.6471,7.316,-0.3073,0
+Xe,NA,Xe,aq,SHS89,NA,13.Jul.87,3225,-4510,14.62,64.8,42.6,7.5196,10.5793,1.5919,-3.2163,42.1036,10.1652,-0.2214,0
+H2,NA,H2,aq,SHS89,NA,13.Jul.87,4236,-1000,13.8,39.9,25.2,5.1427,4.7758,3.8729,-2.9764,27.6251,5.093,-0.209,0
+O2,NA,O2,aq,SHS89,NA,26.Jun.87,3954,-2900,26.04,56,30.38,5.7889,6.3536,3.2528,-3.0417,35.353,8.3726,-0.3943,0
+NH3,NA,NH3,aq,SSW01,SHS89,11.Oct.07,-6383,-19440,25.77,15.63,24.43,5.0911,2.797,8.6248,-2.8946,28.0865,-6.4728,-0.0769,0
+CO2,NA,CO2,aq,SSW01,SHS89,11.Oct.07,-92250,-98900,28.1,51.09,32.8,6.2466,7.4711,2.8136,-3.0879,38.4529,5.3534,-0.1934,0
+H2S,NA,H2S,aq,SSW01,SHS89,11.Oct.07,-6673,-9001,30,42.88,34.92,6.5097,6.7724,5.9646,-3.059,27.8951,6.7164,-0.1471,0
 B(OH)3,NA,B(OH)3,aq,SHS89,NA,13.Jul.87,-231540,-256820,37,12,39.22,7.0643,8.8547,3.5844,-3.1451,11.3568,-0.5902,-0.2,0
-SiO2,SiO2,SiO2,aq,SHS89,NA,13.Jan.89,-199190,-209775,18,-76.1,16.1,1.9,1.7,20,-2.7,29.1,-51.2,0.1291,0
-H3PO4,"phosphoric acid",H3PO4,aq,SHS89,NA,11.Jul.87,-273100,-307920,38,23.6,48.1,8.2727,12.4182,0.8691,-3.2924,17.9708,1.7727,-0.22,0
-Ne,neon,Ne,aq,SHS89,NA,13.Jul.87,4565,-870,16.74,39.7,20.4,4.4709,3.1352,4.5177,-2.9086,27.0977,5.0523,-0.2535,0
-Kr,krypton,Kr,aq,SHS89,NA,13.Jul.87,3554,-3650,15.06,57.6,33.5,6.2721,7.5333,2.7891,-3.0904,37.8226,8.6985,-0.2281,0
-Rn,radon,Rn,aq,SHS89,NA,13.Jul.87,2790,-5000,16,83,54.1,9.0862,14.4045,0.0884,-3.3745,52.5774,13.8725,-0.2423,0
-N2,nitrogen,N2,aq,SHS89,NA,7.Feb.89,4347,-2495,22.9,56,33.3,6.2046,7.3685,2.8539,-3.0836,35.7911,8.3726,-0.3468,0
-SO2,"sulfur dioxide",SO2,aq,SSW01,SHS89,1.Sep.06,-71980,-77194,38.7,35.48,38.5,6.9502,9.189,2.1383,-3.1589,30.8993,2.0024,-0.0559,0
-HF,"hydrofluoric acid",HF,aq,SHS89,NA,7.Feb.89,-71662,-76835,22.5,14,12.5,3.4753,0.7042,5.4732,-2.8081,14.3647,-0.1828,-0.0007,0
+SiO2,NA,SiO2,aq,SHS89,NA,13.Jan.89,-199190,-209775,18,-76.1,16.1,1.9,1.7,20,-2.7,29.1,-51.2,0.1291,0
+H3PO4,NA,H3PO4,aq,SHS89,NA,11.Jul.87,-273100,-307920,38,23.6,48.1,8.2727,12.4182,0.8691,-3.2924,17.9708,1.7727,-0.22,0
+Ne,NA,Ne,aq,SHS89,NA,13.Jul.87,4565,-870,16.74,39.7,20.4,4.4709,3.1352,4.5177,-2.9086,27.0977,5.0523,-0.2535,0
+Kr,NA,Kr,aq,SHS89,NA,13.Jul.87,3554,-3650,15.06,57.6,33.5,6.2721,7.5333,2.7891,-3.0904,37.8226,8.6985,-0.2281,0
+Rn,NA,Rn,aq,SHS89,NA,13.Jul.87,2790,-5000,16,83,54.1,9.0862,14.4045,0.0884,-3.3745,52.5774,13.8725,-0.2423,0
+N2,NA,N2,aq,SHS89,NA,7.Feb.89,4347,-2495,22.9,56,33.3,6.2046,7.3685,2.8539,-3.0836,35.7911,8.3726,-0.3468,0
+SO2,NA,SO2,aq,SSW01,SHS89,1.Sep.06,-71980,-77194,38.7,35.48,38.5,6.9502,9.189,2.1383,-3.1589,30.8993,2.0024,-0.0559,0
+HF,NA,HF,aq,SHS89,NA,7.Feb.89,-71662,-76835,22.5,14,12.5,3.4753,0.7042,5.4732,-2.8081,14.3647,-0.1828,-0.0007,0
 methane,NA,CH4,aq,SH90,NA,31.Aug.87,-8234,-21010,20.99,66.3,37.3,6.7617,8.7279,2.3212,-3.1397,42.0941,10.4707,-0.3179,0
 ethane,NA,C2H6,aq,SH90,NA,31.Aug.87,-3886,-24710,26.59,88.3,51.2,8.75,13.1051,1.6258,-3.3207,73.8072,2.2242,-0.0627,0
 propane,NA,C3H8,aq,SH90,NA,31.Aug.87,-1963,-30490,33.35,110.6,67,10.768,17.6785,-0.5878,-3.5097,84.546,4.6332,-0.165,0
@@ -1572,8 +1572,8 @@
 [-COOH],NA,CHO2,aq,DLH06,NA,25.Aug.06,-92570,-104380,26.41,5.3,24.5,5.82,1.79,-2.4,-0.67,12.9,-4.1,-0.08,0
 [-C6H5],NA,C6H5,aq,DLH06,NA,25.Aug.06,31660,15170,31.02,75.1,72.6,15.33,8.51,13.47,-5.91,70.4,1.8,-0.11,0
 [di.corr],NA,C0,aq,DLH06,NA,25.Aug.06,0,0,0,-13.5,3.2,0.06,-1.48,-0.05,2.32,-0.1,-6.7,-0.02,0
-glutathione,GSH,C10H17N3O6S,aq,Dic07,NA,25.Feb.07,-217454,-335690,106.09,115.9,193.6,49.3,3.56,0.849999999999999,-8.05,153.5,-17.8,0.17,0
-"glutathione,ox",GSSG,C20H32N6O12S2,aq,Dic07,NA,25.Feb.07,-428031,-661380,NA,201.6,365,94.48,4.22,-0.0400000000000027,-15.66,276,-34.8,0.44,0
+glutathione,GSH,C10H17N3O6S,aq,Dic07,NA,25.Feb.07,-217454,-335690,106.09,115.9,193.6,49.3,3.56,0.85,-8.05,153.5,-17.8,0.17,0
+"glutathione,ox",GSSG,C20H32N6O12S2,aq,Dic07,NA,25.Feb.07,-428031,-661380,NA,201.6,365,94.48,4.22,-0.04,-15.66,276,-34.8,0.44,0
 cystine,NA,C6H12N2O4S2,aq,Dic07,NA,25.Feb.07,-150781,-238140,NA,64,124.8,32.16,1.9,16.88,-9.5,88.6,-10.4,0.4,0
 [CysS],NA,CH2S,aq,Dic07,NA,25.Feb.07,9484.5,140,NA,33.84,28.75,6.61,2.81,5.67,-2.98,22.7,5.4,-0.03,0
 adenine,NA,C5H5N5,aq,LH06a,NA,3.Feb.03,74770,31235,53.41,56.24,89.59,21.5046,8.501,-2.6632,-5.3561,97.68,-20.1,0.065,0
@@ -1750,13 +1750,13 @@
 H2NADP(ox)-,H2NADP(ox)-,C21H27N7O17P3-,aq,LH06b,NA,20.Aug.03,-742385,-1014768,160,193.738049713193,367.83,-24.1554,324.1052,-24.1184,-7.4051,312.89,-24.39,7.6,-1
 HNADP(ox)-2,HNADP(ox)-2,C21H26N7O17P3-2,aq,LH06b,NA,20.Aug.03,-739425,-1016668,142.7,163.288718929254,350.62,-25.9406,319.7464,-22.4052,-7.2249,308.97,-30.63,9.1,-2
 NADP(ox)-3,NADP(ox)-3,C21H25N7O17P3-3,aq,LH06b,NA,20.Aug.03,-729595,-1015663,113.1,112.189292543021,323.92,-28.7966,312.7727,-19.6642,-6.9366,297.97,-41.07,11.2,-3
-xylose,xylose,C5H10O5,aq,AP01,NA,24.Aug.06,-179371.414913958,-249937.858508604,48.7332695984704,65.9655831739962,95.7,22.5860420650096,0.908221797323136,4.78011472275335,-2.77246653919694,90.9177820267686,-17.5908221797323,-1.31453154875717,0
-arabinose,arabinose,C5H10O5,aq,AP01,NA,24.Aug.06,-177397.227533461,-249471.797323136,43.6663479923518,67.1606118546845,93.3,22.538240917782,0.812619502868069,3.99139579349904,-3.48948374760994,93.7619502868069,-18.4034416826004,-1.31453154875717,0
+xylose,xylose,C5H10O5,aq,AP01,NA,24.Aug.06,-179371.414913958,-249937.858508604,48.7332695984704,65.9655831739962,95.7,22.5860420650096,0.90822179732314,4.78011472275335,-2.77246653919694,90.9177820267686,-17.5908221797323,-1.31453154875717,0
+arabinose,arabinose,C5H10O5,aq,AP01,NA,24.Aug.06,-177397.227533461,-249471.797323136,43.6663479923518,67.1606118546845,93.3,22.538240917782,0.81261950286807,3.99139579349904,-3.48948374760994,93.7619502868069,-18.4034416826004,-1.31453154875717,0
 lyxose,lyxose,C5H10O5,aq,AP01,NA,24.Aug.06,-179048.757170172,-250164.913957935,47.0841300191205,67.3996175908222,94.2,22.6577437858509,1.2906309751434,1.7925430210325,-3.10707456978967,93.9292543021032,-18.4034416826004,-1.31453154875717,0
 xylulose,xylulose,C5H10O5,aq,AP01,NA,24.Aug.06,-178334.13001912,-246092.256214149,58.1500956022945,76.2428298279159,94.7,22.3231357552581,1.91204588910134,5.32982791586998,-3.58508604206501,102.772466539197,-18.4034416826004,-1.31453154875717,0
 ribulose,ribulose,C5H10O5,aq,AP01,NA,24.Aug.06,-175893.881453155,-244507.648183556,55.2820267686424,76.2428298279159,94.7,22.3231357552581,1.91204588910134,5.32982791586998,-3.58508604206501,102.772466539197,-18.4034416826004,-1.31453154875717,0
 glucose,glucose,C6H12O6,aq,AP01,NA,24.Aug.06,-218905.353728489,-301670.650095602,64.8900573613767,86.7590822179732,112.2,25.5258126195029,3.10707456978967,12.3804971319312,-4.87571701720841,89.7227533460803,-7.88718929254302,-1.5774378585086,0
-mannose,mannose,C6H12O6,aq,AP01,NA,24.Aug.06,-217731.835564054,-300826.959847036,63.7906309751434,81.2619502868069,111.9,26.84034416826,0.478011472275335,1.7208413001912,-2.74856596558317,91.3240917782027,-11.3049713193117,-1.5774378585086,0
+mannose,mannose,C6H12O6,aq,AP01,NA,24.Aug.06,-217731.835564054,-300826.959847036,63.7906309751434,81.2619502868069,111.9,26.84034416826,0.47801147227534,1.7208413001912,-2.74856596558317,91.3240917782027,-11.3049713193117,-1.5774378585086,0
 galactose,galactose,C6H12O6,aq,AP01,NA,24.Aug.06,-217239.48374761,-300000,64.9139579349904,90.5831739961759,110.7,26.7208413001912,-0.1434034416826,2.67686424474187,-2.96367112810707,99.7131931166348,-11.1376673040153,-1.5774378585086,0
 fructose,fructose,C6H12O6,aq,AP01,NA,24.Aug.06,-218812.141491396,-300999.043977055,66.8260038240918,84.1300191204589,111,25.8604206500956,4.51720841300191,8.98661567877629,-6.04684512428298,107.433078393881,-17.9015296367113,-1.5774378585086,0
 sorbose,sorbose,C6H12O6,aq,AP01,NA,24.Aug.06,-217961.281070746,-301935.946462715,60.8508604206501,84.1300191204589,111,25.8604206500956,4.51720841300191,8.98661567877629,-6.04684512428298,107.433078393881,-17.9015296367113,-1.5774378585086,0
@@ -1768,8 +1768,8 @@
 "dibutyl sulfide",NA,C8H18S,aq,Sch10,NA,03.Jul.10,13260,-51810,81.4,195,162.7,23.7393,57.9427,-33.671,-5.1744,177.4725,5.2072,-0.7624,0
 "dipentyl sulfide",NA,C10H22S,aq,Sch10,NA,03.Jul.10,17360,-63150,94.8,238,194.3,28.0757,67.7711,-35.9048,-5.5807,213.8806,8.5956,-0.7302,0
 "dihexyl sulfide",NA,C12H26S,aq,Sch10,NA,03.Jul.10,21460,-74490,108.2,280,225.9,32.412,77.5996,-38.1385,-5.987,249.442,11.9085,-0.698,0
-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
-H4SiO4,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
+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.01498565965583,0
+H4SiO4,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.08690248565966,0
 Br2,bromine,Br2,aq,WEP+82,NA,27.Apr.11,939.3,-619,31.19,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA
 I2,iodine,I2,aq,WEP+82,NA,27.Apr.11,3919.7,5401.5,32.79,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA
 2-methylpropane,NA,C4H10,aq,CGM+81,NA,7.Aug.11,NA,NA,NA,-11.38,NA,NA,NA,NA,NA,NA,NA,NA,NA

Modified: pkg/CHNOSZ/inst/NEWS
===================================================================
--- pkg/CHNOSZ/inst/NEWS	2013-10-05 07:17:54 UTC (rev 57)
+++ pkg/CHNOSZ/inst/NEWS	2013-11-24 22:13:51 UTC (rev 58)
@@ -1,4 +1,4 @@
-CHANGES IN CHNOSZ 1.0.1-2 (2013-10-05)
+CHANGES IN CHNOSZ 1.0.2 (2013-11-24)
 --------------------------------------
 
 - Updated extdata/protein/Sce.csv.xz using Saccharomyces Genome Database
@@ -13,7 +13,14 @@
 - read.fasta() gets new argument 'id'; when supplied, it skips reading
   the protein names from the FASTA headers.
 
+- info() no longer specially sets state of "O2" or "oxygen" to gas.
 
+- In thermo$obigt, names of gases (e.g. "oxygen") are used only for the
+  gaseous species; names were removed from dissolved species in rows
+  63-79. Both gases and aqueous species can continue to be referenced by
+  their chemical formula.
+
+
 CHANGES IN CHNOSZ 1.0.1 (2013-07-04)
 ------------------------------------
 

Modified: pkg/CHNOSZ/inst/tests/test-info.R
===================================================================
--- pkg/CHNOSZ/inst/tests/test-info.R	2013-10-05 07:17:54 UTC (rev 57)
+++ pkg/CHNOSZ/inst/tests/test-info.R	2013-11-24 22:13:51 UTC (rev 58)
@@ -6,8 +6,7 @@
   expect_message(info.character("acetate", "cr"), "only 'aq' is available")
   expect_message(info.character("methane", "cr"), "only 'aq' 'liq' 'gas' are available")
   expect_message(info.character("methane"), "also available in liq, gas")
-  # the special cases: O2 and H2O
-  expect_message(info.character("O2"), "also available in aq")
+  # H2O is a special case
   expect_equal(info.character("H2O", "aq"), info.character("H2O", "liq"))
 })
 

Modified: pkg/CHNOSZ/man/swap.basis.Rd
===================================================================
--- pkg/CHNOSZ/man/swap.basis.Rd	2013-10-05 07:17:54 UTC (rev 57)
+++ pkg/CHNOSZ/man/swap.basis.Rd	2013-11-24 22:13:51 UTC (rev 58)
@@ -38,18 +38,18 @@
 ## swapping basis species
 # start with a preset basis definition
 b1 <- basis("CHNOS+")
-# swap H2 for O2
+# swap H2(aq) for O2(gas)
 (b2 <- swap.basis("O2", "H2"))
 # the logarithm of activity calculated for H2
 # is equal to the one calculated from the equilibrium constant
 # for H2O = H2 + 0.5O2
-logK <- subcrt(c("O2","H2","H2O"), c(-0.5,-1,1), T=25)$out$logK
+logK <- subcrt(c("oxygen","H2","H2O"), c(-0.5,-1,1), T=25)$out$logK
 # the equilibrium value of logaH2 
 # (for logaH2O = 0 and logfO2 = -80)
 (logaH2 <- -logK + 40)
 stopifnot(all.equal(logaH2, b2$logact[5]))
 # put O2 back in
-b3 <- swap.basis("H2", "O2")
+b3 <- swap.basis("H2", "oxygen")
 # we have returned to starting point
 stopifnot(all.equal(b1$logact, b3$logact))
 



More information about the CHNOSZ-commits mailing list