[CHNOSZ-commits] r649 - in pkg/CHNOSZ: . demo inst inst/extdata/thermo

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Mar 14 15:40:10 CET 2021


Author: jedick
Date: 2021-03-14 15:40:10 +0100 (Sun, 14 Mar 2021)
New Revision: 649

Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/demo/affinity.R
   pkg/CHNOSZ/inst/NEWS.Rd
   pkg/CHNOSZ/inst/TODO
   pkg/CHNOSZ/inst/extdata/thermo/protein.csv
Log:
Rename CDC2 to CDK1 in protein.csv and fix some comments in demo/affinity.R


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2021-03-06 04:53:07 UTC (rev 648)
+++ pkg/CHNOSZ/DESCRIPTION	2021-03-14 14:40:10 UTC (rev 649)
@@ -1,6 +1,6 @@
-Date: 2021-03-06
+Date: 2021-03-14
 Package: CHNOSZ
-Version: 1.4.0-18
+Version: 1.4.0-19
 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/demo/affinity.R
===================================================================
--- pkg/CHNOSZ/demo/affinity.R	2021-03-06 04:53:07 UTC (rev 648)
+++ pkg/CHNOSZ/demo/affinity.R	2021-03-14 14:40:10 UTC (rev 649)
@@ -4,50 +4,56 @@
 ##  FEMS Microbiol. Rev. 25, 175--243. https://doi.org/10.1016/S0168-6445(00)00062-0
 library(CHNOSZ)
 
-# use aq state for all basis species (including O2)
+# Use aq state for all basis species (including O2)
 basis(c("CO2", "H2", "NH3", "O2", "H2S", "H+"), "aq")
-# we're going to make H2O
+# We're going to make H2O
 species("H2O")
-# a function to create the plots
+# A function to create the plots
 doplot <- function(T) {
   res <- 20
   # calculate affinity/2.303RT as a function of loga(H2) and loga(O2)
   a <- affinity(H2=c(-10, 0, res), O2=c(-10, 0, res), T=T)
-  T.K <- convert(T, "K")                   # temperature in Kelvin
-  acal <- convert(a$values[[1]], "G", T.K) # affinity (cal/mol)
-  akJ <- convert(acal, "J")/1000           # affinity (kJ/mol)
-  # now contour the values
+  # Temperature in Kelvin
+  T.K <- convert(T, "K")
+  # Convert dimensionless affinity (A/2.303RT) to Gibbs energy (cal/mol)
+  Gcal <- convert(a$values[[1]], "G", T.K)
+  # Convert cal/mol to kJ/mol
+  GkJ <- convert(Gcal, "J")/1000
+  # Now contour the values
   xyvals <- seq(-10, 0, length.out=res)
-  contour(x=xyvals, y=xyvals, z=t(akJ), levels=seq(-150, -250, -20),
+  contour(x=xyvals, y=xyvals, z=t(GkJ), levels=seq(-150, -250, -20),
     labcex=1, xlab=axis.label("H2"), ylab=axis.label("O2"))
-  # show the temperature
+  # Show the temperature
   legend("topleft", bg="white", cex=1,
     legend=describe.property("T", T, digits=0, ret.val=TRUE) )
 }
-# plot layout with space for title at top
+# Plot layout with space for title at top
 opar <- par(no.readonly = TRUE)
 layout(matrix(c(1, 1, 2, 3, 4, 5), ncol=2, byrow=TRUE), heights=c(1, 4, 4))
 
 par(mar=c(0, 0, 0, 0))
 plot.new()
-# we use subcrt() to generate a reaction for titling the plot
+# We use subcrt() to generate a reaction for titling the plot
 rxnexpr <- describe.reaction(subcrt("H2O", 1)$reaction, states="all")
-# also in the title is the property with its units
+# Also in the title is the property with its units
 E.units("J")
 Gexpr <- axis.label("DGr", prefix="k")[[2]]
 text(0.5, 0.6, substitute(paste(G~~"for"~~r), list(G=Gexpr, r=rxnexpr)), cex=2)
 text(0.5, 0.2, "after Amend and Shock, 2001 Figure 7", cex=2)
-# now make the plots
+# Now make the plots
 par(mar=c(3, 3, 0.5, 0.5), cex=1.3, mgp=c(2, 1, 0))
 sapply(c(25, 55, 100, 150), doplot)
 # affinity() can handle the three dimensions simultaneously
 print(affinity(H2=c(-10, 0, 3), O2=c(-10, 0, 3), T=c(25, 150, 4))$values)
-# this is so the plots in the next examples show up OK
+# This is so the plots in the next examples show up OK
 E.units("cal")
 
+# Reset plot settings
 layout(matrix(1))
 par(opar)
 
+
+
 ## amino acid synthesis at low and high temperatures
 ## after Amend and Shock, 1998
 ##  Amend, J. P. and Shock, E. L. (1998) Energetics of amino acid synthesis in hydrothermal ecosystems.

Modified: pkg/CHNOSZ/inst/NEWS.Rd
===================================================================
--- pkg/CHNOSZ/inst/NEWS.Rd	2021-03-06 04:53:07 UTC (rev 648)
+++ pkg/CHNOSZ/inst/NEWS.Rd	2021-03-14 14:40:10 UTC (rev 649)
@@ -10,7 +10,7 @@
 \newcommand{\s}{\ifelse{latex}{\eqn{_{#1}}}{\ifelse{html}{\out{<sub>#1</sub>}}{#1}}}
 \newcommand{\S}{\ifelse{latex}{\eqn{^{#1}}}{\ifelse{html}{\out{<sup>#1</sup>}}{^#1}}}
 
-\section{Changes in CHNOSZ version 1.4.0-17 (2021-03-03)}{
+\section{Changes in CHNOSZ version 1.4.0-19 (2021-03-08)}{
 
   \subsection{NEW FEATURES}{
     \itemize{
@@ -57,6 +57,10 @@
 
       \item Remove unused limSolve package from Suggests in DESCRIPTION.
 
+      \item Renamed \samp{CDC2_HUMAN} to \samp{CDK1_HUMAN} (UniProt:
+      \href{https://www.uniprot.org/uniprot/P06493}{P06493}) in
+      thermo/protein.csv.
+
     }
   }
 

Modified: pkg/CHNOSZ/inst/TODO
===================================================================
--- pkg/CHNOSZ/inst/TODO	2021-03-06 04:53:07 UTC (rev 648)
+++ pkg/CHNOSZ/inst/TODO	2021-03-14 14:40:10 UTC (rev 649)
@@ -89,3 +89,18 @@
   high pressure (DEW model; Robinson et al., 2021)
 
 - Combine solubility() and solubilities() into single function (for CHNOSZ 1.5.0).
+
+[20210306]
+
+- Remove 'bases2' argument from mosaic() (old backward compatibility)
+
+- Widen margins in demo/AkDi.R
+
+[20210309]
+
+- Add argument to OBIGT() to exclude data files for organic species.
+
+[20210312]
+
+- Don't use z.T = NA to trigger AkDi model (makes the more common use case of
+  just adding a simple aqueous species more tricky).

Modified: pkg/CHNOSZ/inst/extdata/thermo/protein.csv
===================================================================
--- pkg/CHNOSZ/inst/extdata/thermo/protein.csv	2021-03-06 04:53:07 UTC (rev 648)
+++ pkg/CHNOSZ/inst/extdata/thermo/protein.csv	2021-03-14 14:40:10 UTC (rev 649)
@@ -152,7 +152,7 @@
 SSI,STRAO,UniProt,P01006,1,18,4,6,5,3,11,2,0,2,9,3,3,8,1,4,9,8,13,1,3
 TRPA,SALTY,UniProt,P00929,1,40,3,13,16,12,20,5,18,8,28,5,11,17,10,15,16,7,17,0,7
 UBIQ,HUMAN,UniProt,P62988,1,2,0,5,6,2,6,1,7,7,9,1,2,3,6,4,3,7,4,0,1
-CDC2,HUMAN,UniProt,NA,1,12,1,19,18,11,18,8,22,24,36,8,10,15,10,15,21,13,18,4,14
+CDK1,HUMAN,UniProt,NA,1,12,1,19,18,11,18,8,22,24,36,8,10,15,10,15,21,13,18,4,14
 CDK2,HUMAN,UniProt,NA,1,19,3,16,17,16,16,10,16,21,39,5,8,19,9,16,14,17,23,4,10
 CDK3,HUMAN,UniProt,NA,1,16,2,14,21,15,18,9,17,20,41,7,6,19,13,19,17,16,19,4,12
 CDK4,HUMAN,UniProt,NA,1,22,4,17,19,13,24,9,11,11,33,8,7,25,8,23,15,15,27,3,9



More information about the CHNOSZ-commits mailing list