[CHNOSZ-commits] r723 - in pkg/CHNOSZ: . R inst inst/tinytest man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Apr 16 11:02:03 CEST 2022
Author: jedick
Date: 2022-04-16 11:02:02 +0200 (Sat, 16 Apr 2022)
New Revision: 723
Modified:
pkg/CHNOSZ/DESCRIPTION
pkg/CHNOSZ/R/affinity.R
pkg/CHNOSZ/inst/NEWS.Rd
pkg/CHNOSZ/inst/tinytest/test-affinity.R
pkg/CHNOSZ/man/affinity.Rd
Log:
Change default for affinity() to loga.protein = 0
Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION 2022-04-16 08:19:03 UTC (rev 722)
+++ pkg/CHNOSZ/DESCRIPTION 2022-04-16 09:02:02 UTC (rev 723)
@@ -1,6 +1,6 @@
Date: 2022-04-16
Package: CHNOSZ
-Version: 1.9.9-15
+Version: 1.9.9-16
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/affinity.R
===================================================================
--- pkg/CHNOSZ/R/affinity.R 2022-04-16 08:19:03 UTC (rev 722)
+++ pkg/CHNOSZ/R/affinity.R 2022-04-16 09:02:02 UTC (rev 723)
@@ -13,7 +13,7 @@
#source("species.R")
affinity <- function(..., property=NULL, sout=NULL, exceed.Ttr=FALSE, exceed.rhomin=FALSE,
- return.buffer=FALSE, return.sout=FALSE, balance="PBB", iprotein=NULL, loga.protein=-3, transect = NULL) {
+ return.buffer=FALSE, return.sout=FALSE, balance="PBB", iprotein=NULL, loga.protein=0, transect = NULL) {
# ...: variables over which to calculate
# property: what type of energy
# (G.basis,G.species,logact.basis,logK,logQ,A)
Modified: pkg/CHNOSZ/inst/NEWS.Rd
===================================================================
--- pkg/CHNOSZ/inst/NEWS.Rd 2022-04-16 08:19:03 UTC (rev 722)
+++ pkg/CHNOSZ/inst/NEWS.Rd 2022-04-16 09:02:02 UTC (rev 723)
@@ -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.9.9-14 (2022-04-11)}{
+\section{Changes in CHNOSZ version 1.9.9-16 (2022-04-16)}{
\subsection{MAJOR CHANGE}{
\itemize{
@@ -51,9 +51,6 @@
(\samp{G}, \samp{S}, and \samp{Cp} at 25 \degC) to formation constants of
aqueous species as a function of temperature.
- \item Add a \strong{zap} argument to \code{mod.OBIGT()} to clear
- parameters of preexisting species.
-
\item Add vignette \strong{customizing.Rmd} with description of database
format, data-entry conventions, and examples of customizing the
thermodynamic database using \code{add.OBIGT()}, \code{mod.OBIGT()}, and
@@ -76,6 +73,18 @@
}
}
+ \subsection{OTHER CHANGES}{
+ \itemize{
+
+ \item Add a \strong{zap} argument to \code{mod.OBIGT()} to clear
+ parameters of preexisting species (used by \code{logB_to_OBIGT()}).
+
+ \item Change default for \code{affinity()} to \code{loga.protein = 0}
+ (was -3).
+
+ }
+ }
+
\subsection{REMOVED FEATURES}{
\itemize{
Modified: pkg/CHNOSZ/inst/tinytest/test-affinity.R
===================================================================
--- pkg/CHNOSZ/inst/tinytest/test-affinity.R 2022-04-16 08:19:03 UTC (rev 722)
+++ pkg/CHNOSZ/inst/tinytest/test-affinity.R 2022-04-16 09:02:02 UTC (rev 723)
@@ -122,6 +122,7 @@
# TODO: add comparison with results from loading proteins via species()
info <- "affinity() for proteins (with/without 'iprotein') returns same value as in previous package versions"
+# These values were calculated using versions 0.6, 0.8 and 0.9-7 (25 degrees C, 1 bar, basis species "CHNOS" or "CHNOS+")
A.2303RT.nonionized <- -3795.297
A.2303RT.ionized <- -3075.222
# first for nonionized protein
@@ -128,13 +129,13 @@
basis("CHNOS")
# try it with iprotein
ip <- pinfo("CSG_HALJP")
-expect_equal(affinity(iprotein = ip)$values[[1]][1], A.2303RT.nonionized, tolerance = 1e-5, info = info)
+expect_equal(affinity(iprotein = ip, loga.protein = -3)$values[[1]][1], A.2303RT.nonionized, tolerance = 1e-5, info = info)
# then with the protein loaded as a species
species("CSG_HALJP")
expect_equal(affinity()$values[[1]][1], A.2303RT.nonionized, tolerance = 1e-5, info = info)
# now for ionized protein
basis("CHNOS+")
-expect_equal(affinity(iprotein = ip)$values[[1]][1], A.2303RT.ionized, tolerance = 1e-5, info = info)
+expect_equal(affinity(iprotein = ip, loga.protein = -3)$values[[1]][1], A.2303RT.ionized, tolerance = 1e-5, info = info)
species("CSG_HALJP")
expect_equal(affinity()$values[[1]][1], A.2303RT.ionized, tolerance = 1e-5, info = info)
Modified: pkg/CHNOSZ/man/affinity.Rd
===================================================================
--- pkg/CHNOSZ/man/affinity.Rd 2022-04-16 08:19:03 UTC (rev 722)
+++ pkg/CHNOSZ/man/affinity.Rd 2022-04-16 09:02:02 UTC (rev 723)
@@ -9,7 +9,7 @@
\usage{
affinity(..., property = NULL, sout = NULL, exceed.Ttr = FALSE,
exceed.rhomin = FALSE, return.buffer = FALSE, return.sout = FALSE,
- balance = "PBB", iprotein = NULL, loga.protein = -3, transect = NULL)
+ balance = "PBB", iprotein = NULL, loga.protein = 0, transect = NULL)
}
\arguments{
More information about the CHNOSZ-commits
mailing list