[CHNOSZ-commits] r950 - in pkg/CHNOSZ: . inst man vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jan 6 09:41:45 CET 2026


Author: jedick
Date: 2026-01-06 09:41:43 +0100 (Tue, 06 Jan 2026)
New Revision: 950

Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/inst/NEWS.Rd
   pkg/CHNOSZ/man/mosaic.Rd
   pkg/CHNOSZ/man/stack_mosaic.Rd
   pkg/CHNOSZ/vignettes/FAQ.Rmd
   pkg/CHNOSZ/vignettes/anintro.Rmd
   pkg/CHNOSZ/vignettes/multi-metal.Rmd
Log:
Comment some lines with S3-


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2026-01-06 07:59:03 UTC (rev 949)
+++ pkg/CHNOSZ/DESCRIPTION	2026-01-06 08:41:43 UTC (rev 950)
@@ -1,6 +1,6 @@
 Date: 2026-01-06
 Package: CHNOSZ
-Version: 2.2.0-16
+Version: 2.2.0-17
 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/inst/NEWS.Rd
===================================================================
--- pkg/CHNOSZ/inst/NEWS.Rd	2026-01-06 07:59:03 UTC (rev 949)
+++ pkg/CHNOSZ/inst/NEWS.Rd	2026-01-06 08:41:43 UTC (rev 950)
@@ -15,7 +15,7 @@
 \newcommand{\Cp}{\ifelse{latex}{\eqn{C_P}}{\ifelse{html}{\out{<I>C<sub>P</sub></I>}}{Cp}}}
 \newcommand{\DG0}{\ifelse{latex}{\eqn{{\Delta}G^{\circ}}}{\ifelse{html}{\out{Δ<I>G</I>°}}{ΔG°}}}
 
-\section{Changes in CHNOSZ version 2.2.0-15 (2026-01-06)}{
+\section{Changes in CHNOSZ version 2.2.0-17 (2026-01-06)}{
 
     \itemize{
 
@@ -43,9 +43,11 @@
 
       \item Add colors to \code{demo/NaCl.R}.
 
-      \item Add aqueous SO\s{2} and S\s{3}\S{-} to basis species for mosaic
-      calculations in examples, demos, and vignettes. Thanks to Evgeniy
-      Bastrakov for suggesting this change.
+      \item Add aqueous SO\s{2} and the trisulfur radical ion (S\s{3}\S{-}) to
+      basis species for mosaic calculations in examples, demos, and vignettes.
+      However, some lines with S\s{3}\S{-} are commented because of large
+      slowdowns (especially in anintro.Rmd and multi-metal.Rmd). Thanks to
+      Evgeniy Bastrakov for suggesting this change.
 
       \item Remove \code{lex()}, which only wrapped its argument in
       \code{as.expression(c())}.

Modified: pkg/CHNOSZ/man/mosaic.Rd
===================================================================
--- pkg/CHNOSZ/man/mosaic.Rd	2026-01-06 07:59:03 UTC (rev 949)
+++ pkg/CHNOSZ/man/mosaic.Rd	2026-01-06 08:41:43 UTC (rev 950)
@@ -76,12 +76,13 @@
 species(c("Fe+2", "Fe+3"), -6)
 species(c("pyrrhotite", "pyrite", "hematite", "magnetite"), add = TRUE)
 # The basis species we'll swap through
-bases <- c("H2S", "HS-", "S3-", "SO2", "HSO4-", "SO4-2")
+bases <- c("H2S", "HS-", "SO2", "HSO4-", "SO4-2")
+# Uncomment to include the trisulfur radical ion (slower)
+# bases <- c("H2S", "HS-", "S3-", "SO2", "HSO4-", "SO4-2")
 # Calculate affinities using the relative abundances of the basis species
 # NOTE: set blend = FALSE for sharp transitions between the basis species
 # (looks more like the diagram in GC65)
-res <- 120
-m1 <- mosaic(bases, pH = c(pH, res), Eh = c(Eh, res), T = T)
+m1 <- mosaic(bases, pH = c(pH), Eh = c(Eh), T = T)
 # Make a diagram and add water stability lines
 col <- ifelse(species()$state == "aq", 4, 1)
 d <- diagram(m1$A.species, lwd = 2, col = col, col.names = col)

Modified: pkg/CHNOSZ/man/stack_mosaic.Rd
===================================================================
--- pkg/CHNOSZ/man/stack_mosaic.Rd	2026-01-06 07:59:03 UTC (rev 949)
+++ pkg/CHNOSZ/man/stack_mosaic.Rd	2026-01-06 08:41:43 UTC (rev 950)
@@ -78,7 +78,9 @@
 basis("Cl-", log10(NaCl$m_Clminus))
 
 # Define arguments for stack_mosaic: Speciate aqueous sulfur
-bases <- c("H2S", "HS-", "S3-", "SO2", "HSO4-", "SO4-2")
+bases <- c("H2S", "HS-", "SO2", "HSO4-", "SO4-2")
+# Uncomment to include the trisulfur radical ion (slower)
+# bases <- c("H2S", "HS-", "S3-", "SO2", "HSO4-", "SO4-2")
 # Calculate stabilities of Fe-bearing minerals first
 species1 <- c("pyrite", "pyrrhotite", "magnetite", "hematite")
 # Calculate stabilities of Cu-bearing and FeCu-bearing minerals second

Modified: pkg/CHNOSZ/vignettes/FAQ.Rmd
===================================================================
--- pkg/CHNOSZ/vignettes/FAQ.Rmd	2026-01-06 07:59:03 UTC (rev 949)
+++ pkg/CHNOSZ/vignettes/FAQ.Rmd	2026-01-06 08:41:43 UTC (rev 950)
@@ -970,7 +970,9 @@
 basis("H2S", -3)
 basis("CO3-2", -0.6)
 species(c("hematite", "pyrite", "pyrrhotite", "magnetite", "siderite"))
-bases <- list( c("H2S", "HS-", "S3-", "SO2", "HSO4-", "SO4-2"), c("CO3-2", "HCO3-", "CO2") )
+bases <- list( c("H2S", "HS-", "SO2", "HSO4-", "SO4-2"), c("CO3-2", "HCO3-", "CO2") )
+# Uncomment to include the trisulfur radical ion (slower)
+# bases <- list( c("H2S", "HS-", "S3-", "SO2", "HSO4-", "SO4-2"), c("CO3-2", "HCO3-", "CO2") )
 m <- mosaic(bases, pH = c(0, 14, 500), O2 = c(-57, -35, 500), T = 150, IS = 0.77)
 d <- diagram(m$A.species, fill = "terrain", dx = c(0, 0, 0, 0, 0.3))
 water.lines(d)

Modified: pkg/CHNOSZ/vignettes/anintro.Rmd
===================================================================
--- pkg/CHNOSZ/vignettes/anintro.Rmd	2026-01-06 07:59:03 UTC (rev 949)
+++ pkg/CHNOSZ/vignettes/anintro.Rmd	2026-01-06 08:41:43 UTC (rev 950)
@@ -434,7 +434,9 @@
 basis("H2S", log10(Stot))
 basis("Cl-", log10(m_Clminus))
 # Define basis species to swap through for mosaic calculation
-bases <- c("H2S", "HS-", "S3-", "SO2", "HSO4-", "SO4-2")
+bases <- c("H2S", "HS-", "SO2", "HSO4-", "SO4-2")
+# Uncomment to include the trisulfur radical ion (slower)
+# bases <- c("H2S", "HS-", "S3-", "SO2", "HSO4-", "SO4-2")
 
 # Get minerals and aqueous species
 icr <- info(c("hematite", "magnetite", "pyrite", "pyrrhotite"))
@@ -801,7 +803,9 @@
 basis("H2S", log10(Stot))
 basis("Cl-", log10(m_Clminus))
 # Define basis species to swap through for mosaic calculation
-bases <- c("H2S", "HS-", "S3-", "SO2", "HSO4-", "SO4-2")
+bases <- c("H2S", "HS-", "SO2", "HSO4-", "SO4-2")
+# Uncomment to include the trisulfur radical ion (slower)
+# bases <- c("H2S", "HS-", "S3-", "SO2", "HSO4-", "SO4-2")
 
 # Get minerals and aqueous species
 icr <- retrieve(metal, c("Cl", "S", "O", "H"), state = "cr")
@@ -1438,7 +1442,9 @@
 # Load aqueous species for relative stability calculation
 species(iaq)
 # Define basis species to swap through for mosaic calculation
-bases <- c("H2S", "HS-", "S3-", "SO2", "HSO4-", "SO4-2")
+bases <- c("H2S", "HS-", "SO2", "HSO4-", "SO4-2")
+# Uncomment to include the trisulfur radical ion (slower)
+# bases <- c("H2S", "HS-", "S3-", "SO2", "HSO4-", "SO4-2")
 m <- mosaic(bases = bases, pH = c(2, 8), O2 = c(-32, -24), T = T_fixed, P = P)
 a <- m$A.species
 fill <- adjustcolor(col, alpha.f = 0.5)

Modified: pkg/CHNOSZ/vignettes/multi-metal.Rmd
===================================================================
--- pkg/CHNOSZ/vignettes/multi-metal.Rmd	2026-01-06 07:59:03 UTC (rev 949)
+++ pkg/CHNOSZ/vignettes/multi-metal.Rmd	2026-01-06 08:41:43 UTC (rev 950)
@@ -134,7 +134,9 @@
 species(c("CH4", "CO2", "HCO3-", "CO3-2"))
 aC <- affinity(pH = c(0, 14), O2 = c(-75, -60))
 dC <- diagram(aC, dx = c(0, 1, 0, 0), dy = c(0, 1, 0, 0))
-species(c("H2S", "HS-", "S3-", "SO2", "HSO4-", "SO4-2"))
+species(c("H2S", "HS-", "SO2", "HSO4-", "SO4-2"))
+# Uncomment to include the trisulfur radical ion (slower)
+# species(c("H2S", "HS-", "S3-", "SO2", "HSO4-", "SO4-2"))
 aS <- affinity(aC)  # argument recall
 dS <- diagram(aS, add = TRUE, col = 4, col.names = 4, dx = c(0, -0.5, 0, 0))
 aCS <- mash(dC, dS)
@@ -478,7 +480,9 @@
 O2 <- c(-48, -33, res2)
 basis(c("Cu+", "pyrite", "H2S", "oxygen", "H2O", "H+"))
 basis("H2S", logaH2S)
-S.aq <- c("H2S", "HS-", "HSO4-", "SO4-2")
+S.aq <- c("H2S", "HS-", "SO2", "HSO4-", "SO4-2")
+# Uncomment to include the trisulfur radical ion (slower)
+# S.aq <- c("H2S", "HS-", "S3-", "SO2", "HSO4-", "SO4-2")
 Fe.cr <- c("pyrite", "pyrrhotite", "magnetite", "hematite")
 Fe.abbrv <- c("Py", "Po", "Mag", "Hem")
 ```
@@ -544,7 +548,9 @@
 m_NaCl <- 0.1
 logm_aq <- -6 # for both Fe- and Cu-bearing aq species
 # Basis species
-S.aq <- c("H2S", "HS-", "HSO4-", "SO4-2")
+S.aq <- c("H2S", "HS-", "SO2", "HSO4-", "SO4-2")
+# Uncomment to include the trisulfur radical ion (slower)
+# S.aq <- c("H2S", "HS-", "S3-", "SO2", "HSO4-", "SO4-2")
 # Minerals
 Fe.cr <- c("pyrite", "pyrrhotite", "magnetite", "hematite")
 Fe.abbrv <- c("Py", "Po", "Mag", "Hem")



More information about the CHNOSZ-commits mailing list