[CHNOSZ-commits] r602 - in pkg/CHNOSZ: . R demo inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Aug 21 04:03:00 CEST 2020
Author: jedick
Date: 2020-08-21 04:02:59 +0200 (Fri, 21 Aug 2020)
New Revision: 602
Modified:
pkg/CHNOSZ/DESCRIPTION
pkg/CHNOSZ/R/basis.R
pkg/CHNOSZ/demo/mosaic.R
pkg/CHNOSZ/inst/NEWS.Rd
pkg/CHNOSZ/man/basis.Rd
Log:
Add "QCa" basis keyword
Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION 2020-08-19 06:15:11 UTC (rev 601)
+++ pkg/CHNOSZ/DESCRIPTION 2020-08-21 02:02:59 UTC (rev 602)
@@ -1,6 +1,6 @@
-Date: 2020-08-19
+Date: 2020-08-21
Package: CHNOSZ
-Version: 1.3.6-75
+Version: 1.3.6-76
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 2020-08-19 06:15:11 UTC (rev 601)
+++ pkg/CHNOSZ/R/basis.R 2020-08-21 02:02:59 UTC (rev 602)
@@ -199,7 +199,7 @@
# to load a preset basis definition by keyword
preset.basis <- function(key=NULL) {
# the available keywords
- basis.key <- c("CHNOS", "CHNOS+", "CHNOSe", "CHNOPS+", "CHNOPSe", "MgCHNOPS+", "MgCHNOPSe", "FeCHNOS", "FeCHNOS+", "QEC4", "QEC", "QEC+")
+ basis.key <- c("CHNOS", "CHNOS+", "CHNOSe", "CHNOPS+", "CHNOPSe", "MgCHNOPS+", "MgCHNOPSe", "FeCHNOS", "FeCHNOS+", "QEC4", "QEC", "QEC+", "QCa", "QCa+")
# just list the keywords if none is specified
if(is.null(key)) return(basis.key)
# delete any previous basis definition
@@ -218,6 +218,8 @@
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+")
+ else if(ibase==13) species <- c("glutamine", "cysteine", "acetic acid", "H2O", "oxygen")
+ else if(ibase==14) species <- c("glutamine", "cysteine", "acetic acid", "H2O", "oxygen", "H+")
# get the preset logact
logact <- preset.logact(species)
# for QEC4, we use logact = -4 for the amino acids
Modified: pkg/CHNOSZ/demo/mosaic.R
===================================================================
--- pkg/CHNOSZ/demo/mosaic.R 2020-08-19 06:15:11 UTC (rev 601)
+++ pkg/CHNOSZ/demo/mosaic.R 2020-08-21 02:02:59 UTC (rev 602)
@@ -23,6 +23,7 @@
pH <- c(0, 14, res)
Eh <- c(-1, 1, res)
T <- 25
+P <- 1
loga_S <- -6
loga_C <- 0
# Define chemical system
@@ -39,7 +40,7 @@
bases2 <- c("CO3-2", "HCO3-", "CO2")
# Make a diagram with log(activity of aqueous Fe species) = -4
-m4 <- mosaic(bases, bases2, pH = pH, Eh = Eh, T = T)
+m4 <- mosaic(bases, bases2, pH = pH, Eh = Eh, T = T, P = P)
diagram(m4$A.species, lty = 2, names = FALSE)
## Show the predominance fields for the sulfur and carbonate basis species
@@ -50,7 +51,7 @@
# Show lines for log(activity of aqueous Fe species) = -6
s6 <- species(c("Fe+2", "Fe+3"), -6)
-m6 <- mosaic(bases, bases2, pH = pH, Eh = Eh, T = T)
+m6 <- mosaic(bases, bases2, pH = pH, Eh = Eh, T = T, P = P)
srt <- dy <- numeric(nrow(s6))
dy[s6$name == "Fe+2"] <- 0.15
dy[s6$name == "hematite"] <- -0.4
@@ -61,7 +62,7 @@
diagram(m6$A.species, add = TRUE, dy = dy, srt = srt, bold = bold)
# Add legend and title
-TP <- describe.property(c("T", "P"), c(25, 1))
+TP <- describe.property(c("T", "P"), c(T, P))
SC <- c(
bquote(log * italic(a)["S(aq)"] == .(loga_S)),
bquote(log * italic(a)["C(aq)"] == .(loga_C))
Modified: pkg/CHNOSZ/inst/NEWS.Rd
===================================================================
--- pkg/CHNOSZ/inst/NEWS.Rd 2020-08-19 06:15:11 UTC (rev 601)
+++ pkg/CHNOSZ/inst/NEWS.Rd 2020-08-21 02:02:59 UTC (rev 602)
@@ -9,7 +9,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.3.6-75 (2020-08-19)}{
+\section{Changes in CHNOSZ version 1.3.6-76 (2020-08-21)}{
\subsection{MAJOR CHANGES}{
\itemize{
@@ -171,11 +171,11 @@
\item Add a \strong{bottom} argument to \code{ratlab()} to allow changing
the ion in the denominator to something other than \Hplus.
- \item The \strong{srt}, \strong{dx} (new), and \strong{dy} arguments in
+ \item The \samp{srt}, \strong{dx} (new), and \samp{dy} arguments in
\code{diagram()} can now be used to rotate and adjust the position of
field labels, not only line labels. This and other arguments
- (\strong{cex}, \strong{col}, \strong{col.names}, \strong{font},
- \strong{family}, \strong{bold}, \strong{italic}) can have length > 1 to
+ (\samp{cex}, \samp{col}, \samp{col.names}, \samp{font},
+ \samp{family}, \samp{bold}, \samp{italic}) can have length > 1 to
apply different settings to each species.
\item Add a \strong{min.area} argument to \code{diagram()} to specify the
@@ -220,6 +220,9 @@
method from \href{https://doi.org/10.1063/1.1744264}{White et al., 1958})
and demo \code{wjd.R} and supporting data file.
+ \item Add "QCa" as a keyword for preset species in basis() (glutamine,
+ cysteine, acetic acid, \H2O, O\s{2}).
+
\item Convert this NEWS file to Rd format.
}
Modified: pkg/CHNOSZ/man/basis.Rd
===================================================================
--- pkg/CHNOSZ/man/basis.Rd 2020-08-19 06:15:11 UTC (rev 601)
+++ pkg/CHNOSZ/man/basis.Rd 2020-08-21 02:02:59 UTC (rev 602)
@@ -52,6 +52,8 @@
\code{QEC4} \tab cysteine, glutamic acid, glutamine, \H2O, \O2 \cr
\code{QEC} \tab cysteine, glutamic acid, glutamine, \H2O, \O2 \cr
\code{QEC+} \tab cysteine, glutamic acid, glutamine, \H2O, \O2, \Hplus \cr
+ \code{QCa} \tab glutamine, cysteine, acetic acid, \H2O, \O2 \cr
+ \code{QCa+} \tab glutamine, cysteine, acetic acid, \H2O, \O2, \Hplus \cr
}
The logarithms of activities of amino acids in the \samp{QEC4} basis are -4 (i.e., basis II in Dick, 2016); those in \samp{QEC} and \samp{QEC+} are set to approximate concentrations in human plasma (see Dick, 2017).
More information about the CHNOSZ-commits
mailing list