[CHNOSZ-commits] r100 - in pkg/CHNOSZ: . R inst vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Nov 10 19:16:47 CET 2015


Author: jedick
Date: 2015-11-10 19:16:46 +0100 (Tue, 10 Nov 2015)
New Revision: 100

Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/R/EOSregress.R
   pkg/CHNOSZ/inst/NEWS
   pkg/CHNOSZ/vignettes/equilibrium.Rnw
   pkg/CHNOSZ/vignettes/equilibrium.lyx
   pkg/CHNOSZ/vignettes/vig.bib
Log:
minor edits of equilibrium.Rnw


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2015-11-09 04:45:34 UTC (rev 99)
+++ pkg/CHNOSZ/DESCRIPTION	2015-11-10 18:16:46 UTC (rev 100)
@@ -1,6 +1,6 @@
-Date: 2015-11-09
+Date: 2015-11-10
 Package: CHNOSZ
-Version: 1.0.6-4
+Version: 1.0.6-5
 Title: Chemical Thermodynamics and Activity Diagrams
 Author: Jeffrey Dick
 Maintainer: Jeffrey Dick <j3ffdick at gmail.com>

Modified: pkg/CHNOSZ/R/EOSregress.R
===================================================================
--- pkg/CHNOSZ/R/EOSregress.R	2015-11-09 04:45:34 UTC (rev 99)
+++ pkg/CHNOSZ/R/EOSregress.R	2015-11-10 18:16:46 UTC (rev 100)
@@ -177,10 +177,12 @@
     names(out) <- c("(Intercept)", "invTTheta2", "TXBorn")
   } else if(property=="V") {
     iis <- iis[,c("a1", "a2", "a3", "a4", "omega")]
-    sigma <- ( iis$a1 + iis$a2 / (2600 + 1) ) * 41.84
-    xi <- ( iis$a3 + iis$a4 / (2600 + 1) ) * 41.84
+    # calculate sigma and xi and convert to volumetric units: 1 cal = 41.84 cm^3 bar
+    sigma <- convert( iis$a1 + iis$a2 / (2600 + 1), "cm3bar" )
+    xi <- convert( iis$a3 + iis$a4 / (2600 + 1), "cm3bar" )
+    omega <- convert( iis$omega, "cm3bar" )
     # watch for the negative sign on omega here!
-    out <- data.frame(sigma, xi, -iis$omega)
+    out <- data.frame(sigma, xi, -omega)
     names(out) <- c("(Intercept)", "invTTheta", "QBorn")
   }
   return(out)

Modified: pkg/CHNOSZ/inst/NEWS
===================================================================
--- pkg/CHNOSZ/inst/NEWS	2015-11-09 04:45:34 UTC (rev 99)
+++ pkg/CHNOSZ/inst/NEWS	2015-11-10 18:16:46 UTC (rev 100)
@@ -1,4 +1,4 @@
-CHANGES IN CHNOSZ 1.0.6-4 (2015-11-09)
+CHANGES IN CHNOSZ 1.0.6-5 (2015-11-10)
 --------------------------------------
 
 - Add functions usrfig() (get figure limits in user coordinates) and

Modified: pkg/CHNOSZ/vignettes/equilibrium.Rnw
===================================================================
--- pkg/CHNOSZ/vignettes/equilibrium.Rnw	2015-11-09 04:45:34 UTC (rev 99)
+++ pkg/CHNOSZ/vignettes/equilibrium.Rnw	2015-11-10 18:16:46 UTC (rev 100)
@@ -64,12 +64,14 @@
 \item [{Basis~species}] Species in terms of which you want to write all
 formation reactions of species of interest.
 \item [{Formation~reactions}] Stoichiometric chemical reactions showing
-the mass requirements for formation of 1 mole of each species of interest
-from the basis species.
-\item [{Chemical~affinity}] Change in Gibbs energy per increment of reaction
-progress; the negative of the overall Gibbs energy of reaction; $\boldsymbol{A}=2.303RT\log(K/Q)$,
-where $K$ is the equilibrium constant and $Q$ is the reaction activity
-quotient ($\log$ here is used for base-10 logarithms).
+the mass balance requirements for formation of 1 mole of each species
+of interest from the basis species.
+\item [{Chemical~affinity}] Negative of the differential of Gibbs energy
+of a system with respect to reaction progress. For a given reaction,
+chemical affinity is the negative of Gibbs energy of reaction; $\boldsymbol{A}=2.303RT\log(K/Q)$,
+where $K$ is the equilibrium constant and $Q$ is the activity quotient
+of species in the reaction ($\log$ in this text denotes base-10 logarithms,
+i.e. \texttt{log10} in R).
 \item [{(1)~Reference~activity}] User-defined (usually equal) activities
 of species of interest.
 \item [{(1)~Reference~affinity}] ($\boldsymbol{A}_{{\it ref}}$) Chemical
@@ -104,10 +106,10 @@
 \item [{Reaction~matrix}] Algorithm used for the equilibration method
 when the balance coefficients are not all 1.
 \item [{Normalization}] Algorithm used for large molecules such as proteins;
-chemical formulas and affinities are scaled to an equal size (e.g.
-a single residue; ``residue equivalent'' in Appendix), activities
-are calculated using balance = 1, and formulas and activities are
-rescaled to the original size of the molecule.
+chemical formulas and affinities are scaled to a similar molecular
+size (e.g. a single residue; ``residue equivalent'' in Appendix),
+activities are calculated using balance = 1, and formulas and activities
+are rescaled to the original size of the molecule.
 \item [{Mosaic}] Calculations of chemical affinities for making diagrams
 where the speciation of basis species depends on the variables.
 \end{description}
@@ -172,7 +174,7 @@
 \item Typical use: simple aqueous species activity comparisons
 \item Function sequence:\\
 \texttt{a <- affinity(...)}\\
-\texttt{e <- equilibrate(e, balance = 1)}\\
+\texttt{e <- equilibrate(a, balance = 1)}\\
 \texttt{diagram(e)}
 \item Algorithm: Boltzmann distribution
 \end{enumerate}
@@ -575,11 +577,11 @@
 disappears while that of the smaller protein from METJA grows. Because
 of the drastic activity changes at the stability transitions (see
 Figure \textcolor{blue}{B} above), a large change in equal activities
-(to an infinitesimally small activity = $10^{-111}$) is used here
-to demonstrate this effect, and even then the visual impact on the
-predominance diagram is subtle. Therefore, naturally occurring relative
-abundances of proteins are better modeled using the \texttt{normalize}
-or \texttt{as.residue} approaches.
+(to a minuscule activity = $10^{-111}$) is used here to demonstrate
+this effect, and even then the visual impact on the predominance diagram
+is subtle. Therefore, naturally occurring relative abundances of proteins
+are better modeled using the \texttt{normalize} or \texttt{as.residue}
+approaches.
 
 \clearpage
 
@@ -588,7 +590,7 @@
 
 Many of the help-page examples and demos in CHNOSZ use these methods
 to reproduce (or closely emulate) published figures. Below is not
-a comprehensive list, but just some highlights:
+a comprehensive list, but just some highlights.
 
 
 \subsection{Maximum affinity method}
@@ -1048,9 +1050,9 @@
 
 \subsection{Visualizing the effects of normalization}
 
-A comparison of the outcomes of equilibrium calculations that do and
-do not use the normalized formulas for proteins was given in a publication
-\citet{Dic08}. A diagram like Figure 5 in that paper is shown below.
+A comparison of equilibrium calculations that do and do not use normalized
+formulas for proteins was presented by \citet{Dic08}. A diagram like
+Figure 5 in that paper is shown below.
 
 <<ProteinSpeciation, results="hide", message=FALSE, fig.height=5.5, cache=TRUE>>=
 organisms <- c("METSC", "METJA", "METFE", "HALJP",  "METVO", "METBU", "ACEKI", "GEOSE", "BACLI", "AERSA")
@@ -1071,8 +1073,8 @@
 
 Although it is well below the stability limit of $\mathrm{H_{2}O}$
 (vertical dashed line), there is an interesting convergence of the
-activities of some proteins at low $\log f_{\mathrm{O_{2}}}$; this
-is likely a consequence of compositional similarities.
+activities of some proteins at low $\log f_{\mathrm{O_{2}}}$, due
+most likely to compositional similarity of the amino acid sequences.
 
 The reaction-matrix approach can also be applied to systems having
 conservation coefficients that differ from unity, such as many mineral

Modified: pkg/CHNOSZ/vignettes/equilibrium.lyx
===================================================================
--- pkg/CHNOSZ/vignettes/equilibrium.lyx	2015-11-09 04:45:34 UTC (rev 99)
+++ pkg/CHNOSZ/vignettes/equilibrium.lyx	2015-11-10 18:16:46 UTC (rev 100)
@@ -200,8 +200,8 @@
 \begin_inset space ~
 \end_inset
 
-reactions Stoichiometric chemical reactions showing the mass requirements
- for formation of 1 mole of each species of interest from the basis species.
+reactions Stoichiometric chemical reactions showing the mass balance requirement
+s for formation of 1 mole of each species of interest from the basis species.
 \end_layout
 
 \begin_layout Description
@@ -209,8 +209,10 @@
 \begin_inset space ~
 \end_inset
 
-affinity Change in Gibbs energy per increment of reaction progress; the
- negative of the overall Gibbs energy of reaction; 
+affinity Negative of the differential of Gibbs energy of a system with respect
+ to reaction progress.
+ For a given reaction, chemical affinity is the negative of Gibbs energy
+ of reaction; 
 \begin_inset Formula $\boldsymbol{A}=2.303RT\log(K/Q)$
 \end_inset
 
@@ -222,11 +224,16 @@
 \begin_inset Formula $Q$
 \end_inset
 
- is the reaction activity quotient (
+ is the activity quotient of species in the reaction (
 \begin_inset Formula $\log$
 \end_inset
 
- here is used for base-10 logarithms).
+ in this text denotes base-10 logarithms, i.e.
+ 
+\family typewriter
+log10
+\family default
+ in R).
 \end_layout
 
 \begin_layout Description
@@ -403,7 +410,7 @@
 
 \begin_layout Description
 Normalization Algorithm used for large molecules such as proteins; chemical
- formulas and affinities are scaled to an equal size (e.g.
+ formulas and affinities are scaled to a similar molecular size (e.g.
  a single residue; 
 \begin_inset Quotes eld
 \end_inset
@@ -608,7 +615,7 @@
 
 
 \family typewriter
-e <- equilibrate(e, balance = 1)
+e <- equilibrate(a, balance = 1)
 \family default
 
 \begin_inset Newline newline
@@ -2470,8 +2477,7 @@
 \color blue
 B
 \color inherit
- above), a large change in equal activities (to an infinitesimally small
- activity = 
+ above), a large change in equal activities (to a minuscule activity = 
 \begin_inset Formula $10^{-111}$
 \end_inset
 
@@ -2512,7 +2518,7 @@
 \begin_layout Standard
 Many of the help-page examples and demos in CHNOSZ use these methods to
  reproduce (or closely emulate) published figures.
- Below is not a comprehensive list, but just some highlights:
+ Below is not a comprehensive list, but just some highlights.
 \end_layout
 
 \begin_layout Subsection
@@ -4261,9 +4267,8 @@
 \end_layout
 
 \begin_layout Standard
-A comparison of the outcomes of equilibrium calculations that do and do
- not use the normalized formulas for proteins was given in a publication
- 
+A comparison of equilibrium calculations that do and do not use normalized
+ formulas for proteins was presented by 
 \begin_inset CommandInset citation
 LatexCommand cite
 key "Dic08"
@@ -4374,7 +4379,7 @@
 \begin_inset Formula $\log f_{\mathrm{O_{2}}}$
 \end_inset
 
-; this is likely a consequence of compositional similarities.
+, due most likely to compositional similarity of the amino acid sequences.
 \end_layout
 
 \begin_layout Standard

Modified: pkg/CHNOSZ/vignettes/vig.bib
===================================================================
--- pkg/CHNOSZ/vignettes/vig.bib	2015-11-09 04:45:34 UTC (rev 99)
+++ pkg/CHNOSZ/vignettes/vig.bib	2015-11-10 18:16:46 UTC (rev 100)
@@ -194,7 +194,7 @@
 }
 
 @Article{DLH06,
-  Title                    = {{T}emperature, pressure, and electrochemical constraints on protein speciation: group additivity calculation of the standard molal thermodynamic properties of ionized unfolded proteins},
+  Title                    = {{T}emperature, pressure, and electrochemical constraints on protein speciation: {G}roup additivity calculation of the standard molal thermodynamic properties of ionized unfolded proteins},
   Author                   = {Dick, Jeffrey M. and LaRowe, Douglas E. and Helgeson, Harold C.},
   Journal                  = {Biogeosciences},
   Year                     = {2006},
@@ -315,12 +315,13 @@
 @Incollection{Hel70c,
   Title                    = {{A} chemical and thermodynamic model of ore deposition in hydrothermal systems},
   Author                   = {Helgeson, Harold C.},
-  Booktitle                = {Mineralogical Society of America, Fiftieth Anniversary Symposium},
+  Booktitle                = {Fiftieth Anniversary Symposia},
   Publisher                = {Mineralogical Society of America},
   Year                     = {1970},
-  Editor                   = {Morgan, B. A.},
+  Editor                   = {Morgan, Benjamin A.},
   Pages                    = {155--186},
-  Volume                   = {Special Paper \#3},
+  Series                   = {Mineralogical Society of America, Special Paper},
+  Volume                   = {3},
   Url                      = {http://www.worldcat.org/oclc/583263}
 }
 
@@ -577,7 +578,6 @@
   Number                   = {21},
   Pages                    = {3965--3992},
   Volume                   = {65},
-  __markedentry            = {},
   Abstract                 = {Aluminum speciation in crustal fluids is assessed by means of standard thermodynamic properties at 25 degreesC, 1 bar, and revised Helgeson-Kirkham-Flowers (HKF) (Tanger J. C. IV and Helgeson H. C., "Calculation of the thermodynamic and transport properties of aqueous species at high pressures and temperatures: Revised equations of state for the standard partial molal properties of ions and electrolytes," Ain. J. Sci. 288, 19-98, 1988) equations of state parameters for aqueous species in the system Al-O-H-Na-Si-Cl-F-SO4 derived from recent experimental data with the help of isocoulombic reactions and correlations among parameters in the HKF model. In acidic to neutral hydrothermal. solutions and for fluorine concentrations in excess of 1 ppm, the fluoride complexes AlFn3-n dominate Al speciation at temperature (T) < 100 degreesC, whereas the hydroxide fluoride species Al(OH)(2)F-(aq)(0) and AlOHF2(aq)0 are dominant up to similar to 400 degreesC. In high-temperature (T > 300 degreesC) hydrothermal and metamorphic fluids, aluminum mobility is considerably 0 enhanced by formation of NaAl(OH)(3)F-(aq)(0) and NaAl(OH)(2)F-2((aq))0 ion paired mixed species. NaAl(OH)(2)F-2((aq))0 controls Al transport in granite-derived fluids and during greisenization. At alkaline PH, Al(OH)(4)(-), Al(OH)(3)H3SiO4-, and the NaAl(OH)(4)(0)((aq)) ion-pair are the dominant Al species. Thermodynamic calculations show that as a result of strong interactions of Al(aq) with NaOH, NaF, HF, and SiO2(aq) present in crustal fluids, the concentrations of aluminum in equilibrium with Al-bearing minerals can be several orders of magnitude higher than those calculated assuming that only Al hydroxyde complexes are formed. Interactions with these components are likely to be responsible for aluminum mobility during hydrothermal and metamorphic reactions. Copyright (C) 2001 Elsevier Science Ltd.},
   Doi                      = {10.1016/S0016-7037(01)00705-0},
 }



More information about the CHNOSZ-commits mailing list