[CHNOSZ-commits] r320 - in pkg/CHNOSZ: . R inst man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jun 12 08:58:33 CEST 2018


Author: jedick
Date: 2018-06-12 08:58:31 +0200 (Tue, 12 Jun 2018)
New Revision: 320

Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/R/basis.R
   pkg/CHNOSZ/R/util.fasta.R
   pkg/CHNOSZ/inst/NEWS
   pkg/CHNOSZ/man/basis.Rd
Log:
basis(): change 'CHNOPS+' keyword to use O2 instead of e-


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2018-05-14 05:08:15 UTC (rev 319)
+++ pkg/CHNOSZ/DESCRIPTION	2018-06-12 06:58:31 UTC (rev 320)
@@ -1,6 +1,6 @@
-Date: 2018-05-14
+Date: 2018-06-12
 Package: CHNOSZ
-Version: 1.1.3-27
+Version: 1.1.3-28
 Title: Thermodynamic Calculations and Diagrams for Geochemistry
 Authors at R: c(
     person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"),

Modified: pkg/CHNOSZ/R/basis.R
===================================================================
--- pkg/CHNOSZ/R/basis.R	2018-05-14 05:08:15 UTC (rev 319)
+++ pkg/CHNOSZ/R/basis.R	2018-06-12 06:58:31 UTC (rev 320)
@@ -189,7 +189,7 @@
 # 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+", "QEC4", "QEC", "QEC+")
+  basis.key <- c("CHNOS", "CHNOS+", "CHNOSe", "CHNOPS+", "CHNOPSe", "MgCHNOPS+", "MgCHNOPSe", "FeCHNOS", "FeCHNOS+", "QEC4", "QEC", "QEC+")
   # just list the keywords if none is specified
   if(is.null(key)) return(basis.key)
   # delete any previous basis definition
@@ -200,12 +200,14 @@
   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+")
-  else if(ibase %in% c(8, 9)) species <- c("glutamine", "glutamic acid", "cysteine", "H2O", "oxygen")
-  else if(ibase==10) species <- c("glutamine", "glutamic acid", "cysteine", "H2O", "oxygen", "H+")
+  else if(ibase==4) species <- c("CO2", "H2O", "NH3", "H3PO4", "H2S", "oxygen", "H+")
+  else if(ibase==5) species <- c("CO2", "H2O", "NH3", "H3PO4", "H2S", "e-", "H+")
+  else if(ibase==6) species <- c("Mg+2", "CO2", "H2O", "NH3", "H3PO4", "H2S", "oxygen", "H+")
+  else if(ibase==7) species <- c("Mg+2", "CO2", "H2O", "NH3", "H3PO4", "H2S", "e-", "H+")
+  else if(ibase==8) species <- c("Fe2O3", "CO2", "H2O", "NH3", "H2S", "oxygen")
+  else if(ibase==9) species <- c("Fe2O3", "CO2", "H2O", "NH3", "H2S", "oxygen", "H+")
+  else if(ibase %in% c(10, 11)) species <- c("glutamine", "glutamic acid", "cysteine", "H2O", "oxygen")
+  else if(ibase==12) species <- c("glutamine", "glutamic acid", "cysteine", "H2O", "oxygen", "H+")
   # get the preset logact
   logact <- preset.logact(species)
   # for QEC4, we use logact = -4 for the amino acids

Modified: pkg/CHNOSZ/R/util.fasta.R
===================================================================
--- pkg/CHNOSZ/R/util.fasta.R	2018-05-14 05:08:15 UTC (rev 319)
+++ pkg/CHNOSZ/R/util.fasta.R	2018-06-12 06:58:31 UTC (rev 320)
@@ -153,6 +153,7 @@
   # count amino acids or DNA bases in one or more sequences given as elements of the list seq
   if(type=="protein") letts <- aminoacids(1)
   else if(type=="DNA") letts <- c("A", "C", "G", "T")
+  else if(type=="RNA") letts <- c("A", "C", "G", "U")
   else stop(paste("unknown sequence type", type))
   # the numerical positions of the letters in alphabetical order (i.e. for amino acids, same order as in thermo$protein)
   ilett <- match(letts, LETTERS)

Modified: pkg/CHNOSZ/inst/NEWS
===================================================================
--- pkg/CHNOSZ/inst/NEWS	2018-05-14 05:08:15 UTC (rev 319)
+++ pkg/CHNOSZ/inst/NEWS	2018-06-12 06:58:31 UTC (rev 320)
@@ -1,4 +1,4 @@
-CHANGES IN CHNOSZ 1.1.3-27 (2018-05-14)
+CHANGES IN CHNOSZ 1.1.3-28 (2018-06-12)
 ---------------------------------------
 
 THERMODYNAMIC DATA
@@ -87,6 +87,9 @@
 - Add thermo$opt$maxcores (default 2) to specify maximum number of
   cores for parallel calculations with palply().
 
+- Keywords in basis(): Change 'CHNOPS+' to use O2 instead of e-, and add
+  'CHNOPSe' and 'MgCHNOPSe' for sets of basis species that have e-.
+
 CHANGES IN CHNOSZ 1.1.3 (2017-11-13)
 ------------------------------------
 

Modified: pkg/CHNOSZ/man/basis.Rd
===================================================================
--- pkg/CHNOSZ/man/basis.Rd	2018-05-14 05:08:15 UTC (rev 319)
+++ pkg/CHNOSZ/man/basis.Rd	2018-06-12 06:58:31 UTC (rev 320)
@@ -44,8 +44,10 @@
     \code{CHNOS} \tab \CO2, \H2O, \NH3, \H2S, \O2 \cr
     \code{CHNOS+} \tab \CO2, \H2O, \NH3, \H2S, \O2, \Hplus \cr
     \code{CHNOSe} \tab \CO2, \H2O, \NH3, \H2S, \eminus, \Hplus \cr
-    \code{CHNOPS+} \tab \CO2, \H2O, \NH3, \H3PO4, \H2S, \eminus, \Hplus \cr
-    \code{MgCHNOPS+} \tab \Mgplus2, \CO2, \H2O, \NH3, \H3PO4, \H2S, \eminus, \Hplus \cr
+    \code{CHNOPS+} \tab \CO2, \H2O, \NH3, \H3PO4, \H2S, \O2, \Hplus \cr
+    \code{CHNOPSe} \tab \CO2, \H2O, \NH3, \H3PO4, \H2S, \eminus, \Hplus \cr
+    \code{MgCHNOPS+} \tab \Mgplus2, \CO2, \H2O, \NH3, \H3PO4, \H2S, \O2, \Hplus \cr
+    \code{MgCHNOPSe} \tab \Mgplus2, \CO2, \H2O, \NH3, \H3PO4, \H2S, \eminus, \Hplus \cr
     \code{FeCHNOS} \tab \Fe2O3, \CO2, \H2O, \NH3, \H2S, \O2 \cr
     \code{FeCHNOS+} \tab \Fe2O3, \CO2, \H2O, \NH3, \H2S, \O2, \Hplus \cr
     \code{QEC4} \tab cysteine, glutamic acid, glutamine, \H2O, \O2 \cr



More information about the CHNOSZ-commits mailing list