From noreply at r-forge.r-project.org Fri Apr 5 06:31:54 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Fri, 5 Apr 2019 06:31:54 +0200 (CEST) Subject: [CHNOSZ-commits] r429 - in pkg/CHNOSZ: . demo inst man vignettes Message-ID: <20190405043154.7517318D58D@r-forge.r-project.org> Author: jedick Date: 2019-04-05 06:31:52 +0200 (Fri, 05 Apr 2019) New Revision: 429 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/demo/adenine.R pkg/CHNOSZ/inst/CHECKLIST pkg/CHNOSZ/man/eqdata.Rd pkg/CHNOSZ/vignettes/anintro.Rmd pkg/CHNOSZ/vignettes/mklinks.sh Log: anintro.Rmd: improve description of reset() Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-03-09 00:43:47 UTC (rev 428) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-05 04:31:52 UTC (rev 429) @@ -1,6 +1,6 @@ -Date: 2019-03-09 +Date: 2019-04-05 Package: CHNOSZ -Version: 1.3.1-9 +Version: 1.3.1-10 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/adenine.R =================================================================== --- pkg/CHNOSZ/demo/adenine.R 2019-03-09 00:43:47 UTC (rev 428) +++ pkg/CHNOSZ/demo/adenine.R 2019-04-05 04:31:52 UTC (rev 429) @@ -3,7 +3,7 @@ # notable functions in this demo: # EOSregress() - to regress HKF coefficients from Cp data -# add.obigt() - to add thermodynamic data that are not in the default database +# mod.obigt() - to modify the thermodynamic database for comparisons with an older set of parameters for adenine # LCT17 = Lowe et al., 2017 (J. Chem. Thermodyn., doi:10.1016/j.jct.2017.04.005) # LH06 = LaRowe and Helgeson, 2006 (Geochim. Cosmochim. Acta, doi:10.1016/j.gca.2006.04.010) Modified: pkg/CHNOSZ/inst/CHECKLIST =================================================================== --- pkg/CHNOSZ/inst/CHECKLIST 2019-03-09 00:43:47 UTC (rev 428) +++ pkg/CHNOSZ/inst/CHECKLIST 2019-04-05 04:31:52 UTC (rev 429) @@ -21,7 +21,7 @@ - run R CMD check using R compiled without long doubles (emulating Solaris checks on CRAN) (CFLAGS=-ffloat-store ./configure --disable-long-double) -- size reduction of vignettes: after installing/upgrading rmarkdown, replace files in +- reduce the size of vignettes: after installing/upgrading rmarkdown, replace files in rmarkdown/rmd/h/bootstrap/fonts/ with empty files - build the package using both qpdf and ghostscript to compact vignettes: Modified: pkg/CHNOSZ/man/eqdata.Rd =================================================================== --- pkg/CHNOSZ/man/eqdata.Rd 2019-03-09 00:43:47 UTC (rev 428) +++ pkg/CHNOSZ/man/eqdata.Rd 2019-04-05 04:31:52 UTC (rev 429) @@ -3,7 +3,10 @@ \alias{eqdata} \title{Read data from an EQ6 output file} \description{ - Extract computational results for aqueous species, solid phases, mineral saturation states, or speciation summaries at each step of reaction progress in an EQ6 output file. The results are written to a comma-separated value file that can be read by other programs. +Extract computational results for aqueous species, solid phases, mineral saturation states, or speciation summaries at each step of reaction progress in an EQ6 output file. +The results are written to a comma-separated value file that can be read by other programs. +The function has been tested with output files generated by EQ3/6 version 7.1 running on a Unix platform. +Currently it does not work for files generated by later versions. } \usage{ @@ -33,8 +36,7 @@ If \code{outfile} is TRUE, the result is saved in a file named like \samp{file}.\samp{property}.\code{csv}, in the same directory as \code{file}. The name of the \code{outfile} can be provided to override this naming scheme, or this argument can be set to FALSE or NULL, to turn off writing the result to a file. - Thanks to Peter Canovas and Everett Shock for helping to test the code and offering ideas for improvements. The function has been tested with output files generated by EQ3/6 version 7.1 running on a Unix platform. - + Thanks to Peter Canovas and Everett Shock for helping to test the code and offering ideas for improvements. } \references{ Modified: pkg/CHNOSZ/vignettes/anintro.Rmd =================================================================== --- pkg/CHNOSZ/vignettes/anintro.Rmd 2019-03-09 00:43:47 UTC (rev 428) +++ pkg/CHNOSZ/vignettes/anintro.Rmd 2019-04-05 04:31:52 UTC (rev 429) @@ -118,13 +118,15 @@ install.packages("CHNOSZ") ``` -Then load the CHNOSZ package to make its functions available in your R session: +Then load the CHNOSZ package to make its data and functions available in your R session: ```{r library_CHNOSZ} library(CHNOSZ) ``` -Then load the `thermo` object, which contains the thermodynamic database and system settings for CHNOSZ: -```{r data_thermo} +CHNOSZ is now ready to go with the default thermodynamic database and an empty system definition. +After running some calculations, you may want to "start over" with the default values. +To clear the system settings and restore the default thermodynamic database, use `reset()`. +```{r reset} reset() ``` @@ -155,7 +157,7 @@ Many functions in CHNOSZ have no side effects. That is, the function only returns a result; to use the result elsewhere, it can be assigned to a variable with `<-`. -In this document, the names of these functions are set in green text (not applicable to the code chunks). +In this document, the names of these functions are shown in green text (not applicable to the code chunks). ```{marginfigure} When they are mentioned, names of functions in the base and recommended packages of R are said to belong to R. Example: Use R's `plot()` to plot the data. @@ -169,7 +171,7 @@ * `diagram()`: plot the results. Some functions in CHNOSZ do have side effects: they modify the `thermo` data object in the current R session. -In this document, the names of these functions are set in red text (but not in the code chunks). +In this document, the names of these functions are shown in red text (but not in the code chunks). Major functions with side effects are: * `basis()`: set the basis species and their chemical activities; @@ -381,7 +383,7 @@ As expected, we get the same result from both operations. Use `reset()` to restore the units and all other settings for CHNOSZ to their defaults: -```{r data_thermo} +```{r reset} ``` # Properties of reactions @@ -562,7 +564,7 @@ ``` Let's not forget to clear the system settings, which were modified by `basis()` and `E.units()`, before running other calculations: -```{r data_thermo, message=FALSE} +```{r reset, message=FALSE} ``` # Using `affinity()` @@ -1527,8 +1529,8 @@ ``` Now we can load the proteins and calculate their activities in metastable equilibrium as a function of `r logfO2`. -The commented line uses `add.obigt()` to revert the group additivity parameters to those present in older versions of CHNOSZ (Dick et al., 2006). -The current database, with parameters set by `reset()` and used here, contains updated group additivity parameters for the sidechain groups of methionine (LaRowe and Dick, 2012) and glycine and the protein backbone [@Kit14]. +The commented line uses `add.obigt()` to load group additivity parameters that were present in older versions of CHNOSZ (Dick et al., 2006). +The default database contains newer group additivity parameters for the sidechain groups of methionine (LaRowe and Dick, 2012) and glycine and the protein backbone [@Kit14]. ```{r yeastplot, eval=FALSE, echo=1:6} par(mfrow = c(1, 3)) @@ -2007,12 +2009,8 @@ The column names with a dot (`.`) refer to different sets of equations for calculating standard thermodynamic properties. Aqueous species use the revised Helgeson-Kirkham-Flowers (HKF) equations (symbols before the dot), and crystalline, gas and liquid species other than `r h2o` use a general heat capacity equation. -See `?thermo` for details about what's in the data table, and `?hkf` and `?cgl` for information about the thermodynamic equations. +See `?thermo` for details about what's in the data table, and `?hkf` and `?cgl` for information about the equations used for thermodynamic properties. -Another use of `add.obigt()` is to add data from the file `CHNOSZ_aq.csv`, which holds provisional updates that aren't loaded by default (i.e., using `reset()`). -In this mode, only the name of the species is used as the argument. -Currently available species are `adenine-old` and `pseudo-H4SiO4` (see [`demo(adenine)`](../demo) and the vignette, [*Regressing thermodynamic data*](eos-regress.html)). - ## Modifying data Use `mod.obigt()` to add or modify the database in the current session. Modified: pkg/CHNOSZ/vignettes/mklinks.sh =================================================================== --- pkg/CHNOSZ/vignettes/mklinks.sh 2019-03-09 00:43:47 UTC (rev 428) +++ pkg/CHNOSZ/vignettes/mklinks.sh 2019-04-05 04:31:52 UTC (rev 429) @@ -37,7 +37,7 @@ sed -i '120,$s/diagram()<\/code>/diagram()<\/a><\/code>/g' anintro.html sed -i '120,$s/basis()<\/code>/basis()<\/a><\/code>/g' anintro.html sed -i '120,$s/species()<\/code>/species()<\/a><\/code>/g' anintro.html -sed -i '120,$s/reset()<\/code>/reset()<\/a><\/code>/g' anintro.html +sed -i '120,$s/reset()<\/code>/reset()<\/a><\/code>/g' anintro.html sed -i '120,$s/describe.reaction()<\/code>/describe.reaction()<\/a><\/code>/g' anintro.html sed -i '120,$s/swap.basis()<\/code>/swap.basis()<\/a><\/code>/g' anintro.html sed -i '120,$s/water.lines()<\/code>/water.lines()<\/a><\/code>/g' anintro.html @@ -45,7 +45,6 @@ sed -i '120,$s/mosaic()<\/code>/mosaic()<\/a><\/code>/g' anintro.html sed -i '120,$s/convert()<\/code>/convert()<\/a><\/code>/g' anintro.html sed -i '120,$s/mod.buffer()<\/code>/mod.buffer()<\/a><\/code>/g' anintro.html -sed -i '120,$s/reset\$/reset<\/a>\$/g' anintro.html sed -i '120,$s/solubility()<\/code>/solubility()<\/a><\/code>/g' anintro.html sed -i '120,$s/ZC.col()<\/code>/ZC.col()<\/a><\/code>/g' anintro.html sed -i '120,$s/aminoacids(\"\")<\/code>/aminoacids(\"\")<\/a><\/code>/g' anintro.html From noreply at r-forge.r-project.org Mon Apr 8 02:48:39 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 8 Apr 2019 02:48:39 +0200 (CEST) Subject: [CHNOSZ-commits] r430 - in pkg/CHNOSZ: . inst inst/extdata/OBIGT vignettes Message-ID: <20190408004839.4329218CD35@r-forge.r-project.org> Author: jedick Date: 2019-04-08 02:48:38 +0200 (Mon, 08 Apr 2019) New Revision: 430 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/inst/extdata/OBIGT/SLOP98.csv pkg/CHNOSZ/inst/extdata/OBIGT/biotic_aq.csv.xz pkg/CHNOSZ/inst/extdata/OBIGT/organic_aq.csv.xz pkg/CHNOSZ/inst/extdata/OBIGT/organic_cr.csv.xz pkg/CHNOSZ/inst/extdata/OBIGT/refs.csv pkg/CHNOSZ/vignettes/obigt.Rmd pkg/CHNOSZ/vignettes/obigt.bib Log: obigt.Rmd: use Zenodo DOI for slop files Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-05 04:31:52 UTC (rev 429) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-08 00:48:38 UTC (rev 430) @@ -1,6 +1,6 @@ -Date: 2019-04-05 +Date: 2019-04-08 Package: CHNOSZ -Version: 1.3.1-10 +Version: 1.3.1-11 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 =================================================================== --- pkg/CHNOSZ/inst/NEWS 2019-04-05 04:31:52 UTC (rev 429) +++ pkg/CHNOSZ/inst/NEWS 2019-04-08 00:48:38 UTC (rev 430) @@ -1,5 +1,5 @@ -CHANGES IN CHNOSZ 1.3.1-8 (2019-03-06) --------------------------------------- +CHANGES IN CHNOSZ 1.3.1-11 (2019-04-08) +--------------------------------------- - Add thermo/stoich.csv.xz (loaded as thermo()$stoich), containing a precalculated stochiometric matrix for the default database, to speed @@ -19,6 +19,9 @@ - Add data for sudoite, daphnite, Mg-amesite, and Fe-amesite to extdata/Berman (Vidal et al., 1992, 2001, 2005). +- obigt.Rmd: Use Zenodo DOI for citations to slop98.dat, slop07.dat, and + slop16.dat. + CHANGES IN CHNOSZ 1.3.1 (2019-03-02) ------------------------------------ Modified: pkg/CHNOSZ/inst/extdata/OBIGT/SLOP98.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/OBIGT/SLOP98.csv 2019-04-05 04:31:52 UTC (rev 429) +++ pkg/CHNOSZ/inst/extdata/OBIGT/SLOP98.csv 2019-04-08 00:48:38 UTC (rev 430) @@ -27,7 +27,7 @@ ZnCl3-,ZnCl3-,ZnCl3-,aq,"SSH97.3 [S98]",NA,2.Oct.97,-129310,-151060,25,41.97,53.9,9.5636,15.5732,-0.3779,-3.4227,42.2912,5.5147,1.2513,-1 Zn(Ac)+,Zn(Ac)+,ZnCH3COO+,aq,"SSH97.4 [S98]",NA,18.Sep.97,-125660,-155120,9.4,86.2,21.52,4.8484,4.06,4.1473,-2.9468,60.4626,14.5244,0.41,1 Zn(Ac)2,Zn(Ac)2,Zn(CH3COO)2,aq,"SSH97.4 [S98]",NA,18.Sep.97,-216450,-271500,22.47,193.3,73.02,11.7443,20.8978,-2.4707,-3.6429,119.1022,36.3407,-0.038,0 -Zn(Ac)3-,Zn(Ac)3-,Zn(CH3COO)3-,aq,"SSH97.4 [S98]",SLOP15.2,2.Jun.98,-305740,-408093,25,316.5,130.4,20.0332,41.1373,-10.4257,-4.4796,203.1827,61.4365,1.2513,-1 +Zn(Ac)3-,Zn(Ac)3-,Zn(CH3COO)3-,aq,"SSH97.4 [S98]",SLOP16.2,2.Jun.98,-305740,-408093,25,316.5,130.4,20.0332,41.1373,-10.4257,-4.4796,203.1827,61.4365,1.2513,-1 AgCl,AgCl,AgCl,aq,"SSH97.3 [S98]",NA,16.Sep.97,-17450,-18270,34.1,6.7,25.24,5.2088,4.9399,3.8015,-2.9832,9.8168,-1.6698,-0.03,0 AgCl2-,AgCl2-,AgCl2-,aq,"SSH97.3 [S98]",NA,16.Sep.97,-51560,-61130,47,7.8,54.37,9.5149,15.4544,-0.3312,-3.4178,19.185,-1.4457,0.9169,-1 AgCl3-2,AgCl3-2,AgCl3-2,aq,"SSH97.3 [S98]",NA,2.Oct.97,-82710,-105613,44.5,10.69,86.82,14.504,27.6363,-5.1192,-3.9214,35.8339,-0.857,2.5402,-2 Modified: pkg/CHNOSZ/inst/extdata/OBIGT/biotic_aq.csv.xz =================================================================== --- pkg/CHNOSZ/inst/extdata/OBIGT/biotic_aq.csv.xz 2019-04-05 04:31:52 UTC (rev 429) +++ pkg/CHNOSZ/inst/extdata/OBIGT/biotic_aq.csv.xz 2019-04-08 00:48:38 UTC (rev 430) @@ -1,88 +1,109 @@ -?7zXZ???F!t/?????4]7I??b???9??????TB;q?"?q???cL;?"??I?,t?b?PK??7?t(?em?A-P?Q?]?? ??8?.f?|?????V[?????=??K????VTm??~vw? ?2/ ??Wa???s?-?????p?lVs????H???u???? ?%?XF??k#??????????+??(??m5?St5?Fa?a??jN??8????>z???3MwS?%??????+?3x??`cw`?; $? (???????P?>????>?1b???QA??????>6o?=?-?((??pN???i????VOL?A???9 c?E3??XP?? ??kj?s?????Y!&o??w(??3?+?"???????; ??R6eW????![?????r?O>O?*?h\t????ty??)B????n<?9l?N!3???z '???}???nV?,0uVe??????? j?????|B??d^7&KK?- f("?9s??[?S>?W?;!6???2_?????s??3}/????hAa]x^|??j???`????wt??\i??V>?eL8?^???QG,h????O???.?????J? ??@4??????b4p?J?u?3??#????o??0???????????????v??0?$`?^??:/??? ???3??)]g?1v*?n????{???;Q????+?????????m?g?Z8p+???^??????.rE??j??6[??k0?jh?\m??e?s???????????t(i$??$??T????;$?:??W?v5G????0 ???$Wg?q9s???$r????? ?YT?Tz.+'??#?R?d????/v??}%???????f???C'T???F?y???{?\4???_??CU?$$?u??5?ujH? ????#(??????u??-;??&?9?njm???h?DQ??A6xT/??f???????????????????v??T???s?_?A*?E~??? -?l?-?5????&?@??? -?????)?!d?9???.?????????eh???r ?y????I???Gg?;?u??N?:????@y???c???[D6?o?+??? -{?`??%?B??,P??%EZ?F?k????w!?9~0????`???X????????F?????? ??eWX@????M???j??S?D????m?(`$???Q????I6??9??$An9?K????{.%??s??8H?Y}yZ?? "i?t??a??D2U'?? ^?????u?p?4e?(? ??1????`j????4G?KM??#????????t??2?.vU?? ?P?/????*g %]:h?B????????y?QYh??d4?"???????? x ?, :i???!???g?C__?"?????? -???@?+?????,?'p??J???h????=n??[?`? -?L"???M???7?MPS????a?D????,??b?( ??Iz"2?a?p?F???>:j?T???D??=H??' ?8" ??M???g??J?o$?"???zc???G?h?},1{??=?x????|?n??jh??d??m?_[???`?\?xOr??A???I2? ]J???'?i?;???r?!5??eb??`??S?Ex?t-(????Z?L?2?a?tA -?|????????T?#H?2?s3{*/?.??~2?B??(?[???@??? -b??????.??? la??C0 ?c?Ud?+?S??q>t??v{N|{??l?????(A\?????s??????eN???'?*???E>P?????S?7P?tD9 ?ri??#w?/w?c2?G??????3E?Ms??b?i?????p??5f?*;z?})??h???_d???b??~?:???]???,?)?OU??bqG?j?t?G>?[?/???}?F??v??wJS?wPvE[?Qy????V?YT?\????U??J?????x?93?x????DU?????T??u3?y$??(?n??]s"?M?????7V!^o ??L??*??S?HTb???=???E>?3t?}9z@?G?????J????? Q?>B????pY???V?P??H3????4,?c????X?j -y??"?Q7~?@L1???(??R?d??p/`93?*?A??9?:Fk?([?3h?HW?c?|?g?2???G?=?B?4?B`A?)fO?]????_ 0m?[?W??1??Jt???C???S\???(?A6??O???8cHV!|??.?????@??h?X??`??c:??w??2S?? Wp??????j??C????+?!??|FfD???y?BS?;8F???0??,??~???mA -?????n????0?'gm?n[O^g??!xwnm???u??????k4??????!N3????]??4?q????=? -??????VO?46b??>;?D -WJU?????)??>??^q2Y({?????>???gS!v?????&????????"N????4?e*y?}G?T?K?X 7z????L???u?3?&n??V?????_8???V=??q??M???bpYJ{??`????TYcx??O?g????4?j????m3;?>??????\?u?????????9x0.'????&A??g????fB4??0???(??`?K9?????m?(n???????g??r? e@???C???4?????l.?h?.?????HD??M-F?? ?^?0?)?Z??`?4Hn;m?GH?Y?<'?]?;??4?IA}G??>0???zT??????$?M?;?Z??rbig!?J??N??I?2???d??w????w? +z??-$?;weyFc???A?0a? ????^i??u?I0???U??.?:?Y?3[; W?Y??? ?)?>;?Z??K?????M???)?H+??l?????q???N?Q?8T? ???$>??EqwZ?+q?I??? ??9?`????>/??W???p???)?[?%d16p?? ?y????_.?s?hveo?cy?5Hv&BT^<w??j ??1?5b?.?(%Q??Q??pq????????0A?d?I??e?s???D????t???O??j ??)?[a2??????] -??Fi? ?9[???^/WR?~`-?*p?&!??N?%r"?S ????K:%ir??????A?*???? ?jRa -??+???? -%?4%??U???n??????O??mq?xZ?M?Q??V??????3?n?;???????? ???v??G??C??T??-????r?,??p ?=u?A??DIk:??|@??J??xv? -|h?a?-??c?2|???K?m???? ?.?T??m????R???#?)l?Y8)1 g?5lC?? ??%;{v$?qn??OC????&: ????? ????? ??m~?v?(?L??????S???I?y???a? -????r.???p?G$A?L&dilE]RP?g#? -(.?U?@ -} -?r??+?6?D)??LW?O?}?????c?????A??y?v?w??????g?5??:??/??A~??*??????b??`.????U/??)6???????Q??r?{U?9?y+????,k??4?NQ7?Z??~?CK??w?D?gD?e?qc*????9?Gd??6?0??/??K -?.?k?^4??G??_p?o???,??X?.????V???e????????9g??~??=????n?H?.??} ? -~??#?)??>????x/????>?m???`???? ???%??????????%]Ys?????nw??=?_0??u???q+?XC?!??'jm0???-??LJ???U -?+f8?;???Ii??W??????q?@?????@?z6?gD?vM??V??Z?3c???A?h?0W??^kEo?>?B???? H?S??//S????y??8T????OjG=v,M???c7?`^?G???(??????????o???0?p at laF]k????:???| ????9?b?ha?=l??03'??x??9$???"???Y?e&?*?y9?^i?/)q%?%>f??????w7??q????+? ?i?Q8???(+l?C??? iF?]?????AR????j???1?????????$D????m? -?;??JB ??]oj? ??????f?^B?r?'?A-??S(*j ?m2????\?B?c?_C?X0p??KTf? ???Cv/?\cc/???????D#?19D7?}???C)D[?|?????" -g??@x????97{???g?S?b?4?)4??:?6?^ -[)??#? -?!?H?%>??G?)Z?]?mE???u???n????U????s??u -X?:??h?Q?g-??6?Z?g??:?N???? -M?G?ho?????#QGh???z??mE1?????????o??????YnT$xP?b@Q??y -??X??????9??/CbF -????????*??o?N$???({~~?i??$Q?".?&????Pg?w??????_\?Cx??3R?o?????e9?! ????jP??????&?jfP\2pa?>?K%?)t?????'????zi??????C?Wk`Z??9??m?@?ov??0?D????D???rh?M?c????`$$?8 ????IX??Z?>?E ??????oR?????z;?????? -?<@??;???p???S?f??n?p??T?X??td????????Q9????Is)??1I??9???/???#?w?84????????_#4??'????_?E,???E???,??h??j????2?W%????h??????VH??a? ? ?iT?7?+IH?i1??7?G???j8??????qh@ ???????~Q??`?3????? ????????|aD?SjT?F??{3???b???E*??? ???V?c?<:?????'R{q -?c??`y????"?,Q??????\?P9q??j?X?kfd?,???C???6?h?J?S?[W??B?L9?Sk??1??g?~?j?? -\ v?f????-?? Q??%???a??}?\:????p 3??????h"??sR???_Jz,??[?H?%?+???????????Y??V?d??qF???x4?&??nM???O8??????C4?????rb???$??m? ??0??C_?o?A??DH8?{[? ?^0??E.???V`y'o5?y?????????' 4Rh??'?u"???PNd????]??(?8?~x?G???i??i5\?VW??{???????T????}"<.]?Cu?q????17???c??R?R#?d?9#?`9?f?U3?n????^????.4r??*lq>?q??S?)?'J?F:Z?4|?2??p??????h0?rvl -B^?^?j????% d5?y?~?ZX?$?? _ -?STC2b?l?????L\&p???+dd^B?f?_L??\??????\vB?Lk?W??<@T$-?G??n*hb???#b?????E?X?E?#o?@?????/f???M?, ?)o?^0?????]7?r???KP?????Q?~?????T??M???zi???D??B?$t?m?DE??-??-?:df.sx???z??d?)4????Z??c ?,,\???????? -??B??!&Z??z???a????P????????????"$??Q??0I ??o?G3J:???a?}??a?+?o?????l?}??<'????76@?,???^??{?bV??kA ???eJ -?? ???)???? ????N=????0I?Ld?0??????Ep?????O?.?????m???T??????????#&jX?=??r?f`?i8?W;??G?{k?.?`(b???X??chn:z??????=ve??????6_??????>?n9]tF,?z`a?'???-??????+??;??g??????n?S#-????8z?sO?9??~m??K?,V-?b?4 ????9} ????f?f?n??03???? ????:RUG? -?g????&???? -???53V?04??~B?8u??R?5???H??~??GL?3W??LE????3dy[?V5??vQ? -V?? NW???ar???z???_???*????0)????x???V)!?M?a??d??~4 ?????r1??~??]??/O???g??%??' ??O??d0?l??f?1r?L??ZKn\??a?l9?v?????iA??A-?;??????2sD"????>??GX??3?W?/???=?mp????J!4#?f?^?f?Bg? -????e?S??S??:?s^??!!+G???=ct/0BK?? S????F?n\??gk ?V?X?{z$z#???d??d????=?_??B? ??I4?a;oQ??)P3???. -??????l???O=?)??V????ur????rIL???]?K?g?:U&A?HI??D??u??-]/?l)-S??Yh?h?.? ??>?b??u??;D?z2?>y?0?]|(p??????V?d???C??%??Q?z??!?/md?????YqR????????????? >?????h??.??q??I?KJB??Y?5A??P?F???k???H?????h???F?M =???r 6*?!???m??&?I=????[R$ -???V6????????7'"H] P?yW9E??7l????g%p? 0??????(.?? -T?4#+o\?$}.???? .B???fY?????K????m_?Z6`?`???E9X??v???3\??Z)??"z+G0?"4?c??? ?s@?q?=>??u?i?jB?????Y?FWT??V?M"???U7??{????>?????8??O;.?t?T?]k???Bw??+?.???R+#4=?????V???r?M6G?? -LvvQR]E~Y?u?@?cg{oC?Z??rgF??????If?1#??|?WE??V?T???vN? ?<}}@???ma?+???pt?q??hk???"G&??h?????k??S,??_?2??_??n?f?:'pW?*?f+?C{?i1V?sIX???'jrJgk??????/??G>??????3`?DA?1}??^s???y]"?t??G???W6'?~???????G?}?T??n?`+?????y? -??E???)rk??"?F~?F????#?????zG?7??Nga??M?k?a ?|?" E?MzK?g@???KE???y?????-???&??O?T??l?L?7??l?+|-?|?C@?(s?@???F???`G7???W??\ -???e ?H????7nQ?q??a*;?;:p:9??>? ?Z ??#??6??? ?n1b?7\?g?????????????S?)????[9k?j?S3???Ap at 0??\??L)?Z??6Y(C??mc??vu?????0ap?P??J6??5?y_??d???O?2???@?v???$q?K7 ??K?N???6??7[:#??F?dbP??|^?pC??}w?ae???p,??Y?"U$M#%C4?????? -?*i??AL:u? ?4?g?U?~p?%?~??????,%?[c?@?| -C -??_??5??? M?????GE?'?id???v9???>???t?p???S?\J,v???|g@"k] #qU{?R??-c??Jm??#??d????I#Gs?U???b?]O[??DR/0?7??S{?#H?????/s????M%???????v&K?????/?7?g?? ?>?*)???9??.M8???M???hm????kp?k?1[?.? -.?Y?????|W? -??h?74Zw6Y4?Yo?]?????g?ftl?]s??R??U;????????"wN?c4*`????7???JQwvSD/A?)4?????|?w?????????m??S?*?F?f?A5Ah0?(?????????=?R>T?I\???6? -Lm{+/W[?;???ST????!{?ZtpXG??z?G?????b#@??~_F????!?N?[| P???? oi??l?yb????y???Z?????#?e?? ~??e???,Op?=???????T???????? /???,'?\??? -??U 4?P?kw SN}?lB???fd??)??v7?D?g??????????a???=R??????_`?'0?? ??vIm???Z??????`?????????|???L???9?9???z;??'???>???.???(`?|???.e?h?u`? -y?x?????!?}??????2??"??{????Hy??^?JY?2??????K??r??r?0?b???6 ????+ ?&G??L?RMwv??b??? ???N??J=????h???; ???g?YZ \ No newline at end of file +>?v5G????0 ???DE?/7?!?????'W???RV???V??r# +v?'??B?t?W?$?Ex??? +,`Y?w? +??NJr?G???d=n??Ol????P1 +???x?6?????x???p=A +? $ {???????qs==????o??z??????=?&?9C?`??? ?g?9?t??:?ufwU??\? +?x??^????F??? +) )????J63:???????O;?????????I????? 9!n8z? "[??f?IZ??M +?U'?E????????[????M?? ?j.?q\???LB???*td??>?G?T??g?[?j0?vB??? ?x??c?y?wX??Y'A??;?n??7Tx???l??I"?\-[?1?x??oW?5?y?????R5??}U?FM???????????oqN6f?x;" ? +?F?t?????q?m>l8??.r???f??$?v????????p???&i?l??D?cq???(*@? ?? +????s??f??_ +!?? h?!?? +??rj?{?@?+f??6?I_??*???_b?@?KL????!ux~QT?h->??Ux??Ed?xa??dQ?`?@?2??9???*???&?Z????????Oc)????????ILf?#????O??s3?6 +4}???]?&?????-???e?E!n???? ?-6?mP4??Z??@???1m ??8(?KKv?1?dSS?G??Xu?_1??#???F?x?????????V.j?????(?j-Aa???%^??Q?A?f?r}??g??k?.Zo|\ + &H????=?be?U???????????7????I$5>.??r=??F?????TE???6?5x7??$Bsx7???w???&+6)7??Bt.?r#@'.?)??5z0vb e????(????U?? v?????]%J?wJ???? ?^?+?/?????c +?S?t??????!?1&?Q +3?y?;?V??o????7?? +s?!;4?IXpACN?w??????????? ?'r????y????b1?l"/ .?? +a?"?wl??1??t/?j?rM3?????S?*?-#3?J???L?r??1^??o(>???H??rKB?+O???GS?.m>??4i~}jy??'g=D?O??????0?r????;??;?}Wc;TaG??}S'??\???????M?[????6?S????>?Yb??L?k??W?{B???j[l??Scc?&O?? Z?k?ZO??/??????Yzr? e?f?????lV?+????????x? ?? ??|l0[?]/? +???XZQADn??o??? ??t!x???4??=??:?:??iU??/?????O??EC??Pw'K/??#rt??7_W}A????>?B]???Yw*???*?P??|=?????bk?2#k??<i:??61rISz?????e?b?fRx???L?? ?/-G~?ab????Fv^???v??$S?c??+???????;e??=?j?jo?2$???=?????r{!??N^rtY?3?L???Q3??Ak?W??D???DAP[8???!y#Ngd??*??yaVA????w?W]l?????{?1??Q?v??[?Q????L?/??h?I?L?{???M??6[? ?e??}??????=??;??????=???q?????M?Q??????D??#J?i?*????clz?p7???u|-?????/????? '?????J??7z>?s?????8i??!?z???|-?????>)?????a???Nd?\?=??JQ?#??.?l?(??4?1?????k??? %??(??x?%7??Ir?:i4?F?Sw??+k?h???k????????O.?Q~u?n?]j?M??f??V)?a???????W^??Ks?????1^gl??#uIx????yP?k2"Wa???8???x\???#?[f?rJpi6cX?A??"z??!O??&???J?c?o??Eo~w?X??j_A????*?>Q???????@Z??}??????????????= ??}?<$J??LE?=?1x? +??d"H|:?P??X????F1Gp@???G????hs?j& Kb??:f?Y"?HP????S?s4,???/?l7?O{??Y??5#!?YwL?u?n?4?=#P?v +w93???Q:????b???#D???KA?j?Y? M???p?(?J???-?w?????>???J?C??9YZ$?gU??V????}??_tds?q '???Z??E?1E????v at L +9??? E} 6?O????b~?=???Pq?J?????x???]??VIuM?O????????F#mn?????YG^??????u?? ?????;^,????p??C?q?????I?d2?{IG????H?? +k.{V?{Y%$G??"???}?pB?c?jl:i???[r*??n???l]????WLR?LBw}!?A??JIxi:4???h?u???s__?[N??p??+Y????|?Z???AGP???K??J??e???g:8?? ????h??:.??+de?????????7"?d????H?hS?J?k4?;,???????g?0???o_? +?????V??/?q??????v??Z???LO?mX:??E??qE??????20????o<*pi?:"???K ?9?&???????Ql?Z?????? F??g??_Z?&~@?s??????L?n6iG^????? ???w0?\Ey?LeP??F??????{???N,?Q[o??4=???lv8??a)@?? 8Wh????????#???Ud???{????d#??+S9h?i/z?} +| G!??? r ??U??`?????D?????/?????J?vlm/S?{z???@??4?????F +?X?L?#??? +???"no?Y??Z`??? ?/x*?? ??1?ec?G?+??+?????#]pl?????y?i :??h4?3!?M?/?? ???>???^?,??v????r??El??6f????t??9 +?9e???t??3mAt???s?? j?R +iB?Ot????"2?;Mz????i?3?????"??'ZY???? ??????&e?16?D?2?g??H(??K???x?8?u?}8?l?.?cn? ?1B??|F?zX?E?'??Vr?????0?o>???w^K?????????#???k?9_?^W????9=?? +????S????3????l???eY?B??=-????? ,??"??*??4m]?VXu?YD?_????H&\Ke??????<??U?Z?i??Y?QBV?|R4?T*j ?<???z???Du@???`(??2??A????P??????ig???]sy???r???1[??P?G7?e??]:?\;???."?x?????k_???:??6 -8????????fR?5?S?5?qq??????q?\?Yh!%C?3Z?|1(1,i?vX??TE? ,?I4?'?%Z?w??W.n??4a?"???K?????'???X?.? OA?v??O?)?A?????Fp??? +??????? + ???Y.?#?^_????A??5???g?!i:??V q??c-??N??^??e??T?w??? 'h?g?6??n??a????Z?????????nI????r??[??!?M?\=:???/??M????[?????n 8D??KR]1?|??????mlD?^o+qy?uF? ? ???Yjs???>??Pr??%?!???$?+?? ??| `ncl??0?+???>?G?dup?q??I???h?(?% 6????????2rEi?S[??L????N?????o?? ??n????i??:????`??????"X??? +?C? ?~[N;?5????"?? jM??[th!lg6?w?1?d????P???E?' +?k?c??G?U[??p????+?]??;?V?Q3?FG@???d??<?&?????????%?? +?G???N???"3????2??*|????? ??=???????m?'?????B4??,??????A????YUE?Qg\"]??SN@????SP???yP???51cQ7???\???? +y??+azK@?Abp??S^?x> ??C??????? ?BWN???U?] +U?)??O?x? ? ???V)m4?x?Y^ X)???c????!??L=???X??,p???k8?cBk?w???????f?1??J??H"j&?{c?^?????? ?$??2???z??1?+?N??U??'????`????,???;???O?>??????vM??m????B|??O???(??? +????????`? +'2Z3??*??$??D??(L' ?U??hP???fB%u???? D??C??????8$??>????????{?y*J????v??????S,?c?? ???G???> ???,???LBml?v-M?e|? ?u?j????W??????>eF?8??kx8????? ?!???c???T +?VX.,"???4???l????\??%w?fFKD??????R???- ?^?????$?=-??5\S?9??5????GW??]ze#&?MrQC??Q2F=??v'?u??????g?z???wW??K????4?{???U,LF?i??$?? +???h??F????q4??h?!??l?s?\{J?BC n}?3:!'?H.`?SA?%?s? yc_'??UF*1S???'fVy??????"cV5?S?h=m=~?O-?Uqha?>,?h?? d1s@??F?]???%?@In??'?w??I??f5?X??!??D?h Ht?t??>?[?J??x?nP??2b@??Bc5?vQ?%PK4??????>???;??'?E??f?"?oinW,E??u?G??v??E?? p?$2??M??[??r?????o=1R?N?z?Y?r?[?????1?????^??.ui~? +U?f??q?[MJE???(??]???M??K????A??q + +??WkOv?|????G +b??V?"7???8%S&??L?E????b?o?){8?h??D?????{??Dz|????D???#?I?QrV?????F?bM???L ,J???%o???m&???@??????%h??)/2OK?z?I0???Y?j#????????|???m?#???s#-NH?5??sYN +??}us??q??eW?????k?\8??{U2N|?K?|g?T?y???????!??b??R?v +?T????????-!+?@??*??iv????=?}?????????j?@2+?N:??????????Wd;?n??v?|iO??x???? J?????+??N?4x?|^??!??Y 5(??.????{T??%????s??n*??FS?????M3??????<??T???[G$???!0????^Ce??dp1?M?K?&???"?o$@???V??????}??P8]???????*?*??|?@q]??????k??b7>???$(?"??hB?> +?5i???I ???g??? ???Gx$?b?e\??]y:q~w3o??U???????x???????x??)???e$??+0??? +???ThX)??h)???39?7Kk?????d??? ?9%7z?Y??'f???CL?Q????I'"$????BCWnGO`?Gou?3?qv?`???,???|?:g;?E9???{3F????17??g,{???jz?35?rx??C?3???&?? ???g??^?? +/ll0~????t"t)V?NE0 Sk???G+S??c???Eke(b??S??V?sd????F]?j??EV\]M_?8??hrJW????{???? +?.?Q??????????%??-?^???@v(?5????\s?XRJ???#??6?????g?`S?%k-?4?=}?Ag3dT.???8?x}?fYOA??????Y??????9? ?K???$9? ?;Ydt'?????4=h}HU~?,?p????2??n'?J +?P?N???LI??{???????m???y???????????H?fv8"? m?4)?E?!???1?(YW??????L|?v?t??,?M??P???Qu?" ??????q?+?????Q6?Z0L?Med?? v???S?'??Q????,%?TQ;#?????+:?ox?J~?y0?????????Bf,????6(????????w???.~/?u{?|@?*??ULf??r?A???L5?'?|?a#???"?/???D$6????)?? +???~9??xf?w*(}u????T?5?R?????|#???;??5?T?m?V??b??;??p?{?? ?) T#??N?x$?P?`?h)???h[????p???d?X??? '"?Q??*%???k???????]??~??&?*??Z at .???+t6g???Z.??m:?S?BoC?=j? ?j+{3??Y?????? +e?Ki???4???&?H????KG5*????????G-?G_Q?S?t 9LaN#?=?G???$?E?X? ?Ii_???)8~y??S??F??9~??Ro^k?Y?6r]?_Q????`?1f?YZ?9??4????c??=??dZ??B?H?Y?]D?)??7???z??RR?5?? n ?(?K????7?K u?U[Pd??5??JA? ???j?;=??1?5qa=+?? Jn:a??? ? +?L@????????Mg???p??1)?1H+????Y??? ?O?F? +t5??EbjE????'L?w?9.?6?3z??[?[hu?X?>???? +,Y?D??Ve{i??-o??x=????????? +Vg=k??9???6?n1I??^????N????????WO???"?????Z?????????}n.?f?Er????t???G?Q?A?K??N?6?O b???r??Z????G?????u6????????T???*u?dl?t????]?_??D???"(??w????}P#9???5?_??{????y-H? |=????????`$???@ ~?H)%??D?v?6??w??*#i??yh/?)??????W???"?]?a?ov?????B?}????`??s??q+WM??7?O?6b?T????@?WF1 ?u?J??d??B%2?????sV????,5????q?.?Z?=??z??jE?4??4?G?Rkk=0?) ?R?9 8@?ds?@??IM>????^??v&?9??????)?? e!?o}???;??%?.??g?? +'Ek]???????{ 4???_???*??]?&????x????z?ezo{R??h6^??kxa???7g??5C t???????@?[?C?)*?0ggjl5?^)Wg??B?????r???~=??????????{?D?V`?3_T?Q?C??+?????:?p?????!??nl?X????:5c????~v?I??w\?B???%?v????B +???e~????v?WxnIi?7????0A????&???h`????;u9H?-????PN?wY?2?q??l(??:???'?$??iuM?n!B ??V??7] ??????|h?}Z"?;J?}?1Q????\u????p?+"??5"??KF?W???? +2??S?ePp?- c??Rk?o??O???@?? +?R??????I??O?vR???H?SE ??Um?Iu?^W??6?? +???-????hm?????F.?????Z??R??\??@?w??u?=??4????i??????? b'?f??w??xQ?? ?p??\?!??????????j??=??M??O??Fhxn?`C?J3\A,p6x??x|k?K?h??L??1?W?M??* e?6N?7???|r{p?_?X?` +???CH+??ut?Q@&J?oQ??}?????E'???@\?;?U)bM7??AF}?u?!?????L?^?q +f6??h|?????5^oRFR?\@R>WV???#??>L??4:Nx=V??N??{???s??y?O??_<(I?7\U?(H?????V>???rj??.?? x!#???0N???????? ?V?q??P?@o?*?~ ??!?~?&??????x?{;??Q(T?{????~W??U?@?? r?&?3??f1(\F?^??=W???d N8;h?c3??? -???I?H??t-f????U[????_???????? V".??[??|R?ZC??????K?Q???????7W ????U?+????IX?/ ??0??`zB????D?????,????-[?Gf?U?^???(?F??})2???????:?L???V??v??-}?;4??? ???R5?DE?`?#???? ?1Xl{?G????V??p?a????FmU??s}???m????C?????h??!o?;Ha???+zN?066?p?Q=??n\?????M????s?T:?j???B;f?k~9?????F??&?4?6??L?D????x%?l??+?d?kd -n?4?#p???????N`g.??A4?u?i?x??0E??Y/U???=???t?8#?z?J?????K?????0???JF7?? ????k??H1????????#b??-?>?c??????j???????gq?]:???U? ?.#e??M???T?KU?l?D=?/@F?}?d??6??r?tr?cW????^???;>???5/b??Tim?B??[?2????w@?Q?? ???gS?$?5l???5?`{Q???|??S1?7|??i??k?_?O?Y????8???-#???o?7C???????eJ5l?N}I ;??mb=??C?.?|l????U??r??g@??mDX??s?o??U?sY?D8$?,??X??^b:??=O??)??q8J????? -HdS?vqj????X?zR??y?$d4Ir?? -?Z???vT:??l??>??.??????}Q?^?*???C???????????????;?ZM?c"?Hn????~r?????|?/Z??k??!4???7c?'???aqDy(H3????p?V??????pZ?????8!??iq??@?jL?\N?4l??em??|??EV??w?????]`??Fu?1?????????m6N?4f?y=??h ?r?? ????Kg??X???n?4???????????>???M????~??9^??q?{"u?<???9??+?????V?G???????%?Oqc?/d??E?????n?%?[???n0????????H?g{U? -???D ?S@??D???Q??QR?z?y?%?`??-??9S>?{?I?B\?????s;W[WV????eE{??O???~????_??4???vk?n? [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/chnosz -r 430 From noreply at r-forge.r-project.org Thu Apr 11 11:00:12 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Thu, 11 Apr 2019 11:00:12 +0200 (CEST) Subject: [CHNOSZ-commits] r431 - in pkg/CHNOSZ: . R inst man Message-ID: <20190411090012.C0E3018BC42@r-forge.r-project.org> Author: jedick Date: 2019-04-11 11:00:12 +0200 (Thu, 11 Apr 2019) New Revision: 431 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/R/diagram.R pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/man/diagram.Rd Log: diagram(): 'fill' can now be the name of an HCL palette (for R >= 3.6.0) Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-08 00:48:38 UTC (rev 430) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-11 09:00:12 UTC (rev 431) @@ -1,6 +1,6 @@ -Date: 2019-04-08 +Date: 2019-04-11 Package: CHNOSZ -Version: 1.3.1-11 +Version: 1.3.1-12 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/diagram.R =================================================================== --- pkg/CHNOSZ/R/diagram.R 2019-04-08 00:48:38 UTC (rev 430) +++ pkg/CHNOSZ/R/diagram.R 2019-04-11 09:00:12 UTC (rev 431) @@ -27,7 +27,7 @@ lty=NULL, lwd=par("lwd"), dotted=NULL, spline.method=NULL, contour.method="edge", # colors col=par("col"), col.names=par("col"), fill=NULL, - fill.NA="slategray1", limit.water=TRUE, + fill.NA="gray80", limit.water=TRUE, # field and line labels names=NULL, format.names=TRUE, bold=FALSE, italic=FALSE, font=par("font"), family=par("family"), adj=0.5, dy=0, srt=0, @@ -547,14 +547,20 @@ ### now on to the diagram itself # colors to fill predominance fields - # default to heat colors if we're on screen, or to transparent if we're adding to a plot - if(missing(fill)) { - if(add) fill <- "transparent" - else if(any(grepl(names(dev.cur()), c("X11cairo", "quartz", "windows")))) fill <- "heat" - } - if(is.null(fill)) fill <- "transparent" + if(is.null(fill) | length(fill)==0) fill <- "transparent" else if(isTRUE(fill[1]=="rainbow")) fill <- rainbow(ngroups) else if(isTRUE(fill[1] %in% c("heat", "terrain", "topo", "cm"))) fill <- get(paste0(fill[1], ".colors"))(ngroups) + else if(getRversion() >= "3.6.0") { + # choose an HCL palette 20190411 + # matching adapted from hcl.colors() + fx <- function(x) tolower(gsub("[-, _, \\,, (, ), \\ , \\.]", "", x)) + p <- charmatch(fx(fill), fx(grDevices::hcl.pals())) + if(!is.na(p)) { + if(!p < 1L) { + fill <- grDevices::hcl.colors(ngroups, fill) + } + } + } fill <- rep(fill, length.out=ngroups) # modify the default for fill.NA if(add & missing(fill.NA)) fill.NA <- "transparent" Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2019-04-08 00:48:38 UTC (rev 430) +++ pkg/CHNOSZ/inst/NEWS 2019-04-11 09:00:12 UTC (rev 431) @@ -1,4 +1,4 @@ -CHANGES IN CHNOSZ 1.3.1-11 (2019-04-08) +CHANGES IN CHNOSZ 1.3.1-12 (2019-04-11) --------------------------------------- - Add thermo/stoich.csv.xz (loaded as thermo()$stoich), containing a @@ -22,6 +22,9 @@ - obigt.Rmd: Use Zenodo DOI for citations to slop98.dat, slop07.dat, and slop16.dat. +- diagram(): Starting with R version 3.6.0, 'fill' can be the name of + any available HCL-based color palette (see hcl.pals() for a list). + CHANGES IN CHNOSZ 1.3.1 (2019-03-02) ------------------------------------ Modified: pkg/CHNOSZ/man/diagram.Rd =================================================================== --- pkg/CHNOSZ/man/diagram.Rd 2019-04-08 00:48:38 UTC (rev 430) +++ pkg/CHNOSZ/man/diagram.Rd 2019-04-11 09:00:12 UTC (rev 431) @@ -26,7 +26,7 @@ contour.method = "edge", # colors col = par("col"), col.names = par("col"), fill = NULL, - fill.NA = "slategray1", limit.water = TRUE, + fill.NA = "gray80", limit.water = TRUE, # field and line labels names = NULL, format.names = TRUE, bold = FALSE, italic = FALSE, font = par("font"), family = par("family"), adj = 0.5, dy = 0, srt = 0, @@ -134,8 +134,10 @@ \section{2-D diagrams}{ On 2-D diagrams, the fields represent the species with the highest equilibrium activity. \code{fill} determines the color of the predominance fields, \code{col} that of the boundary lines. -By default, \code{\link{heat.colors}} are used to fill the predominance fields in diagrams on the screen plot device. -\code{fill} can be any color specification, or the word \samp{rainbow}, \samp{heat}, \samp{terrain}, \samp{topo}, or \samp{cm}, indicating a palette from \pkg{grDevices}. +The default of NULL for \code{fill} produces transparent predominance fields. +\code{fill} can be any \code{\link{colors}}, or the word \samp{rainbow}, \samp{heat}, \samp{terrain}, \samp{topo}, or \samp{cm}, indicating a palette from \pkg{grDevices}. +Starting with \R version 3.6.0, \code{fill} can be the name of any available HCL color palette, matched in the same way as the \code{palette} argument of \code{\link{hcl.colors}}. + \code{fill.NA} gives the color for empty fields, i.e. points for which NA values are present, possibly by using \code{\link{equilibrate}} at extreme conditions (see \code{test-diagram.Rd}). \code{fill.NA} is also used to specify the color outside the water stability limits on Eh-pH or pe-pH diagrams, when \code{limit.water} is TRUE. Note that the default for \code{fill.NA} is automatically changed to \samp{transparent} when \code{add} is TRUE. From noreply at r-forge.r-project.org Fri Apr 12 16:18:02 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Fri, 12 Apr 2019 16:18:02 +0200 (CEST) Subject: [CHNOSZ-commits] r432 - in pkg/CHNOSZ: . vignettes Message-ID: <20190412141802.2D3D518005B@r-forge.r-project.org> Author: jedick Date: 2019-04-12 16:18:01 +0200 (Fri, 12 Apr 2019) New Revision: 432 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/vignettes/CHNOSZ.dia pkg/CHNOSZ/vignettes/obigt.Rmd Log: update package flowchart Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-11 09:00:12 UTC (rev 431) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-12 14:18:01 UTC (rev 432) @@ -1,6 +1,6 @@ -Date: 2019-04-11 +Date: 2019-04-12 Package: CHNOSZ -Version: 1.3.1-12 +Version: 1.3.1-13 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/vignettes/CHNOSZ.dia =================================================================== (Binary files differ) Modified: pkg/CHNOSZ/vignettes/obigt.Rmd =================================================================== --- pkg/CHNOSZ/vignettes/obigt.Rmd 2019-04-11 09:00:12 UTC (rev 431) +++ pkg/CHNOSZ/vignettes/obigt.Rmd 2019-04-12 14:18:01 UTC (rev 432) @@ -234,7 +234,7 @@ ### `r setfile("SLOP98.csv")` ```{r SLOP98, results="asis", echo=FALSE} -cat('These species, which were taken from or are linked to slop98.dat (or later versions) and were present in earlier versions of CHNOSZ, have been replaced by or are incompatible with species currently in the default dateabase, including aqueous Al species [@TS01], As species [@NA03], Au, Ag, and Cu species [@AZ01; @AZ10], Pd species [@TBZ+13], Zn species [@AT14], and Pt species [@TBB15]. The data are kept here to enable comparisons with newer data and reproduction of published calculations. Use `add.obigt("SLOP98")` to load the data. **NOTE:** Many other species found in slop98.dat and later versions are still present in the default database.\n\n') +cat('These species, which were taken from or are linked to slop98.dat (or later versions) and were present in earlier versions of CHNOSZ, have been replaced by or are incompatible with species currently in the default database, including aqueous Al species [@TS01], As species [@NA03], Au, Ag, and Cu species [@AZ01; @AZ10], Pd species [@TBZ+13], Zn species [@AT14], and Pt species [@TBB15]. The data are kept here to enable comparisons with newer data and reproduction of published calculations. Use `add.obigt("SLOP98")` to load the data. **NOTE:** Many other species found in slop98.dat and later versions are still present in the default database.\n\n') ``` ```{r optreflist, results="asis", echo=FALSE} From noreply at r-forge.r-project.org Sat Apr 13 03:04:01 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sat, 13 Apr 2019 03:04:01 +0200 (CEST) Subject: [CHNOSZ-commits] r433 - in pkg/CHNOSZ: . R Message-ID: <20190413010401.519BE18D3EB@r-forge.r-project.org> Author: jedick Date: 2019-04-13 03:04:00 +0200 (Sat, 13 Apr 2019) New Revision: 433 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/R/add.obigt.R Log: mod.obigt(): improve error message for unnamed arguments Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-12 14:18:01 UTC (rev 432) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-13 01:04:00 UTC (rev 433) @@ -1,6 +1,6 @@ -Date: 2019-04-12 +Date: 2019-04-13 Package: CHNOSZ -Version: 1.3.1-13 +Version: 1.3.1-14 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/add.obigt.R =================================================================== --- pkg/CHNOSZ/R/add.obigt.R 2019-04-12 14:18:01 UTC (rev 432) +++ pkg/CHNOSZ/R/add.obigt.R 2019-04-13 01:04:00 UTC (rev 433) @@ -26,7 +26,8 @@ # this is needed if we are called with a list as the actual argument if(is.list(args[[1]])) args <- args[[1]] if(length(args) < 2) stop("please supply at least a species name and a property to update") - if(is.null(names(args))) stop("please supply named arguments") + if(is.null(names(args))) stop("all arguments after the first should be named") + if(any(tail(nchar(names(args)), -1)==0)) stop("all arguments after the first should be named") # if the first argument is numeric, it's the species index if(is.numeric(args[[1]][1])) { ispecies <- args[[1]] From noreply at r-forge.r-project.org Sat Apr 13 03:34:12 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sat, 13 Apr 2019 03:34:12 +0200 (CEST) Subject: [CHNOSZ-commits] r434 - in pkg/CHNOSZ: . man Message-ID: <20190413013412.31AE818D0CE@r-forge.r-project.org> Author: jedick Date: 2019-04-13 03:34:09 +0200 (Sat, 13 Apr 2019) New Revision: 434 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/man/EOSregress.Rd pkg/CHNOSZ/man/retrieve.Rd pkg/CHNOSZ/man/subcrt.Rd Log: add par(opar) to some examples Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-13 01:04:00 UTC (rev 433) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-13 01:34:09 UTC (rev 434) @@ -1,6 +1,6 @@ Date: 2019-04-13 Package: CHNOSZ -Version: 1.3.1-14 +Version: 1.3.1-15 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/man/EOSregress.Rd =================================================================== --- pkg/CHNOSZ/man/EOSregress.Rd 2019-04-13 01:04:00 UTC (rev 433) +++ pkg/CHNOSZ/man/EOSregress.Rd 2019-04-13 01:34:09 UTC (rev 434) @@ -137,7 +137,7 @@ CH4coeffs <- EOScoeffs("CH4", "Cp") ## make plots comparing the regressions ## with the accepted EOS parameters of CH4 -par(mfrow=c(2,2)) +opar <- par(mfrow=c(2,2)) EOSplot(d, T.max=600) title("Cp of CH4(aq), fit to 600 K") legend("bottomleft", pch=1, legend="Hn?dkovsk? and Wood, 1997") @@ -147,6 +147,7 @@ title("Cp fit to 600 K, plot to 600 K") EOSplot(d, coefficients=CH4coeffs, T.plot=600) title("Cp from EOS parameters in database") +par(opar) # continuing from above, with user-defined variables Theta <- 228 # K @@ -173,7 +174,7 @@ varHKF <- c("invTTheta", "QBorn") # alpha is the expansivity coefficient of water varal <- c("invTTheta", "alpha") -par(mfrow=c(2,2)) +opar <- par(mfrow=c(2,2)) # for both HKF and the expansivity equation # we'll fit up to a temperature limit EOSplot(d, varHKF, T.max=663, T.plot=625) @@ -185,6 +186,7 @@ title("V of CH4(aq), HKF equation") EOSplot(d, varal, T.max=663) title("V of CH4(aq), expansivity equation") +par(opar) # note that the volume regression using the HKF gives # a result for omega (coefficient on Q) that is # not consistent with the high-T heat capacities Modified: pkg/CHNOSZ/man/retrieve.Rd =================================================================== --- pkg/CHNOSZ/man/retrieve.Rd 2019-04-13 01:04:00 UTC (rev 433) +++ pkg/CHNOSZ/man/retrieve.Rd 2019-04-13 01:34:09 UTC (rev 434) @@ -69,6 +69,7 @@ species(iMn) a <- affinity(pH = c(6, 14), Eh = c(-1, 1)) diagram(a, fill = "terrain") +\dontshow{par(thermo()$opar)} } \concept{Extended workflow} Modified: pkg/CHNOSZ/man/subcrt.Rd =================================================================== --- pkg/CHNOSZ/man/subcrt.Rd 2019-04-13 01:04:00 UTC (rev 433) +++ pkg/CHNOSZ/man/subcrt.Rd 2019-04-13 01:34:09 UTC (rev 434) @@ -267,7 +267,7 @@ # but we go to -30 knowing properties will become NA sb <- subcrt(c("H2O", "Na+"), T=seq(-30, 10), P=1)$out # start plot with extra room on right -par(mar=c(5, 4, 4, 4)) +opar <- par(mar=c(5, 4, 4, 4)) # plot G plot(sb$water$T, sb$water$G, ylim=c(-63000, -56000), xlab=axis.label("T"), ylab=axis.label("DG0")) @@ -284,6 +284,7 @@ Na <- expr.species("Na+") degC <- expr.units("T") title(main=substitute(H2O~and~Na~to~-20~degC, list(H2O=H2O, Na=Na, degC=degC))) +par(opar) ## Calculations using a variable-pressure standard state thermo("opt$varP" = TRUE) From noreply at r-forge.r-project.org Sat Apr 13 04:14:19 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sat, 13 Apr 2019 04:14:19 +0200 (CEST) Subject: [CHNOSZ-commits] r435 - in pkg/CHNOSZ: . man Message-ID: <20190413021419.3844718C572@r-forge.r-project.org> Author: jedick Date: 2019-04-13 04:14:18 +0200 (Sat, 13 Apr 2019) New Revision: 435 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/man/EOSregress.Rd pkg/CHNOSZ/man/add.obigt.Rd pkg/CHNOSZ/man/add.protein.Rd pkg/CHNOSZ/man/affinity.Rd pkg/CHNOSZ/man/basis.Rd pkg/CHNOSZ/man/berman.Rd pkg/CHNOSZ/man/buffer.Rd pkg/CHNOSZ/man/eos.Rd pkg/CHNOSZ/man/extdata.Rd pkg/CHNOSZ/man/info.Rd pkg/CHNOSZ/man/ionize.aa.Rd pkg/CHNOSZ/man/makeup.Rd pkg/CHNOSZ/man/nonideal.Rd pkg/CHNOSZ/man/protein.info.Rd pkg/CHNOSZ/man/species.Rd pkg/CHNOSZ/man/subcrt.Rd pkg/CHNOSZ/man/thermo.Rd pkg/CHNOSZ/man/util.data.Rd pkg/CHNOSZ/man/util.fasta.Rd pkg/CHNOSZ/man/util.formula.Rd pkg/CHNOSZ/man/util.misc.Rd pkg/CHNOSZ/man/util.seq.Rd pkg/CHNOSZ/man/util.water.Rd Log: Rd files: change thermo$ to thermo()$ Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-13 01:34:09 UTC (rev 434) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-13 02:14:18 UTC (rev 435) @@ -1,6 +1,6 @@ Date: 2019-04-13 Package: CHNOSZ -Version: 1.3.1-15 +Version: 1.3.1-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/man/EOSregress.Rd =================================================================== --- pkg/CHNOSZ/man/EOSregress.Rd 2019-04-13 01:34:09 UTC (rev 434) +++ pkg/CHNOSZ/man/EOSregress.Rd 2019-04-13 02:14:18 UTC (rev 435) @@ -87,7 +87,7 @@ \code{EOScoeffs} retrieves coefficients in the Helgeson-Kirkham-Flowers equations from the thermodynamic database (\code{\link{thermo}$obigt}) for the given aqueous \code{species}. If the \code{property} is \samp{Cp}, the resulting data frame has column names of \samp{(Intercept)}, \samp{invTTheta2} and \samp{TX}, respectively holding the coefficients \eqn{c_1}{c1}, \eqn{c_2}{c2} and \eqn{\omega}{omega} in the equation \eqn{Cp^\circ = c_1 + c_2/(T-\Theta)^2 + {\omega}TX}{Cp = c1 + c2/(T-Theta)^2 + omega*TX}. If the \code{property} is \samp{V}, the data frame has column names of \samp{(Intercept)}, \samp{invTTheta} and \samp{Q}, respectively holding the coefficients \eqn{\sigma}{sigma}, \eqn{\xi}{xi} and \eqn{\omega}{omega} in \eqn{V^\circ = \sigma + \xi/(T-\Theta) - {\omega}Q}{V = sigma + xi/(T-Theta) - omega*Q}. -Here, \eqn{\sigma}{sigma} and \eqn{\xi}{xi} are calculated from a1, a2, a3 and a4 in \code{thermo$obigt} at the pressure indicated by \code{P} (default 1 bar). +Here, \eqn{\sigma}{sigma} and \eqn{\xi}{xi} are calculated from a1, a2, a3 and a4 in \code{thermo()$obigt} at the pressure indicated by \code{P} (default 1 bar). The original motivation for writing these functions was to explore alternatives or possible modifications to the revised Helgeson-Kirkham-Flowers equations applied to aqueous nonelectrolytes. As pointed out by Schulte et al., 2001, the functional forms of the equations do not permit retrieving values of the solvation parameter (\eqn{\omega}{omega}) that closely represent the observed trends in both heat capacity and volume at high temperatures (above ca. 200 \degC). Modified: pkg/CHNOSZ/man/add.obigt.Rd =================================================================== --- pkg/CHNOSZ/man/add.obigt.Rd 2019-04-13 01:34:09 UTC (rev 434) +++ pkg/CHNOSZ/man/add.obigt.Rd 2019-04-13 02:14:18 UTC (rev 435) @@ -35,7 +35,7 @@ If \code{species} is given and matches the name(s) of species in the file, only those species are added to the database. By default, species in the file replace any existing species having the same combination of name and state. -Set \code{force} to FALSE to avoid replacing species that are present in (\code{thermo$obigt}). +Set \code{force} to FALSE to avoid replacing species that are present in (\code{thermo()$obigt}). Given the default setting of \code{E.units}, the function does not perform any unit conversions. If \code{E.units} is set to \samp{J}, then the thermodynamic parameters are converted from units of Joules to calories, as used in the CHNOSZ database. @@ -50,11 +50,11 @@ The formula is taken from the \samp{formula} argument, or if that is missing, is taken to be the same as the \samp{name} of the species. An error results if the formula is not valid (i.e. can not be parsed by\code{\link{makeup}}). Additional arguments refer to the name of the property(s) to be updated and are matched to any part of compound column names in \code{\link{thermo}$obigt}, such as \samp{z} or \samp{T} in \samp{z.T}. -Unless \samp{state} is specified as one of the properties, its value is taken from \code{thermo$opt$state}. -When adding species, properties that are not specified become NA, except for \samp{state}, which takes a default value from \code{thermo$opt$state}, and \samp{z.T}, which for aqueous species is set to the charge calculated from the chemical formula (otherwise, NA charge for newly added species would trigger the \code{\link{AkDi}} model). +Unless \samp{state} is specified as one of the properties, its value is taken from \code{thermo()$opt$state}. +When adding species, properties that are not specified become NA, except for \samp{state}, which takes a default value from \code{thermo()$opt$state}, and \samp{z.T}, which for aqueous species is set to the charge calculated from the chemical formula (otherwise, NA charge for newly added species would trigger the \code{\link{AkDi}} model). The values provided should be in the units specifed in the documentation for the \code{thermo} data object, including any order-of-magnitude scaling factors. -\code{today} returns the current date in the format adopted for \code{thermo$obigt} (inherited from SUPCRT-format data files) e.g. \samp{13.May.12} for May 13, 2012. +\code{today} returns the current date in the format adopted for \code{thermo()$obigt} (inherited from SUPCRT-format data files) e.g. \samp{13.May.12} for May 13, 2012. } \value{ Modified: pkg/CHNOSZ/man/add.protein.Rd =================================================================== --- pkg/CHNOSZ/man/add.protein.Rd 2019-04-13 01:34:09 UTC (rev 434) +++ pkg/CHNOSZ/man/add.protein.Rd 2019-04-13 02:14:18 UTC (rev 435) @@ -15,7 +15,7 @@ } \arguments{ - \item{aa}{data frame, amino acid composition in the format of \code{thermo$protein}} + \item{aa}{data frame, amino acid composition in the format of \code{thermo()$protein}} \item{protein}{character, name of protein; numeric, indices of proteins (rownumbers of \code{\link{thermo}$protein})} \item{sequence}{character, protein sequence} \item{...}{additional arguments passed to \code{\link{read.csv}}} @@ -31,7 +31,7 @@ The purpose of the functions described here is to identify proteins and work with their amino acid compositions. From the amino acid compositions, the thermodynamic properties of the proteins can be estimated by group additivity. -\code{seq2aa} returns a data frame of amino acid composition, in the format of \code{thermo$protein}, corresponding to the provided \code{sequence}. +\code{seq2aa} returns a data frame of amino acid composition, in the format of \code{thermo()$protein}, corresponding to the provided \code{sequence}. Here, the \code{protein} argument indicates the name of the protein with an underscore (e.g. \samp{LYSC_CHICK}). \code{aasum} returns a data frame representing the sum of amino acid compositions in the rows of the input \code{aa} data frame. @@ -39,9 +39,9 @@ If \code{average} is TRUE the final sum is divided by the number of input compositions. The name used in the output is taken from the first row of \code{aa} or from \code{protein} and \code{organism} if they are specified. -Given amino acid compositions returned by the \code{*aa} functions described above, \code{add.protein} adds them to \code{thermo$protein} for use by other functions in CHNOSZ. -The amino acid compositions of proteins in \code{aa} with the same name as one in \code{thermo$protein} are replaced. -The value returned by this function is the rownumbers of \code{thermo$protein} that are added and/or replaced. +Given amino acid compositions returned by the \code{*aa} functions described above, \code{add.protein} adds them to \code{thermo()$protein} for use by other functions in CHNOSZ. +The amino acid compositions of proteins in \code{aa} with the same name as one in \code{thermo()$protein} are replaced. +The value returned by this function is the rownumbers of \code{thermo()$protein} that are added and/or replaced. } \examples{ Modified: pkg/CHNOSZ/man/affinity.Rd =================================================================== --- pkg/CHNOSZ/man/affinity.Rd 2019-04-13 01:34:09 UTC (rev 434) +++ pkg/CHNOSZ/man/affinity.Rd 2019-04-13 02:14:18 UTC (rev 435) @@ -71,7 +71,7 @@ } \seealso{ -\code{\link{ionize.aa}}, activated if proteins are among the species of interest, \samp{H+} is in the basis, and \code{thermo$opt$ionize} is TRUE. +\code{\link{ionize.aa}}, activated if proteins are among the species of interest and \samp{H+} is in the basis. \code{\link{equilibrate}} for using the results of \code{affinity} to calculate equilibrium activities of species, and \code{\link{diagram}} to plot the results. } Modified: pkg/CHNOSZ/man/basis.Rd =================================================================== --- pkg/CHNOSZ/man/basis.Rd 2019-04-13 01:34:09 UTC (rev 434) +++ pkg/CHNOSZ/man/basis.Rd 2019-04-13 02:14:18 UTC (rev 435) @@ -26,7 +26,7 @@ The special names \samp{pH}, \samp{pe} and \samp{Eh} can be included in the \code{species} argument; they get translated into the names of the proton (\samp{H+}) and electron (\samp{e-}) as appropriate. The physical states or logarithms of activities of species in the basis definition can be changed by calling \code{basis} with the formulas of species that are in the basis set, or their species indices. -If either of the second or third arguments to \code{basis} is of type character, it refers to the name of a state (if present in \code{thermo$obigt$state}) or to the name of a chemical activity \code{\link{buffer}} (if present in \code{thermo$buffers$name}). +If either of the second or third arguments to \code{basis} is of type character, it refers to the name of a state (if present in \code{thermo()$obigt$state}) or to the name of a chemical activity \code{\link{buffer}} (if present in \code{thermo()$buffers$name}). If either of these arguments is numeric it specifies the logarithms of activities (or fugacities for gases) of the basis species. In case \samp{pH}, \samp{pe} or \samp{Eh} is named, the logarithm of activity of the basis species is converted from these values. For example, a value of 7 for pH is stored as a logarithm of activity of -7. @@ -57,7 +57,7 @@ } \value{ -Returns the value of \code{thermo$basis} after any modifications; or, if \code{delete} is TRUE, its value before deletion (invisibly). +Returns the value of \code{thermo()$basis} after any modifications; or, if \code{delete} is TRUE, its value before deletion (invisibly). } \seealso{ Modified: pkg/CHNOSZ/man/berman.Rd =================================================================== --- pkg/CHNOSZ/man/berman.Rd 2019-04-13 01:34:09 UTC (rev 434) +++ pkg/CHNOSZ/man/berman.Rd 2019-04-13 02:14:18 UTC (rev 435) @@ -15,7 +15,7 @@ \item{name}{character, name of mineral} \item{T}{numeric, temperature(s) at which to calculate properties (K)} \item{P}{numeric, pressure(s) at which to calculate properties (bar)} - \item{thisinfo}{dataframe, row for mineral from \code{thermo$obigt}} + \item{thisinfo}{dataframe, row for mineral from \code{thermo()$obigt}} \item{check.G}{logical, check consistency of G, H, and S?} \item{calc.transition}{logical, include calculation of polymorphic transition properties?} \item{calc.disorder}{logical, include calculation of disordering properties?} @@ -24,7 +24,7 @@ \details{ This function calculates the thermodynamic properties of minerals at high \P and \T using equations given by Berman (1988). -These minerals should be listed in \code{thermo$obigt} with the state \samp{cr} and chemical formula, and optionally an abbreviation and references, but all other properties set to NA. +These minerals should be listed in \code{thermo()$obigt} with the state \samp{cr} and chemical formula, and optionally an abbreviation and references, but all other properties set to NA. The standard state thermodynamic properties and parameters for the calculations are stored in data files under \code{extdata/Berman}, or can be read from a user-created file (if available) named \samp{berman.csv} in the working directory. @@ -43,7 +43,7 @@ The data files have the following 30 columns: \tabular{lll}{ - \code{name} \tab mineral name (must match an entry with a formula but NA properties in \code{thermo$obigt})\cr + \code{name} \tab mineral name (must match an entry with a formula but NA properties in \code{thermo()$obigt})\cr \code{GfPrTr} \tab standard Gibbs energy at 298.15 K and 1 bar (J mol\S{-1}) (Benson-Helgeson convention)\cr \code{HfPrTr} \tab standard enthalpy at 298.15 K and 1 bar (J mol\S{-1})\cr \code{SPrTr} \tab standard entropy at 298.15 K and 1 bar (J mol\S{-1} K\S{-1})\cr @@ -69,7 +69,7 @@ If \code{check.G} is TRUE, the tabulated value of \code{GfTrPr} (Benson-Helgeson) is compared with that calculated from \code{HfPrTr} - 298.15*\code{DSPrTr} (\code{DSPrTr} is the difference between the entropies of the elements in the formula and \code{SPrTr} in the table). A warning is produced if the absolute value of the difference between tabulated and calculated \code{GfTrPr} is greater than 1000 J/mol. -Providing \code{thisinfo} avoids searching for the mineral in \code{thermo$obigt}, potentially saving some running time. +Providing \code{thisinfo} avoids searching for the mineral in \code{thermo()$obigt}, potentially saving some running time. If the function is called with missing \code{name}, the parameters for all available minerals are returned. } @@ -80,7 +80,7 @@ \examples{ \dontshow{reset()} # other than the formula, the parameters aren't stored in -# thermo$obigt, so this shows NAs +# thermo()$obigt, so this shows NAs info(info("quartz", "cr")) # properties of alpha-quartz (aQz) at 298.15 K and 1 bar berman("quartz") @@ -167,7 +167,7 @@ # the curves cross at about 725 deg C (BA96 Fig. 8) # (actually, in our calculation they cross closer to 800 deg C) stopifnot(T[which.min(abs(Gex_BA96 - Gex_Ber88))] == 800) -# reset the database (thermo$opt$E.units, thermo$obigt, and thermo$opt$Berman) +# reset the database (thermo()$opt$E.units, thermo()$obigt, and thermo()$opt$Berman) reset() } Modified: pkg/CHNOSZ/man/buffer.Rd =================================================================== --- pkg/CHNOSZ/man/buffer.Rd 2019-04-13 01:34:09 UTC (rev 434) +++ pkg/CHNOSZ/man/buffer.Rd 2019-04-13 02:14:18 UTC (rev 435) @@ -13,7 +13,7 @@ } \arguments{ - \item{name}{character, name of buffer to add to or find in \code{thermo$buffers}.} + \item{name}{character, name of buffer to add to or find in \code{thermo()$buffers}.} \item{species}{character, names or formulas of species in a buffer.} \item{state}{character, physical states of species in buffer.} \item{logact}{numeric, logarithms of activities of species in buffer.} @@ -38,7 +38,7 @@ It is possible to set the logarithms of activities of the species in the buffer through the \code{logact} argument; if this is missing unit activity is assigned to crystalline species in buffer, otherwise (for aqueous species) the default value of activity is 10\eqn{^{-3}}{^-3}. If \code{name} identifies an already defined buffer, this function modifies the logarithms of activities or states of species in that buffer, optionally restricted to only those species given in \code{species}. -It is possible to assign different buffers to different basis species, in which case the order of their calculation depends on their order in \code{thermo$buffers}. +It is possible to assign different buffers to different basis species, in which case the order of their calculation depends on their order in \code{thermo()$buffers}. This function is compatible with systems of proteins, but note that for buffers \emph{made} of proteins the buffer calculations presently use whole protein formulas (instead of residue equivalents) and consider nonionized proteins only. } Modified: pkg/CHNOSZ/man/eos.Rd =================================================================== --- pkg/CHNOSZ/man/eos.Rd 2019-04-13 01:34:09 UTC (rev 434) +++ pkg/CHNOSZ/man/eos.Rd 2019-04-13 02:14:18 UTC (rev 435) @@ -18,7 +18,7 @@ \arguments{ \item{property}{character, name(s) of properties to calculate} - \item{parameters}{dataframe, species parameters as one or more rows from \code{thermo$obigt}} + \item{parameters}{dataframe, species parameters as one or more rows from \code{thermo()$obigt}} \item{T}{numeric, temperature(s) at which to calculate properties (K)} \item{P}{numeric, pressure(s) at which to calculate properties (bar)} \item{contrib}{character, which contributions to consider in the revised HKF equations equations of state: (\code{n})onsolvation, (\code{s})olvation (the \eqn{\omega}{omega} terms), or (o)rigination contributions (i.e., the property itself at 25 \degC and 1 bar). Default is \code{c("n","s","o")}, for all contributions} @@ -34,7 +34,7 @@ \code{hkf} implements the revised HKF equations of state (Helgeson et al., 1981; Tanger and Helgeson, 1988; Shock and Helgeson, 1988). The equations-of-state parameters are \code{a1}, \code{a2}, \code{a3}, \code{a4}, \code{c1}, \code{c2}, \code{omega} and \code{Z}; the units of these parameters are as indicated for \code{\link{thermo}$obigt}, without the order of magnitude multipliers. -Note that the equation-of-state parameter \code{Z} (appearing in the \eqn{g}{g}-function for the temperature derivatives of the omega parameter; Shock et al., 1992) is taken from \code{thermo$obigt} and \emph{not} from the \code{\link{makeup}} of the species. +Note that the equation-of-state parameter \code{Z} (appearing in the \eqn{g}{g}-function for the temperature derivatives of the omega parameter; Shock et al., 1992) is taken from \code{thermo()$obigt} and \emph{not} from the \code{\link{makeup}} of the species. \code{H2O.props} is an optional argument that lists the properties of water that should be returned; it is used by \code{\link{subcrt}} so that the time-consuming water calculations are only performed once. The temperature and pressure derivatives of the \code{omega} parameter for charged species (where \code{Z != 0}, but not for the aqueous proton, H+) are calculated using the \eqn{g}{g}- and \eqn{f}{f}-functions described by Shock et al., 1992 and Johnson et al., 1992. Modified: pkg/CHNOSZ/man/extdata.Rd =================================================================== --- pkg/CHNOSZ/man/extdata.Rd 2019-04-13 01:34:09 UTC (rev 434) +++ pkg/CHNOSZ/man/extdata.Rd 2019-04-13 02:14:18 UTC (rev 435) @@ -93,8 +93,8 @@ Files in \code{supcrt} contain scripts for reading and comparing SUPCRT files (including slop98.dat and newer slop files from GEOPIG (http://geopig.asu.edu)) with the database in CHNOSZ: \itemize{ \item \code{read.supcrt.R} defines the function \code{read.supcrt} that can be used to read SUPCRT files. - \item \code{compare.R} uses \code{read.supcrt} to compare data in the SUPCRT file with that in \code{thermo$obigt}. - \item \code{newnames.csv} maps names generated by \code{read.supcrt}, based on names present in the source SUPCRT files, to names used in \code{thermo$obigt}. + \item \code{compare.R} uses \code{read.supcrt} to compare data in the SUPCRT file with that in \code{thermo()$obigt}. + \item \code{newnames.csv} maps names generated by \code{read.supcrt}, based on names present in the source SUPCRT files, to names used in \code{thermo()$obigt}. } Files in \code{taxonomy} contain taxonomic data files: @@ -108,7 +108,7 @@ \item \code{obigt_check.csv} contains the results of running \code{\link{check.obigt}} to check the internal consistency of entries in the default and optional datafiles. \item \code{RH98_Table15.csv} Group stoichiometries for high molecular weight crystalline and liquid organic compounds taken from Table 15 of Richard and Helgeson, 1998. The first three columns have the \code{compound} name, \code{formula} and physical \code{state} (\samp{cr} or \samp{liq}). The remaining columns have the numbers of each group in the compound; the names of the groups (columns) correspond to species in \code{\link{thermo}$obigt}. The compound named \samp{5a(H),14a(H)-cholestane} in the paper has been changed to \samp{5a(H),14b(H)-cholestane} here to match the group stoichiometry given in the table. See \code{\link{RH2obigt}} for a function that uses this file. \item \code{DLEN67.csv} Standard Gibbs energies of formation, in kcal/mol, from Dayhoff et al., 1967, for nitrogen (N2) plus 17 compounds shown in Fig. 2 of Dayhoff et al., 1964, at 300, 500, 700 and 1000 K. See \code{demo("wjd")} and the vignette \code{wjd.Rmd} for examples that use this file. - \item \code{SK95.csv} contains thermodynamic data for alanate, glycinate, and their complexes with metals, taken from Shock and Koretsky (1995) as corrected in slop98.dat. The data are used in the package tests (\code{test-recalculate.R}) to check the recalculated values of G, H, and S in \code{thermo$obigt} using properties for alanate and glycinate from Amend and Helgeson (1997). + \item \code{SK95.csv} contains thermodynamic data for alanate, glycinate, and their complexes with metals, taken from Shock and Koretsky (1995) as corrected in slop98.dat. The data are used in the package tests (\code{test-recalculate.R}) to check the recalculated values of G, H, and S in \code{thermo()$obigt} using properties for alanate and glycinate from Amend and Helgeson (1997). } Modified: pkg/CHNOSZ/man/info.Rd =================================================================== --- pkg/CHNOSZ/man/info.Rd 2019-04-13 01:34:09 UTC (rev 434) +++ pkg/CHNOSZ/man/info.Rd 2019-04-13 02:14:18 UTC (rev 435) @@ -24,7 +24,7 @@ The searches of the indicated \code{species} are made among the names, chemical formulas, and abbreviations (in the \samp{abbrv} column) in the thermodynamic database. If the text of the \code{species} is matched the index of that species is returned. If there are multiple matches for the \code{species}, and \code{state} is NULL, the index of first match is returned. -The order of entries in \code{thermo$obigt} is grouped by states in the order \samp{aq}, \samp{cr}, \samp{gas}, \samp{liq}, so for species in both aqueous and gaseous states the index of the aqueous species is returned, unless \code{state} is set to \samp{gas}. +The order of entries in \code{thermo()$obigt} is grouped by states in the order \samp{aq}, \samp{cr}, \samp{gas}, \samp{liq}, so for species in both aqueous and gaseous states the index of the aqueous species is returned, unless \code{state} is set to \samp{gas}. Names of species including an underscore character are indicative of proteins, e.g. \samp{LYSC_CHICK}. If the name of a protein is provided to \code{info} and the composition of the protein can be found using \code{\link{protein}}, the thermodyamic properties and parameters of the nonionized protein (calculated using amino acid group additivity) are added to the thermodynamic database. @@ -33,8 +33,8 @@ If no exact matches are found, \code{info} searches the database for similar names or formulas using \code{\link{agrep}}. If any of these are found, the results are summarized on the screen, but the function always returns NA in this case. -With a numeric argument, the rows of \code{thermo$obigt} indicated by \code{ispecies} are returned, after removing any order-of-magnitude scaling factors. -If these species are all aqueous or are all not aqueous, the compounded column names used in \code{thermo$obigt} are replaced with names appropriate for the corresponding equations of state. +With a numeric argument, the rows of \code{thermo()$obigt} indicated by \code{ispecies} are returned, after removing any order-of-magnitude scaling factors. +If these species are all aqueous or are all not aqueous, the compounded column names used in \code{thermo()$obigt} are replaced with names appropriate for the corresponding equations of state. A missing value of one of the standard molal Gibbs energy (\code{G}) or enthalpy (\code{H}) of formation from the elements or entropy (\code{S}) is calculated from the other two, if available. If \code{check.it} is TRUE, several checks of self consistency among the thermodynamic properties and parameters are performed using \code{\link{checkGHS}} and \code{\link{checkEOS}}. } Modified: pkg/CHNOSZ/man/ionize.aa.Rd =================================================================== --- pkg/CHNOSZ/man/ionize.aa.Rd 2019-04-13 01:34:09 UTC (rev 434) +++ pkg/CHNOSZ/man/ionize.aa.Rd 2019-04-13 02:14:18 UTC (rev 435) @@ -12,7 +12,7 @@ } \arguments{ - \item{aa}{data frame, amino acid composition in the format of \code{thermo$protein}} + \item{aa}{data frame, amino acid composition in the format of \code{thermo()$protein}} \item{property}{character, property to calculate} \item{T}{numeric, temperature in \degC} \item{P}{numeric, pressure in bar, or \samp{Psat} for vapor pressure of \H2O above 100 \degC} @@ -36,7 +36,7 @@ \examples{\dontshow{reset()} ## Charge of LYSC_CHICK as a function of pH and T # After Fig. 10 of Dick et al., 2006 -# the rownumber of the protein in thermo$protein +# the rownumber of the protein in thermo()$protein ip <- pinfo("LYSC_CHICK") # its amino acid composition aa <- pinfo(ip) Modified: pkg/CHNOSZ/man/makeup.Rd =================================================================== --- pkg/CHNOSZ/man/makeup.Rd 2019-04-13 01:34:09 UTC (rev 434) +++ pkg/CHNOSZ/man/makeup.Rd 2019-04-13 02:14:18 UTC (rev 435) @@ -31,7 +31,7 @@ \code{makeup} will issue a warning for elemental symbols that are not present in \code{\link{thermo}$element}. \code{makeup} can handle numeric and length > 1 values for the \code{formula} argument. -If the argument is numeric, it identifies row number(s) in \code{thermo$obigt} from which to take the formulas of species. +If the argument is numeric, it identifies row number(s) in \code{thermo()$obigt} from which to take the formulas of species. If \code{formula} has length > 1, the function returns a list containing the elemental counts in each of the formulas. If \code{count.zero} is TRUE, the elemental counts for each formula include zeros to indicate elements that are only present in any of the other formulas. @@ -67,8 +67,8 @@ # these all represent a single negative charge, i.e., electron makeup("-1") makeup("Z-1+0") -makeup("Z0-1") # the "old" formula for the electron in thermo$obigt -makeup("(Z-1)") # the current formula in thermo$obigt +makeup("Z0-1") # the "old" formula for the electron in thermo()$obigt +makeup("(Z-1)") # the current formula in thermo()$obigt # hypothetical compounds with negative numbers of elements makeup("C-4(O-2)") # -4 carbon, -2 oxygen Modified: pkg/CHNOSZ/man/nonideal.Rd =================================================================== --- pkg/CHNOSZ/man/nonideal.Rd 2019-04-13 01:34:09 UTC (rev 434) +++ pkg/CHNOSZ/man/nonideal.Rd 2019-04-13 02:14:18 UTC (rev 435) @@ -61,8 +61,8 @@ \section{Neutral Species}{ For neutral species, the Setch{\eacute}now equation is used, as described in Shvarov and Bastrakov, 1999. If \code{\link{thermo}$opt$Setchenow} is \samp{bgamma0} (the default), the extended term parameter is set to zero and the only non-zero term is the mole fraction to molality conversion factor (using the value of \code{m_star}). -If \code{thermo$opt$Setchenow} is \samp{bgamma}, the extended term paramter is taken from the setting for the charged species (which can be either \samp{Bdot} or \samp{bgamma}). -Set \code{thermo$opt$Setchenow} to any other value to disable the calculations for neutral species. +If \code{thermo()$opt$Setchenow} is \samp{bgamma}, the extended term paramter is taken from the setting for the charged species (which can be either \samp{Bdot} or \samp{bgamma}). +Set \code{thermo()$opt$Setchenow} to any other value to disable the calculations for neutral species. } \section{b_gamma}{ Modified: pkg/CHNOSZ/man/protein.info.Rd =================================================================== --- pkg/CHNOSZ/man/protein.info.Rd 2019-04-13 01:34:09 UTC (rev 434) +++ pkg/CHNOSZ/man/protein.info.Rd 2019-04-13 02:14:18 UTC (rev 435) @@ -35,14 +35,14 @@ } \details{ -For character \code{protein}, \code{pinfo} returns the rownumber(s) of \code{thermo$protein} that match the protein names. +For character \code{protein}, \code{pinfo} returns the rownumber(s) of \code{thermo()$protein} that match the protein names. The names can be supplied in the single \code{protein} argument (with an underscore, denoting protein_organism) or as pairs of \code{protein}s and \code{organism}s. NA is returned for any unmatched proteins, including those for which no \code{organism} is given or that do not have an underscore in \code{protein}. -Alternatively, if \code{regexp} is TRUE, the \code{protein} argument is used as a pattern (regular expression); rownumbers of all matches of \code{thermo$protein$protein} to this pattern are returned. -When using \code{regexp}, the \code{organism} can optionally be provided to return only those entries that also match \code{thermo$protein$organism}. +Alternatively, if \code{regexp} is TRUE, the \code{protein} argument is used as a pattern (regular expression); rownumbers of all matches of \code{thermo()$protein$protein} to this pattern are returned. +When using \code{regexp}, the \code{organism} can optionally be provided to return only those entries that also match \code{thermo()$protein$organism}. -For numeric \code{protein}, \code{pinfo} returns the corresponding row(s) of \code{thermo$protein}. +For numeric \code{protein}, \code{pinfo} returns the corresponding row(s) of \code{thermo()$protein}. Set \code{residue} to TRUE to return the per-residue composition (i.e. amino acid composition of the protein divided by total number of residues). For dataframe \code{protein}, \code{pinfo} returns it unchanged, except for possibly the per-residue calculation. @@ -55,21 +55,21 @@ The amino acid compositions are multiplied by the output of \code{\link{group.formulas}} to generate the result. \code{protein.obigt} calculates the thermodynamic properties and equations-of-state parameters for the completely nonionized proteins using group additivity with parameters taken from Dick et al., 2006 (aqueous proteins) and LaRowe and Dick, 2012 (crystalline proteins and revised aqueous methionine sidechain group). -The return value is a data frame in the same format as \code{thermo$obigt}. +The return value is a data frame in the same format as \code{thermo()$obigt}. \code{state} indicates the physical state for the parameters used in the calculation (\samp{aq} or \samp{cr}). The following functions also depend on an existing definition of the basis species: \code{protein.basis} calculates the numbers of the basis species (i.e. opposite of the coefficients in the formation reactions) that can be combined to form the composition of each of the proteins. -The basis species must be present in \code{thermo$basis}, and if \samp{H+} is among the basis species, the ionization states of the proteins are included. -The ionization state of the protein is calculated at the pH defined in \code{thermo$basis} and at the temperature specified by the \code{T} argument. +The basis species must be present in \code{thermo()$basis}, and if \samp{H+} is among the basis species, the ionization states of the proteins are included. +The ionization state of the protein is calculated at the pH defined in \code{thermo()$basis} and at the temperature specified by the \code{T} argument. If \code{normalize} is TRUE, the coefficients on the basis species are divided by the lengths of the proteins. - \code{protein.equil} produces a series of messages showing step-by-step a calculation of the chemical activities of proteins in metastable equilibrium. For the first protein, it shows the standard Gibbs energies of the reaction to form the nonionized protein from the basis species and of the ionization reaction of the protein (if \samp{H+} is in the basis), then the standard Gibbs energy/RT of the reaction to form the (possibly ionized) protein per residue. The per-residue values of \samp{logQstar} and \samp{Astar/RT} are also shown for the first protein. Equilibrium calculations are then performed, only if more than one protein is specified. This calculation applies the Boltzmann distribution to the calculation of the equilibrium degrees of formation of the residue equivalents of the proteins, then converts them to activities of proteins taking account of \code{loga.protein} and protein length. If the \code{protein} argument is numeric (indicating rownumbers in \code{thermo$protein}), the values of \samp{Astar/RT} are compared with the output of \code{\link{affinity}}, and those of the equilibrium degrees of formation of the residues and the chemical activities of the proteins with the output of \code{\link{diagram}}. If the values in any of these tests are are not \code{\link{all.equal}} an error is produced indicating a bug. [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/chnosz -r 435 From noreply at r-forge.r-project.org Sat Apr 13 04:23:47 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sat, 13 Apr 2019 04:23:47 +0200 (CEST) Subject: [CHNOSZ-commits] r436 - in pkg/CHNOSZ: . vignettes Message-ID: <20190413022348.166581886EA@r-forge.r-project.org> Author: jedick Date: 2019-04-13 04:23:47 +0200 (Sat, 13 Apr 2019) New Revision: 436 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/vignettes/anintro.Rmd Log: anintro.Rmd: change thermo$ to thermo()$ Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-13 02:14:18 UTC (rev 435) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-13 02:23:47 UTC (rev 436) @@ -1,6 +1,6 @@ Date: 2019-04-13 Package: CHNOSZ -Version: 1.3.1-16 +Version: 1.3.1-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/vignettes/anintro.Rmd =================================================================== --- pkg/CHNOSZ/vignettes/anintro.Rmd 2019-04-13 02:14:18 UTC (rev 435) +++ pkg/CHNOSZ/vignettes/anintro.Rmd 2019-04-13 02:23:47 UTC (rev 436) @@ -683,7 +683,7 @@ ``` Note that chalcocite (Cu2S) undergoes phase transitions. -To get the temperatures of the phase transitions from `thermo$obigt` (in Kelvin, regardless of the `T.units()`), we can use `info()`. +To get the temperatures of the phase transitions from `thermo()$obigt` (in Kelvin, regardless of the `T.units()`), we can use `info()`. We see that at 200 ?C (473.15 K) the second phase is stable; this one is automatially used by CHNOSZ for this diagram. ```{r info_chalcocite, message=FALSE} info(info("chalcocite", c("cr", "cr2", "cr3")))$T @@ -810,10 +810,10 @@ This question relates to the concept of chemical activity buffers. In CHNOSZ there are two ways to perform buffer calculations: -1. Assign the name of a buffer (listed in `thermo$buffer`) to the basis species: +1. Assign the name of a buffer (listed in `thermo()$buffer`) to the basis species: * more versatile (multiple activities can be buffered, e.g. both S2 and O2 by pyrite-pyrrhotite-magnetite); * the buffers are active in calculations of affinity of other species; -* use `mod.buffer()` to change or add buffers in `thermo$buffer`; +* use `mod.buffer()` to change or add buffers in `thermo()$buffer`; * [`demo(buffer)`](../demo) uses it for mineral buffers (solid lines). 2. Use the `type` argument of `diagram()` to solve for the activity of the indicated basis species: * more convenient (the buffers come from the currently defined species of interest), but only a single basis species can be buffered, and it's not used in the calculation of affinity; @@ -1105,7 +1105,7 @@ Intead, invoke the calculations by setting the `IS` argument in `subcrt()` or `affinity()`. There are a few things to remember when using activity coefficients: -* H+ is assumed to behave ideally, so its activity coefficient is 1 for any ionic strength. You can calculate activity coefficients of H+ by setting `thermo$opt$ideal.H <<- FALSE`. +* H+ is assumed to behave ideally, so its activity coefficient is 1 for any ionic strength. You can calculate activity coefficients of H+ by running `thermo("opt$ideal.H" = FALSE)`. * Using `subcrt()` with `IS` not equal to zero, calculated values of `G` are the **adjusted** Gibbs energy at specified ionic strength [denoted by Δ*G*?(*I*); @Alb96]. @@ -1277,7 +1277,7 @@ When proteins in CHNOSZ are identified by name, they include an underscore, such as in `LYSC_CHICK` (chicken lysozyme C). Use `pinfo()` to search for one or more proteins by name; multiple proteins from the same organism can be specified using the `organism` argument. -The name search returns the rownumbers of `thermo$protein` (i.e. `iprotein`, the protein indices). +The name search returns the rownumbers of `thermo()$protein` (i.e. `iprotein`, the protein indices). Supply those protein indices to `pinfo()` to get the amino acid compositions: ```{r pinfo_LYSC_CHICK} p1 <- pinfo("LYSC_CHICK") @@ -1511,7 +1511,7 @@ ina <- is.na(y$abundance) ``` -Next, we get the amino acid compositions of the proteins and add them to `thermo$protein`: +Next, we get the amino acid compositions of the proteins and add them to `thermo()$protein`: ```{r add_protein_yeast, message=FALSE} aa <- yeast.aa(y$protein[!ina]) ip <- add.protein(aa) @@ -1569,7 +1569,7 @@ Because affinities of proteins often vary strongly with oxygen fugacity and other variables, it can be helpful to express the values as differences from a baseline. The following example compares the affinities for formation of transcription factors involved in embryonic dorsal-ventral patterning with that of the morphogen, Sonic hedgehog (Shh), as a function of `r logfO2` and log*a*`r h2o` [@Dic15]. -We first list the UniProt names of Shh and 10 transcription factors, and get the `iprotein` indices (rownumbers of `thermo$protein`): +We first list the UniProt names of Shh and 10 transcription factors, and get the `iprotein` indices (rownumbers of `thermo()$protein`): ```{r Shh_pname} pname <- c("SHH", "OLIG2", "NKX22", "FOXA2", "IRX3", "PAX6", "NKX62", "DBX1", "DBX2", "NKX61", "PAX7") @@ -1642,7 +1642,7 @@ In the Rubisco example above, we saw the use of `read.fasta()` to read amino acid sequences from a FASTA file. There are several other methods for inputting amino acid compositions. -R's `read.csv()` can be used to read amino acid compositions from a CSV file with the same columns that are present in `thermo$protein`. +R's `read.csv()` can be used to read amino acid compositions from a CSV file with the same columns that are present in `thermo()$protein`. Note the use of `as.is = TRUE` to prevent reading character data as factors. The `nrows` argument can be added to read that number of rows: ```{r read_csv} @@ -1738,7 +1738,7 @@ ## Adding proteins and using `iprotein` -Once the amino acid compositions have been obtained, use `add.protein()` to add these proteins to `thermo$protein`: +Once the amino acid compositions have been obtained, use `add.protein()` to add these proteins to `thermo()$protein`: ```{r add_protein} add.protein(myaa) ``` @@ -1815,7 +1815,7 @@ Consider the amino acid abundances reported by @FMM_14. Here, we identify the amino acids using their one-letter abbreviations. -Then, `aminoacids()` is used to produce the full names, which in turn are used to search `thermo$obigt` for their formulas. +Then, `aminoacids()` is used to produce the full names, which in turn are used to search `thermo()$obigt` for their formulas. `makeup()` is used to count the elements in the formulas: ```{r smoker_aa, message=FALSE} aa <- c("D", "T", "S", "E", "G", "A", "K", "H") @@ -1919,7 +1919,7 @@ ## Viewing data sources: `thermo.refs()` -The database in CHNOSZ lists one or two sources for each entry, and citation information for the sources is listed in `thermo$refs`. +The database in CHNOSZ lists one or two sources for each entry, and citation information for the sources is listed in `thermo()$refs`. You can locate and view the references with `thermo.refs()`. Running the function without any arguments opens a browser window with the complete table of references. ```{marginfigure} From noreply at r-forge.r-project.org Sat Apr 13 08:25:09 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sat, 13 Apr 2019 08:25:09 +0200 (CEST) Subject: [CHNOSZ-commits] r437 - in pkg/CHNOSZ: . vignettes Message-ID: <20190413062509.66CC218C00E@r-forge.r-project.org> Author: jedick Date: 2019-04-13 08:25:07 +0200 (Sat, 13 Apr 2019) New Revision: 437 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/vignettes/anintro.Rmd Log: anintro.Rmd: don't hard-code species index of methane Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-13 02:23:47 UTC (rev 436) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-13 06:25:07 UTC (rev 437) @@ -1,6 +1,6 @@ Date: 2019-04-13 Package: CHNOSZ -Version: 1.3.1-17 +Version: 1.3.1-18 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/vignettes/anintro.Rmd =================================================================== --- pkg/CHNOSZ/vignettes/anintro.Rmd 2019-04-13 02:23:47 UTC (rev 436) +++ pkg/CHNOSZ/vignettes/anintro.Rmd 2019-04-13 06:25:07 UTC (rev 437) @@ -253,6 +253,7 @@ info("methane") ``` +The number that is returned can be used to identify the species for other functions in CHNOSZ. Multiple entries exist for methane; the index of the `aq` (aqueous) species is returned by default. ```{marginfigure} This convention applies to organic species, but for inorganic species, the English name refers to the gas (`info("oxygen")`) while the chemical formula is used to identify the aqueous species (`info("O2")`). @@ -262,20 +263,12 @@ info("methane", "gas") ``` -```{r info_methane_test, echo=FALSE, results="hide"} -# this prevents the vignette from compiling in case -# database updates cause the species index of methane to change -stopifnot(info("methane")==881) -# it is up to the editor of this vignette to ensure that number -# is used in the hard-coded examples below! +Taking the species number of aqueous methane returned by `info()`, use the function again to retrieve the set of standard molal thermodynamic properties and equations of state parameters: +```{r info_imethane, message=FALSE} +imethane <- info("methane") +info(imethane) ``` -Knowing that aqueous methane is species number 881 in the database, you can again use `info()` to retrieve the set of standard molal thermodynamic properties and equations of state parameters: -```{r info_881, message=FALSE} -info(881) -``` - -This number can be used as an argument (`ispecies`) for other functions in CHNOSZ to uniquely identify any species; some commonly used functions also accept the species names. Liquid water is species number 1; it has NA entries in the database because specialized functions are used to compute its properties: ```{r info_info_water} info(info("water")) @@ -295,8 +288,7 @@ ``` The message includes e.g. "uracil" and "metacinnabar" because their names have some similarity to the search term. - -As "ribose" is the name of a species in the database, to find species with similar names, add an extra character to the search: +Since "ribose" is the name of a species in the database, to find species with similar names, add an extra character to the search: ```{r info_ribose} info(" ribose") ``` @@ -306,21 +298,21 @@ ## Counting elements, chemical formulas, `ZC()` Continuing with the example of methane, let's look at its chemical formula: -```{r info_881_formula, message=FALSE} -info(881)$formula +```{r info_imethane_formula, message=FALSE} +info(imethane)$formula ``` We can use `makeup()` to count the elements in the formula, followed by `as.chemical.formula()` to rewrite the formula on one line: -```{r makeup_881} -makeup(881) -as.chemical.formula(makeup(881)) +```{r makeup_imethane} +makeup(imethane) +as.chemical.formula(makeup(imethane)) ``` For organic species, a calculation of the average oxidation state of carbon (`r zc`) is possible given the species index, chemical formula, or elemental count: -```{r ZC_881, message=FALSE} -ZC(881) -ZC(info(881)$formula) -ZC(makeup(881)) +```{r ZC_imethane, message=FALSE} +ZC(imethane) +ZC(info(imethane)$formula) +ZC(makeup(imethane)) ``` # Calculating thermodynamic properties From noreply at r-forge.r-project.org Sat Apr 13 16:46:44 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sat, 13 Apr 2019 16:46:44 +0200 (CEST) Subject: [CHNOSZ-commits] r438 - in pkg/CHNOSZ: . inst inst/extdata/OBIGT man vignettes Message-ID: <20190413144644.BD3CA18CC4F@r-forge.r-project.org> Author: jedick Date: 2019-04-13 16:46:44 +0200 (Sat, 13 Apr 2019) New Revision: 438 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/inst/CHECKLIST pkg/CHNOSZ/inst/extdata/OBIGT/refs.csv pkg/CHNOSZ/man/EOSregress.Rd pkg/CHNOSZ/vignettes/obigt.bib pkg/CHNOSZ/vignettes/vig.bib Log: EOSregress.Rd: remove non-portable characters from example code Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-13 06:25:07 UTC (rev 437) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-13 14:46:44 UTC (rev 438) @@ -1,6 +1,6 @@ Date: 2019-04-13 Package: CHNOSZ -Version: 1.3.1-18 +Version: 1.3.1-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/inst/CHECKLIST =================================================================== --- pkg/CHNOSZ/inst/CHECKLIST 2019-04-13 06:25:07 UTC (rev 437) +++ pkg/CHNOSZ/inst/CHECKLIST 2019-04-13 14:46:44 UTC (rev 438) @@ -21,6 +21,9 @@ - run R CMD check using R compiled without long doubles (emulating Solaris checks on CRAN) (CFLAGS=-ffloat-store ./configure --disable-long-double) +- run R CMD check with Latin-1 locale (catches errors on CRAN's debian-clang) + LC_CTYPE=en_US R CMD check CHNOSZ_x.x.x.tar.gz + - reduce the size of vignettes: after installing/upgrading rmarkdown, replace files in rmarkdown/rmd/h/bootstrap/fonts/ with empty files Modified: pkg/CHNOSZ/inst/extdata/OBIGT/refs.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/OBIGT/refs.csv 2019-04-13 06:25:07 UTC (rev 437) +++ pkg/CHNOSZ/inst/extdata/OBIGT/refs.csv 2019-04-13 14:46:44 UTC (rev 438) @@ -37,7 +37,7 @@ SH90,"E. L. Shock and H. C. Helgeson",1990,"Geochim. Cosmochim. Acta 54, 915-945","organic species",https://doi.org/10.1016/0016-7037(90)90429-O SH90.1,"E. L. Shock and H. C. Helgeson",1990,"Geochim. Cosmochim. Acta 54, 915-945","formic acid, formate, and propanoate",https://doi.org/10.1016/0016-7037(90)90429-O BN91,"J. W. Ball and D. K. Nordstrom",1991,"User's manual for WATEQ4F, with revised thermodynamic data base and text cases for calculating speciation of major, trace, and redox elements in natural waters. USGS Open-File Report 91-183","arsenopyrite: G",https://pubs.er.usgs.gov/publication/ofr91183 -HRA91,"B. S. Hemingway et al.",1991,"Am. Mineral. 76, 445-457",bohemite,http://pubs.er.usgs.gov/publication/70016664 +HRA91,"B. S. Hemingway et al.",1991,"Am. Mineral. 76, 445-457",boehmite,http://pubs.er.usgs.gov/publication/70016664 SHD91,"D. A. Sverjensky, J. J. Hemley and W. M. D'Angelo",1991,"Geochim. Cosmochim. Acta 55, 989-1004","G and H revisions for K- and Al-bearing silicates",https://doi.org/10.1016/0016-7037(89)90341-4 SHD91.1,"D. A. Sverjensky, J. J. Hemley and W. M. D'Angelo",1991,"Geochim. Cosmochim. Acta 55, 989-1004","phlogopite: H and S modified by @Ber90, followed by G and H revision for K-bearing silicates [after @SHD91]",https://doi.org/10.1016/0016-7037(89)90341-4 SHD91.2,"D. A. Sverjensky, J. J. Hemley and W. M. D'Angelo",1991,"Geochim. Cosmochim. Acta 55, 989-1004","annite: G and H revision for K-bearing silicates [after @SHD91]",https://doi.org/10.1016/0016-7037(89)90341-4 Modified: pkg/CHNOSZ/man/EOSregress.Rd =================================================================== --- pkg/CHNOSZ/man/EOSregress.Rd 2019-04-13 06:25:07 UTC (rev 437) +++ pkg/CHNOSZ/man/EOSregress.Rd 2019-04-13 14:46:44 UTC (rev 438) @@ -140,7 +140,7 @@ opar <- par(mfrow=c(2,2)) EOSplot(d, T.max=600) title("Cp of CH4(aq), fit to 600 K") -legend("bottomleft", pch=1, legend="Hn?dkovsk? and Wood, 1997") +legend("bottomleft", pch=1, legend="Hnedkovsky and Wood, 1997") EOSplot(d, coefficients=CH4coeffs) title("Cp from EOS parameters in database") EOSplot(d, T.max=600, T.plot=600) @@ -178,7 +178,7 @@ # for both HKF and the expansivity equation # we'll fit up to a temperature limit EOSplot(d, varHKF, T.max=663, T.plot=625) -legend("bottomright", pch=1, legend="Hn?dkovsk? et al., 1996") +legend("bottomright", pch=1, legend="Hnedkovsky et al., 1996") title("V of CH4(aq), HKF equation") EOSplot(d, varal, T.max=663, T.plot=625) title("V of CH4(aq), expansivity equation") Modified: pkg/CHNOSZ/vignettes/obigt.bib =================================================================== --- pkg/CHNOSZ/vignettes/obigt.bib 2019-04-13 06:25:07 UTC (rev 437) +++ pkg/CHNOSZ/vignettes/obigt.bib 2019-04-13 14:46:44 UTC (rev 438) @@ -164,13 +164,13 @@ } @Book{HGK84, - author = {Haar, Lester and Gallagher, John S. and Kell, George S.}, - publisher = {Hemisphere Publishing Corporation}, - title = {{NBS}/{NRC} {S}team {T}ables: {T}hermodynamic and {T}ransport {P}roperties and {C}omputer {P}rograms for {V}apor and {L}iquid {S}tates of {W}ater in {SI} {U}nits}, - year = {1984}, - address = {Washington, D. C.}, - pages = {320}, - url = {http://www.worldcat.org/oclc/858456124}, + author = {Haar, Lester and Gallagher, John S. and Kell, George S.}, + publisher = {Hemisphere Publishing Corporation}, + title = {{NBS}/{NRC} {S}team {T}ables: {T}hermodynamic and {T}ransport {P}roperties and {C}omputer {P}rograms for {V}apor and {L}iquid {S}tates of {W}ater in {SI} {U}nits}, + year = {1984}, + address = {Washington, D. C.}, + pages = {320}, + url = {http://www.worldcat.org/oclc/858456124}, } @Article{HSS95, @@ -282,7 +282,6 @@ pages = {171--187}, doi = {10.1007/s00239-014-9616-1}, issn = {0022-2844}, - language = {English}, } @Article{LD12, @@ -405,14 +404,14 @@ } @Article{MVT01, - author = {Mercury, Lionel and Vieillard, Philippe and Tardy, Yves}, - journal = {Applied Geochemistry}, - title = {{T}hermodynamics of ice polymorphs and {?}ice-like{?} water in hydrates and hydroxides}, - year = {2001}, - volume = {16}, - number = {2}, - pages = {161--181}, - doi = {10.1016/S0883-2927(00)00025-1}, + author = {Mercury, Lionel and Vieillard, Philippe and Tardy, Yves}, + journal = {Applied Geochemistry}, + title = {{T}hermodynamics of ice polymorphs and {?}ice-like{?} water in hydrates and hydroxides}, + year = {2001}, + volume = {16}, + number = {2}, + pages = {161--181}, + doi = {10.1016/S0883-2927(00)00025-1}, } @Book{Pan70, @@ -722,14 +721,14 @@ } @Article{SK95, - author = {Shock, Everett L. and Koretsky, Carla M.}, - journal = {Geochimica et Cosmochimica Acta}, - title = {{M}etal-organic complexes in geochemical processes: {E}stimation of standard partial molal thermodynamic properties of aqueous complexes between metal cations and monovalent organic acid ligands at high pressures and temperatures}, - year = {1995}, - volume = {59}, - number = {8}, - pages = {1497--1532}, - doi = {10.1016/0016-7037(95)00058-8}, + author = {Shock, Everett L. and Koretsky, Carla M.}, + journal = {Geochimica et Cosmochimica Acta}, + title = {{M}etal-organic complexes in geochemical processes: {E}stimation of standard partial molal thermodynamic properties of aqueous complexes between metal cations and monovalent organic acid ligands at high pressures and temperatures}, + year = {1995}, + volume = {59}, + number = {8}, + pages = {1497--1532}, + doi = {10.1016/0016-7037(95)00058-8}, } @Article{SM93, @@ -1124,16 +1123,16 @@ } @Article{Kul06, - author = {Kulik, D. A.}, - journal = {Chemical Geology}, - title = {{D}ual-thermodynamic estimation of stoichiometry and stability of solid solution end members in aqueous?solid solution systems}, - year = {2006}, - volume = {225}, - number = {3}, - pages = {189--212}, - note = {Solid solutions: from theory to experiment}, - doi = {10.1016/j.chemgeo.2005.08.014}, - issn = {0009-2541}, + author = {Kulik, D. A.}, + journal = {Chemical Geology}, + title = {{D}ual-thermodynamic estimation of stoichiometry and stability of solid solution end members in aqueous--solid solution systems}, + year = {2006}, + volume = {225}, + number = {3}, + pages = {189--212}, + note = {Solid solutions: from theory to experiment}, + doi = {10.1016/j.chemgeo.2005.08.014}, + issn = {0009-2541}, } @Misc{BDat17, @@ -1377,7 +1376,7 @@ @Article{AP14, author = {Nikolay N. Akinfiev and Andrey V. Plyasunov}, journal = {Geochimica et Cosmochimica Acta}, - title = {{A}pplication of the {A}kinfiev?{D}iamond equation of state to neutral hydroxides of metalloids ({B}({OH})$_3$, {S}i({OH})$_4$, {A}s({OH})$_3$) at infinite dilution in water over a wide range of the state parameters, including steam conditions}, + title = {{A}pplication of the {A}kinfiev-{D}iamond equation of state to neutral hydroxides of metalloids ({B}({OH})$_3$, {S}i({OH})$_4$, {A}s({OH})$_3$) at infinite dilution in water over a wide range of the state parameters, including steam conditions}, year = {2014}, volume = {126}, pages = {338 - 351}, Modified: pkg/CHNOSZ/vignettes/vig.bib =================================================================== --- pkg/CHNOSZ/vignettes/vig.bib 2019-04-13 06:25:07 UTC (rev 437) +++ pkg/CHNOSZ/vignettes/vig.bib 2019-04-13 14:46:44 UTC (rev 438) @@ -126,7 +126,7 @@ @Article{DS11, author = {Dick, Jeffrey M. and Shock, Everett L.}, - journal = {PLoS ONE}, + journal = {PLOS One}, title = {{C}alculation of the relative chemical stabilities of proteins as a function of temperature and redox chemistry in a hot spring}, year = {2011}, volume = {6}, @@ -137,7 +137,7 @@ @Article{DS13, author = {Dick, Jeffrey M. and Shock, Everett L.}, - journal = {PLoS ONE}, + journal = {PLOS One}, title = {{A} metastable equilibrium model for the relative abundances of microbial phyla in a hot spring}, year = {2013}, volume = {8}, @@ -233,7 +233,6 @@ pages = {171--187}, doi = {10.1007/s00239-014-9616-1}, issn = {0022-2844}, - language = {English}, } @Article{LD12, @@ -451,14 +450,14 @@ } @Article{SOJSH92, - author = {Shock, Everett L. and Oelkers, Eric H. and Johnson, James W. and Sverjensky, Dimitri A. and Helgeson, Harold C.}, - journal = {Journal of the Chemical Society, Faraday Transactions}, - title = {{C}alculation of the thermodynamic properties of aqueous species at high pressures and temperatures: {E}ffective electrostatic radii, dissociation constants, and standard partial molal properties to 1000 ?{C} and 5 kbar}, - year = {1992}, - volume = {88}, - number = {6}, - pages = {803--826}, - doi = {10.1039/FT9928800803}, + author = {Shock, Everett L. and Oelkers, Eric H. and Johnson, James W. and Sverjensky, Dimitri A. and Helgeson, Harold C.}, + journal = {Journal of the Chemical Society, Faraday Transactions}, + title = {{C}alculation of the thermodynamic properties of aqueous species at high pressures and temperatures: {E}ffective electrostatic radii, dissociation constants, and standard partial molal properties to 1000 ?{C} and 5 kbar}, + year = {1992}, + volume = {88}, + number = {6}, + pages = {803--826}, + doi = {10.1039/FT9928800803}, } @Article{SS98, @@ -629,15 +628,15 @@ } @Article{MD98, - author = {Merino, Enrique and Dewers, Thomas}, - journal = {Journal of Hydrology}, - title = {{I}mplications of replacement for reaction?transport modeling}, - year = {1998}, - volume = {209}, - number = {1?4}, - pages = {137--146}, - doi = {10.1016/S0022-1694(98)00150-4}, - issn = {0022-1694}, + author = {Merino, Enrique and Dewers, Thomas}, + journal = {Journal of Hydrology}, + title = {{I}mplications of replacement for reaction--transport modeling}, + year = {1998}, + volume = {209}, + number = {1-4}, + pages = {137--146}, + doi = {10.1016/S0022-1694(98)00150-4}, + issn = {0022-1694}, } @TechReport{Wol92, From noreply at r-forge.r-project.org Sun Apr 14 05:43:01 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 14 Apr 2019 05:43:01 +0200 (CEST) Subject: [CHNOSZ-commits] r439 - in pkg/CHNOSZ: . inst inst/extdata/OBIGT inst/extdata/adds inst/extdata/thermo tests/testthat vignettes Message-ID: <20190414034301.8233518B3AB@r-forge.r-project.org> Author: jedick Date: 2019-04-14 05:42:58 +0200 (Sun, 14 Apr 2019) New Revision: 439 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/inst/extdata/OBIGT/SLOP98.csv pkg/CHNOSZ/inst/extdata/OBIGT/SUPCRT92.csv pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_aq.csv.xz pkg/CHNOSZ/inst/extdata/OBIGT/organic_aq.csv.xz pkg/CHNOSZ/inst/extdata/OBIGT/refs.csv pkg/CHNOSZ/inst/extdata/adds/obigt_check.csv pkg/CHNOSZ/inst/extdata/thermo/stoich.csv.xz pkg/CHNOSZ/tests/testthat/test-info.R pkg/CHNOSZ/vignettes/obigt.Rmd Log: move transuranic actinide complexes to SLOP98.csv Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-13 14:46:44 UTC (rev 438) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-14 03:42:58 UTC (rev 439) @@ -1,6 +1,6 @@ Date: 2019-04-13 Package: CHNOSZ -Version: 1.3.1-19 +Version: 1.3.1-20 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 =================================================================== --- pkg/CHNOSZ/inst/NEWS 2019-04-13 14:46:44 UTC (rev 438) +++ pkg/CHNOSZ/inst/NEWS 2019-04-14 03:42:58 UTC (rev 439) @@ -1,4 +1,4 @@ -CHANGES IN CHNOSZ 1.3.1-12 (2019-04-11) +CHANGES IN CHNOSZ 1.3.1-20 (2019-04-14) --------------------------------------- - Add thermo/stoich.csv.xz (loaded as thermo()$stoich), containing a @@ -25,6 +25,10 @@ - diagram(): Starting with R version 3.6.0, 'fill' can be the name of any available HCL-based color palette (see hcl.pals() for a list). +- Move transuranic actinide complexes to optional data (SLOP98), as + entropies of the elements at 298.15 K are not available to check the + self-consistency of the GHS values for the complexes. + CHANGES IN CHNOSZ 1.3.1 (2019-03-02) ------------------------------------ Modified: pkg/CHNOSZ/inst/extdata/OBIGT/SLOP98.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/OBIGT/SLOP98.csv 2019-04-13 14:46:44 UTC (rev 438) +++ pkg/CHNOSZ/inst/extdata/OBIGT/SLOP98.csv 2019-04-14 03:42:58 UTC (rev 439) @@ -1,4 +1,5 @@ name,abbrv,formula,state,ref1,ref2,date,G,H,S,Cp,V,a1.a,a2.b,a3.c,a4.d,c1.e,c2.f,omega.lambda,z.T +H2AsO3-,H2AsO3-,H2AsO3-,aq,"SH88.2 [S92]",NA,3.Jul.87,-140330,-170840,26.4,-2.9,26.4,5.7934,6.3646,3.2485,-3.0421,15.8032,-3.6253,1.2305,-1 Ag(Ac),NA,AgCH3COO,aq,"SK93.1 [S98]",NA,17.Aug.92,-70840,-91650,38.9,72.5,48.6,8.3987,12.7257,0.7485,-3.305,48.3694,11.73,-0.03,0 Ag(Ac)2-,NA,Ag(CH3COO)2-,aq,"SK93.1 [S98]",NA,17.Aug.92,-158990,-210560,49.9,164.9,103.5,16.2287,31.8418,-6.7592,-4.0952,110.8373,30.5473,0.8741,-1 Cu(Ac),NA,CuCH3COO,aq,"SK93.1 [S98]",NA,19.Aug.92,-76770,-99970,28.7,85.5,40.5,7.3009,10.0483,1.7946,-3.1943,56.0175,14.3883,-0.03,0 @@ -57,11 +58,58 @@ ZnO,ZnO,ZnO,aq,"SSWS97.5 [S98]",NA,14.Nov.97,-67420,-78290,-2,-10,-21.9,-1.2418,-10.8072,9.9819,-2.3321,0.0295,-5.0715,-0.03,0 HZnO2-,HZnO2-,HZnO2-1,aq,"SSWS97.5 [S98]",NA,14.Nov.97,-110720,-142370,-16,20,-13.4,0.5623,-6.4047,8.2588,-2.5141,35.0874,1.0394,1.8669,-1 ZnO2-2,ZnO2-2,ZnO2-2,aq,"SSWS97.5 [S98]",NA,14.Nov.97,-93290,-132100,-40,-15,-26.4,-0.5559,-9.1347,9.3301,-2.4013,32.5837,-6.09,3.8216,-2 +Am+3,Am+3,Am+3,aq,"MS99 [S07]",NA,11.Feb.98,-142900,-147400,-48.9,NA,NA,-2.9531,-14.9848,11.6223,-2.1594,6.5235,-10.327,2.3161,3 +AmOH+2,AmOH+2,AmOH+2,aq,"MS99 [S07]",NA,11.Feb.98,-190845,-186550,-2.5,NA,NA,2.7959,-0.9559,6.128,-2.7394,-4.8573,-10.0418,1.0929,2 +AmO+,AmO+,AmO+,aq,"MS99 [S07]",NA,27.Jun.98,-180340,-171250,13.6,NA,NA,2.8674,-0.7813,6.0593,-2.7466,-35.6706,-18.5768,0.3444,1 +HAmO2,HAmO2,HAmO2,aq,"MS99 [S07]",NA,27.Jun.98,-221190,-206620,48.7,NA,NA,5.0241,4.4881,3.981,-2.9644,-73.2025,-30.534,-0.03,0 +AmF+2,AmF+2,AmF+2,aq,"MS99 [S07]",NA,11.Feb.98,-214880,-220920,-14.2,NA,NA,-2.8891,-14.828,11.5598,-2.1659,19.5254,-2.4822,1.2776,2 +AmF2+,AmF2+,AmF2+,aq,"MS99 [S07]",NA,11.Feb.98,-285490,-302130,-10,NA,NA,-2.6218,-14.1804,11.3162,-2.1927,16.1668,-1.8012,0.7003,1 +AmF3,AmF3(AQ),AmF3,aq,"MS99 [S07]",NA,14.Jan.99,-355030,-386410,-19.6,NA,NA,-2.3562,-13.5317,11.0616,-2.2196,-9.286,-8.2838,-0.03,0 +AmF4-,AmF4-,AmF4-,aq,"MS99 [S07]",NA,14.Jan.99,-423020,-474140,-46,NA,NA,-0.9839,-10.1809,9.7446,-2.3581,-26.7871,-21.93,2.3239,-1 +AmCl+2,AmCl+2,AmCl+2,aq,"MS99 [S07]",NA,27.Jun.98,-175710,-184780,-22,NA,NA,-0.2357,-8.3539,9.0265,-2.4336,18.1703,-3.3178,1.3914,2 +AmCl2+,AmCl2+,AmCl2+,aq,"MS99 [S07]",NA,14.Jan.99,-207730,-224330,-5,NA,NA,2.8832,-0.7385,6.0333,-2.7484,9.7834,-3.7964,0.6305,1 +AmCl3,AmCl3(AQ),AmCl3,aq,"MS99 [S07]",NA,18.Jan.99,-237720,-264600,2.8,NA,NA,6.4188,7.8944,2.6402,-3.1053,-19.2952,-11.7628,-0.03,0 +AmCl4-,AmCl4-,AmCl4-,aq,"MS99 [S07]",NA,18.Jan.99,-268230,-308380,0.5,NA,NA,11.1715,19.4992,-1.921,-3.585,-48.4478,-27.2169,1.6238,-1 +AmNO3+2,AmNO3+2,AmNO3+2,aq,"MS99 [S07]",NA,27.Jun.98,-171220,-204070,-32,NA,NA,1.3476,-4.4881,7.507,-2.5934,33.6975,1.6122,1.5372,2 +Am(NO3)2+,Am(NO3)2+,Am(NO3)2+,aq,"MS99 [S07]",NA,18.Jan.99,-198330,-256390,-4.6,NA,NA,6.1236,7.1736,2.9235,-3.0755,43.5785,7.9761,0.6223,1 +AmNO2+2,AmNO2+2,AmNO2+2,aq,"MS99 [S07]",NA,27.Jun.98,-153470,-178190,-29.3,NA,NA,0.7899,-5.8466,8.0341,-2.5372,25.9108,-0.9964,1.5067,2 +AmH2PO4+2,AmH2PO4+2,AmH2PO4+2,aq,"MS99 [S07]",NA,27.Jun.98,-417130,-460840,-25.7,NA,NA,1.632,-3.7971,7.2436,-2.6219,43.0978,5.166,1.4477,2 +AmSCN+2,AmSCN+2,AmSCN+2,aq,"MS99 [S07]",NA,27.Jun.98,-122510,-136050,-31.7,NA,NA,2.2644,-2.2529,6.636,-2.6858,41.0941,4.183,1.5372,2 +Am(SCN)2+,Am(SCN)2+,Am(SCN)2+,aq,"MS99 [S07]",NA,22.Jan.99,-100420,-120030,-4.5,NA,NA,8.0619,11.9065,1.0633,-3.2712,61.241,14.1151,0.6223,1 +Am(SCN)3,Am(SCN)3(AQ),Am(SCN)3,aq,"MS99 [S07]",NA,22.Jan.99,-78480,-104000,23.2,NA,NA,14.6427,27.9751,-5.2524,-3.9354,70.5618,19.4692,-0.03,0 +Am(HCO3)+2,Am(HCO3)+2,Am(HCO3)+2,aq,"MS99 [S07]",NA,22.Jan.99,-286460,-315940,-26.6,NA,NA,0.7185,-6.0241,8.1108,-2.5299,41.5986,4.614,1.4574,2 +Am(ClO4)+2,Am(ClO4)+2,Am(ClO4)+2,aq,"MS99 [S07]",NA,22.Jan.99,-147420,-189870,-35.8,NA,NA,3.4489,0.6429,5.4904,-2.8055,45.5927,5.5441,1.6005,2 +AmCO3+,AmCO3+,AmCO3+,aq,"MS99 [S07]",NA,19.Jul.98,-279730,-280130,103.7,NA,NA,-1.7286,-11.9966,10.4522,-2.283,-38.6375,-15.6435,-1.0199,1 +Am(CO3)2-,Am(CO3)2-,Am(CO3)2-,aq,"MS99 [S07]",NA,19.Jul.98,-412070,-370270,84.7,NA,NA,0,0,0,0,60.6334,14.891,0.3461,-1 +AmSO4+,AmSO4+,AmSO4+,aq,"MS99 [S07]",NA,19.Jul.98,-326080,-314020,-12.4,NA,NA,1.5392,-4.0158,7.3119,-2.6129,-20.9484,-14.6047,0.7384,1 +Am(SO4)2-,Am(SO4)2-,Am(SO4)2-,aq,"MS99 [S07]",NA,19.Jul.98,-506130,-485990,-4.5,NA,NA,4.6821,3.6494,4.3193,-2.9298,-25.2191,-18.8824,1.6997,-1 +Am(Ac)+2,Am(Ac)+2,AmCH3COO+2,aq,"MS99 [S07]",NA,22.Jan.99,-235220,-266700,-25.2,NA,NA,2.8878,-0.7273,6.0289,-2.7489,57.3678,10.1565,1.4382,2 +Am(Ac)2+,Am(Ac)2+,Am(CH3COO)2+,aq,"MS99 [S07]",NA,22.Jan.99,-326360,-385560,-4.1,NA,NA,9.4478,15.2906,-0.2668,-3.4111,102.206,28.3793,0.6143,1 +Am(Ac)3,Am(Ac)3(AQ),Am(CH3COO)3,aq,"MS99 [S07]",NA,22.Jan.99,-416630,-505490,10.6,NA,NA,16.8468,33.3569,-7.3677,-4.1579,142.1213,44.3415,-0.03,0 +Am(Lac)+2,Am(Lac)+2,AmCH3CH2OCO2+2,aq,"MS99 [S07]",NA,25.Jan.99,-269140,-319200,-30.5,NA,NA,5.0696,4.6,3.935,-2.9691,80.3905,17.9069,1.5168,2 +Am(Lac)2+,Am(Lac)2+,Am(CH3CH2OCO2)2+,aq,"MS99 [S07]",NA,25.Jan.99,-396460,-489730,-4.2,NA,NA,14.0044,26.4165,-4.6398,-3.871,155.4532,46.8867,0.6143,1 +Am(For)+2,Am(For)+2,AmCHO2+2,aq,"MS99 [S07]",NA,25.Jan.99,-230530,-252410,-25.8,NA,NA,0.9287,-5.5108,7.909,-2.5511,26.7819,-0.505,1.4477,2 +Am(For)2+,Am(For)2+,Am(CHO2)2+,aq,"MS99 [S07]",NA,25.Jan.99,-317720,-357420,-4,NA,NA,5.2992,5.1607,3.7147,-2.9923,28.9586,2.9204,0.6143,1 +Am(Prop)+2,Am(Prop)+2,AmCH3CH2CO2+2,aq,"MS99 [S07]",NA,25.Jan.99,-233450,-275460,-28,NA,NA,4.8782,4.1327,4.1187,-2.9498,84.5913,19.4948,1.4769,2 +Am(Prop)2+,Am(Prop)2+,Am(CH3CH2CO2)2+,aq,"MS99 [S07]",NA,25.Jan.99,-322480,-401070,-3.9,NA,NA,13.6283,25.4982,-4.2788,-3.833,166.3624,50.6784,0.6143,1 +Am(But)+2,Am(But)+2,AmCH3(CH2)2CO2+2,aq,"MS99 [S07]",NA,25.Jan.99,-231320,-283770,-30.4,NA,NA,6.9922,9.2945,2.0899,-3.1632,99.7521,24.6365,1.5168,2 +Am(But)2+,Am(But)2+,Am(CH3CH2CH2CO2)2+,aq,"MS99 [S07]",NA,25.Jan.99,-318540,-416630,-4.2,NA,NA,18.0692,36.3415,-8.5407,-4.2813,201.6874,62.9565,0.6143,1 +Am(Glyc)+2,Am(Glyc)+2,AmCH3OCO2+2,aq,"MS99 [S07]",NA,25.Jan.99,-267840,-307400,-27.8,NA,NA,2.8119,-0.9126,6.1017,-2.7412,58.0507,10.2699,1.4769,2 +Am(Glyc)2+,Am(Glyc)2+,Am(CH3OCO2)2+,aq,"MS99 [S07]",NA,25.Jan.99,-391490,-465260,-3.9,NA,NA,9.2598,14.8314,-0.0864,-3.3921,102.9852,28.6502,0.6143,1 Al(Ac)+2,NA,AlCH3COO+2,aq,"SK93.1 [S98]",NA,5.Apr.93,-207630,-249130,-66.1,72.2,-0.03,2.4411,-1.8235,6.4722,-2.7035,67.0012,11.6689,2.0115,2 Al(Ac)2+,NA,Al(CH3COO)2+,aq,"SK93.1 [S98]",NA,5.Apr.93,-298430,-372080,-59.8,168.7,49.4,8.9971,14.1844,0.1805,-3.3653,117.86,31.3303,1.3918,1 Al(Ac)3,NA,Al(CH3COO)3,aq,"SK93.1 [S98]",NA,5.Apr.93,-391100,-498280,-57,NA,NA,16.0545,31.4184,-6.597,-4.0777,156.5453,49.3293,-0.03,0 Al(Mal)+,NA,AlC3H2O4+,aq,"PSK99.1 [S07]",NA,24.Aug.06,-289589,-331497,-16,-17.9,0,0,0,0,0,2.2763,-6.6807,0.7895,1 Al(Oxal)+,NA,AlC2O4+,aq,"PSK99.1 [S07]",NA,24.Aug.06,-286615,-321675,-25.6,-25.8,0,0,0,0,0,-1.0645,-8.29,0.9437,1 +PuO2(Oxal),NA,PuO2C2O4,aq,"PSK99 [S07]",NA,24.Aug.06,-347049,-388846,12.9,15.8,0,0,0,0,0,16.6355,0.1839,0.1446,0 +Pu(Oxal)+2,NA,PuC2O4+2,aq,"PSK99 [S07]",SLOP07.1,24.Aug.06,-285533,-322634,-36,7.1,0,0,0,0,0,23.7073,-1.5882,1.6004,2 +PuO2(Succ),NA,PuO2C4H4O4,aq,"PSK99 [S07]",NA,24.Aug.06,-352253,-410929,21.5,38.6,0,0,0,0,0,28.909,4.8282,0.0144,0 +Am(Oxal)+,NA,AmC2O4+,aq,"PSK99 [S07]",NA,24.Aug.06,-313961,-342092,-6.1,-28.9,0,0,0,0,0,-5.36,-8.9214,0.6472,1 +Cm(Oxal)+,NA,CmC2O4+,aq,"PSK99 [S07]",NA,24.Aug.06,-311797,-340287,-6.3,-28.8,0,0,0,0,0,-5.3012,-8.9011,0.6472,1 +Np(Oxal)+2,NA,NpC2O4+2,aq,"PSK99 [S07]",NA,24.Aug.06,-290553,-324602,-41.8,6.8,0,0,0,0,0,24.2778,-1.6493,1.6897,2 +NpO2(Oxal),NA,NpO2C2O4,aq,"PSK99 [S07]",CHNOSZ.4,24.Aug.06,-327304,-365780,23.7,17.8,0,0,0,0,0,22.4362,0.5913,0.6983,0 +NpO2(Succ),NA,NpO2C4H4O4,aq,"PSK99 [S07]",CHNOSZ.4,24.Aug.06,-334413,-389768,32.3,40.6,0,0,0,0,0,39.4934,5.2356,1.1402,0 +NpO2(Glut),NA,NpO2C5H6O4,aq,"PSK99 [S07]",NA,24.Aug.06,-356890,-419969,39,51.4,0,0,0,0,0,34.195,7.4356,-0.2506,0 NaH2AsO4,NA,NaH2AsO4,aq,MA07,MA10,12.Sep.07,-240179,-272608,41.2,37.8,41.1,7.3772,10.2352,1.1421,-3.2022,27.9202,4.6622,-0.038,0 KH2AsO4,NA,KH2AsO4,aq,MA07,MA10,12.Sep.07,-244935,-274352,54.5,21.9,52.4,8.9277,14.0226,-0.484,-3.3587,18.6125,1.4173,-0.038,0 MgH2AsO4+,NA,MgH2AsO4+,aq,MA07,MA10,12.Sep.07,-290910,-332717,-10.4,50.7,18.3,4.5105,3.2335,4.1483,-2.9127,42.265,7.2899,0.7009,1 @@ -114,6 +162,8 @@ PbH2AsO3+,NA,PbH2AsO3+,aq,MA07,MA10,12.Sep.07,-153138,-174063,42.8,24.7,16.5,3.9918,1.9667,4.6922,-2.8603,19.6811,2.0039,-0.1047,1 AlH2AsO3+2,NA,AlH2AsO3+2,aq,MA07,MA10,12.Sep.07,-266611,-309612,-55.5,25.5,-15.6,0.2882,-7.0795,8.5761,-2.4864,38.8545,2.1567,1.929,2 FeH2AsO3+2,NA,FeH2AsO3+2,aq,MA07,MA10,12.Sep.07,-154392,-192413,-39.1,56.8,-7.3,1.3321,-4.5295,7.4813,-2.5918,54.8314,8.5274,1.6797,2 +NpCrO4+2,NA,NpCrO4+2,aq,AML10.1,NA,03.Jul.10,-308402,-340807,-24.124,69.28,-8.1,1.1484,-4.9783,7.674,-2.5732,60.0623,11.0783,1.4532,2 +AmCrO4+2,NA,AmCrO4+2,aq,AML10.1,NA,03.Jul.10,-327893,-348491,32.276,-31.77,3.75,2.297,-2.1728,6.4695,-2.6892,-11.8592,-9.5056,0.0552,2 PdCl+,PdCl+,PdCl+,aq,"SS98a.3 [S98]",NA,16.Aug.15,3310,-3820,-3.9,21,5.1,2.6729,-1.2577,6.2503,-2.7269,24.1532,1.2501,0.6143,1 PdCl2,PdCl2,PdCl2,aq,"SS98a.3 [S98]",NA,16.Aug.15,-34080,-51390,4.2,37.8,32.4,6.1933,7.3404,2.8664,-3.0824,28.0429,4.665,-0.03,0 PdCl3-,PdCl3-,PdCl3-,aq,"SS98a.3 [S98]",NA,16.Aug.15,-68390,-98890,2.5,44.6,62.9,10.9057,18.8497,-1.6645,-3.5581,46.9452,6.0491,1.5895,-1 Modified: pkg/CHNOSZ/inst/extdata/OBIGT/SUPCRT92.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/OBIGT/SUPCRT92.csv 2019-04-13 14:46:44 UTC (rev 438) +++ pkg/CHNOSZ/inst/extdata/OBIGT/SUPCRT92.csv 2019-04-14 03:42:58 UTC (rev 439) @@ -178,7 +178,6 @@ stilbite,Stb,NaCa2(Al5Si13)O36*14H2O,cr,"HDNB78 [S92]",NA,5.May.78,NA,NA,399.3,NA,649.91,390.55,137.68,-49.84,0,0,0,0,848 stilbite,Stb,NaCa2(Al5Si13)O36*14H2O,cr2,"HDNB78 [S92]",CHNOSZ.1,5.May.78,-11.741,NA,395.63,NA,649.91,400.12,118.9,-41.74,0,0,0,0,1000 talc,Tcl,Mg3Si4O10(OH)2,cr,"HDNB78 [S92]",NA,5.May.78,-1320188,-1410920,62.34,NA,136.25,82.482,41.614,-13.342,0,0,0,0,800 -H2AsO3-,H2AsO3-,H2AsO3-,aq,"SH88.2 [S92]",NA,3.Jul.87,-140330,-170840,26.4,-2.9,26.4,5.7934,6.3646,3.2485,-3.0421,15.8032,-3.6253,1.2305,-1 tremolite,Tr,(Ca2Mg5)Si8O22(OH)2,cr,"HDNB78 [S92]",SPRONS92.2,15.Mar.90,-2770245,-2944038,131.19,NA,272.92,188.222,57.294,-44.822,0,0,0,0,800 wairakite,Wai,Ca(Al2Si4)O12*2H2O,cr,"HDNB78 [S92]",SPRONS92.2,15.Mar.90,-1477432,-1579333,105.1,NA,186.87,100.4,44.47,-16.43,0,0,0,0,1000 wollastonite,Wo,CaSiO3,cr,"HDNB78 [S92]",SPRONS92.2,15.Mar.90,-369225,-389590,19.6,NA,39.93,26.64,3.6,-6.52,0,0,0,0,1400 Modified: pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_aq.csv.xz =================================================================== --- pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_aq.csv.xz 2019-04-13 14:46:44 UTC (rev 438) +++ pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_aq.csv.xz 2019-04-14 03:42:58 UTC (rev 439) @@ -1,4 +1,4 @@ -?7zXZ???F!t/???????]7I??b???9??????TB;q?"?q???cL;?"??R ???o>??V`??KD?$?0C???Jh?W?????>??????:?j?-?x??R?SU??? R?H???k?u}??R9"?0?0S?R??(?Vi?AiP???5e\km"?????5? --9ap??5???yc?????????? K???4?;??zl??y???@&.IPO??07????????G??)??~?????_????*!????hfh?????_?kz???0%SFh/vK?]??[L?viC??E?5?i/?#?,x:M??????g??????lk?????24??????%eJ??km??????6DRQ\s???{B??????H? ?v??8B????}/&!h?????6P?O?=0?@???{"??????T}F=?T???? }?b??`/Ok~??????U? ???????d???`?? ?-"??2?|?^O???6??h?!? -o???????/????T%a???'?. R????.DS& -?m?c=????????.=3}`?A?=??_6???-?_???F?E????j{k??m>y??R?)???xn?Q8????Q??Z?M@? -?? ? ?Y??Zh?k??V?5W??h???pj?H3 ????bx???[?????? ??? ?????e ??P???z?i??????8.??b???B??u?,t*?t???wW?????B???a?:?Z???[?????.kT?G:r?n??C????1 b! -? ???;BZR??`j??????@zz -????_6?Z?????he???lg?e?? -?E??]"??/?+v_????b?????^x\^DbB???5?@x6,?I?????D;??kTv????????N?x 00?`??????UCT?M??Kd??%???cw)???WI??????????zB?2?&?.?l ????4x???_?_??|h?>???_?l,?#t??[??R:?X??2??V??;!%??Z???c?,bQ1? # -,t?;??Q??Q^?????????? -?yiH+????p????>????s`}?r????!7;?-En?e}?_??????=????x~G?1????c?i?9 jQ??8?? ??F?S?Z????m????Q?)_?|???T?3?,VJ??I~/(?!???2r???w???)?dsvtV?????V???-N0???.6?'??A?(?y????:+dJ?y?k???%??H??7B?V?,??????TN????I????Z?v?nS#?<]?&???X~??t?D????-???w6??@n?>?? ?^?@C??????8?N{???h?3n???E????0=?e?t? -?!?>? ?vG9???~??Z(??,6?????lH??<y=????1??"]???{???h?? -?+fA?2;?m?wVH?)?oa bOC????c?@???y?b?7'J??D??u??FH??(?&b????yU????tqc???/??6#?ZB?>+??U.?+?????I??O?Z@)???6??~H?W?0?Z? ???=??j??r??'??????&t{? ?|? -????whY?3oL????sC?C?\ i?>fJ??,uL?j?"g=???,&???Kz? E????K??? -*??:????.h]e?T?????????qrm??{???z? ???{`?&??????{?$;??[??L?A^?????+??V?O??`t??u^??=?@-?p~??j???RQ??q??&??Pu??M??&?3?:=?I,??U?\D$???!V`?F:??cw?(?#R6K?S????cJ??9??k7a????|B?/?m?i[[A???J???H???? ?[?A?P;?ey??c "?GZ?3??????3?.????y?^?U?9K/???u{?????????]?e9? w???????????tA{????? -?a????h?5<`?? +|??[a??\??v??N\????}B???E??~??%??>3?X) t0?%???? ?ao????#L>???gn^^lw??f???y??X%?ili?x:?fS49?2:?????o??????3c??\??\!?={o????>/???sA??????:?]4?W??????e?(9???"???7z???????? ?tW9?n?Q?D?H.??&?S??S????R?&.??i??(??????x=?GG??[s???"@?H??/A???n??O??}a4???dt? o?JJ7??9???a?\????v6????>U?k??jl?7.?YJ?Z?!K?? -???s(?????? )? ??(E ?p???O???G????i?Je;y???A95??4??????#?$????/1??"?UGA?????W+s???K???X?? -?67yY?a|?uZ?I?;?p?_ ??Q?Ml???wj4?. -2N???=???x????6??msjK?p ?-?b?c?+??uXw)?{faZ?J??m:|??`??al ???2??????????\5E?R?mh+A???K?Gxt????H?_??\?????#???^?+Y?????rJbu?S??v?|?r????Qv)?hJ5R" -)H?\??9 ????A0?>R?M ^?$l?`?L? .??Jl(O??%\c9&?? ?ncwRQ???-?O????????? -?}????b9'???w5??qk>??????g~p????#??7?? ???Q??G?3?! D?;M??\??z/?????:?1????c?hD?????????j????Y?>A?ok?i?????????g???:???(??K?E? -:???!d??3??7J???A??E?]?~?4???????r???<???U???F&~??T???\B????r\_??6????c?UT???6??V???Q2M_?!|??8 ? ??3??????~??????vo???5enN?2??? +4?Z7E?Y=??O? +Nn???????==?0?c?D?)N??g= +??:?'????4z$u"?*?t&?%??M???~??_?Q????0J3?8?????)C{?5??m??C)F? +?S???>t?;M??}???????KA????ys??6/z?@Ge?Tp???=Bg???=?? ]???p?{3_U)[??~????3P???????cO?i?J \?k????j??g????3C)???oz;?J??H????Ayh??^v]?7? +Nk?4????uw?????6?w?T????_??@aQ??R??|,??H????Y?BM?kUJ??.wm?????Bs?c??~s?k??1??f?????b??sbt??>*HN??????_qs}?????,????JeP?????^??V??8??U?t *K??Frk?0OR|???( ?1??m?8?"???Jx?*?{??????? /?:J??,;X?> ++????XMy?y??z????_GZ  ?C??<? &?? ??????????????.???K9????o?gqJ>q?~??2???????>???e1]?b??????%????5????_$Q??[?9?T?b5??? +?>'?i?:,_V 1e.???}?H??3.??;?B????gpDG?I N???qh?~? +?u +??Y?=???}f?|V?Z?,DBN?_??,??[????,RZ???UZ?/??0Ep9??;C????S +?????L??x????O?wLv??HaEZ??????????G? +k????v???+d??@? ??W3??? ??;?1?|"?'????d@??? p.?6?P????i!?????CD[???5)=q??9Z????'9???$O??S8~Kg???-{O??\a?GL?'9?-`??*T?J???]??\xX}~?x?? ??{??????zg?>_HZ????S??`???4?/?????hU%?'?? +J?E?s?;ac?aj[?????spC????f*?M???@Z??l??{??9???:Y?D ??,8"B$??Q`?:4????%????????"?'??????\?i???r??}Ke??KPs??l?vWPc??k?M (??SA?[=??b ?P?4???????W??-????N??/W??XY:V}?@b5??:???????1???g?A?#???X??????F??o?Q?(p??c88??,??????h?t/???76~?7???\A?p|???0???? H????Vd?8?U+??T?Z?M?????x????i???+o??T????C*c/Y??w??|????_???fV_w?"N?m??%?Z??.?????Y???? ?P*$???B8=?[L??)?/h???:???6?S???"??E?:k???a9??x??U?l?~# +?S%o????k?? ?T??r$x??? +?? +??? D=t?J???????g??5?s?jY ?K$??4?u6mn??ej??-I?6N??*c??,$??~??WG?k?Q??o?~???w??T???Xv????v=f,???Y ?U0:p]?Z???B?|?t>Q?|*????s*:0????V?k???? +t?~???\D?M?4???\?a)?f??r???? ? /?????V?W??C!Ai????x?'?????6???J?'?????!??( ??La?0F ?y?JnZ*??x69Y??:>?????i??x'?a?????l??_?????G?????1??5?7N|?Z;8`f6?a?a??<'sH??4?:???????;????r???#r?t??>~4#??U?4??rP????\ ?'L?To??&?? +???2H? ??01???d?%?8g??l???~?????EH'??fu?e??UA??\?????JI: ?????`?b??k??n??3MM??_g?e?Zt????+??P?~????.p?_]??dX?/A?9?-???*?????G?? +?????M????/;?j??????"?sE9?.v?JjK?!?t????PL??g????????&Ko(??6??R???J???2??N?@??(?9?????????? +_Pm???`??????.p?RE?vP??Z??????H*9gFy? +??C??,????yb?{?5k?##~??&?a ????U<~???wH?C?@???zj3??i??V?7???rID?&?I?6=?-!?L??rO*? \???????oP????"?2???X????tSi>]??9*?o~H???1 +O~`??K=?? ? +t? +< ??????yD?????~?????4????0???`?4cO?nC?L? +?8?(?:M????a???6p??y?S??6?X(?-????Paq???n?T?&g{0?M"e????W?\?? +q?????J?*8?#Q?@?q~?l???5???? ???$(?4?L???qf:-}???a*?~%??9???(??vQI????em?$??4?M???????L48??V?[} ?@X/(???????M?R????`????L?????!j??3d:d?????YH?x?t9H?M?E?C'Ax??Q?\[Q?[N?w|E?l?2?{(?Nj??g?E~?????G9c5???Di?????|??d??N?"?}?k?d??U9?ht?? +MD????g!?r?< +Hb|?WdB???????@??????r#&?????????5?>:??g~??f????t??? ?dQ??6?e=n!!k.+g???E?#.?| U?I Iq?R)???@? P?>??RM??????B???):#?k? ???7???"8???;?)l>S?k+?Nc6?<<??? ???Y?a?|o?????Uc? S?{?p0Tp???S???i?E?Vd??R???Fl?7??`?=?[??Fv??8?2?{???~?K?k%??? +?pq}u< +tCa??ko?????????9?$??P????H???c?=Pm??6??[??w.?7??p????X?@???3???c?c??w)1??} ?????=J???b??/?;??.="?i ???f?h?};?N???f????"?y??uMO???q^Nd?Q?)?t?gp?L??????Dk?}u???&k??????6)????????f Dl?t?pA???????? x!#???0N???????? ?V?q??P?@o?*?~ ??!?~?&??????x?{;??Q(T?{????~W??U?@?? r?&?3??f1(\F?^??=W ???J???e???g???Z????h?5_}???9G?? ?`~t?K? -+A??n???[?H??B??Xf?-?+??%W??\??,5Y?Q?????:O??'9c???+k???,{???R?iCb?@3???9I5?%H -???+$U/??&`??U?t???????}??[??I1^?t???@????(Jy??!.????W???q?=O???????-??I??h?6n"$qz04h?L8?+???.??#???"V???j?Y?u/?????&L?}??[?v??s?*+?? :??????M?e?vu????z???&????h??ep? ?? ?q???~?Q???m ?o,G?{?+DA???????~??1j?????-?#?L1Wt?e?????i???H????#0<|uH,?R????}?? ?0?????H???b??????fL?8?????;|h?????4lo????/r??;????????`?m2??K:?a!?gx?m ?n??5vqB_??f ?!L! 9wIj??quk?T;??.m??:????{??4?????{??o?? ?tQ?????'a???o??p?R?P??g&U?4?L??X,b?????k?v?h???Az???D?z??`?? <?? ?tn9?R??%?r???H???PVY??;?o??r6???@5?????5?+??e?????Y?H??e?"?F?*???o??w??????B???oT0/???" ??-????[?zB bj?U????GWmZ?|????????~Oo?$?p~zjMr6 \Aq -H1??P?9[7?S?!r?:J;??O\!????Z?tgY??!u??>?yJ[S=_?Kg|T at 5>??Vt??h?'_?y3???L9?W?K"??1?Hc?g???jp???4?B?Vy???Y??f?A(U6????l9p\?????_?????b?pi??8?????a????,c???????S??????)?c`]??ql??????n?r??@??y??:?3m?E{??????N???f??L?[?.k??x?,??M4m???o???????E4?]???cs?m?Lg?t7???*?t???O?jJ?:??i;???b}?K?t?????????#-???k??SD?U2?+?PXh$@???s??? -??O????Vm\s??????2???|CU??%?M7k??h??=???u?z?N=??^!T????DQv?J8r~?????q?????S5,??s??Uu??????H^???}Kd?H???? -e?E????W?????+?XT????F??/?|)+v? {?????????b????8?3??hk/???6Ztdw??v`???????L6???X>1?S??i -q?W?Qve????????B,*?e???#]?32??}?b? -b?|?????0t??:?bl??e??,? s??1????????f?#???{;??Q?'??Q??Cf??@?ba???????????????R?z?-???J???0????\k-??$?\ -"Ec_i~+??r????=w?TY????K;??)??N?=s??Y?? (??K1FF?J??C??R???6S?4?E???r????/?\?&lV??Xs???GS??j?H??_^???^?&?c?#??Q??Ip?"?T(??}??? Bm /??+??.? ?YItd[J??6-Rg????zd7maN*?ED%??$?<,???W/KJ??i??????q??0?=????m?:?&%N?Pj?a??_?R)????qwA?}????[=???+R?.?(?? ??U'.g???+x?I??+ ?a??~?^?T??-?tfg????-????W?M?`;>??=#??5?<&?D?????-??????D;??C?;^?y???9?? -9{??????EQ??_X???P?TM??f"?JP{\?(?????A?G'12N?\?????????_p?*??)n???We?????Y?sW?'??r_T_?:?|??,?g?~???x?l?6???fB?QS2?M???o?????T???lw?m??jM??A?~?? ?????L?~??.?7N??U??7?8 ???#????0?6??^???c?JL?a??+v?v??? -???F??aT7????????y?O?<3??Y?a~?+??D?????_&????--}?MQ???Mz??#?m=W??L+??@#?@??P -?cgB+!?x6? ?#??????"?r???V@:???f?WCRa?9\?'??(?V`??qy?}?S?.?s??????y?}?Mn?l} ??????<+????/? -?$?FuB?~??x?tA??(??()??3;,~?92<(?&??V~?|4i-?8f???Jg???x?K?}}??5]5a8f?E????)????Q????dj?T8Fw????]?V+H?1?{??9???M?N?? ?R???K????l%??????f?vv???Y?t?1Kn??h8 @3???Ye?/W?F@?,i?:A??k????\g? m????~???;??i???9?0L????.????q?(;????N???<:??4?) s???=?g???kI???7??l+?0-???PG???F?p?>,H?? ??*@?????j??:r]?y"???2??r*B?R -^??:?\ry?xbB?6? -???%??h? - ?P?? -?D????6?s?? ?????Y`?qD??? -N|=??V??fMsYLQw????i?x? l?g\?VNm???0?????? -9U$???????,3???????c?Y?H?\{??7?s?k?=]????Y>???????O??e???.?L?r??Y?Jbz???!T??/??"y??Z]g?J?T?E1??o?? ???????zr??n?5+???w? -I[e^}??b???;?2.Y?8kh???%?=E??????????N82?;?w?????)z??,?N????8??s(???$?\?}+?,14m?8E }??????*?????{??v7?????????:!???R8nwyR??*pL?8Hsn6?2C?A?????????,'???h??AJ?v? -S???=?T?b??YH?|B/?;????[?CC??i?,?[?B??8q -??K??4??O?`#]?g?x?y???? ?,?oO???c?AP8?????&`??H??K?| - ?????1?N;^??^ba$bl?K????5?Ix@[!???T ???a?}W -??2?d???+l???M???9???X??*n?)H8g?????j? ??J? ?#??W;??????O2?u??????NKz??? ????m??`?p"2VVi?2???#=a??si?^??~?W???????????????%?T????r???R????&?~??@?[???^?O???_?X?WS:M?????i?)??U+?w????S???\x??g?g?j/`#ys?:???_?aPZGC??T???Vu?2?}??????????!@/S??|????????? -]? -?@?B???{I??!????q.G]CP?>?Z???x[???o+???v?P?????:???B?J??Pu????Gs1?s)?? ????kC??|:?7?????#'??{}??jyE9?N?$?????#??Q??zMm???_??$?l? ?s-???HM???B?u10e? +??[?C>??+?U?o?o??@???< ?>?C??.?aGA,k?!??P???+ AS??f?W;??`o9???(?F1JN??n ??aX????????HC??p-M??.K>?oK??'*?}?~!P??;e!8????8???N???????? )[j{Qoth?=i????5? ?o&??L-H?uZ??S(???j????\??m"*?Jc?iwR??l?4'??????PZ??#????d~??bn???t??????ZN?Q.??????S3?F_m????&? ? ??{?m\??????i???@|h????????O2?v?|Dg?5????K?m??F&A?'?1??"?6`?????????%I +|9?, ? ?Z???? __=f?VMc?d?K?f$?u???? ?4?Ec????????8??? T'ZTP@?!NH??^CT%?????vHt??)U?6??z?OQ?A_???|?E??)?JT?@??+?MoI?????%????"? ???,??Z +??T???2????#?r[? [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/chnosz -r 439 From noreply at r-forge.r-project.org Mon Apr 15 05:05:20 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 15 Apr 2019 05:05:20 +0200 (CEST) Subject: [CHNOSZ-commits] r440 - in pkg/CHNOSZ: . R demo inst man Message-ID: <20190415030520.DDF3618D2BE@r-forge.r-project.org> Author: jedick Date: 2019-04-15 05:05:20 +0200 (Mon, 15 Apr 2019) New Revision: 440 Added: pkg/CHNOSZ/demo/contour.R Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/R/examples.R pkg/CHNOSZ/demo/00Index pkg/CHNOSZ/demo/affinity.R pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/man/examples.Rd Log: add demo/contour.R - gold solubility contours on logfO2-pH diagram Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-14 03:42:58 UTC (rev 439) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-15 03:05:20 UTC (rev 440) @@ -1,6 +1,6 @@ -Date: 2019-04-13 +Date: 2019-04-15 Package: CHNOSZ -Version: 1.3.1-20 +Version: 1.3.1-21 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/examples.R =================================================================== --- pkg/CHNOSZ/R/examples.R 2019-04-14 03:42:58 UTC (rev 439) +++ pkg/CHNOSZ/R/examples.R 2019-04-15 03:05:20 UTC (rev 440) @@ -29,7 +29,7 @@ demos <- function(which=c("sources", "protein.equil", "affinity", "NaCl", "density", "ORP", "revisit", "findit", "ionize", "buffer", "protbuff", "yeastgfp", "glycinate", - "mosaic", "copper", "solubility", "gold", "wjd", "bugstab", "Shh", "saturation", + "mosaic", "copper", "solubility", "gold", "contour", "wjd", "bugstab", "Shh", "saturation", "adenine", "DEW", "lambda", "TCA", "go-IU", "bison", "AkDi"), save.png=FALSE) { # run one or more demos from CHNOSZ with ask=FALSE, and return the value of the last one for(i in 1:length(which)) { Modified: pkg/CHNOSZ/demo/00Index =================================================================== --- pkg/CHNOSZ/demo/00Index 2019-04-14 03:42:58 UTC (rev 439) +++ pkg/CHNOSZ/demo/00Index 2019-04-15 03:05:20 UTC (rev 440) @@ -15,6 +15,7 @@ copper Another example of mosaic(): complexation of copper with glycine species solubility Solubility of calcite and CO2(gas) as a function of pH gold Solubility of gold +contour Gold solubility contours on log fO2 - pH diagram wjd Gibbs energy minimization: prebiological atmospheres and cell periphery of yeast dehydration log K of dehydration reactions; SVG file contains tooltips and links bugstab Formation potential of microbial proteins in colorectal cancer Modified: pkg/CHNOSZ/demo/affinity.R =================================================================== --- pkg/CHNOSZ/demo/affinity.R 2019-04-14 03:42:58 UTC (rev 439) +++ pkg/CHNOSZ/demo/affinity.R 2019-04-15 03:05:20 UTC (rev 440) @@ -1,6 +1,7 @@ ## affinities of metabolic reactions ## after Amend and Shock, 2001, Fig. 7 -## Amend, J. P. and Shock, E. L. (2001) Energetics of overall metabolic reactions of thermophilic and hyperthermophilic Archaea and Bacteria. \emph{FEMS Microbiol. Rev.} \bold{25}, 175--243. \url{https://doi.org/10.1016/S0168-6445(00)00062-0} +## Amend, J. P. and Shock, E. L. (2001) Energetics of overall metabolic reactions of thermophilic and hyperthermophilic Archaea and Bacteria. +## FEMS Microbiol. Rev. 25, 175--243. https://doi.org/10.1016/S0168-6445(00)00062-0 # use aq state for all basis species (including O2) basis(c("CO2", "H2", "NH3", "O2", "H2S", "H+"), "aq") # we're going to make H2O @@ -44,7 +45,8 @@ ## 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. \emph{Science} \bold{281}, 1659--1662. \url{https://doi.org/10.1126/science.281.5383.1659} +## Amend, J. P. and Shock, E. L. (1998) Energetics of amino acid synthesis in hydrothermal ecosystems. +## Science 281, 1659--1662. https://doi.org/10.1126/science.281.5383.1659 # select the basis species and species of interest # and set their activities, first for the 18 degree C case basis(c("H2O", "CO2", "NH4+", "H2", "H+", "H2S"), Added: pkg/CHNOSZ/demo/contour.R =================================================================== --- pkg/CHNOSZ/demo/contour.R (rev 0) +++ pkg/CHNOSZ/demo/contour.R 2019-04-15 03:05:20 UTC (rev 440) @@ -0,0 +1,39 @@ +# CHNOSZ/demo/contour.R +# gold solubility contours on logfO2-pH diagram +# 20181107 initial version +# 20190415 cleanup for demo + +# After Williams-Jones et al., 2009, Fig. 3 +# doi:10.2113/gselements.5.5.281 + +# define temperature (degrees C), pressure (bar), grid resolution +T <- 250 +P <- 500 +res <- 600 +# make smooth (TRUE) or sharp (FALSE) transitions between basis species +blend <- TRUE + +# set up system +basis(c("Au", "Cl-", "H2S", "H2O", "oxygen", "H+")) +species(c("Au(HS)2-", "AuHS", "AuOH", "AuCl2-")) +# this get us close to total S = 0.01 m +basis("H2S", -2) +# calculate solution composition for 1 mol/kg NaCl +NaCl <- NaCl(T = T, P = P, m_tot=1) +basis("Cl-", log10(NaCl$m_Cl)) +# calculate affinity with changing basis species +bases <- c("H2S", "HS-", "HSO4-", "SO4-2") +m <- mosaic(bases, pH = c(2, 10, res), O2 = c(-41, -29, res), T = T, P = P, IS = NaCl$IS, blend = blend) +# calculate and plot solubility +s <- solubility(m$A.species) +diagram(s, type="loga.balance") +# show predominance fields +diagram(m$A.bases, add=TRUE, col = "red", col.names = "red", limit.water = FALSE, lty = 2, italic = TRUE) +diagram(m$A.species, add=TRUE, col = "blue", col.names = "blue", limit.water = FALSE, lwd = 2, bold = TRUE) +# add legend and title +dP <- describe.property(c("T", "P"), c(250, 500)) +legend("top", dP, bty = "n") +dNaCl <- expression(NaCl == 1~mol~kg^-1) +dS <- expression(sum(S) ~"in basis" == 0.01~mol~kg^-1) +legend("topright", c(dNaCl, dS), bty = "n") +title(main = ("After Williams-Jones et al., 2009, Fig. 3"), font.main = 1) Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2019-04-14 03:42:58 UTC (rev 439) +++ pkg/CHNOSZ/inst/NEWS 2019-04-15 03:05:20 UTC (rev 440) @@ -1,4 +1,4 @@ -CHANGES IN CHNOSZ 1.3.1-20 (2019-04-14) +CHANGES IN CHNOSZ 1.3.1-21 (2019-04-15) --------------------------------------- - Add thermo/stoich.csv.xz (loaded as thermo()$stoich), containing a @@ -29,6 +29,8 @@ entropies of the elements at 298.15 K are not available to check the self-consistency of the GHS values for the complexes. +- Add demo/contour.R for gold solubility contours on logfO2-pH diagram. + CHANGES IN CHNOSZ 1.3.1 (2019-03-02) ------------------------------------ Modified: pkg/CHNOSZ/man/examples.Rd =================================================================== --- pkg/CHNOSZ/man/examples.Rd 2019-04-14 03:42:58 UTC (rev 439) +++ pkg/CHNOSZ/man/examples.Rd 2019-04-15 03:05:20 UTC (rev 440) @@ -16,8 +16,9 @@ demos(which = c("sources", "protein.equil", "affinity", "NaCl", "density", "ORP", "revisit", "findit", "ionize", "buffer", "protbuff", "yeastgfp", "glycinate", "mosaic", "copper", - "solubility", "gold", "wjd", "bugstab", "Shh", "saturation", - "adenine", "DEW", "lambda", "TCA", "go-IU", "bison", "AkDi"), + "solubility", "gold", "contour", "wjd", "bugstab", "Shh", + "saturation", "adenine", "DEW", "lambda", "TCA", "go-IU", + "bison", "AkDi"), save.png=FALSE) } @@ -47,6 +48,7 @@ \code{copper} \tab Another example of \code{\link{mosaic}}: complexation of Cu with glycine (Aksu and Doyle, 2001) \cr \code{solubility} \tab Solubility of calcite (cf. Manning et al., 2013) and \CO2 (cf. Stumm and Morgan, 1996) \cr \code{gold} \tab Solubility of gold (Akinfiev and Zotov; 2001; Stef{\aacute}nsson and Seward, 2004; Williams-Jones et al., 2009) \cr + \code{contour} \tab Gold solubility contours on log fO2 - pH diagram (Williams-Jones et al., 2009) \cr \code{wjd} \tab \eqn{G}{G} minimization: prebiological atmospheres (Dayhoff et al., 1964) and cell periphery of yeast \cr \code{dehydration} \tab \logK of dehydration reactions; SVG file contains tooltips and links \cr \code{bugstab} \tab Formation potential of microbial proteins in colorectal cancer (Dick, 2016) \cr From noreply at r-forge.r-project.org Mon Apr 15 06:26:30 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 15 Apr 2019 06:26:30 +0200 (CEST) Subject: [CHNOSZ-commits] r441 - in pkg/CHNOSZ: . R inst man Message-ID: <20190415042630.ED83A18D313@r-forge.r-project.org> Author: jedick Date: 2019-04-15 06:26:29 +0200 (Mon, 15 Apr 2019) New Revision: 441 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/R/affinity.R pkg/CHNOSZ/R/eqdata.R pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/man/eqdata.Rd Log: eqdata(): add partial support for EQ3/6 version 8.0a Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-15 03:05:20 UTC (rev 440) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-15 04:26:29 UTC (rev 441) @@ -1,6 +1,6 @@ Date: 2019-04-15 Package: CHNOSZ -Version: 1.3.1-21 +Version: 1.3.1-22 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 2019-04-15 03:05:20 UTC (rev 440) +++ pkg/CHNOSZ/R/affinity.R 2019-04-15 04:26:29 UTC (rev 441) @@ -259,6 +259,8 @@ vars[[iH]] <- "pH" vals[[iH]] <- -args$vals[[iH]] } + # use the variable names for the vals list 20190415 + names(vals) <- vars # content of return value depends on buffer request if(return.buffer) return(c(tb, list(vars=vars, vals=vals))) Modified: pkg/CHNOSZ/R/eqdata.R =================================================================== --- pkg/CHNOSZ/R/eqdata.R 2019-04-15 03:05:20 UTC (rev 440) +++ pkg/CHNOSZ/R/eqdata.R 2019-04-15 04:26:29 UTC (rev 441) @@ -5,18 +5,65 @@ # 20110516 use grand summary of solid phases, handle data blocks # with blank rows, add progress messages, get activity of water # 20110805 add mineral saturation states and speciation summaries +# 20190415 add detection of version 7 or 8 eqdata <- function(file, species, property="log act", outfile=TRUE) { - # the available properties for different types of data: - # solid phases, aqueous species, mineral saturation states, speciation summary - props <- list( - solid = c("product", "log moles", "moles", "grams", "volume, cc"), - aqueous = c("species", "moles", "grams", "conc", "log conc", "log g", "log act"), - mineral = c("affinity, kcal"), - speciation = c("molal conc", "per cent") - ) + # first read the entire file + lines <- readLines(file) + cat(paste("eqdata: read", length(lines), "lines from", file, "\n")) + # detect version 7 or 8 + # grep for "ersion" to match "version" or "Version" + vline <- lines[grep("ersion", lines)[1]] + version <- strsplit(vline, "ersion ")[[1]][2] + v <- substr(version, 1, 1) + if(!v %in% c("7", "8")) stop("EQ3/6 version", version, "is unsupported") + if(v=="7") { + # the available properties for different types of data: + # solid phases, aqueous species, mineral saturation states, speciation summary + props <- list( + solid = c("product", "log moles", "moles", "grams", "volume, cc"), + aqueous = c("species", "moles", "grams", "conc", "log conc", "log g", "log act"), + mineral = c("affinity, kcal"), + speciation = c("molal conc", "per cent") + ) + # header lines that begin the result block for this data type + headers <- list( + # summary of solid product phases + #solid = " product log moles moles", + # grand summary of solid phases + solid = " phase/end-member log moles moles", + aqueous = " species moles grams", + mineral = " mineral affinity, kcal state", + speciation = paste("aqueous species accounting for 99% or more of",species) + ) + # lines that let us know the data block has ended + enders <- list( + solid = "--- mineral saturation state summary ---", + aqueous = "--- major aqueous species contributing to mass balances ---", + mineral = "--- summary of gas species ---", + speciation = "- - - - - - - - - - - - - - - - - - - - - - -" + ) + } + + # This code does not completely support version 8. + # TODO: add headers for solid, mineral, and speciation blocks + # FIXME: getziT() does not work + if(v=="8") { + props <- list( + aqueous = c("Species", "Molality", "Log Molality", "Log Gamma", "Log Activity") + ) + headers <- list( + aqueous = " Species Molality" + ) + enders <- list( + aqueous = "Species with molalities less than" + ) + # change the default property="log act" to "Log Activity" + if(property=="log act") property <- "Log Activity" + } + ## process the 'property' argument to ## figure out the data type for the requested property # match property to each list element of props @@ -38,24 +85,7 @@ if(length(species) > 1) stop("speciation data can only be had for a single basis species") } - # header lines that begin the result block for this data type - headers <- list( - # summary of solid product phases - #solid = " product log moles moles", - # grand summary of solid phases - solid = " phase/end-member log moles moles", - aqueous = " species moles grams", - mineral = " mineral affinity, kcal state", - speciation = paste("aqueous species accounting for 99% or more of",species) - ) header <- headers[[itype]] - # lines that let us know the data block has ended - enders <- list( - solid = "--- mineral saturation state summary ---", - aqueous = "--- major aqueous species contributing to mass balances ---", - mineral = "--- summary of gas species ---", - speciation = "- - - - - - - - - - - - - - - - - - - - - - -" - ) ender <- enders[[itype]] ## done processing 'property' argument @@ -151,9 +181,6 @@ } # put it all together - # first read the entire file - lines <- readLines(file) - cat(paste("eqdata: read", length(lines), "lines from", file, "\n")) # get the line numbers where the data blocks start # without fixed=TRUE this fails for e.g. zn+2 !! ihead <- grep(header, lines, fixed=TRUE) Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2019-04-15 03:05:20 UTC (rev 440) +++ pkg/CHNOSZ/inst/NEWS 2019-04-15 04:26:29 UTC (rev 441) @@ -1,4 +1,4 @@ -CHANGES IN CHNOSZ 1.3.1-21 (2019-04-15) +CHANGES IN CHNOSZ 1.3.1-22 (2019-04-15) --------------------------------------- - Add thermo/stoich.csv.xz (loaded as thermo()$stoich), containing a @@ -31,6 +31,9 @@ - Add demo/contour.R for gold solubility contours on logfO2-pH diagram. +- In the output of affinity(), the list of 'vals' (the values of the + input variables) now has names corresponding to the variables. + CHANGES IN CHNOSZ 1.3.1 (2019-03-02) ------------------------------------ Modified: pkg/CHNOSZ/man/eqdata.Rd =================================================================== --- pkg/CHNOSZ/man/eqdata.Rd 2019-04-15 03:05:20 UTC (rev 440) +++ pkg/CHNOSZ/man/eqdata.Rd 2019-04-15 04:26:29 UTC (rev 441) @@ -6,7 +6,7 @@ Extract computational results for aqueous species, solid phases, mineral saturation states, or speciation summaries at each step of reaction progress in an EQ6 output file. The results are written to a comma-separated value file that can be read by other programs. The function has been tested with output files generated by EQ3/6 version 7.1 running on a Unix platform. -Currently it does not work for files generated by later versions. +Currently there is only partial support for version 8.0a (reading data from aqueous species blocks). } \usage{ From noreply at r-forge.r-project.org Mon Apr 15 08:46:08 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 15 Apr 2019 08:46:08 +0200 (CEST) Subject: [CHNOSZ-commits] r442 - in pkg/CHNOSZ: . R inst man Message-ID: <20190415064608.61CBE18CBA0@r-forge.r-project.org> Author: jedick Date: 2019-04-15 08:46:07 +0200 (Mon, 15 Apr 2019) New Revision: 442 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/R/examples.R pkg/CHNOSZ/R/util.plot.R pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/man/util.plot.Rd Log: thermo.axis(): add 'grid' argument (also usable in diagram()) Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-15 04:26:29 UTC (rev 441) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-15 06:46:07 UTC (rev 442) @@ -1,6 +1,6 @@ Date: 2019-04-15 Package: CHNOSZ -Version: 1.3.1-22 +Version: 1.3.1-23 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/examples.R =================================================================== --- pkg/CHNOSZ/R/examples.R 2019-04-15 04:26:29 UTC (rev 441) +++ pkg/CHNOSZ/R/examples.R 2019-04-15 06:46:07 UTC (rev 442) @@ -6,7 +6,7 @@ # run all the examples in CHNOSZ documentation .ptime <- proc.time() topics <- c("thermo", "examples", - "util.array", "util.blast", "util.data", "util.expression", + "util.array", "util.blast", "util.data", "util.expression", "util.plot", "util.fasta", "util.formula", "util.matrix", "util.misc", "util.seq", "util.units", "util.water", "taxonomy", "info", "retrieve", "add.obigt", "protein.info", "hkf", "water", "IAPWS95", "subcrt", "berman", Modified: pkg/CHNOSZ/R/util.plot.R =================================================================== --- pkg/CHNOSZ/R/util.plot.R 2019-04-15 04:26:29 UTC (rev 441) +++ pkg/CHNOSZ/R/util.plot.R 2019-04-15 06:46:07 UTC (rev 442) @@ -3,7 +3,7 @@ thermo.plot.new <- function(xlim,ylim,xlab,ylab,cex=par('cex'),mar=NULL,lwd=par('lwd'),side=c(1,2,3,4), mgp=c(1.7,0.3,0),cex.axis=par('cex'),col=par('col'),yline=NULL,axs='i',do.box=TRUE, - las=1,xline=NULL, ...) { + las=1,xline=NULL, grid = "", col.grid = "gray", ...) { # start a new plot with some customized settings thermo <- get("thermo", CHNOSZ) # 20120523 store the old par in thermo$opar @@ -31,8 +31,8 @@ if(is.null(yline)) yline <- mgp[1] thermo.axis(ylab,side=2,line=yline,cex=cex.axis,lwd=NULL) # (optional) tick marks - if(1 %in% side) thermo.axis(NULL,side=1,lwd=lwd) - if(2 %in% side) thermo.axis(NULL,side=2,lwd=lwd) + if(1 %in% side) thermo.axis(NULL,side=1,lwd=lwd, grid = grid, col.grid = col.grid) + if(2 %in% side) thermo.axis(NULL,side=2,lwd=lwd, grid = grid, col.grid = col.grid) if(3 %in% side) thermo.axis(NULL,side=3,lwd=lwd) if(4 %in% side) thermo.axis(NULL,side=4,lwd=lwd) } @@ -198,13 +198,19 @@ # with some default style settings (rotation of numeric labels) # With the default arguments (no labels specified), it plots only the axis lines and tick marks # (used by diagram() for overplotting the axis on diagrams filled with colors). -thermo.axis <- function(lab=NULL,side=1:4,line=1.5,cex=par('cex'),lwd=par('lwd'),col=par('col')) { +thermo.axis <- function(lab=NULL,side=1:4,line=1.5,cex=par('cex'),lwd=par('lwd'),col=par('col'), grid = "", col.grid="gray") { if(!is.null(lwd)) { - ## plot major tick marks and numeric labels for(thisside in side) { + + ## get the positions of major tick marks and make grid lines + at <- axis(thisside,labels=FALSE,tick=TRUE) + if(grid %in% c("major", "both") & thisside==1) abline(v = at, col=col.grid) + if(grid %in% c("major", "both") & thisside==2) abline(h = at, col=col.grid) + ## plot major tick marks and numeric labels do.label <- TRUE if(missing(side) | (missing(cex) & thisside %in% c(3,4))) do.label <- FALSE at <- axis(thisside,labels=do.label,tick=TRUE,lwd=lwd,col=col,col.axis=col) + ## plot minor tick marks # the distance between major tick marks da <- abs(diff(at[1:2])) @@ -242,6 +248,9 @@ daxt <- (axt - myusr[1])/di daxt <- (daxt-round(daxt))*di at <- at + daxt + ## get the positions of major tick marks and make grid lines + if(grid %in% c("minor", "both") & thisside==1) abline(v = at, col=col.grid, lty = 3) + if(grid %in% c("minor", "both") & thisside==2) abline(h = at, col=col.grid, lty = 3) tcl <- par('tcl') * 0.5 axis(thisside,labels=FALSE,tick=TRUE,lwd=lwd,col=col,col.axis=col,at=at,tcl=tcl) } Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2019-04-15 04:26:29 UTC (rev 441) +++ pkg/CHNOSZ/inst/NEWS 2019-04-15 06:46:07 UTC (rev 442) @@ -1,4 +1,4 @@ -CHANGES IN CHNOSZ 1.3.1-22 (2019-04-15) +CHANGES IN CHNOSZ 1.3.1-23 (2019-04-15) --------------------------------------- - Add thermo/stoich.csv.xz (loaded as thermo()$stoich), containing a @@ -34,6 +34,10 @@ - In the output of affinity(), the list of 'vals' (the values of the input variables) now has names corresponding to the variables. +- In diagram(), a background grid corresponding to major and/or minor + tick marks can be added using the 'grid' argument. Or, use + thermo.axis() after diagram() to overlay a grid. + CHANGES IN CHNOSZ 1.3.1 (2019-03-02) ------------------------------------ Modified: pkg/CHNOSZ/man/util.plot.Rd =================================================================== --- pkg/CHNOSZ/man/util.plot.Rd 2019-04-15 04:26:29 UTC (rev 441) +++ pkg/CHNOSZ/man/util.plot.Rd 2019-04-15 06:46:07 UTC (rev 442) @@ -20,9 +20,9 @@ mar = NULL, lwd = par("lwd"), side = c(1,2,3,4), mgp = c(1.7, 0.3, 0), cex.axis = par("cex"), col = par("col"), yline = NULL, axs = "i", do.box = TRUE, las = 1, - xline = NULL, ...) + xline = NULL, grid = "", col.grid = "gray", ...) thermo.axis(lab = NULL, side = 1:4, line = 1.5, cex = par("cex"), - lwd = par("lwd"), col = par("col")) + lwd = par("lwd"), col = par("col"), grid = "", col.grid = "gray") label.plot(x, xfrac = 0.05, yfrac = 0.95, paren = FALSE, italic = FALSE, ...) usrfig() @@ -51,6 +51,8 @@ \item{do.box}{logical, draw a box around the plot?} \item{las}{numeric, style for axis labels} \item{xline}{numeric, margin line on which to plot \eqn{x}{x}-axis name} + \item{grid}{character, type of grid (\samp{major}, \samp{minor}, or \samp{both})} + \item{col.grid}{character, color of the grid lines} \item{...}{further arguments passed to \code{par} or \code{mtext}} \item{lab}{character, axis label} \item{line}{numeric, margin line on which to place axis label or plot title} @@ -75,6 +77,9 @@ \code{yline}, if present, denotes the margin line (default \code{\link{par}('mgp')[1]}) where the y-axis name is plotted. \code{thermo.axis} is the function that actually adds the axes, including inward-pointing major and minor tick marks (often used for thermodynamic property diagrams). +Use \code{grid} to add a grid to the plot, corresponding to either the major ticks (solid lines), minor ticks (dashed lines), or both. +The grid can be made by adding \code{grid} argument to \code{\link{diagram}}, or by calling \code{thermo.axis} after \code{diagram} (see example). + \code{water.lines} plots lines representing the oxidation and reduction stability limits of water on Eh/pe/\logfO2/\logfH2 vs pH/\T/\P diagrams. The x- and y-variables and their ranges are taken from \code{eout}. Values of \T, \P, pH, and \logaH2O, not corresponding to either axis, are also taken from \code{eout}. @@ -104,4 +109,22 @@ \code{\link{diagram}} uses \code{thermo.plot.new} to set up a new plot, unless the argument \code{tplot} is set to FALSE in \code{diagram}. } +\examples{ +basis(c("H2S", "H2O", "H+", "e-")) +species(c("HS-", "H2S", "HSO4-", "SO4-2")) +a <- affinity(pH = c(0, 12), Eh = c(-1, 1), T = 200) +opar <- par(mfrow=c(2, 2)) +diagram(a, grid = "both") +title(main = 'diagram(a, grid = "both")') +diagram(a, grid = "major") +title(main = 'diagram(a, grid = "major")') +diagram(a, grid = "minor") +title(main = 'diagram(a, grid = "minor")') +diagram(a, fill = "set3") +thermo.axis(grid = "major", col.grid = "slategray") +title(main = 'thermo.axis(grid = "major")') +par(thermo()$opar) +par(opar) +} + \concept{Utility functions} From noreply at r-forge.r-project.org Mon Apr 15 11:20:57 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 15 Apr 2019 11:20:57 +0200 (CEST) Subject: [CHNOSZ-commits] r443 - in pkg/CHNOSZ: . R demo inst man vignettes Message-ID: <20190415092057.CF1E218B777@r-forge.r-project.org> Author: jedick Date: 2019-04-15 11:20:57 +0200 (Mon, 15 Apr 2019) New Revision: 443 Added: pkg/CHNOSZ/demo/arsenic.R Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/R/diagram.R pkg/CHNOSZ/R/examples.R pkg/CHNOSZ/demo/00Index pkg/CHNOSZ/demo/go-IU.R pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/man/diagram.Rd pkg/CHNOSZ/man/examples.Rd pkg/CHNOSZ/vignettes/obigt.Rmd Log: add demo/arsenic.R (Eh-pH diagram after Lu and Zhu, 2011) Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-15 06:46:07 UTC (rev 442) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-15 09:20:57 UTC (rev 443) @@ -1,6 +1,6 @@ Date: 2019-04-15 Package: CHNOSZ -Version: 1.3.1-23 +Version: 1.3.1-24 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/diagram.R =================================================================== --- pkg/CHNOSZ/R/diagram.R 2019-04-15 06:46:07 UTC (rev 442) +++ pkg/CHNOSZ/R/diagram.R 2019-04-15 09:20:57 UTC (rev 443) @@ -550,7 +550,7 @@ if(is.null(fill) | length(fill)==0) fill <- "transparent" else if(isTRUE(fill[1]=="rainbow")) fill <- rainbow(ngroups) else if(isTRUE(fill[1] %in% c("heat", "terrain", "topo", "cm"))) fill <- get(paste0(fill[1], ".colors"))(ngroups) - else if(getRversion() >= "3.6.0") { + else if(getRversion() >= "3.6.0" & length(fill)==1) { # choose an HCL palette 20190411 # matching adapted from hcl.colors() fx <- function(x) tolower(gsub("[-, _, \\,, (, ), \\ , \\.]", "", x)) Modified: pkg/CHNOSZ/R/examples.R =================================================================== --- pkg/CHNOSZ/R/examples.R 2019-04-15 06:46:07 UTC (rev 442) +++ pkg/CHNOSZ/R/examples.R 2019-04-15 09:20:57 UTC (rev 443) @@ -29,7 +29,7 @@ demos <- function(which=c("sources", "protein.equil", "affinity", "NaCl", "density", "ORP", "revisit", "findit", "ionize", "buffer", "protbuff", "yeastgfp", "glycinate", - "mosaic", "copper", "solubility", "gold", "contour", "wjd", "bugstab", "Shh", "saturation", + "mosaic", "copper", "arsenic", "solubility", "gold", "contour", "wjd", "bugstab", "Shh", "saturation", "adenine", "DEW", "lambda", "TCA", "go-IU", "bison", "AkDi"), save.png=FALSE) { # run one or more demos from CHNOSZ with ask=FALSE, and return the value of the last one for(i in 1:length(which)) { Modified: pkg/CHNOSZ/demo/00Index =================================================================== --- pkg/CHNOSZ/demo/00Index 2019-04-15 06:46:07 UTC (rev 442) +++ pkg/CHNOSZ/demo/00Index 2019-04-15 09:20:57 UTC (rev 443) @@ -13,6 +13,7 @@ glycinate Metal-glycinate complexes mosaic Eh-pH diagram for iron oxides, sulfides and carbonate with two sets of changing basis species copper Another example of mosaic(): complexation of copper with glycine species +arsenic Another example of mosaic(): Eh-pH diagram for the system As-O-H-S solubility Solubility of calcite and CO2(gas) as a function of pH gold Solubility of gold contour Gold solubility contours on log fO2 - pH diagram Added: pkg/CHNOSZ/demo/arsenic.R =================================================================== --- pkg/CHNOSZ/demo/arsenic.R (rev 0) +++ pkg/CHNOSZ/demo/arsenic.R 2019-04-15 09:20:57 UTC (rev 443) @@ -0,0 +1,40 @@ +# CHNOSZ/demo/arsenic.R +# Eh-pH diagram for the system As-O-H-S, +# after Lu and Zhu, 2011 (doi:10.1007/s12665-010-0652-x) + +# 20190415 extracted from go-IU.R; use retrieve() + +# define temperature (degrees C), pressure (bar), grid resolution +res <- 500 +T <- 25 +P <- 1 +# change this to FALSE to make sharp transitions between the basis species, +# giving a diagram with straight lines around the AsS(OH)HS- wedge +blend <- TRUE + +# set basis species +basis(c("As", "H2O", "H2S", "H+", "e-")) +basis(c("H2S"), c(-3)) +# find and set formed species +iaq <- retrieve("As", c("S", "O", "H"), "aq") +icr <- retrieve("As", c("S", "O", "H"), "cr") +species(c(iaq, icr)) +# set activities of aqueous species +species(1:length(iaq), -5) + +# the possible S-bearing basis species +bases <- c("H2S", "HS-", "HSO4-", "SO4-2") +# calculate affinties of formation reactions using the speciated S basis species +m <- mosaic(bases, pH = c(0, 14, res), Eh = c(-0.8, 0.8, res), T = T, P = 1, blend = blend) +# adjust colors and names +fill <- rev(heat.colors(nrow(species()))) +fill[which(species()$state == "cr")] <- "slategray3" +m$A.species$species$name <- gsub(",alpha", "", m$A.species$species$name) +# make the plot! +diagram(m$A.species, fill = fill) +# add legend and title +dprop <- describe.property(c("T", "P"), c(T, P)) +legend("bottomleft", legend = dprop, bty = "n") +t1 <- quote("As-O-H-S, "~list(Sigma*S == 10^-3~M, Sigma*As == 10^-5~M)) +t2 <- "After Lu and Zhu, 2011 Fig. 2b" +mtitle(as.expression(c(t1, t2)), cex = 0.95) Modified: pkg/CHNOSZ/demo/go-IU.R =================================================================== --- pkg/CHNOSZ/demo/go-IU.R 2019-04-15 06:46:07 UTC (rev 442) +++ pkg/CHNOSZ/demo/go-IU.R 2019-04-15 09:20:57 UTC (rev 443) @@ -79,59 +79,6 @@ # doi:10.1016/j.cageo.2016.02.013 ########### -### plot 3: Eh-pH diagram for As-O-H-S -########### -basis(c("As", "H2O", "H2S", "H+", "e-")) -basis(c("H2S"), c(-3)) -As_aq <- c("H3AsO4", "H2AsO4-", "HAsO4-2", "AsO4-3", "H3AsO3", "H2AsO3-", "HAsO3-2", "AsO3-3") -AsS_aq <- c("AsS(OH)HS-", "As3S4(HS)2-") -As_cr <- "As" -AsS_cr <- c("realgar,alpha", "realgar,beta", "orpiment", "orpiment,amorphous") -FeAs_cr <- c("arsenopyrite", "scorodite", "ferric arsenate,amorphous") -#species(c(As_aq, AsS_aq, As_cr, AsS_cr, FeAs_cr)) -species(c(As_aq, AsS_aq, As_cr, AsS_cr)) -species(c(As_aq, AsS_aq), -5) -## a simple diagram, but using only H2S at all pH -#a <- affinity(pH=c(0, 14), Eh=c(-1, 1.5)) -#diagram(a) -# the S basis species depends on pH -bases <- c("H2S", "HS-", "HSO4-", "SO4-2") -# calculate affinties of formation reactions using the speciated S basis species -res <- 300 -# the default has blend = TRUE, unlike LZ11's diagram where -# it appears the S-basis species are switched in an on/off fashion -m <- mosaic(bases, pH=c(0, 14, res), Eh=c(-0.8, 0.8, res)) -# adjust colors and names -fill <- rev(heat.colors(nrow(species()))) -fill[11:15] <- "darkgrey" -m$A.species$species$name <- gsub(",alpha", "", m$A.species$species$name) -diagram(m$A.species, fill=fill) -dprop <- describe.property(c("T", "P"), c(25, 1)) -legend("bottomleft", legend=dprop, bty="n") -t1 <- quote("As-O-H-S, "~list(Sigma*S==10^-3~M, Sigma*As==10^-5~M)) -t2 <- "After Lu and Zhu, 2011 Fig. 2b" -# doi:10.1007/s12665-010-0652-x -mtitle(as.expression(c(t1, t2)), cex=0.95) - -########### -### plot 4: aqueous Al species -########### -basis(c("Al+3", "F-", "H+", "O2", "H2O")) -AlOH <- c("Al(OH)4-", "Al(OH)3", "Al(OH)2+", "AlOH+2") -Al <- "Al+3" -AlF <- c("AlF+2", "AlF2+", "AlF3", "AlF4-") -AlOHF <- c("Al(OH)2F2-", "Al(OH)2F", "AlOHF2") -species(c(AlOH, Al, AlF, AlOHF), "aq") -res <- 300 -a <- affinity(pH=c(0.5, 6.5, res), `F-`=c(-2, -9, res), T=200) -diagram(a, fill=rev(cm.colors(nrow(species())))) -dprop <- describe.property(c("T", "P"), c(200, "Psat")) -legend("topright", legend=dprop, bty="n") -mtitle(c("Aqueous aluminum species", - "After Tagirov and Schott, 2001 Fig. 4d"), cex=0.95) -# doi:10.1016/S0016-7037(01)00705-0 - -########### ### clean up: restore thermodynamic database to default ########### reset() Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2019-04-15 06:46:07 UTC (rev 442) +++ pkg/CHNOSZ/inst/NEWS 2019-04-15 09:20:57 UTC (rev 443) @@ -1,4 +1,4 @@ -CHANGES IN CHNOSZ 1.3.1-23 (2019-04-15) +CHANGES IN CHNOSZ 1.3.1-24 (2019-04-15) --------------------------------------- - Add thermo/stoich.csv.xz (loaded as thermo()$stoich), containing a @@ -38,6 +38,8 @@ tick marks can be added using the 'grid' argument. Or, use thermo.axis() after diagram() to overlay a grid. +- Add demo/arsenic.R (Eh-pH diagram after Lu and Zhu, 2011). + CHANGES IN CHNOSZ 1.3.1 (2019-03-02) ------------------------------------ Modified: pkg/CHNOSZ/man/diagram.Rd =================================================================== --- pkg/CHNOSZ/man/diagram.Rd 2019-04-15 06:46:07 UTC (rev 442) +++ pkg/CHNOSZ/man/diagram.Rd 2019-04-15 09:20:57 UTC (rev 443) @@ -264,6 +264,22 @@ text(3, 22, describe.basis(thermo()$basis[2:3,], digits=2, oneline=TRUE)) text(3, 21, describe.property(c("T", "P"), c(25, 1), oneline=TRUE)) +## aqueous Al species, after Tagirov and Schott, 2001 +# this uses a HCL palette for the fill colors +basis(c("Al+3", "F-", "H+", "O2", "H2O")) +AlOH <- c("Al(OH)4-", "Al(OH)3", "Al(OH)2+", "AlOH+2") +Al <- "Al+3" +AlF <- c("AlF+2", "AlF2+", "AlF3", "AlF4-") +AlOHF <- c("Al(OH)2F2-", "Al(OH)2F", "AlOHF2") +species(c(AlOH, Al, AlF, AlOHF), "aq") +res <- 300 +a <- affinity(pH = c(0.5, 6.5, res), `F-` = c(-2, -9, res), T = 200) +diagram(a, fill = "pastel") +dprop <- describe.property(c("T", "P"), c(200, "Psat")) +legend("topright", legend = dprop, bty = "n") +mtitle(c("Aqueous aluminum species", + "After Tagirov and Schott, 2001 Fig. 4d"), cex = 0.95) + ## Temperature-Pressure: kayanite-sillimanite-andalusite # cf. Fig. 49 of Helgeson et al., 1978 # this is a system of one component (Al2SiO5), however: @@ -300,6 +316,9 @@ LaRowe, D. E. and Helgeson, H. C. (2007) Quantifying the energetics of metabolic reactions in diverse biogeochemical systems: electron flow and ATP synthesis. \emph{Geobiology} \bold{5}, 153--168. \url{https://doi.org/10.1111/j.1472-4669.2007.00099.x} Majzlan, J., Navrotsky, A., McClesky, R. B. and Alpers, C. N. (2006) Thermodynamic properties and crystal structure refinement of ferricopiapite, coquimbite, rhomboclase, and Fe\s{2}(SO\s{4})\s{3}(H\s{2}O)\s{5}. \emph{Eur. J. Mineral.} \bold{18}, 175--186. \url{https://doi.org/10.1127/0935-1221/2006/0018-0175} + + Tagirov, B. and Schott, J. (2001) Aluminum speciation in crustal fluids revisited. \emph{Geochim. Cosmochim. Acta} \bold{65}, 3965--3992. \url{https://doi.org/10.1016/S0016-7037(01)00705-0} + } \concept{Main workflow} Modified: pkg/CHNOSZ/man/examples.Rd =================================================================== --- pkg/CHNOSZ/man/examples.Rd 2019-04-15 06:46:07 UTC (rev 442) +++ pkg/CHNOSZ/man/examples.Rd 2019-04-15 09:20:57 UTC (rev 443) @@ -16,8 +16,8 @@ demos(which = c("sources", "protein.equil", "affinity", "NaCl", "density", "ORP", "revisit", "findit", "ionize", "buffer", "protbuff", "yeastgfp", "glycinate", "mosaic", "copper", - "solubility", "gold", "contour", "wjd", "bugstab", "Shh", - "saturation", "adenine", "DEW", "lambda", "TCA", "go-IU", + "arsenic", "solubility", "gold", "contour", "wjd", "bugstab", + "Shh", "saturation", "adenine", "DEW", "lambda", "TCA", "go-IU", "bison", "AkDi"), save.png=FALSE) } @@ -46,6 +46,7 @@ \code{glycinate} \tab Metal-glycinate complexes (Shock and Koretsky, 1995; Azadi et al., 2019) \cr \code{mosaic} \tab Eh-pH diagram with two sets of changing basis species (Garrels and Christ, 1965) \cr \code{copper} \tab Another example of \code{\link{mosaic}}: complexation of Cu with glycine (Aksu and Doyle, 2001) \cr + \code{arsenic} \tab Another example of \code{\link{mosaic}}: Eh-pH diagram for the system As-O-H-S (Lu and Zhu, 2011) \cr \code{solubility} \tab Solubility of calcite (cf. Manning et al., 2013) and \CO2 (cf. Stumm and Morgan, 1996) \cr \code{gold} \tab Solubility of gold (Akinfiev and Zotov; 2001; Stef{\aacute}nsson and Seward, 2004; Williams-Jones et al., 2009) \cr \code{contour} \tab Gold solubility contours on log fO2 - pH diagram (Williams-Jones et al., 2009) \cr @@ -120,6 +121,8 @@ Johnson, J. W., Oelkers, E. H. and Helgeson, H. C. (1992) SUPCRT92: A software package for calculating the standard molal thermodynamic properties of minerals, gases, aqueous species, and reactions from 1 to 5000 bar and 0 to 1000\degC. \emph{Comp. Geosci.} \bold{18}, 899--947. \url{https://doi.org/10.1016/0098-3004(92)90029-Q} Lowe, A. R., Cox, J. S. and Tremaine, P. R. (2017) Thermodynamics of aqueous adenine: Standard partial molar volumes and heat capacities of adenine, adeninium chloride, and sodium adeninate from \emph{T} = 278.15 K to 393.15 K. \emph{J. Chem. Thermodyn.} \bold{112}, 129--145. \url{https://doi.org/10.1016/j.jct.2017.04.005} + +Lu, P. and Zhu, C. (2011) Arsenic Eh--pH diagrams at 25\degC and 1 bar. \emph{Environ. Earth Sci.} \bold{62}, 1673--1683. \url{https://doi.org/10.1007/s12665-010-0652-x} Manning, C. E., Shock, E. L. and Sverjensky, D. A. (2013) The chemistry of carbon in aqueous fluids at crustal and upper-mantle conditions: Experimental and theoretical constraints. \emph{Rev. Mineral. Geochem.} \bold{75}, 109--148. \url{https://doi.org/10.2138/rmg.2013.75.5} Modified: pkg/CHNOSZ/vignettes/obigt.Rmd =================================================================== --- pkg/CHNOSZ/vignettes/obigt.Rmd 2019-04-15 06:46:07 UTC (rev 442) +++ pkg/CHNOSZ/vignettes/obigt.Rmd 2019-04-15 09:20:57 UTC (rev 443) @@ -211,7 +211,7 @@ ### `r setfile("DEW_aq.csv")` ```{r DEW_aq, results="asis", echo=FALSE} -cat("The [Deep Earth Water](http://www.dewcommunity.org/) (DEW) model extends the applicability of the revised HKF equations of state to 60 kbar. Accuracy of the thermodynamic calculations at these conditions is improved by revised correlations for the a1 HKF parameter, as described by [Sverjensky et al., 2014](https://doi.org/10.1016/j.gca.2013.12.019). The data here were taken from the May 2017 version of the DEW spreadsheet ([Dew Model, 2017](http://www.dewcommunity.org/resources.html)). The following species are present in the spreadsheet, but are not listed in `DEW_aq.csv` because the parameters are unchanged from the default database in CHNOSZ: B(OH)3, Br-, Ca+2, Cl-, Cs+, F-, H+, H2, He, I-, K+, Kr, Li+, Mg+2, Na+, Ne, O2, Rb+, Rn.\n\n") +cat("The [Deep Earth Water](http://www.dewcommunity.org/) (DEW) model extends the applicability of the revised HKF equations of state to 60 kbar. Accuracy of the thermodynamic calculations at these conditions is improved by revised correlations for the a1 HKF parameter, as described by [Sverjensky et al., 2014](https://doi.org/10.1016/j.gca.2013.12.019). The data here were taken from the May 2017 version of the DEW spreadsheet ([Dew Model, 2017](http://www.dewcommunity.org/resources.html)). The following species are present in the spreadsheet, but are not used here because the parameters are unchanged from the default database in CHNOSZ: B(OH)3, Br-, Ca+2, Cl-, Cs+, F-, H+, H2, He, I-, K+, Kr, Li+, Mg+2, Na+, Ne, O2, Rb+, Rn.\n\n") cat("Besides using `add.obigt('DEW')` to load these data, you should also run `water('DEW')` to activate the DEW equations in CHNOSZ. See [`demo(DEW)`](../demo) for some examples.
") ``` From noreply at r-forge.r-project.org Mon Apr 15 16:00:52 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 15 Apr 2019 16:00:52 +0200 (CEST) Subject: [CHNOSZ-commits] r444 - in pkg/CHNOSZ: . demo inst inst/extdata/cpetc man Message-ID: <20190415140052.9D80318D0F5@r-forge.r-project.org> Author: jedick Date: 2019-04-15 16:00:52 +0200 (Mon, 15 Apr 2019) New Revision: 444 Added: pkg/CHNOSZ/inst/extdata/cpetc/Mer75_Table4.csv pkg/CHNOSZ/inst/extdata/cpetc/TKSS14_Fig2.csv Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/demo/00Index pkg/CHNOSZ/demo/go-IU.R pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/man/examples.Rd pkg/CHNOSZ/man/extdata.Rd Log: demo/go-IU.R: add plots from Tutolo et al., 2014 Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-15 09:20:57 UTC (rev 443) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-15 14:00:52 UTC (rev 444) @@ -1,6 +1,6 @@ Date: 2019-04-15 Package: CHNOSZ -Version: 1.3.1-24 +Version: 1.3.1-25 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/00Index =================================================================== --- pkg/CHNOSZ/demo/00Index 2019-04-15 09:20:57 UTC (rev 443) +++ pkg/CHNOSZ/demo/00Index 2019-04-15 14:00:52 UTC (rev 444) @@ -16,7 +16,7 @@ arsenic Another example of mosaic(): Eh-pH diagram for the system As-O-H-S solubility Solubility of calcite and CO2(gas) as a function of pH gold Solubility of gold -contour Gold solubility contours on log fO2 - pH diagram +contour Gold solubility contours on a log fO2 - pH diagram wjd Gibbs energy minimization: prebiological atmospheres and cell periphery of yeast dehydration log K of dehydration reactions; SVG file contains tooltips and links bugstab Formation potential of microbial proteins in colorectal cancer @@ -26,7 +26,7 @@ DEW Deep Earth Water (DEW) model for high pressures lambda Thermodynamic properties of lambda transition in quartz TCA Standard Gibbs energies of steps of the citric acid cycle -go-IU Diagrams using thermodynamic data in the SUPCRTBL compilation +go-IU Reactions involving Al-bearing minerals carboxylase Rank abundance distribution for RuBisCO and acetyl-CoA carboxylase bison Average oxidation state of carbon in proteins for phyla at Bison Pool AkDi Henry's constant of dissolved gases Modified: pkg/CHNOSZ/demo/go-IU.R =================================================================== --- pkg/CHNOSZ/demo/go-IU.R 2019-04-15 09:20:57 UTC (rev 443) +++ pkg/CHNOSZ/demo/go-IU.R 2019-04-15 14:00:52 UTC (rev 444) @@ -1,48 +1,50 @@ -# CHNOSZ/demo/go-IU.R 20171018 -# diagrams using data from the SUPCRTBL compilation -# (BL = Bloomington campus of Indiana University) +# CHNOSZ/demo/go-IU.R +# 20171018 comparisons with calculations of SUPCRTBL +# (BL = Bloomington campus of Indiana University) +# 20190415 add diagrams from Tutolo et al., 2014 ## set up plotting area -opar <- par(mfrow=c(2, 2)) +opar <- par(mfrow = c(2, 2)) ########### ### plot 1: boehmite - kaolinite equilibrium ########### -## experimental data from Table 1 of Hemley et al., 1980 -# doi:10.2113/gsecongeo.75.2.210 +# After Zhu and Lu, 2009 (doi:10.1016/j.gca.2009.03.015) +# experimental data from Table 1 of Hemley et al., 1980 (doi:10.2113/gsecongeo.75.2.210) xT <- c(200, 200, 200, 200, 250, 250, 265, 300, 300, 300, 300) xlogaSiO2 <- -c(2.54, 2.59, 2.65, 2.77, 2.21, 2.32, 2.12, 1.90, 1.95, 1.94, 1.90) ## set up basis species so that axis.label shows activity of SiO2 basis(c("Al2O3","SiO2", "H2O", "O2")) T <- 125:350 -thermo.plot.new(xlim=range(T), ylim=c(-3.5, -1.5), xlab = axis.label("T"), ylab=axis.label("SiO2")) +thermo.plot.new(xlim = range(T), ylim = c(-3.5, -1.5), xlab = axis.label("T"), ylab = axis.label("SiO2")) points(xT, xlogaSiO2) -basis(delete=TRUE) +basis(delete = TRUE) ## first calculation: as in SUPCRT92 add.obigt("SUPCRT92") # gets kaolinite and boehmite from HDNB78 -r1 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T=T, P=1000, exceed.Ttr = TRUE) +r1 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T = T, P = 1000, exceed.Ttr = TRUE) # we need exceed.Ttr = TRUE because the T limit for boehmite is 500 K (Helgeson et al., 1978) ## second calculation: CHNOSZ default # kaolinite from Berman, 1988 # boehmite from Hemingway et al., 1991 # SiO2 from Apps and Spycher, 2004 reset() -r2 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T=T, P=1000, exceed.Ttr = TRUE) +r2 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T = T, P = 1000, exceed.Ttr = TRUE) ## third calculation: get SiO2(aq) from SHS89 add.obigt("AS04") -r3 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T=T, P=1000, exceed.Ttr = TRUE) +r3 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T = T, P = 1000, exceed.Ttr = TRUE) ## log activity of SiO2 is -ve logK -lines(T, -r1$out$logK) -lines(T, -r2$out$logK, col="red") -lines(T, -r3$out$logK, col="red", lty = 2) +lines(T, -r1$out$logK, col = "blue1", lty = 2) +lines(T, -r2$out$logK, lwd = 1.5) +lines(T, -r3$out$logK, col = "red", lty = 2) ## add points calculated using the SUPCRTBL package -points(seq(125, 350, 25), -c(3.489, 3.217, 2.967, 2.734, 2.517, 2.314, 2.124, 1.946, 1.781, 1.628), pch=4, col="red") +points(seq(125, 350, 25), -c(3.489, 3.217, 2.967, 2.734, 2.517, 2.314, 2.124, 1.946, 1.781, 1.628), pch = 4, col = "red") ## add legend and title -legend("bottomright", lty=c(0, 0, 1, 1, 2), pch=c(1, 4, NA, NA, NA), - col=c("black", "red", "black", "red", "red"), bty="n", cex=0.9, - legend=c("Hemley et al., 1980", "SUPCRTBL", "SUPCRT92", "CHNOSZ (default)", 'add.obigt("AS04")')) -mtitle(c("Kaolinite - Boehmite", "After Zhu and Lu, 2009 Fig. A1"), cex=0.95) -# Zhu and Lu, 2009: doi:10.1016/j.gca.2009.03.015 +title(main = describe.reaction(r1$reaction), cex.main = 1.1) +legend("bottomright", lty = c(0, 0, 2, 1, 2), pch = c(1, 4, NA, NA, NA), lwd = c(1, 1, 1, 1.5, 1), + col = c("black", "red", "black", "black", "red"), bty = "n", cex = 0.9, + legend = c("Hemley et al., 1980", "SUPCRTBL", "SUPCRT92", "CHNOSZ", 'add.obigt("AS04")')) +legend("topleft", c("Boehmite - Kaolinite", "After Zhu and Lu, 2009 Fig. A1"), bty = "n") +reset() # Helgeson et al., 1978 (HDNB78): http://www.worldcat.org/oclc/13594862 # Shock et al., 1989 (SHS89): doi:10.1016/0016-7037(89)90341-4 # Berman, 1988 (Ber88): doi:10.1093/petrology/29.2.445 @@ -53,34 +55,84 @@ ########### ### plot 2: dawsonite solubility ########### -## experimental data from Benezeth et al., 2007 Table 5 -# doi:10.1016/j.gca.2007.07.003 +# After Zimmer et al., 2016 (doi:10.1016/j.cageo.2016.02.013) +# experimental data from Benezeth et al., 2007 Table 5 (doi:10.1016/j.gca.2007.07.003) # (averages for each temperature in a single run) T <- c(100.1, 100.1, 150.1, 100.1, 150.1, 99.8, 99.8, 200.7, 99.8, 50.1, 75.1, 100.3, 150.1) logK <- -c(14.825, 14.735, 13.625, 14.79, 13.665, 14.725, 14.1775, 12.74, 14.4925, 16.8625, 15.61, 14.51, 13.455) -plot(T, logK, xlim=c(25, 250), ylim=c(-18, -10), xlab=axis.label("T"), ylab=axis.label("logK")) +plot(T, logK, xlim = c(25, 250), ylim = c(-18, -10), xlab = axis.label("T"), ylab = axis.label("logK")) T <- 0:250 # calculation 1: CHNOSZ default species <- c("dawsonite", "H2O", "Al(OH)4-", "HCO3-", "Na+", "H+") coeffs <- c(-1, -2, 1, 1, 1, 1) -Daw1 <- subcrt(species, coeffs, T=T) +Daw1 <- subcrt(species, coeffs, T = T) # calculation 2: dawsonite with Cp = 0 -mod.obigt("dawsonite", Cp=0) -Daw2 <- subcrt(species, coeffs, T=T) +mod.obigt("dawsonite", Cp = 0) +Daw2 <- subcrt(species, coeffs, T = T) ## plot the calculated logKs -lines(T, Daw1$out$logK, col="red") -lines(T, Daw2$out$logK, col="red", lty=2) +lines(T, Daw1$out$logK, lwd = 1.5) +lines(T, Daw2$out$logK, col = "red", lty = 2) ## add points calculated using the SUPCRTBL package points(seq(25, 250, 25), c(-17.829, -16.523, -15.402, -14.425, -13.568, -12.815, -12.154, -11.581, -11.094, -10.699), pch=4, col="red") ## add legend and title -legend("bottomright", lty=c(0, 0, 1, 2), pch=c(1, 4, NA, NA), col=c("black", "red", "red", "red"), - bty="n", cex=0.9, legend=c("Ben\u00e9z\u00e9th et al., 2007", "SUPCRTBL", "CHNOSZ", 'mod.obigt("dawsonite", Cp = 0)')) -mtitle(c("Dawsonite - aqueous species", "After Zimmer et al., 2016 Fig. 2"), cex=0.95) -# doi:10.1016/j.cageo.2016.02.013 +title(main = describe.reaction(Daw1$reaction), cex.main = 0.95) +legend("bottomright", lty = c(0, 0, 1, 2), pch = c(1, 4, NA, NA), col = c("black", "red", "black", "red"), lwd = c(1, 1, 1.5, 1), + bty = "n", cex = 0.9, legend = c("Ben\u00e9z\u00e9th et al., 2007", "SUPCRTBL", "CHNOSZ", 'mod.obigt("dawsonite", Cp = 0)')) +legend("topleft", c("Dawsonite solubility", "After Zimmer et al., 2016 Fig. 2"), bty = "n") +reset() ########### -### clean up: restore thermodynamic database to default +### plot 3: kaolinite solubility ########### +# After Tutolo et al., 2014, Fig. 2 (doi:10.1016/j.gca.2014.02.036) +dat <- read.csv(system.file("extdata/cpetc/TKSS14_Fig2.csv", package = "CHNOSZ")) +plot(dat, type = "p", xlim = c(3.5, 1.5), ylim = c(-2, 14), xlab = "1000/T(K)", ylab = "pK") +# plot line: default database +invTK <- seq(3.5, 1.6, -0.02) +T <- 1000/invTK - 273.15 +sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "H4SiO4"), c(-1, -2, -5, 2, 2), T = T) +pK <- -sres$out$logK +lines(invTK, pK, lwd = 1.5) +# plot line: SUPCRT92 +add.obigt("SUPCRT92") +sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "H4SiO4"), c(-1, -2, -5, 2, 2), T = T) +pK <- -sres$out$logK +lines(invTK, pK, col = "blue", lty = 2) +# add title and legend +par(xpd = NA) +title(main = describe.reaction(sres$reaction), cex.main = 1.1) +par(xpd = FALSE) +legend("topright", c("Kaolinite solubility", "After Tutolo et al., 2014 Fig. 2"), bty = "n") +legend("bottomleft", lty = c(0, 2, 1), pch = c(1, NA, NA), lwd = c(1, 1, 1.5), col = c("black", "blue", "black"), + legend = c("Tutolo et al., 2014", "SUPCRT92", "CHNOSZ"), bty = "n", cex = 0.9) reset() +########### +### plot 4: albite - K-feldspar exchange +########### +# After Tutolo et al., 2014, Fig. 5 (doi:10.1016/j.gca.2014.02.036) +# experimental data from Merino, 1975, Table 4 (doi:10.1016/0016-7037(75)90085-X) +# plot line calculated using default database +basis(c("Al2O3", "SiO2", "K+", "Na+", "O2", "H2O", "H+")) +species(c("albite", "K-feldspar")) +T <- 100 +P <- 150 +a <- affinity("K+" = c(4, 7), "Na+" = c(6, 9), T = T, P = P) +diagram(a, lwd = 1.5, xlab = ratlab("K+"), ylab = ratlab("Na+")) +# plot experimental data +dat <- read.csv(system.file("extdata/cpetc/Mer75_Table4.csv", package = "CHNOSZ")) +points(dat$log.aK..aH.., dat$log.aNa..aH..) +# plot line calculated using SUPCRT92 data +add.obigt("SUPCRT92") +a <- affinity("K+" = c(4, 7), "Na+" = c(6, 9), T = 100, P = 150) +diagram(a, col = "blue", lty = 2, add = TRUE, names = NULL) +# add title and legend +sres <- subcrt(c("albite", "K+", "K-feldspar", "Na+"), c(-1, -1, 1, 1)) +title(main = describe.reaction(sres$reaction), cex.main = 1.1) +legend("topleft", c("Albite - K-feldspar", "After Tutolo et al., 2014 Fig. 5"), bty = "n", cex = 0.9) +legend("bottomright", lty = c(0, 2, 1), pch = c(1, NA, NA), lwd = c(1, 1, 1.5), col = c("black", "blue", "black"), + legend = c("Merino, 1975", "SUPCRT92", "CHNOSZ"), bty = "n", cex = 0.9) +legend("right", describe.property(c("T", "P"), c(T, P)), bty = "n") +reset() + par(opar) Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2019-04-15 09:20:57 UTC (rev 443) +++ pkg/CHNOSZ/inst/NEWS 2019-04-15 14:00:52 UTC (rev 444) @@ -1,4 +1,4 @@ -CHANGES IN CHNOSZ 1.3.1-24 (2019-04-15) +CHANGES IN CHNOSZ 1.3.1-25 (2019-04-15) --------------------------------------- - Add thermo/stoich.csv.xz (loaded as thermo()$stoich), containing a @@ -40,6 +40,8 @@ - Add demo/arsenic.R (Eh-pH diagram after Lu and Zhu, 2011). +- demo/go-IU.R: add plots from Tutolo et al., 2014. + CHANGES IN CHNOSZ 1.3.1 (2019-03-02) ------------------------------------ Added: pkg/CHNOSZ/inst/extdata/cpetc/Mer75_Table4.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/cpetc/Mer75_Table4.csv (rev 0) +++ pkg/CHNOSZ/inst/extdata/cpetc/Mer75_Table4.csv 2019-04-15 14:00:52 UTC (rev 444) @@ -0,0 +1,42 @@ +Brine,log(aNa+/aH+),log(aK+/aH+) +1,7.38,5.515 +2,7.209,5.362 +3,7.094,5.286 +5,7.121,5.263 +8,7.868,5.797 +9,7.997,5.971 +11,8.02,5.97 +12,8.05,5.98 +13,7.568,5.55 +16,7.611,5.581 +17,7.66,5.626 +19,8,6.01 +20,7.99,5.99 +24,7.584,5.544 +25,7.52,5.39 +26,6.856,5.033 +28,7.9,5.93 +29,7.594,5.515 +30,7.294,5.723 +31,7.719,5.643 +41,7.299,5.22 +45,7.457,5.455 +52,8.25,6.17 +53,8.114,6.08 +58,7.805,5.752 +59,784,5.69 +63,7.245,5.451 +65,7.435,5.375 +66,7.94,5.74 +69,7.775,5.62 +70,7.96,5.77 +72,8.399,5.961 +73,8.242,6.009 +74,7.73,5.55 +78,8.233,6.069 +80,8.25,6.09 +83,7.554,3.7325 +88,6.896,4.805 +97,8.224,6.116 +99,8.18,6.05 +100,7.597,5.503 Added: pkg/CHNOSZ/inst/extdata/cpetc/TKSS14_Fig2.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/cpetc/TKSS14_Fig2.csv (rev 0) +++ pkg/CHNOSZ/inst/extdata/cpetc/TKSS14_Fig2.csv 2019-04-15 14:00:52 UTC (rev 444) @@ -0,0 +1,25 @@ +x,y +3.353,11.57 +3.353,11.2 +3.353,8.83 +3.351,9.9 +3.353,9.22 +3.351,10.79 +2.113,5.97 +1.909,4.3 +1.859,3.82 +1.746,2.84 +3.351,11.05 +2.829,6.87 +2.113,5.39 +2.113,4.5 +1.744,2.76 +1.744,-0.15 +2.113,5.28 +1.824,3.54 +3.001,10.39 +2.752,9.39 +2.609,9.02 +2.363,6.85 +2.363,6.35 +3.388,10.61 Modified: pkg/CHNOSZ/man/examples.Rd =================================================================== --- pkg/CHNOSZ/man/examples.Rd 2019-04-15 09:20:57 UTC (rev 443) +++ pkg/CHNOSZ/man/examples.Rd 2019-04-15 14:00:52 UTC (rev 444) @@ -49,7 +49,7 @@ \code{arsenic} \tab Another example of \code{\link{mosaic}}: Eh-pH diagram for the system As-O-H-S (Lu and Zhu, 2011) \cr \code{solubility} \tab Solubility of calcite (cf. Manning et al., 2013) and \CO2 (cf. Stumm and Morgan, 1996) \cr \code{gold} \tab Solubility of gold (Akinfiev and Zotov; 2001; Stef{\aacute}nsson and Seward, 2004; Williams-Jones et al., 2009) \cr - \code{contour} \tab Gold solubility contours on log fO2 - pH diagram (Williams-Jones et al., 2009) \cr + \code{contour} \tab Gold solubility contours on a log fO2 - pH diagram (Williams-Jones et al., 2009) \cr \code{wjd} \tab \eqn{G}{G} minimization: prebiological atmospheres (Dayhoff et al., 1964) and cell periphery of yeast \cr \code{dehydration} \tab \logK of dehydration reactions; SVG file contains tooltips and links \cr \code{bugstab} \tab Formation potential of microbial proteins in colorectal cancer (Dick, 2016) \cr @@ -59,7 +59,7 @@ \code{DEW} \tab Deep Earth Water (DEW) model for high pressures (Sverjensky et al., 2014a and 2014b) \cr \code{lambda} \tab Effects of lambda transition on thermodynamic properties of quartz (Berman, 1988) \cr \code{TCA} \tab Standard Gibbs energies of the tricarboxylic (citric) acid cycle (Canovas and Shock, 2016) \cr - \code{go-IU} \tab Diagrams using thermodynamic data in the SUPCRTBL compilation (Zimmer et al., 2016) \cr + \code{go-IU} \tab Reactions involving Al-bearing minerals (Zimmer et al., 2016; Tutolo et al., 2014) \cr \code{carboxylase} \tab Rank abundance distribution for RuBisCO and acetyl-CoA carboxylase \cr \code{bison} \tab Average oxidation state of carbon in proteins for phyla at Bison Pool (Dick and Shock, 2013) \cr \code{AkDi} \tab Henry's constant of dissolved gases (Akinfiev and Diamond, 2003) \cr @@ -142,6 +142,8 @@ Sverjensky, D. A., Stagno, V. and Huang, F. (2014b) Important role for organic carbon in subduction-zone fluids in the deep carbon cycle. \emph{Nat. Geosci.} \bold{7}, 909--913. \url{https://doi.org/10.1038/ngeo2291} +Tutolo, B. M., Kong, X.-Z., Seyfried, W. E., Jr. and Saar, M. O. (2014) Internal consistency in aqueous geochemical data revisited: Applications to the aluminum system. \emph{Geochim. Cosmochim. Acta} \bold{133}, 216--234. \url{https://doi.org/10.1016/j.gca.2014.02.036} + Williams-Jones, A. E., Bowell, R. J. and Migdisov, A. A. (2009) Gold in solution. \emph{Elements} \bold{5}, 281--287. \url{https://doi.org/10.2113/gselements.5.5.281} Zimmer, K., Zhang, Y., Lu, P., Chen, Y., Zhang, G., Dalkilic, M. and Zhu, C. (2016) SUPCRTBL: A revised and extended thermodynamic dataset and software package of SUPCRT92. \emph{Comp. Geosci.} \bold{90}, 97--111. \url{https://doi.org/10.1016/j.cageo.2016.02.013} Modified: pkg/CHNOSZ/man/extdata.Rd =================================================================== --- pkg/CHNOSZ/man/extdata.Rd 2019-04-15 09:20:57 UTC (rev 443) +++ pkg/CHNOSZ/man/extdata.Rd 2019-04-15 14:00:52 UTC (rev 444) @@ -48,6 +48,8 @@ \item \code{rubisco.csv} UniProt IDs for Rubisco, ranges of optimal growth temperature of organisms, domain and name of organisms, and URL of reference for growth temperature, from Dick, 2014. See the vignette \code{anintro.Rmd} for an example that uses this file. \item \code{bluered.txt} Blue - light grey - red color palette, computed using \CRANpkg{colorspace}\code{::diverge_hcl(1000,} \code{c = 100, l = c(50, 90), power = 1)}. This is used by \code{\link{ZC.col}}. \item \code{AD03_Fig1?.csv} Experimental data points digitized from Figure 1 of Akinfiev and Diamond, 2003, used in \code{\link{demos}("AkDi")}. + \item \code{TKSS14_Fig2.csv} Experimental data points digitized from Figure 2 of Tutolo et al., 2014, used in \code{\link{demos}("go-IU")}. + \item \code{Mer75_Table4.csv} Values of log(aK+/aH+) and log(aNa+/aH+) from Table 4 of Merino, 1975, used in \code{\link{demos}("go-IU")}. } Files in \code{fasta} contain protein sequences: @@ -151,6 +153,8 @@ Joint Genome Institute (2007) Bison Pool Environmental Genome. Protein sequence files downloaded from IMG/M (\url{http://img.jgi.doe.gov/cgi-bin/m/main.cgi?section=FindGenomes&page=findGenomes}) +Merino, E. (1975) Diagenesis in teriary sandstones from Kettleman North Dome, California. II. Interstitial solutions: distribution of aqueous species at 100°C and chemical relation to diagenetic mineralogy. \emph{Geochim. Cosmochim. Acta} \bold{39}, 1629--1645. \url{https://doi.org/10.1016/0016-7037(75)90085-X} + Privalov, P. L. and Makhatadze, G. I. (1990) Heat capacity of proteins. II. Partial molar heat capacity of the unfolded polypeptide chain of proteins: Protein unfolding effects. \emph{J. Mol. Biol.} \bold{213}, 385--391. \url{https://doi.org/10.1016/S0022-2836(05)80198-6} Richard, L. and Helgeson, H. C. (1998) Calculation of the thermodynamic properties at elevated temperatures and pressures of saturated and aromatic high molecular weight solid and liquid hydrocarbons in kerogen, bitumen, petroleum, and other organic matter of biogeochemical interest. \emph{Geochim. Cosmochim. Acta} \bold{62}, 3591--3636. \url{https://doi.org/10.1016/S0016-7037(97)00345-1} @@ -171,6 +175,8 @@ Tai, S. L., Boer, V. M., Daran-Lapujade, P., Walsh, M. C., de Winde, J. H., Daran, J.-M. and Pronk, J. T. (2005) Two-dimensional transcriptome analysis in chemostat cultures: Combinatorial effects of oxygen availability and macronutrient limitation in \emph{Saccharomyces cerevisiae}. \emph{J. Biol. Chem.} \bold{280}, 437--447. \url{https://doi.org/10.1074/jbc.M410573200} +Tutolo, B. M., Kong, X.-Z., Seyfried, W. E., Jr. and Saar, M. O. (2014) Internal consistency in aqueous geochemical data revisited: Applications to the aluminum system. \emph{Geochim. Cosmochim. Acta} \bold{133}, 216--234. \url{https://doi.org/10.1016/j.gca.2014.02.036} + YeastGFP project. Yeast GFP Fusion Localization Database, http://yeastgfp.ucsf.edu; Current location: \url{http://yeastgfp.yeastgenome.org} } From noreply at r-forge.r-project.org Tue Apr 16 06:25:41 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 16 Apr 2019 06:25:41 +0200 (CEST) Subject: [CHNOSZ-commits] r445 - in pkg/CHNOSZ: . R demo inst man vignettes Message-ID: <20190416042542.05CA418CAA4@r-forge.r-project.org> Author: jedick Date: 2019-04-16 06:25:40 +0200 (Tue, 16 Apr 2019) New Revision: 445 Added: pkg/CHNOSZ/demo/aluminum.R Removed: pkg/CHNOSZ/demo/go-IU.R Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/R/examples.R pkg/CHNOSZ/demo/00Index pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/man/diagram.Rd pkg/CHNOSZ/man/examples.Rd pkg/CHNOSZ/man/extdata.Rd pkg/CHNOSZ/vignettes/anintro.Rmd pkg/CHNOSZ/vignettes/obigt.Rmd Log: rename demo/go-IU.R to aluminum.R Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-15 14:00:52 UTC (rev 444) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-16 04:25:40 UTC (rev 445) @@ -1,6 +1,6 @@ -Date: 2019-04-15 +Date: 2019-04-16 Package: CHNOSZ -Version: 1.3.1-25 +Version: 1.3.1-26 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/examples.R =================================================================== --- pkg/CHNOSZ/R/examples.R 2019-04-15 14:00:52 UTC (rev 444) +++ pkg/CHNOSZ/R/examples.R 2019-04-16 04:25:40 UTC (rev 445) @@ -30,7 +30,7 @@ demos <- function(which=c("sources", "protein.equil", "affinity", "NaCl", "density", "ORP", "revisit", "findit", "ionize", "buffer", "protbuff", "yeastgfp", "glycinate", "mosaic", "copper", "arsenic", "solubility", "gold", "contour", "wjd", "bugstab", "Shh", "saturation", - "adenine", "DEW", "lambda", "TCA", "go-IU", "bison", "AkDi"), save.png=FALSE) { + "adenine", "DEW", "lambda", "TCA", "aluminum", "bison", "AkDi"), save.png=FALSE) { # run one or more demos from CHNOSZ with ask=FALSE, and return the value of the last one for(i in 1:length(which)) { # say something so the user sees where we are Modified: pkg/CHNOSZ/demo/00Index =================================================================== --- pkg/CHNOSZ/demo/00Index 2019-04-15 14:00:52 UTC (rev 444) +++ pkg/CHNOSZ/demo/00Index 2019-04-16 04:25:40 UTC (rev 445) @@ -26,7 +26,7 @@ DEW Deep Earth Water (DEW) model for high pressures lambda Thermodynamic properties of lambda transition in quartz TCA Standard Gibbs energies of steps of the citric acid cycle -go-IU Reactions involving Al-bearing minerals +aluminum Reactions involving Al-bearing minerals carboxylase Rank abundance distribution for RuBisCO and acetyl-CoA carboxylase bison Average oxidation state of carbon in proteins for phyla at Bison Pool AkDi Henry's constant of dissolved gases Copied: pkg/CHNOSZ/demo/aluminum.R (from rev 444, pkg/CHNOSZ/demo/go-IU.R) =================================================================== --- pkg/CHNOSZ/demo/aluminum.R (rev 0) +++ pkg/CHNOSZ/demo/aluminum.R 2019-04-16 04:25:40 UTC (rev 445) @@ -0,0 +1,137 @@ +# CHNOSZ/demo/aluminum.R +# 20171018 comparisons with calculations of SUPCRTBL +# 20190415 add diagrams from Tutolo et al., 2014 + +## set up plotting area +opar <- par(mfrow = c(2, 2)) + +########### +### plot 1: boehmite - kaolinite equilibrium +########### +# After Zhu and Lu, 2009 (doi:10.1016/j.gca.2009.03.015) +# experimental data from Table 1 of Hemley et al., 1980 (doi:10.2113/gsecongeo.75.2.210) +xT <- c(200, 200, 200, 200, 250, 250, 265, 300, 300, 300, 300) +xlogaSiO2 <- -c(2.54, 2.59, 2.65, 2.77, 2.21, 2.32, 2.12, 1.90, 1.95, 1.94, 1.90) +## set up basis species so that axis.label shows activity of SiO2 +basis(c("Al2O3","SiO2", "H2O", "O2")) +T <- 125:350 +thermo.plot.new(xlim = range(T), ylim = c(-3.5, -1.5), xlab = axis.label("T"), ylab = axis.label("SiO2")) +points(xT, xlogaSiO2) +basis(delete = TRUE) +## first calculation: as in SUPCRT92 +add.obigt("SUPCRT92") # gets kaolinite and boehmite from HDNB78 +r1 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T = T, P = 1000, exceed.Ttr = TRUE) +# we need exceed.Ttr = TRUE because the T limit for boehmite is 500 K (Helgeson et al., 1978) +## second calculation: CHNOSZ default +# kaolinite from Berman, 1988 +# boehmite from Hemingway et al., 1991 +# SiO2 from Apps and Spycher, 2004 +reset() +r2 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T = T, P = 1000, exceed.Ttr = TRUE) +## third calculation: get SiO2(aq) from SHS89 +add.obigt("AS04") +r3 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T = T, P = 1000, exceed.Ttr = TRUE) +## log activity of SiO2 is -ve logK +lines(T, -r1$out$logK, col = "blue1", lty = 2) +lines(T, -r2$out$logK, lwd = 1.5) +lines(T, -r3$out$logK, col = "red", lty = 2) +## add points calculated using the SUPCRTBL package +points(seq(125, 350, 25), -c(3.489, 3.217, 2.967, 2.734, 2.517, 2.314, 2.124, 1.946, 1.781, 1.628), pch = 4, col = "red") +## add legend and title +title(main = describe.reaction(r1$reaction), cex.main = 1.1) +legend("bottomright", lty = c(0, 0, 2, 1, 2), pch = c(1, 4, NA, NA, NA), lwd = c(1, 1, 1, 1.5, 1), + col = c("black", "red", "black", "black", "red"), bty = "n", cex = 0.9, + legend = c("Hemley et al., 1980", "SUPCRTBL", "SUPCRT92", "CHNOSZ", 'add.obigt("AS04")')) +legend("topleft", c("Boehmite - Kaolinite", "After Zhu and Lu, 2009 Fig. A1"), bty = "n") +reset() +# Helgeson et al., 1978 (HDNB78): http://www.worldcat.org/oclc/13594862 +# Shock et al., 1989 (SHS89): doi:10.1016/0016-7037(89)90341-4 +# Berman, 1988 (Ber88): doi:10.1093/petrology/29.2.445 +# Holland and Powell, 2011 (HP11): 10.1111/j.1525-1314.2010.00923.x +# Hemingway et al., 1991 (HRA91): http://pubs.er.usgs.gov/publication/70016664 +# Apps and Spycher, 2004 (AS04): Bechtel SAIC Company, LLC ANL-NBS-HS-000043 REV 00 (DOC.20041118.0004) + +########### +### plot 2: dawsonite solubility +########### +# After Zimmer et al., 2016 (doi:10.1016/j.cageo.2016.02.013) +# experimental data from Benezeth et al., 2007 Table 5 (doi:10.1016/j.gca.2007.07.003) +# (averages for each temperature in a single run) +T <- c(100.1, 100.1, 150.1, 100.1, 150.1, 99.8, 99.8, 200.7, 99.8, 50.1, 75.1, 100.3, 150.1) +logK <- -c(14.825, 14.735, 13.625, 14.79, 13.665, 14.725, 14.1775, 12.74, 14.4925, 16.8625, 15.61, 14.51, 13.455) +plot(T, logK, xlim = c(25, 250), ylim = c(-18, -10), xlab = axis.label("T"), ylab = axis.label("logK")) +T <- 0:250 +# calculation 1: CHNOSZ default +species <- c("dawsonite", "H2O", "Al(OH)4-", "HCO3-", "Na+", "H+") +coeffs <- c(-1, -2, 1, 1, 1, 1) +Daw1 <- subcrt(species, coeffs, T = T) +# calculation 2: dawsonite with Cp = 0 +mod.obigt("dawsonite", Cp = 0) +Daw2 <- subcrt(species, coeffs, T = T) +## plot the calculated logKs +lines(T, Daw1$out$logK, lwd = 1.5) +lines(T, Daw2$out$logK, col = "red", lty = 2) +## add points calculated using the SUPCRTBL package +points(seq(25, 250, 25), c(-17.829, -16.523, -15.402, -14.425, -13.568, -12.815, -12.154, -11.581, -11.094, -10.699), pch=4, col="red") +## add legend and title +title(main = describe.reaction(Daw1$reaction), cex.main = 0.95) +legend("bottomright", lty = c(0, 0, 1, 2), pch = c(1, 4, NA, NA), col = c("black", "red", "black", "red"), lwd = c(1, 1, 1.5, 1), + bty = "n", cex = 0.9, legend = c("Ben\u00e9z\u00e9th et al., 2007", "SUPCRTBL", "CHNOSZ", 'mod.obigt("dawsonite", Cp = 0)')) +legend("topleft", c("Dawsonite solubility", "After Zimmer et al., 2016 Fig. 2"), bty = "n") +reset() + +########### +### plot 3: kaolinite solubility +########### +# After Tutolo et al., 2014, Fig. 2 (doi:10.1016/j.gca.2014.02.036) +dat <- read.csv(system.file("extdata/cpetc/TKSS14_Fig2.csv", package = "CHNOSZ")) +plot(dat, type = "p", xlim = c(3.5, 1.5), ylim = c(-2, 14), xlab = "1000/T(K)", ylab = "pK") +# plot line: default database +invTK <- seq(3.5, 1.6, -0.02) +T <- 1000/invTK - 273.15 +sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "H4SiO4"), c(-1, -2, -5, 2, 2), T = T) +pK <- -sres$out$logK +lines(invTK, pK, lwd = 1.5) +# plot line: SUPCRT92 +add.obigt("SUPCRT92") +sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "H4SiO4"), c(-1, -2, -5, 2, 2), T = T) +pK <- -sres$out$logK +lines(invTK, pK, col = "blue", lty = 2) +# add title and legend +par(xpd = NA) +title(main = describe.reaction(sres$reaction), cex.main = 1.1) +par(xpd = FALSE) +legend("topright", c("Kaolinite solubility", "After Tutolo et al., 2014 Fig. 2"), bty = "n") +legend("bottomleft", lty = c(0, 2, 1), pch = c(1, NA, NA), lwd = c(1, 1, 1.5), col = c("black", "blue", "black"), + legend = c("Tutolo et al., 2014", "SUPCRT92", "CHNOSZ"), bty = "n", cex = 0.9) +reset() + +########### +### plot 4: albite - K-feldspar exchange +########### +# After Tutolo et al., 2014, Fig. 5 (doi:10.1016/j.gca.2014.02.036) +# experimental data from Merino, 1975, Table 4 (doi:10.1016/0016-7037(75)90085-X) +# plot line calculated using default database +basis(c("Al2O3", "SiO2", "K+", "Na+", "O2", "H2O", "H+")) +species(c("albite", "K-feldspar")) +T <- 100 +P <- 150 +a <- affinity("K+" = c(4, 7), "Na+" = c(6, 9), T = T, P = P) +diagram(a, lwd = 1.5, xlab = ratlab("K+"), ylab = ratlab("Na+")) +# plot experimental data +dat <- read.csv(system.file("extdata/cpetc/Mer75_Table4.csv", package = "CHNOSZ")) +points(dat$log.aK..aH.., dat$log.aNa..aH..) +# plot line calculated using SUPCRT92 data +add.obigt("SUPCRT92") +a <- affinity("K+" = c(4, 7), "Na+" = c(6, 9), T = 100, P = 150) +diagram(a, col = "blue", lty = 2, add = TRUE, names = NULL) +# add title and legend +sres <- subcrt(c("albite", "K+", "K-feldspar", "Na+"), c(-1, -1, 1, 1)) +title(main = describe.reaction(sres$reaction), cex.main = 1.1) +legend("topleft", c("Albite - K-feldspar", "After Tutolo et al., 2014 Fig. 5"), bty = "n", cex = 0.9) +legend("bottomright", lty = c(0, 2, 1), pch = c(1, NA, NA), lwd = c(1, 1, 1.5), col = c("black", "blue", "black"), + legend = c("Merino, 1975", "SUPCRT92", "CHNOSZ"), bty = "n", cex = 0.9) +legend("right", describe.property(c("T", "P"), c(T, P)), bty = "n") +reset() + +par(opar) Deleted: pkg/CHNOSZ/demo/go-IU.R =================================================================== --- pkg/CHNOSZ/demo/go-IU.R 2019-04-15 14:00:52 UTC (rev 444) +++ pkg/CHNOSZ/demo/go-IU.R 2019-04-16 04:25:40 UTC (rev 445) @@ -1,138 +0,0 @@ -# CHNOSZ/demo/go-IU.R -# 20171018 comparisons with calculations of SUPCRTBL -# (BL = Bloomington campus of Indiana University) -# 20190415 add diagrams from Tutolo et al., 2014 - -## set up plotting area -opar <- par(mfrow = c(2, 2)) - -########### -### plot 1: boehmite - kaolinite equilibrium -########### -# After Zhu and Lu, 2009 (doi:10.1016/j.gca.2009.03.015) -# experimental data from Table 1 of Hemley et al., 1980 (doi:10.2113/gsecongeo.75.2.210) -xT <- c(200, 200, 200, 200, 250, 250, 265, 300, 300, 300, 300) -xlogaSiO2 <- -c(2.54, 2.59, 2.65, 2.77, 2.21, 2.32, 2.12, 1.90, 1.95, 1.94, 1.90) -## set up basis species so that axis.label shows activity of SiO2 -basis(c("Al2O3","SiO2", "H2O", "O2")) -T <- 125:350 -thermo.plot.new(xlim = range(T), ylim = c(-3.5, -1.5), xlab = axis.label("T"), ylab = axis.label("SiO2")) -points(xT, xlogaSiO2) -basis(delete = TRUE) -## first calculation: as in SUPCRT92 -add.obigt("SUPCRT92") # gets kaolinite and boehmite from HDNB78 -r1 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T = T, P = 1000, exceed.Ttr = TRUE) -# we need exceed.Ttr = TRUE because the T limit for boehmite is 500 K (Helgeson et al., 1978) -## second calculation: CHNOSZ default -# kaolinite from Berman, 1988 -# boehmite from Hemingway et al., 1991 -# SiO2 from Apps and Spycher, 2004 -reset() -r2 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T = T, P = 1000, exceed.Ttr = TRUE) -## third calculation: get SiO2(aq) from SHS89 -add.obigt("AS04") -r3 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T = T, P = 1000, exceed.Ttr = TRUE) -## log activity of SiO2 is -ve logK -lines(T, -r1$out$logK, col = "blue1", lty = 2) -lines(T, -r2$out$logK, lwd = 1.5) -lines(T, -r3$out$logK, col = "red", lty = 2) -## add points calculated using the SUPCRTBL package -points(seq(125, 350, 25), -c(3.489, 3.217, 2.967, 2.734, 2.517, 2.314, 2.124, 1.946, 1.781, 1.628), pch = 4, col = "red") -## add legend and title -title(main = describe.reaction(r1$reaction), cex.main = 1.1) -legend("bottomright", lty = c(0, 0, 2, 1, 2), pch = c(1, 4, NA, NA, NA), lwd = c(1, 1, 1, 1.5, 1), - col = c("black", "red", "black", "black", "red"), bty = "n", cex = 0.9, - legend = c("Hemley et al., 1980", "SUPCRTBL", "SUPCRT92", "CHNOSZ", 'add.obigt("AS04")')) -legend("topleft", c("Boehmite - Kaolinite", "After Zhu and Lu, 2009 Fig. A1"), bty = "n") -reset() -# Helgeson et al., 1978 (HDNB78): http://www.worldcat.org/oclc/13594862 -# Shock et al., 1989 (SHS89): doi:10.1016/0016-7037(89)90341-4 -# Berman, 1988 (Ber88): doi:10.1093/petrology/29.2.445 -# Holland and Powell, 2011 (HP11): 10.1111/j.1525-1314.2010.00923.x -# Hemingway et al., 1991 (HRA91): http://pubs.er.usgs.gov/publication/70016664 -# Apps and Spycher, 2004 (AS04): Bechtel SAIC Company, LLC ANL-NBS-HS-000043 REV 00 (DOC.20041118.0004) - -########### -### plot 2: dawsonite solubility -########### -# After Zimmer et al., 2016 (doi:10.1016/j.cageo.2016.02.013) -# experimental data from Benezeth et al., 2007 Table 5 (doi:10.1016/j.gca.2007.07.003) -# (averages for each temperature in a single run) -T <- c(100.1, 100.1, 150.1, 100.1, 150.1, 99.8, 99.8, 200.7, 99.8, 50.1, 75.1, 100.3, 150.1) -logK <- -c(14.825, 14.735, 13.625, 14.79, 13.665, 14.725, 14.1775, 12.74, 14.4925, 16.8625, 15.61, 14.51, 13.455) -plot(T, logK, xlim = c(25, 250), ylim = c(-18, -10), xlab = axis.label("T"), ylab = axis.label("logK")) -T <- 0:250 -# calculation 1: CHNOSZ default -species <- c("dawsonite", "H2O", "Al(OH)4-", "HCO3-", "Na+", "H+") -coeffs <- c(-1, -2, 1, 1, 1, 1) -Daw1 <- subcrt(species, coeffs, T = T) -# calculation 2: dawsonite with Cp = 0 -mod.obigt("dawsonite", Cp = 0) -Daw2 <- subcrt(species, coeffs, T = T) -## plot the calculated logKs -lines(T, Daw1$out$logK, lwd = 1.5) -lines(T, Daw2$out$logK, col = "red", lty = 2) -## add points calculated using the SUPCRTBL package -points(seq(25, 250, 25), c(-17.829, -16.523, -15.402, -14.425, -13.568, -12.815, -12.154, -11.581, -11.094, -10.699), pch=4, col="red") -## add legend and title -title(main = describe.reaction(Daw1$reaction), cex.main = 0.95) -legend("bottomright", lty = c(0, 0, 1, 2), pch = c(1, 4, NA, NA), col = c("black", "red", "black", "red"), lwd = c(1, 1, 1.5, 1), - bty = "n", cex = 0.9, legend = c("Ben\u00e9z\u00e9th et al., 2007", "SUPCRTBL", "CHNOSZ", 'mod.obigt("dawsonite", Cp = 0)')) -legend("topleft", c("Dawsonite solubility", "After Zimmer et al., 2016 Fig. 2"), bty = "n") -reset() - -########### -### plot 3: kaolinite solubility -########### -# After Tutolo et al., 2014, Fig. 2 (doi:10.1016/j.gca.2014.02.036) -dat <- read.csv(system.file("extdata/cpetc/TKSS14_Fig2.csv", package = "CHNOSZ")) -plot(dat, type = "p", xlim = c(3.5, 1.5), ylim = c(-2, 14), xlab = "1000/T(K)", ylab = "pK") -# plot line: default database -invTK <- seq(3.5, 1.6, -0.02) -T <- 1000/invTK - 273.15 -sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "H4SiO4"), c(-1, -2, -5, 2, 2), T = T) -pK <- -sres$out$logK -lines(invTK, pK, lwd = 1.5) -# plot line: SUPCRT92 -add.obigt("SUPCRT92") -sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "H4SiO4"), c(-1, -2, -5, 2, 2), T = T) -pK <- -sres$out$logK -lines(invTK, pK, col = "blue", lty = 2) -# add title and legend -par(xpd = NA) -title(main = describe.reaction(sres$reaction), cex.main = 1.1) -par(xpd = FALSE) -legend("topright", c("Kaolinite solubility", "After Tutolo et al., 2014 Fig. 2"), bty = "n") -legend("bottomleft", lty = c(0, 2, 1), pch = c(1, NA, NA), lwd = c(1, 1, 1.5), col = c("black", "blue", "black"), - legend = c("Tutolo et al., 2014", "SUPCRT92", "CHNOSZ"), bty = "n", cex = 0.9) -reset() - -########### -### plot 4: albite - K-feldspar exchange -########### -# After Tutolo et al., 2014, Fig. 5 (doi:10.1016/j.gca.2014.02.036) -# experimental data from Merino, 1975, Table 4 (doi:10.1016/0016-7037(75)90085-X) -# plot line calculated using default database -basis(c("Al2O3", "SiO2", "K+", "Na+", "O2", "H2O", "H+")) -species(c("albite", "K-feldspar")) -T <- 100 -P <- 150 -a <- affinity("K+" = c(4, 7), "Na+" = c(6, 9), T = T, P = P) -diagram(a, lwd = 1.5, xlab = ratlab("K+"), ylab = ratlab("Na+")) -# plot experimental data -dat <- read.csv(system.file("extdata/cpetc/Mer75_Table4.csv", package = "CHNOSZ")) -points(dat$log.aK..aH.., dat$log.aNa..aH..) -# plot line calculated using SUPCRT92 data -add.obigt("SUPCRT92") -a <- affinity("K+" = c(4, 7), "Na+" = c(6, 9), T = 100, P = 150) -diagram(a, col = "blue", lty = 2, add = TRUE, names = NULL) -# add title and legend -sres <- subcrt(c("albite", "K+", "K-feldspar", "Na+"), c(-1, -1, 1, 1)) -title(main = describe.reaction(sres$reaction), cex.main = 1.1) -legend("topleft", c("Albite - K-feldspar", "After Tutolo et al., 2014 Fig. 5"), bty = "n", cex = 0.9) -legend("bottomright", lty = c(0, 2, 1), pch = c(1, NA, NA), lwd = c(1, 1, 1.5), col = c("black", "blue", "black"), - legend = c("Merino, 1975", "SUPCRT92", "CHNOSZ"), bty = "n", cex = 0.9) -legend("right", describe.property(c("T", "P"), c(T, P)), bty = "n") -reset() - -par(opar) Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2019-04-15 14:00:52 UTC (rev 444) +++ pkg/CHNOSZ/inst/NEWS 2019-04-16 04:25:40 UTC (rev 445) @@ -1,4 +1,4 @@ -CHANGES IN CHNOSZ 1.3.1-25 (2019-04-15) +CHANGES IN CHNOSZ 1.3.1-26 (2019-04-16) --------------------------------------- - Add thermo/stoich.csv.xz (loaded as thermo()$stoich), containing a @@ -40,7 +40,8 @@ - Add demo/arsenic.R (Eh-pH diagram after Lu and Zhu, 2011). -- demo/go-IU.R: add plots from Tutolo et al., 2014. +- Rename demo/go-IU.R to aluminum.R, and add plots from Tutolo et al., + 2014. CHANGES IN CHNOSZ 1.3.1 (2019-03-02) ------------------------------------ Modified: pkg/CHNOSZ/man/diagram.Rd =================================================================== --- pkg/CHNOSZ/man/diagram.Rd 2019-04-15 14:00:52 UTC (rev 444) +++ pkg/CHNOSZ/man/diagram.Rd 2019-04-16 04:25:40 UTC (rev 445) @@ -274,7 +274,7 @@ species(c(AlOH, Al, AlF, AlOHF), "aq") res <- 300 a <- affinity(pH = c(0.5, 6.5, res), `F-` = c(-2, -9, res), T = 200) -diagram(a, fill = "pastel") +diagram(a, fill = "terrain") dprop <- describe.property(c("T", "P"), c(200, "Psat")) legend("topright", legend = dprop, bty = "n") mtitle(c("Aqueous aluminum species", Modified: pkg/CHNOSZ/man/examples.Rd =================================================================== --- pkg/CHNOSZ/man/examples.Rd 2019-04-15 14:00:52 UTC (rev 444) +++ pkg/CHNOSZ/man/examples.Rd 2019-04-16 04:25:40 UTC (rev 445) @@ -17,7 +17,7 @@ "density", "ORP", "revisit", "findit", "ionize", "buffer", "protbuff", "yeastgfp", "glycinate", "mosaic", "copper", "arsenic", "solubility", "gold", "contour", "wjd", "bugstab", - "Shh", "saturation", "adenine", "DEW", "lambda", "TCA", "go-IU", + "Shh", "saturation", "adenine", "DEW", "lambda", "TCA", "aluminum", "bison", "AkDi"), save.png=FALSE) } @@ -59,7 +59,7 @@ \code{DEW} \tab Deep Earth Water (DEW) model for high pressures (Sverjensky et al., 2014a and 2014b) \cr \code{lambda} \tab Effects of lambda transition on thermodynamic properties of quartz (Berman, 1988) \cr \code{TCA} \tab Standard Gibbs energies of the tricarboxylic (citric) acid cycle (Canovas and Shock, 2016) \cr - \code{go-IU} \tab Reactions involving Al-bearing minerals (Zimmer et al., 2016; Tutolo et al., 2014) \cr + \code{aluminum} \tab Reactions involving Al-bearing minerals (Zimmer et al., 2016; Tutolo et al., 2014) \cr \code{carboxylase} \tab Rank abundance distribution for RuBisCO and acetyl-CoA carboxylase \cr \code{bison} \tab Average oxidation state of carbon in proteins for phyla at Bison Pool (Dick and Shock, 2013) \cr \code{AkDi} \tab Henry's constant of dissolved gases (Akinfiev and Diamond, 2003) \cr Modified: pkg/CHNOSZ/man/extdata.Rd =================================================================== --- pkg/CHNOSZ/man/extdata.Rd 2019-04-15 14:00:52 UTC (rev 444) +++ pkg/CHNOSZ/man/extdata.Rd 2019-04-16 04:25:40 UTC (rev 445) @@ -48,8 +48,8 @@ \item \code{rubisco.csv} UniProt IDs for Rubisco, ranges of optimal growth temperature of organisms, domain and name of organisms, and URL of reference for growth temperature, from Dick, 2014. See the vignette \code{anintro.Rmd} for an example that uses this file. \item \code{bluered.txt} Blue - light grey - red color palette, computed using \CRANpkg{colorspace}\code{::diverge_hcl(1000,} \code{c = 100, l = c(50, 90), power = 1)}. This is used by \code{\link{ZC.col}}. \item \code{AD03_Fig1?.csv} Experimental data points digitized from Figure 1 of Akinfiev and Diamond, 2003, used in \code{\link{demos}("AkDi")}. - \item \code{TKSS14_Fig2.csv} Experimental data points digitized from Figure 2 of Tutolo et al., 2014, used in \code{\link{demos}("go-IU")}. - \item \code{Mer75_Table4.csv} Values of log(aK+/aH+) and log(aNa+/aH+) from Table 4 of Merino, 1975, used in \code{\link{demos}("go-IU")}. + \item \code{TKSS14_Fig2.csv} Experimental data points digitized from Figure 2 of Tutolo et al., 2014, used in \code{\link{demos}("aluminum")}. + \item \code{Mer75_Table4.csv} Values of log(aK+/aH+) and log(aNa+/aH+) from Table 4 of Merino, 1975, used in \code{\link{demos}("aluminum")}. } Files in \code{fasta} contain protein sequences: Modified: pkg/CHNOSZ/vignettes/anintro.Rmd =================================================================== --- pkg/CHNOSZ/vignettes/anintro.Rmd 2019-04-15 14:00:52 UTC (rev 444) +++ pkg/CHNOSZ/vignettes/anintro.Rmd 2019-04-16 04:25:40 UTC (rev 445) @@ -1975,7 +1975,7 @@ `add.obigt("AS04")` -- This file has data for aqueous `r sio2` from @AS04 and modified HSiO3-. These data are included to help transition to the "higher solubility of quartz paradigm" [@WJ17], but are not included in the default database in order to maintain compatibility with existing data for minerals that are linked to the older aqueous `r sio2` data. -See [`demo(go-IU)`](../demo) for an example. +See [`demo(aluminum)`](../demo) for an example. `add.obigt("DEW")` -- These are aqueous species, with modified parameters, that are intended for use with the [Deep Earth Water](http://www.dewcommunity.org/) (DEW) model [@SHA14]. You should also run `water("DEW")` to activate the equations in the model; then, they will be used by `subcrt()` and `affinity()`. Modified: pkg/CHNOSZ/vignettes/obigt.Rmd =================================================================== --- pkg/CHNOSZ/vignettes/obigt.Rmd 2019-04-15 14:00:52 UTC (rev 444) +++ pkg/CHNOSZ/vignettes/obigt.Rmd 2019-04-16 04:25:40 UTC (rev 445) @@ -250,7 +250,7 @@ ### `r setfile("AS04.csv")` ```{r AS04, results="asis", echo=FALSE} -cat('This file has data for aqueous SiO2 from @AS04 and modified HSiO3-. Use `add.obigt("AS04")` to load the data; see [`demo(go-IU)`](../demo) for an example.\n\n') +cat('This file has data for aqueous SiO2 from @AS04 and modified HSiO3-. Use `add.obigt("AS04")` to load the data; see [`demo(aluminum)`](../demo) for an example.\n\n') ``` ```{r optreflist, results="asis", echo=FALSE} From noreply at r-forge.r-project.org Tue Apr 16 07:25:58 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 16 Apr 2019 07:25:58 +0200 (CEST) Subject: [CHNOSZ-commits] r446 - in pkg/CHNOSZ: . vignettes Message-ID: <20190416052559.3C02918D00F@r-forge.r-project.org> Author: jedick Date: 2019-04-16 07:25:57 +0200 (Tue, 16 Apr 2019) New Revision: 446 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/vignettes/CHNOSZ.png pkg/CHNOSZ/vignettes/anintro.Rmd pkg/CHNOSZ/vignettes/eos-regress.Rmd pkg/CHNOSZ/vignettes/obigt.Rmd Log: vignettes: use %\VignetteEncoding{UTF-8} Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-16 04:25:40 UTC (rev 445) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-16 05:25:57 UTC (rev 446) @@ -1,6 +1,6 @@ Date: 2019-04-16 Package: CHNOSZ -Version: 1.3.1-26 +Version: 1.3.1-27 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/vignettes/CHNOSZ.png =================================================================== (Binary files differ) Modified: pkg/CHNOSZ/vignettes/anintro.Rmd =================================================================== --- pkg/CHNOSZ/vignettes/anintro.Rmd 2019-04-16 04:25:40 UTC (rev 445) +++ pkg/CHNOSZ/vignettes/anintro.Rmd 2019-04-16 05:25:57 UTC (rev 446) @@ -17,7 +17,7 @@ vignette: > %\VignetteIndexEntry{An Introduction to CHNOSZ} %\VignetteEngine{knitr::rmarkdown} - \usepackage[utf8]{inputenc} + %\VignetteEncoding{UTF-8} bibliography: vig.bib link-citations: yes csl: elementa.csl Modified: pkg/CHNOSZ/vignettes/eos-regress.Rmd =================================================================== --- pkg/CHNOSZ/vignettes/eos-regress.Rmd 2019-04-16 04:25:40 UTC (rev 445) +++ pkg/CHNOSZ/vignettes/eos-regress.Rmd 2019-04-16 05:25:57 UTC (rev 446) @@ -18,7 +18,7 @@ vignette: > %\VignetteIndexEntry{Regressing thermodynamic data} %\VignetteEngine{knitr::rmarkdown} - \usepackage[utf8]{inputenc} + %\VignetteEncoding{UTF-8} bibliography: vig.bib link-citations: yes csl: elementa.csl Modified: pkg/CHNOSZ/vignettes/obigt.Rmd =================================================================== --- pkg/CHNOSZ/vignettes/obigt.Rmd 2019-04-16 04:25:40 UTC (rev 445) +++ pkg/CHNOSZ/vignettes/obigt.Rmd 2019-04-16 05:25:57 UTC (rev 446) @@ -9,7 +9,7 @@ vignette: > %\VignetteIndexEntry{Thermodynamic data in CHNOSZ} %\VignetteEngine{knitr::rmarkdown} - \usepackage[utf8]{inputenc} + %\VignetteEncoding{UTF-8} bibliography: obigt.bib # so that these appear in the bibliography nocite: | @@ -234,7 +234,7 @@ ### `r setfile("SLOP98.csv")` ```{r SLOP98, results="asis", echo=FALSE} -cat('These species, which were taken from or are linked to slop98.dat (or later versions) and were present in earlier versions of CHNOSZ, have been replaced by or are incompatible with species currently in the default database, including aqueous Al species [@TS01], As species [@NA03], Au, Ag, and Cu species [@AZ01; @AZ10], Pd species [@TBZ+13], Zn species [@AT14], and Pt species [@TBB15]. This file also contains aqueous transuranic actinide complexes, for which estimated thermodynamic properties have been reported, but no entropies of the corresponding elements at 298.15 K are available to check the self-consistency of the GHS values for the complexes. The data are kept here to enable comparisons with newer data and reproduction of published calculations. Use `add.obigt("SLOP98")` to load the data. **NOTE:** Many other species found in slop98.dat and later versions are still present in the default database.\n\n') +cat('These species, which were taken from or are linked to slop98.dat (or later versions) and were present in earlier versions of CHNOSZ, have been replaced by or are incompatible with species currently in the default database, including aqueous Al species [@TS01], As species [@NA03], Au, Ag, and Cu species [@AZ01; @AZ10], Pd species [@TBZ+13], Zn species [@AT14], and Pt species [@TBB15]. This file also contains aqueous transuranic actinide complexes, for which estimated thermodynamic properties have been reported, but no entropies of the corresponding elements at 298.15 K are available to check the self-consistency of the GHS values for the complexes. Use `add.obigt("SLOP98")` to load the data. **NOTE:** Many other species found in slop98.dat and later versions are still present in the default database.\n\n') ``` ```{r optreflist, results="asis", echo=FALSE} @@ -242,7 +242,7 @@ ### `r setfile("OldAA.csv")` ```{r OldAA, results="asis", echo=FALSE} -cat('Data for these amino acids and related species were present in earlier versions of CHNOSZ but have been replaced by or are incompatible with later updates [@LD12; @Kit14; @AKAE19]. The data are kept here to reproduce published calculations and for comparison with newer data. Use `add.obigt("OldAA")` to load the data.\n\n') +cat('Data for these amino acids and related species were present in earlier versions of CHNOSZ but have been replaced by or are incompatible with later updates [@LD12; @Kit14; @AKAE19]. Use `add.obigt("OldAA")` to load the data.\n\n') ``` ```{r optreflist, results="asis", echo=FALSE} From noreply at r-forge.r-project.org Tue Apr 16 08:07:09 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 16 Apr 2019 08:07:09 +0200 (CEST) Subject: [CHNOSZ-commits] r447 - in pkg/CHNOSZ: . demo inst inst/extdata/OBIGT vignettes Message-ID: <20190416060709.3DA62183881@r-forge.r-project.org> Author: jedick Date: 2019-04-16 08:07:08 +0200 (Tue, 16 Apr 2019) New Revision: 447 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/demo/aluminum.R pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_cr.csv.xz pkg/CHNOSZ/inst/extdata/OBIGT/refs.csv pkg/CHNOSZ/vignettes/obigt.bib Log: OBIGT: use dawsonite Cp coefficients from Tutolo et al., 2014 Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-16 05:25:57 UTC (rev 446) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-16 06:07:08 UTC (rev 447) @@ -1,6 +1,6 @@ Date: 2019-04-16 Package: CHNOSZ -Version: 1.3.1-27 +Version: 1.3.1-28 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/aluminum.R =================================================================== --- pkg/CHNOSZ/demo/aluminum.R 2019-04-16 05:25:57 UTC (rev 446) +++ pkg/CHNOSZ/demo/aluminum.R 2019-04-16 06:07:08 UTC (rev 447) @@ -66,7 +66,7 @@ coeffs <- c(-1, -2, 1, 1, 1, 1) Daw1 <- subcrt(species, coeffs, T = T) # calculation 2: dawsonite with Cp = 0 -mod.obigt("dawsonite", Cp = 0) +mod.obigt("dawsonite", Cp = 0, a = 0, b = 0, c = 0) Daw2 <- subcrt(species, coeffs, T = T) ## plot the calculated logKs lines(T, Daw1$out$logK, lwd = 1.5) @@ -76,7 +76,7 @@ ## add legend and title title(main = describe.reaction(Daw1$reaction), cex.main = 0.95) legend("bottomright", lty = c(0, 0, 1, 2), pch = c(1, 4, NA, NA), col = c("black", "red", "black", "red"), lwd = c(1, 1, 1.5, 1), - bty = "n", cex = 0.9, legend = c("Ben\u00e9z\u00e9th et al., 2007", "SUPCRTBL", "CHNOSZ", 'mod.obigt("dawsonite", Cp = 0)')) + bty = "n", cex = 0.9, legend = c("Ben\u00e9z\u00e9th et al., 2007", "SUPCRTBL", "CHNOSZ", 'Cp(dawsonite) = 0')) legend("topleft", c("Dawsonite solubility", "After Zimmer et al., 2016 Fig. 2"), bty = "n") reset() Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2019-04-16 05:25:57 UTC (rev 446) +++ pkg/CHNOSZ/inst/NEWS 2019-04-16 06:07:08 UTC (rev 447) @@ -43,6 +43,8 @@ - Rename demo/go-IU.R to aluminum.R, and add plots from Tutolo et al., 2014. +- OBIGT: use dawsonite Cp coefficients from Tutolo et al., 2014. + CHANGES IN CHNOSZ 1.3.1 (2019-03-02) ------------------------------------ Modified: pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_cr.csv.xz =================================================================== --- pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_cr.csv.xz 2019-04-16 05:25:57 UTC (rev 446) +++ pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_cr.csv.xz 2019-04-16 06:07:08 UTC (rev 447) @@ -1,4 +1,4 @@ -?7zXZ???F!t/???8mE]7I??b???9??????TB;q?"?q???cL;?"????Q???7?.42&l{?3???a???Z?r??XeQo?(l?N???<$>??3O?R?>-$?C??????HY??c????I??9?H?C??( ???T???s?.b(W?Vq:v Vg[7Qq3???{?m$xt???:dKfZ??RxP%@w????c2?_?O^?o P$??D?QyM3? R?]u?i???_[?F5(X2????;@??#5;'Z?#}?, ?????g"f??'???)??V???????*%???? ???X??\?D??]??T? i? rP??4Nx ?\V?Mc??? I???)?????e?????4? -??Hn??m????@i????,E???6i2???z?q???wb??V??;F?3-??R??? -V?Q?#?'|???C?2?????#?TL}`?ZKD#?9?????v}V?nvmD&?i7 Author: jedick Date: 2019-04-16 11:50:20 +0200 (Tue, 16 Apr 2019) New Revision: 448 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/demo/aluminum.R pkg/CHNOSZ/inst/CHECKLIST pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/inst/extdata/OBIGT/AS04.csv pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_aq.csv.xz pkg/CHNOSZ/inst/extdata/thermo/stoich.csv.xz pkg/CHNOSZ/man/add.obigt.Rd pkg/CHNOSZ/vignettes/eos-regress.Rmd pkg/CHNOSZ/vignettes/mklinks.sh pkg/CHNOSZ/vignettes/obigt.Rmd Log: OBIGT: move H4SiO4 to AS04.csv (optional data) Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-16 06:07:08 UTC (rev 447) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-16 09:50:20 UTC (rev 448) @@ -1,6 +1,6 @@ Date: 2019-04-16 Package: CHNOSZ -Version: 1.3.1-28 +Version: 1.3.1-29 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/aluminum.R =================================================================== --- pkg/CHNOSZ/demo/aluminum.R 2019-04-16 06:07:08 UTC (rev 447) +++ pkg/CHNOSZ/demo/aluminum.R 2019-04-16 09:50:20 UTC (rev 448) @@ -89,12 +89,18 @@ # plot line: default database invTK <- seq(3.5, 1.6, -0.02) T <- 1000/invTK - 273.15 -sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "H4SiO4"), c(-1, -2, -5, 2, 2), T = T) +sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "SiO2", "H2O"), c(-1, -2, -5, 2, 2, 4), T = T) pK <- -sres$out$logK lines(invTK, pK, lwd = 1.5) +# plot line: default database with AS04 SiO2 +add.obigt("AS04") +sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "SiO2", "H2O"), c(-1, -2, -5, 2, 2, 4), T = T) +pK <- -sres$out$logK +lines(invTK, pK, col = "red", lty = 2) +reset() # plot line: SUPCRT92 add.obigt("SUPCRT92") -sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "H4SiO4"), c(-1, -2, -5, 2, 2), T = T) +sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "SiO2", "H2O"), c(-1, -2, -5, 2, 2, 4), T = T) pK <- -sres$out$logK lines(invTK, pK, col = "blue", lty = 2) # add title and legend @@ -102,8 +108,8 @@ title(main = describe.reaction(sres$reaction), cex.main = 1.1) par(xpd = FALSE) legend("topright", c("Kaolinite solubility", "After Tutolo et al., 2014 Fig. 2"), bty = "n") -legend("bottomleft", lty = c(0, 2, 1), pch = c(1, NA, NA), lwd = c(1, 1, 1.5), col = c("black", "blue", "black"), - legend = c("Tutolo et al., 2014", "SUPCRT92", "CHNOSZ"), bty = "n", cex = 0.9) +legend("bottomleft", lty = c(0, 2, 1, 2), pch = c(1, NA, NA, NA), lwd = c(1, 1, 1.5, 1), col = c("black", "blue", "black", "red"), + legend = c("Tutolo et al., 2014", "SUPCRT92", "CHNOSZ", 'add.obigt("AS04")'), bty = "n", cex = 0.9) reset() ########### Modified: pkg/CHNOSZ/inst/CHECKLIST =================================================================== --- pkg/CHNOSZ/inst/CHECKLIST 2019-04-16 06:07:08 UTC (rev 447) +++ pkg/CHNOSZ/inst/CHECKLIST 2019-04-16 09:50:20 UTC (rev 448) @@ -33,7 +33,7 @@ - vignettes/obigt.bib: check correct year for CHNOSZ reference - documentation links: after installation, run doc/mklinks.sh - and insert the modified anintro.html in the package + and put the modified anintro.html and obigt.html in the package - backwards compatibility: build and check the package with the *minimum* R version (from the DESCRIPTION file) Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2019-04-16 06:07:08 UTC (rev 447) +++ pkg/CHNOSZ/inst/NEWS 2019-04-16 09:50:20 UTC (rev 448) @@ -1,4 +1,4 @@ -CHANGES IN CHNOSZ 1.3.1-26 (2019-04-16) +CHANGES IN CHNOSZ 1.3.1-29 (2019-04-16) --------------------------------------- - Add thermo/stoich.csv.xz (loaded as thermo()$stoich), containing a @@ -45,6 +45,8 @@ - OBIGT: use dawsonite Cp coefficients from Tutolo et al., 2014. +- OBIGT: Move H4SiO4 (Stef??nsson, 2001) to AS04.csv (optional data). + CHANGES IN CHNOSZ 1.3.1 (2019-03-02) ------------------------------------ Modified: pkg/CHNOSZ/inst/extdata/OBIGT/AS04.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/OBIGT/AS04.csv 2019-04-16 06:07:08 UTC (rev 447) +++ pkg/CHNOSZ/inst/extdata/OBIGT/AS04.csv 2019-04-16 09:50:20 UTC (rev 448) @@ -1,3 +1,4 @@ name,abbrv,formula,state,ref1,ref2,date,G,H,S,Cp,V,a1.a,a2.b,a3.c,a4.d,c1.e,c2.f,omega.lambda,z.T +H4SiO4,NA,H4SiO4,aq,Ste01,NA,31.Aug.06,-312919.933078394,-348676.147227533,45.1003824091778,15.0095602294455,52.3,18.7299235181644,-21.2600382409178,18.6199808795411,-1.20004780114723,58.0305927342256,-20.789913957935,0.0869024856596558,0 SiO2,NA,SiO2,aq,AS04,NA,08.Feb.19,-199540,-212179,11.128325,-22.324515,15.575422,1.9,1.7,20,-2.7,32.221331,-25.288582,0.342671,0 HSiO3-,HSiO3-,HSiO3-,aq,"SSH97.2 [S98]",CHNOSZ.8,08.Feb.19,-243151,-276276,-1.871675,-21,5,2.9735,-0.5158,5.9467,-2.7575,8.1489,-7.3123,1.5511,-1 Modified: pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_aq.csv.xz =================================================================== --- pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_aq.csv.xz 2019-04-16 06:07:08 UTC (rev 447) +++ pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_aq.csv.xz 2019-04-16 09:50:20 UTC (rev 448) @@ -1,4 +1,4 @@ -?7zXZ???F!t/??????}]7I??b???9??????TB;q?"?q???cL;?"??t?;M??}???????KA????ys??6/z?@Ge?Tp???=Bg???=?? ]???p?{3_U)[??~????3P???????cO?i?J \?k????j??g????3C)???oz;?J??H????Ayh??^v]?7? -Nk?4????uw?????6?w?T????_??@aQ??R??|,??H????Y?BM?kUJ??.wm?????Bs?c??~s?k??1??f?????b??sbt??>*HN??????_qs}?????,????JeP?????^??V??8??U?t *K??Frk?0OR|???( ?1??m?8?"???Jx?*?{??????? /?:J??,;X?> -+????XMy?y??z????_GZ  ?C??<? &?? ??????????????.???K9????o?gqJ>q?~??2???????>???e1]?b??????%????5????_$Q??[?9?T?b5??? -?>'?i?:,_V 1e.???}?H??3.??;?B????gpDG?I N???qh?~? -?u -??Y?=???}f?|V?Z?,DBN?_??,??[????,RZ???UZ?/??0Ep9??;C????S -?????L??x????O?wLv??HaEZ??????????G? -k????v???+d??@? ??W3??? ??;?1?|"?'????d@??? p.?6?P????i!?????CD[???5)=q??9Z????'9???$O??S8~Kg???-{O??\a?GL?'9?-`??*T?J???]??\xX}~?x?? ??{??????zg?>_HZ????S??`???4?/?????hU%?'?? -J?E?s?;ac?aj[?????spC????f*?M???@Z??l??{??9???:Y?D ??,8"B$??Q`?:4????%????????"?'??????\?i???r??}Ke??KPs??l?vWPc??k?M (??SA?[=??b ?P?4???????W??-????N??/W??XY:V}?@b5??:???????1???g?A?#???X??????F??o?Q?(p??c88??,??????h?t/???76~?7???\A?p|???0???? H????Vd?8?U+??T?Z?M?????x????i???+o??T????C*c/Y??w??|????_???fV_w?"N?m??%?Z??.?????Y???? ?P*$???B8=?[L??)?/h???:???6?S???"??E?:k???a9??x??U?l?~# -?S%o????k?? ?T??r$x??? -?? -??? D=t?J???????g??5?s?jY ?K$??4?u6mn??ej??-I?6N??*c??,$??~??WG?k?Q??o?~???w??T???Xv????v=f,???Y ?U0:p]?Z???B?|?t>Q?|*????s*:0????V?k???? -t?~???\D?M?4???\?a)?f??r???? ? /?????V?W??C!Ai????x?'?????6???J?'?????!??( ??La?0F ?y?JnZ*??x69Y??:>?????i??x'?a?????l??_?????G?????1??5?7N|?Z;8`f6?a?a??<'sH??4?:???????;????r???#r?t??>~4#??U?4??rP????\ ?'L?To??&?? -???2H? ??01???d?%?8g??l???~?????EH'??fu?e??UA??\?????JI: ?????`?b??k??n??3MM??_g?e?Zt????+??P?~????.p?_]??dX?/A?9?-???*?????G?? -?????M????/;?j??????"?sE9?.v?JjK?!?t????PL??g????????&Ko(??6??R???J???2??N?@??(?9?????????? -_Pm???`??????.p?RE?vP??Z??????H*9gFy? -??C??,????yb?{?5k?##~??&?a ????U<~???wH?C?@???zj3??i??V?7???rID?&?I?6=?-!?L??rO*? \???????oP????"?2???X????tSi>]??9*?o~H???1 -O~`??K=?? ? -t? -< ??????yD?????~?????4????0???`?4cO?nC?L? -?8?(?:M????a???6p??y?S??6?X(?-????Paq???n?T?&g{0?M"e????W?\?? -q?????J?*8?#Q?@?q~?l???5???? ???$(?4?L???qf:-}???a*?~%??9???(??vQI????em?$??4?M???????L48??V?[} ?@X/(???????M?R????`????L?????!j??3d:d?????YH?x?t9H?M?E?C'Ax??Q?\[Q?[N?w|E?l?2?{(?Nj??g?E~?????G9c5???Di?????|??d??N?"?}?k?d??U9?ht?? -MD????g!?r?< -Hb|?WdB???????@??????r#&?????????5?>:??g~??f????t??? ?dQ??6?e=n!!k.+g???E?#.?| U?I Iq?R)???@? P?>??RM??????B???):#?k? ???7???"8???;?)l>S?k+?Nc6?<<??? ???Y?a?|o?????Uc? S?{?p0Tp???S???i?E?Vd??R???Fl?7??`?=?[??Fv??8?2?{???~?K?k%??? -?pq}u< -tCa??ko?????????9?$??P????H???c?=Pm??6??[??w.?7??p????X?@???3???c?c??w)1??} ?????=J???b??/?;??.="?i ???f?h?};?N???f????"?y??uMO???q^Nd?Q?)?t?gp?L??????Dk?}u???&k??????6)????????f Dl?t?pA???????t?;M??}???????=??????7 +?[d??$q??Ngn??:L???4?N?? +?O?? &???@??Ri??X????q?z???????.9?/X3}??? ?-1?'?7|Jk???? ???Iy??Sr?[8?I???????Z"2?T/??x??(o"`C?+ ?M?? ?-i????&????$z???&?y~'m2????9?????t?Y?J??(?o?^%?YC?8Z%\z?VS?&T`???h??e???xw??????{k +??N??????j???A1JZ? _??b?h??>V?%??4?? z/?)fWt?v????R?????????{a??9?w???????D???j???p'?c)???ih;:??5`?CP,c?-(????8V??? +K(?S0?#?? ???????5?4?o?? M??A?????eqSv?X?#??????%?h???? +2???D????y???~>#aTg???e?7??mH] ??????Q?Ns??? +`o????????#??C4j_??T????\???|?S$!??=aJ/??!N?X? +j?c?? ???HEsr?F?4?x]?o^?U?rt??!? ?F?a???eo??q???????????7Q'N??q* @????????H??|Im?]????Fj?OB??]X???9]?#%????u???] ?uRY?4??pB????b????%??N????6?=J?&?tu?kNt3o?o???Z????#??????p?pl??D?u?wGXK??X?5p?~??????v?!?????^a?????|?2?I?(??????)?2?.??o?????p?qY????????F,3f?`?k????W??????????$?UV??c????2?2C????.GH??,j#??e@?aZ?O??????*??N??t,g?k??!??I??= ???? j???+to? xZC?re???I??U??a?aE?t`???????|?D?)cu??????A????Hp???_?3in?L|!V???`?m?kk??i??My +????????s? + s??????)g?&????*?EZD?? +??Y????c???8???????????AFmQ0?????(&k_???~fa??????{??????!?P?T??Qn%??R:?Z??2?}?????x\??|V?P???f?????Ma?R???wTR????9}F8?? ??e)W???8??????r?g???u?Wm??x?????????5?d????#f????(???u??$]?yi??DLU?b?#2?P+p??9?p!Y?Y?c?'??Xq}??????\o??:Rm?*?a??j???I?A?L??$A??,[ iy???}VuQG??j)??]I??@? ?j ?-?:?dvH?j??n?W??qnN?6( ?Q???n???????#s?xy??)?? +o???????2O#}|?tS_i???uE??????r}?nOiY<4????h.r?1???m"B??_?y??J;??g?'?w???^lPYZ??N???}W?ZDXl??? ??? 2???Yhnx??I???\?"NL?W?r???Y????v???fU?hAQ???6????exXx!1;*??????n?X???????2??%t?8????%t?]??/Ud8 +|.ch??N??L??C?w????;???????/(.??f9???0?T?|???6#?)2?G??????!?d?L???8 ???@??D?????iR +??0?Y2?CTX?N +????~?[??U?R?e????s>?94?? ??;???3????`!??????=??????S1???~?)K??????p?8???~?``Hw??v??w?l?w6D????` +??n?EC ????i???????;???R???5??m=?????e-z?????Lc???c?Gy??????2Q+?&??????? ?8??$5n???[^?4a?e?3I(??????x'?? >?I??D1?O G? +?0\3????? ,??????? ????[MCJYRM?a?,O?BV"??c_?QC?(?p??=N???>)t%??fJ?3????:???a????+R?r?s?i????OG??n???hgo????@ ?q?NE?9F??Y?b?k??cb??F?7?u?}~u?.?MI??;h????Z? [? d????&?on?F?)??????????!Z??x??`??*h??*?W?????O3Q?S&x?7?U$? ???? +???y+??????&?+??OD_/??|?sww??>??M??w +????????L??fU"?7;r /??Fu?????????.?eq m?????W ??h???s??*?!???i??+PE???????`]XnP+?Kv:?}?M??s?#?$??b&?b_A?//Z]9? +??u??????"(R=I7?? ????K???EG??d? 9??YoX??????,?N?9|?=????"(???F????"7_??????7? ?J??9/??l???M??9???z? ?8RyD???"z?z!l?o>b??ELK???s??mlQ??O"b??J +? +6?X?i)!?????fO?UC0@??{p!????????N??.v????2?o?:P??[????rsI9?Zld?????0?}u??'?8%H?~???? R(??k??C?P9?h?$?7.?G6`??G'???A??4B?????^???????? \?????????W??%n????p???s/?3J?6?????8e?X?ny???C????L??U??????D3H??????C??????*?e????_?^???_ Pk$??0???$M??L????????[ ?*{U\?N h???m^???].$? +?????)??V?#'?????t?t???p???!? J??s???a4"a?g?w;???Q73Pd???3zM%???Z?_??kt?????c5#???T?u i[? ??u$???+???J ???'Q?lHH?2?g7?BR?T%??g??????? r??????NV1a???|?k-?.t?[n???UCB????EW7h6??t&+9xH?? ????,??pD?&??W?#??????~??]? ??Y???S?t????+??^ +R?"?8???????!1??m???????r*zu?`water()`](http://www.chnosz.net/manual/water.html)-related functions in CHNOSZ and [`lm()` in R](http://stat.ethz.ch/R-manual/R-patched/library/stats/html/lm.html). +The regression functions are essentially a wrapper around the `water()`-related functions in CHNOSZ and `lm()` in R. The former provide values of the Born functions. Accordingly, numerical values for all of the *variables* in the equations (e.g. 1/(*T* - ??)2 and *TX*) can be calculated at each experimental *T* and *P*. @@ -396,12 +396,12 @@ ``` We just calculated the properties of the `r h4sio4` pseudospecies. -For comparison, the database in CHNOSZ contains `pseudo-H4SiO4` with parameters from @Ste01: +For comparison, the database in CHNOSZ contains `H4SiO4` with parameters from @Ste01: ```{r width180, include=FALSE} options(width = 180) ``` ```{r info_H4SiO4, message=FALSE} -info(info(c("calc-H4SiO4", "pseudo-H4SiO4"))) +info(info(c("calc-H4SiO4", "H4SiO4"))) ``` ```{r width80, include=FALSE} ``` @@ -410,28 +410,28 @@ s1 <- subcrt(c("calc-H4SiO4", "SiO2", "H2O"), c(-1, 1, 2)) plot(s1$out$T, s1$out$G, type = "l", ylim = c(-100, 600), xlab = axis.label("T"), ylab = axis.label("DG0")) -s2 <- subcrt(c("pseudo-H4SiO4", "SiO2", "H2O"), c(-1, 1, 2)) +s2 <- subcrt(c("H4SiO4", "SiO2", "H2O"), c(-1, 1, 2)) lines(s2$out$T, s2$out$G, lty = 2) abline(h = 0, lty = 3) legend("topright", legend = c("calc-H4SiO4 (this vignette)", - "pseudo-H4SiO4", "(Stef??nsson, 2001)"), lty = c(1, 2, NA), bty = "n") + "H4SiO4", "(Stef??nsson, 2001)"), lty = c(1, 2, NA), bty = "n") text(225, 250, describe.reaction(s1$reaction)) ``` -Let's compare `pseudo-H4SiO4` from Stef??nsson (2001) and the `calc-H4SiO4` we just made with the calculated properties of `r sio2` + 2 `r h2o` as a function of temperature: +Let's compare `H4SiO4` from Stef??nsson (2001) and the `calc-H4SiO4` we just made with the calculated properties of `r sio2` + 2 `r h2o` as a function of temperature: ```{r subcrt_H4SiO4, eval=FALSE} ``` Ideally, the lines would be horizontal with a _y_-interecept of 0. -However, both the `calc-H4SiO4` we made here and the `pseudo-H4SiO4` from Stef??nsson (2001) show deviations that increase at higher temperatures. +However, both the `calc-H4SiO4` we made here and the `H4SiO4` from Stef??nsson (2001) show deviations that increase at higher temperatures. While they are not quite negligible, these deviations are comparatively small. For example, the almost 200 cal/mol offset in ΔG° at 350 °C corresponds to a difference in logK of only -0.07. -The following example uses the `pseudo-H4SiO4` from Stef??nsson (2001) to make an activity diagram for the K2O-Al2O3-SiO2-H2O system. +The following example uses the `H4SiO4` from Stef??nsson (2001) to make an activity diagram for the K2O-Al2O3-SiO2-H2O system. This is similar to diagrams found, for example, on p. 361 of [Garrels and Christ, 1965](http://www.worldcat.org/oclc/517586) and Figure 3 of [Steinmann et al., 1994](http://ccm.geoscienceworld.org/content/42/2/197), but is quantitatively a closer match to the diagram in the [User's Guide to PHREEQC](https://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc/html/final-75.html). ```{r activity_diagram, fig.margin=TRUE, fig.width=4, fig.height=4, small.mar=TRUE, echo=TRUE, results="hide", message=FALSE, dpi=dpi, out.width="100%", cache=TRUE, fig.cap="Activity diagram for K2O-Al2O3-SiO2-H2O.", pngquant=pngquant} -basis(c("Al+3", "pseudo-H4SiO4", "K+", "H2O", "H+", "O2")) +basis(c("Al+3", "H4SiO4", "K+", "H2O", "H+", "O2")) species(c("gibbsite", "muscovite", "kaolinite", "pyrophyllite", "K-feldspar")) a <- affinity(H4SiO4 = c(-8, 0, 300), `K+` = c(-1, 8, 300)) diagram(a, ylab = ratlab("K+"), fill = "terrain", yline = 1.7) Modified: pkg/CHNOSZ/vignettes/mklinks.sh =================================================================== --- pkg/CHNOSZ/vignettes/mklinks.sh 2019-04-16 06:07:08 UTC (rev 447) +++ pkg/CHNOSZ/vignettes/mklinks.sh 2019-04-16 09:50:20 UTC (rev 448) @@ -37,7 +37,7 @@ sed -i '120,$s/diagram()<\/code>/
diagram()<\/a><\/code>/g' anintro.html sed -i '120,$s/basis()<\/code>/basis()<\/a><\/code>/g' anintro.html sed -i '120,$s/species()<\/code>/species()<\/a><\/code>/g' anintro.html -sed -i '120,$s/reset()<\/code>/reset()<\/a><\/code>/g' anintro.html +sed -i '120,$s/reset()<\/code>/reset()<\/a><\/code>/g' anintro.html sed -i '120,$s/describe.reaction()<\/code>/describe.reaction()<\/a><\/code>/g' anintro.html sed -i '120,$s/swap.basis()<\/code>/swap.basis()<\/a><\/code>/g' anintro.html sed -i '120,$s/water.lines()<\/code>/water.lines()<\/a><\/code>/g' anintro.html @@ -45,6 +45,7 @@ sed -i '120,$s/mosaic()<\/code>/mosaic()<\/a><\/code>/g' anintro.html sed -i '120,$s/convert()<\/code>/convert()<\/a><\/code>/g' anintro.html sed -i '120,$s/mod.buffer()<\/code>/mod.buffer()<\/a><\/code>/g' anintro.html +sed -i '120,$s/reset\$/reset<\/a>\$/g' anintro.html sed -i '120,$s/solubility()<\/code>/solubility()<\/a><\/code>/g' anintro.html sed -i '120,$s/ZC.col()<\/code>/ZC.col()<\/a><\/code>/g' anintro.html sed -i '120,$s/aminoacids(\"\")<\/code>/aminoacids(\"\")<\/a><\/code>/g' anintro.html @@ -95,3 +96,8 @@ sed -i '120,$s/substitute()/substitute()<\/a>/g' anintro.html sed -i '120,$s/for()/for()<\/a>/g' anintro.html sed -i '120,$s/browseURL()/browseURL()<\/a>/g' anintro.html + +# add links to obigt.Rmd +sed -i '120,$s/add.obigt()<\/code>/add.obigt()<\/a><\/code>/g' obigt.html +sed -i '120,$s/reset()<\/code>/reset()<\/a><\/code>/g' obigt.html +sed -i 's/?add.obigt<\/code>/?add.obigt<\/a><\/code>/g' obigt.html Modified: pkg/CHNOSZ/vignettes/obigt.Rmd =================================================================== --- pkg/CHNOSZ/vignettes/obigt.Rmd 2019-04-16 06:07:08 UTC (rev 447) +++ pkg/CHNOSZ/vignettes/obigt.Rmd 2019-04-16 09:50:20 UTC (rev 448) @@ -250,7 +250,7 @@ ### `r setfile("AS04.csv")` ```{r AS04, results="asis", echo=FALSE} -cat('This file has data for aqueous SiO2 from @AS04 and modified HSiO3-. Use `add.obigt("AS04")` to load the data; see [`demo(aluminum)`](../demo) for an example.\n\n') +cat('This file has data for aqueous SiO2 from @AS04 and a modified HSiO3- to be consistent with the SiO2 here. This file also has H4SiO4 from an earlier publication [@Ste01] that is roughly consistent with SiO2 here (see `?add.obigt`). Use `add.obigt("AS04")` to load the data; see [*Regressing thermodynamic data*](eos-regress.html) for an example.\n\n') ``` ```{r optreflist, results="asis", echo=FALSE} From noreply at r-forge.r-project.org Tue Apr 16 14:42:20 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 16 Apr 2019 14:42:20 +0200 (CEST) Subject: [CHNOSZ-commits] r449 - in pkg/CHNOSZ: . R demo inst man Message-ID: <20190416124220.C366E18B9ED@r-forge.r-project.org> Author: jedick Date: 2019-04-16 14:42:20 +0200 (Tue, 16 Apr 2019) New Revision: 449 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/R/diagram.R pkg/CHNOSZ/R/util.plot.R pkg/CHNOSZ/demo/aluminum.R pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/man/util.plot.Rd Log: thermo.axis(): don't plot axis lines Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-16 09:50:20 UTC (rev 448) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-16 12:42:20 UTC (rev 449) @@ -1,6 +1,6 @@ Date: 2019-04-16 Package: CHNOSZ -Version: 1.3.1-29 +Version: 1.3.1-30 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/diagram.R =================================================================== --- pkg/CHNOSZ/R/diagram.R 2019-04-16 09:50:20 UTC (rev 448) +++ pkg/CHNOSZ/R/diagram.R 2019-04-16 12:42:20 UTC (rev 449) @@ -629,7 +629,13 @@ else linesout <- contour.lines(predominant, xlim.calc, ylim.calc, lty=lty, col=col, lwd=lwd) } # re-draw the tick marks and axis lines in case the fill obscured them - if(tplot & !identical(fill, "transparent")) thermo.axis() + has.color <- FALSE + if(!identical(unique(fill), "transparent")) has.color <- TRUE + if(any(is.na(zs)) & !identical(fill.NA, "transparent")) has.color <- TRUE + if(tplot & !add & has.color) { + thermo.axis() + box() + } } # done with the 2D plot! out2D <- list(namesx=pn$namesx, namesy=pn$namesy) } # end if(nd==2) @@ -661,7 +667,7 @@ plot.xlim <- c(xlim[1]-xpad,xlim[2]+xpad) ymax <- nstrip+0.3 thermo.plot.new(xlim=plot.xlim,ylim=c(ymin,ymax),xlab=xlab,ylab="", - side=c(1,3),mar=par('mar'),do.box=FALSE) + side=c(1,3),mar=par('mar'),plot.box=FALSE) if(!is.null(xticks)) { # mark the positions of the sites on the x-axis for(i in 1:5) lines(rep(xticks[i],2),c(ymin,ymin+0.1),lwd=6,col=col[i]) Modified: pkg/CHNOSZ/R/util.plot.R =================================================================== --- pkg/CHNOSZ/R/util.plot.R 2019-04-16 09:50:20 UTC (rev 448) +++ pkg/CHNOSZ/R/util.plot.R 2019-04-16 12:42:20 UTC (rev 449) @@ -2,7 +2,7 @@ # Functions to create and modify plots thermo.plot.new <- function(xlim,ylim,xlab,ylab,cex=par('cex'),mar=NULL,lwd=par('lwd'),side=c(1,2,3,4), - mgp=c(1.7,0.3,0),cex.axis=par('cex'),col=par('col'),yline=NULL,axs='i',do.box=TRUE, + mgp=c(1.7,0.3,0),cex.axis=par('cex'),col=par('col'),yline=NULL,axs='i',plot.box=TRUE, las=1,xline=NULL, grid = "", col.grid = "gray", ...) { # start a new plot with some customized settings thermo <- get("thermo", CHNOSZ) @@ -24,17 +24,17 @@ par(mar=mar,mgp=mgp,tcl=0.3,las=las,xaxs=axs,yaxs=axs,cex=cex,lwd=lwd,col=col,fg=col, ...) plot.new() plot.window(xlim=xlim,ylim=ylim) - if(do.box) box() + if(plot.box) box() # labels if(is.null(xline)) xline <- mgp[1] thermo.axis(xlab,side=1,line=xline,cex=cex.axis,lwd=NULL) if(is.null(yline)) yline <- mgp[1] thermo.axis(ylab,side=2,line=yline,cex=cex.axis,lwd=NULL) # (optional) tick marks - if(1 %in% side) thermo.axis(NULL,side=1,lwd=lwd, grid = grid, col.grid = col.grid) - if(2 %in% side) thermo.axis(NULL,side=2,lwd=lwd, grid = grid, col.grid = col.grid) - if(3 %in% side) thermo.axis(NULL,side=3,lwd=lwd) - if(4 %in% side) thermo.axis(NULL,side=4,lwd=lwd) + if(1 %in% side) thermo.axis(NULL,side=1,lwd=lwd, grid = grid, col.grid = col.grid, plot.line = !plot.box) + if(2 %in% side) thermo.axis(NULL,side=2,lwd=lwd, grid = grid, col.grid = col.grid, plot.line = !plot.box) + if(3 %in% side) thermo.axis(NULL,side=3,lwd=lwd, plot.line = !plot.box) + if(4 %in% side) thermo.axis(NULL,side=4,lwd=lwd, plot.line = !plot.box) } label.plot <- function(x, xfrac=0.05, yfrac=0.95, paren=FALSE, italic=FALSE, ...) { @@ -198,18 +198,24 @@ # with some default style settings (rotation of numeric labels) # With the default arguments (no labels specified), it plots only the axis lines and tick marks # (used by diagram() for overplotting the axis on diagrams filled with colors). -thermo.axis <- function(lab=NULL,side=1:4,line=1.5,cex=par('cex'),lwd=par('lwd'),col=par('col'), grid = "", col.grid="gray") { +thermo.axis <- function(lab=NULL,side=1:4,line=1.5,cex=par('cex'),lwd=par('lwd'),col=par('col'), grid = "", col.grid="gray", plot.line=FALSE) { if(!is.null(lwd)) { for(thisside in side) { ## get the positions of major tick marks and make grid lines - at <- axis(thisside,labels=FALSE,tick=TRUE) + at <- axis(thisside,labels=FALSE,tick=FALSE) if(grid %in% c("major", "both") & thisside==1) abline(v = at, col=col.grid) if(grid %in% c("major", "both") & thisside==2) abline(h = at, col=col.grid) ## plot major tick marks and numeric labels do.label <- TRUE if(missing(side) | (missing(cex) & thisside %in% c(3,4))) do.label <- FALSE - at <- axis(thisside,labels=do.label,tick=TRUE,lwd=lwd,col=col,col.axis=col) + # col and col.ticks: plot the tick marks but no line (we make it with box() in thermo.plot.new()) 20190416 + # mat: don't plot ticks at the plot limits 20190416 + if(thisside %in% c(1, 3)) pat <- par("usr")[1:2] + if(thisside %in% c(2, 4)) pat <- par("usr")[3:4] + mat <- setdiff(at, pat) + if(plot.line) axis(thisside, at=mat, labels=do.label, tick=TRUE, lwd=lwd, col.axis=col, col=col) + else axis(thisside, at=mat, labels=do.label, tick=TRUE, lwd=lwd, col.axis=col, col = NA, col.ticks = col) ## plot minor tick marks # the distance between major tick marks @@ -252,7 +258,9 @@ if(grid %in% c("minor", "both") & thisside==1) abline(v = at, col=col.grid, lty = 3) if(grid %in% c("minor", "both") & thisside==2) abline(h = at, col=col.grid, lty = 3) tcl <- par('tcl') * 0.5 - axis(thisside,labels=FALSE,tick=TRUE,lwd=lwd,col=col,col.axis=col,at=at,tcl=tcl) + at <- setdiff(at, pat) + if(plot.line) axis(thisside,labels=FALSE,tick=TRUE,lwd=lwd,col.axis=col,at=at,tcl=tcl, col = col) + else axis(thisside,labels=FALSE,tick=TRUE,lwd=lwd,col.axis=col,at=at,tcl=tcl, col = NA, col.ticks = col) } } # rotate labels on side axes Modified: pkg/CHNOSZ/demo/aluminum.R =================================================================== --- pkg/CHNOSZ/demo/aluminum.R 2019-04-16 09:50:20 UTC (rev 448) +++ pkg/CHNOSZ/demo/aluminum.R 2019-04-16 12:42:20 UTC (rev 449) @@ -59,9 +59,10 @@ # (averages for each temperature in a single run) T <- c(100.1, 100.1, 150.1, 100.1, 150.1, 99.8, 99.8, 200.7, 99.8, 50.1, 75.1, 100.3, 150.1) logK <- -c(14.825, 14.735, 13.625, 14.79, 13.665, 14.725, 14.1775, 12.74, 14.4925, 16.8625, 15.61, 14.51, 13.455) -plot(T, logK, xlim = c(25, 250), ylim = c(-18, -10), xlab = axis.label("T"), ylab = axis.label("logK")) +thermo.plot.new(c(25, 250), c(-18, -10), axis.label("T"), axis.label("logK")) +points(T, logK) +# calculation 1: CHNOSZ default T <- 0:250 -# calculation 1: CHNOSZ default species <- c("dawsonite", "H2O", "Al(OH)4-", "HCO3-", "Na+", "H+") coeffs <- c(-1, -2, 1, 1, 1, 1) Daw1 <- subcrt(species, coeffs, T = T) @@ -85,7 +86,8 @@ ########### # After Tutolo et al., 2014, Fig. 2 (doi:10.1016/j.gca.2014.02.036) dat <- read.csv(system.file("extdata/cpetc/TKSS14_Fig2.csv", package = "CHNOSZ")) -plot(dat, type = "p", xlim = c(3.5, 1.5), ylim = c(-2, 14), xlab = "1000/T(K)", ylab = "pK") +thermo.plot.new(c(3.5, 1.5), c(-2, 14), quote(1000 / italic(T)*"(K)"), "pK") +points(dat) # plot line: default database invTK <- seq(3.5, 1.6, -0.02) T <- 1000/invTK - 273.15 @@ -105,7 +107,7 @@ lines(invTK, pK, col = "blue", lty = 2) # add title and legend par(xpd = NA) -title(main = describe.reaction(sres$reaction), cex.main = 1.1) +title(main = describe.reaction(sres$reaction), cex.main = 1) par(xpd = FALSE) legend("topright", c("Kaolinite solubility", "After Tutolo et al., 2014 Fig. 2"), bty = "n") legend("bottomleft", lty = c(0, 2, 1, 2), pch = c(1, NA, NA, NA), lwd = c(1, 1, 1.5, 1), col = c("black", "blue", "black", "red"), Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2019-04-16 09:50:20 UTC (rev 448) +++ pkg/CHNOSZ/inst/NEWS 2019-04-16 12:42:20 UTC (rev 449) @@ -1,4 +1,4 @@ -CHANGES IN CHNOSZ 1.3.1-29 (2019-04-16) +CHANGES IN CHNOSZ 1.3.1-30 (2019-04-16) --------------------------------------- - Add thermo/stoich.csv.xz (loaded as thermo()$stoich), containing a @@ -47,6 +47,11 @@ - OBIGT: Move H4SiO4 (Stef?nsson, 2001) to AS04.csv (optional data). +- Give thermo.plot.new() argument 'plot.box' (default TRUE) and + thermo.axis() argument 'plot.line' (default FALSE) to prevent + unecessary plotting of axis lines on a plot with a box. thermo.axis() + also avoids plotting tick marks at the plot limits. + CHANGES IN CHNOSZ 1.3.1 (2019-03-02) ------------------------------------ Modified: pkg/CHNOSZ/man/util.plot.Rd =================================================================== --- pkg/CHNOSZ/man/util.plot.Rd 2019-04-16 09:50:20 UTC (rev 448) +++ pkg/CHNOSZ/man/util.plot.Rd 2019-04-16 12:42:20 UTC (rev 449) @@ -19,10 +19,11 @@ thermo.plot.new(xlim, ylim, xlab, ylab, cex = par("cex"), mar = NULL, lwd = par("lwd"), side = c(1,2,3,4), mgp = c(1.7, 0.3, 0), cex.axis = par("cex"), col = par("col"), - yline = NULL, axs = "i", do.box = TRUE, las = 1, + yline = NULL, axs = "i", plot.box = TRUE, las = 1, xline = NULL, grid = "", col.grid = "gray", ...) thermo.axis(lab = NULL, side = 1:4, line = 1.5, cex = par("cex"), - lwd = par("lwd"), col = par("col"), grid = "", col.grid = "gray") + lwd = par("lwd"), col = par("col"), grid = "", col.grid = "gray", + plot.line = FALSE) label.plot(x, xfrac = 0.05, yfrac = 0.95, paren = FALSE, italic = FALSE, ...) usrfig() @@ -48,11 +49,12 @@ \item{col}{character, line color} \item{yline}{numeric, margin line on which to plot \eqn{y}{y}-axis name} \item{axs}{character, setting for axis limit calculation} - \item{do.box}{logical, draw a box around the plot?} + \item{plot.box}{logical, draw a box around the plot?} \item{las}{numeric, style for axis labels} \item{xline}{numeric, margin line on which to plot \eqn{x}{x}-axis name} \item{grid}{character, type of grid (\samp{major}, \samp{minor}, or \samp{both})} \item{col.grid}{character, color of the grid lines} + \item{plot.line}{logical, draw axis lines?} \item{...}{further arguments passed to \code{par} or \code{mtext}} \item{lab}{character, axis label} \item{line}{numeric, margin line on which to place axis label or plot title} From noreply at r-forge.r-project.org Tue Apr 16 15:16:32 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 16 Apr 2019 15:16:32 +0200 (CEST) Subject: [CHNOSZ-commits] r450 - in pkg/CHNOSZ: . vignettes Message-ID: <20190416131632.9323F18D3C6@r-forge.r-project.org> Author: jedick Date: 2019-04-16 15:16:32 +0200 (Tue, 16 Apr 2019) New Revision: 450 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/vignettes/eos-regress.Rmd Log: eos-regress.Rmd: convert to ASCII to build successfully on ISO-8859-15 (R-hub) Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-16 12:42:20 UTC (rev 449) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-16 13:16:32 UTC (rev 450) @@ -1,6 +1,6 @@ Date: 2019-04-16 Package: CHNOSZ -Version: 1.3.1-30 +Version: 1.3.1-31 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/vignettes/eos-regress.Rmd =================================================================== --- pkg/CHNOSZ/vignettes/eos-regress.Rmd 2019-04-16 12:42:20 UTC (rev 449) +++ pkg/CHNOSZ/vignettes/eos-regress.Rmd 2019-04-16 13:16:32 UTC (rev 450) @@ -33,8 +33,8 @@ ```{r HTML, include=FALSE} ## some frequently used HTML expressions -V0 <- "V?" -Cp0 <- "CP?" +V0 <- "V°" +Cp0 <- "CP°" c1 <- "c1" c2 <- "c2" a1 <- "a1" @@ -45,7 +45,7 @@ sio2 <- "SiO2" h2o <- "H2O" ch4 <- "CH4" -wPrTr <- "?Pr,Tr" +wPrTr <- "ωPr,Tr" ``` ```{r setup, include=FALSE} @@ -87,23 +87,23 @@ The equations were originally described by @HKF81; for `r Cp0` the equation is -> `r Cp0` = `r c1` + `r c2` / (*T* - ?)2 + ?*TX* +> `r Cp0` = `r c1` + `r c2` / (*T* - θ)2 + ω*TX* -Here, `r c1` and `r c2` are the non-solvation parameters, and ? is the solvation parameter. -? is equal to 228 K, and *X* is one of the "Born functions" that relates the solvation process to the dielectric properties of water. -For neutral species, all of the parameters, including the "effective" value of ?, are constant. -However, **for charged species, ? has non-zero derivatives at *T* > 100 ?C, increasing with temperature**, that depend on the charge and ionic radius. +Here, `r c1` and `r c2` are the non-solvation parameters, and ω is the solvation parameter. +θ is equal to 228 K, and *X* is one of the "Born functions" that relates the solvation process to the dielectric properties of water. +For neutral species, all of the parameters, including the "effective" value of ω, are constant. +However, **for charged species, ω has non-zero derivatives at *T* > 100 °C, increasing with temperature**, that depend on the charge and ionic radius. Revisions by @TH88 and @SOJSH92 refined the equations to improve their high-*T* and *P* behavior. # A note on the algorithms The regression functions are essentially a wrapper around the `water()`-related functions in CHNOSZ and `lm()` in R. The former provide values of the Born functions. -Accordingly, numerical values for all of the *variables* in the equations (e.g. 1/(*T* - ?)2 and *TX*) can be calculated at each experimental *T* and *P*. +Accordingly, numerical values for all of the *variables* in the equations (e.g. 1/(*T* - θ)2 and *TX*) can be calculated at each experimental *T* and *P*. Applying a linear model (`lm`), the *coefficients* in the model can be obtained. -In this case, they correspond to the HKF parameters, e.g. `c1` (the intercept), `c2` and ?. -The coefficients **in this model** are constants, restricing application of the model to neutral (uncharged) species, for which the high-temperature derivatives of ? are 0. +In this case, they correspond to the HKF parameters, e.g. `c1` (the intercept), `c2` and ω. +The coefficients **in this model** are constants, restricing application of the model to neutral (uncharged) species, for which the high-temperature derivatives of ω are 0. Further below, a procedure is described to iteratively solve the equations for charged species. # An example for neutral species @@ -132,7 +132,7 @@ Next, we specify the terms in the HKF equations and perform the regression using `EOSregress()`. In the second call to `EOSregress()` below, only for *T* < 600 K are included in the regression. -The coefficients here correspond to `r c1`, `r c2` and ? in the HKF equations. +The coefficients here correspond to `r c1`, `r c2` and ω in the HKF equations. ```{r EOSregress} var <- c("invTTheta2", "TXBorn") @@ -170,7 +170,7 @@ ## Setting the value of omega -Given both high-temperature volumetric and calorimetric data for neutral species, the effective value of ? is most reliably regressed from the latter [@SSW01]. +Given both high-temperature volumetric and calorimetric data for neutral species, the effective value of ω is most reliably regressed from the latter [@SSW01]. Let's regress volumetric data using a value of omega taken from the heat capacity regression. First, read the data from @HWM96. @@ -182,19 +182,19 @@ Compressibilities of species (measured or estimated) are implied by the full set of HKF volumetric parameters (`r a1`, `r a2`, `r a3`, `r a4`). In this example we model volumes at nearly constant *P*. -Therefore, we can use a simpler equation for `r V0` written in terms of the "isobaric fit parameters" (Tanger and Helgeson 1988, p. 35) ? and ?, together with the solvation contribution that depends on the *Q* Born function: +Therefore, we can use a simpler equation for `r V0` written in terms of the "isobaric fit parameters" (Tanger and Helgeson 1988, p. 35) σ and ξ, together with the solvation contribution that depends on the *Q* Born function: -> `r V0` = ? + ? / (*T* - ?) - ?*Q* +> `r V0` = σ + ξ / (*T* - θ) - ω*Q* ```{marginfigure} `EOSvar()` actually returns the negative of *Q*, so the omega symbol here carries no negative sign. ``` -Now we calculate the *Q* Born function using `EOSvar()` and multiply by ? (from the heat capacity regression) to get the solvation volume at each experimental temperature and pressure. +Now we calculate the *Q* Born function using `EOSvar()` and multiply by ω (from the heat capacity regression) to get the solvation volume at each experimental temperature and pressure. Subtract the solvation volume from the experimental volumes and create a new data frame holding the calculated "non-solvation" volume. ```{marginfigure} -Because we are dealing with volumes, the units of ? are converted according to 1 cal = 41.84 cm3?bar. +Because we are dealing with volumes, the units of ω are converted according to 1 cal = 41.84 cm3 bar. ``` ```{r Vdat_non} @@ -228,7 +228,7 @@ Finally, plot the data and regressions. The first plot shows all the data, and the second the low-temperature subset (*T* < 600 K). -The solid line is the two-term fit for ? and ? (using ? from the heat capacity regression), and the dashed line shows the volumes calculated using the parameters in the database. +The solid line is the two-term fit for σ and ξ (using ω from the heat capacity regression), and the dashed line shows the volumes calculated using the parameters in the database. The plot legends give the parameters from the two-term fit (first plot), or from the database (second plot). ```{r Vplot, eval=FALSE} @@ -252,10 +252,10 @@ Nadat <- prop.PT[, c("T", "P", "Cp")] ``` -As noted above, ? for electrolytes is not a constant. -What happens if we apply the constant-? model anyway, knowing it's not applicable (especially at high temperature)? +As noted above, ω for electrolytes is not a constant. +What happens if we apply the constant-ω model anyway, knowing it's not applicable (especially at high temperature)? -```{r Nalm, fig.margin=TRUE, fig.width=3.5, fig.height=3.5, fig.cap="Heat capacity of Na+ (inapplicable: constant ?).", dpi=dpi, out.width=672, out.height=336, pngquant=pngquant} +```{r Nalm, fig.margin=TRUE, fig.width=3.5, fig.height=3.5, fig.cap="Heat capacity of Na+ (inapplicable: constant ω).", dpi=dpi, out.width=672, out.height=336, pngquant=pngquant} var <- c("invTTheta2", "TXBorn") Nalm <- EOSregress(Nadat, var, T.max = 600) EOSplot(Nadat, coefficients = Nalm$coefficients, fun.legend = NULL) @@ -263,13 +263,13 @@ ``` As before, the solid line is a fit to relatively low-temperature (*T* < 600 K) data, and the dotted line a fit to the entire temperature range of the data. -The fits using constant ? are clearly not acceptable. +The fits using constant ω are clearly not acceptable. There is, however, a way out. A different variable, `Cp_s_var`, can be used to specify the calculation of the "solvation" heat capacity in the HKF equations using the temperature- and pressure-dependent corrections for charged species. To use this variable, the values of `r wPrTr` (omega at the reference temperature and pressure) and *Z* (charge) must be given, in addition to *T* and *P*. Of course, right now we *don't know* the value of `r wPrTr`---it is the purpose of the regression to find it! -But we can make a first guess using the value of ? found above. +But we can make a first guess using the value of ω found above. ```{r Navars1} var1 <- c("invTTheta2", "Cp_s_var") @@ -277,9 +277,9 @@ ``` Then, we can use an iterative procedure that refines successive guesses of `r wPrTr`. -The convergence criterion is measured by the difference in sequential regressed values of ?. +The convergence criterion is measured by the difference in sequential regressed values of ω. -```{r Nawhile, fig.margin=TRUE, fig.width=3.5, fig.height=3.5, fig.cap="Heat capacity of Na+ (variable ?).", dpi=dpi, out.width=672, out.height=336, pngquant=pngquant} +```{r Nawhile, fig.margin=TRUE, fig.width=3.5, fig.height=3.5, fig.cap="Heat capacity of Na+ (variable ω).", dpi=dpi, out.width=672, out.height=336, pngquant=pngquant} diff.omega <- 999 while(abs(diff.omega) > 1) { Nalm1 <- EOSregress(Nadat, var1, omega.PrTr = tail(omega.guess, 1), Z = 1) @@ -297,11 +297,11 @@ ## Doing it for volume Just like above, but using synthetic `r V0` data. -Note that the regressed value of ? has volumetric units (cm3?bar/mol), while `omega.PrTr` is in caloric units (cal/mol). +Note that the regressed value of ω has volumetric units (cm3 bar/mol), while `omega.PrTr` is in caloric units (cal/mol). Compared to `r Cp0`, the regression of `r V0` is very finicky. -Given a starting guess of `r wPrTr` of 1400000 cm3?bar/mol, the iteration converges on 1394890 instead of the "true" database value of 1383230 (represented by dashed line in the plot). +Given a starting guess of `r wPrTr` of 1400000 cm3 bar/mol, the iteration converges on 1394890 instead of the "true" database value of 1383230 (represented by dashed line in the plot). -```{r NaVolume, fig.margin=TRUE, fig.width=3.5, fig.height=3.5, fig.cap="Volume of Na+ (variable ?).", results="hide", message=FALSE, echo=FALSE, dpi=dpi, out.width=672, out.height=336, pngquant=pngquant} +```{r NaVolume, fig.margin=TRUE, fig.width=3.5, fig.height=3.5, fig.cap="Volume of Na+ (variable ω).", results="hide", message=FALSE, echo=FALSE, dpi=dpi, out.width=672, out.height=336, pngquant=pngquant} T <- convert(seq(0, 600, 25), "K") P <- 1000 prop.PT <- subcrt("Na+", T = T, P = P, grid = "T", convert = FALSE)$out[[1]] @@ -338,7 +338,7 @@ The pseudo-reaction with zero properties, `r h4sio4` = `r sio2` + 2 `r h2o`, defines the properties of the pseudospecies `r h4sio4`. First we go about calculating the properties of `r sio2` + 2 `r h2o`. -We do this over a range of *T* and *P*, but include many points near 25 ?C to improve the fit of the regression in that region: +We do this over a range of *T* and *P*, but include many points near 25 °C to improve the fit of the regression in that region: `r op <- options(warn = -1)` ```{r SiO2_2H2O, message=FALSE} s_25C <- subcrt(c("SiO2", "H2O"), c(1, 2), T = 25)$out @@ -350,14 +350,14 @@ ``` `r options(op)` -Now we can start making the new species, with thermodynamic properties calculated at 25 ?C: +Now we can start making the new species, with thermodynamic properties calculated at 25 °C: ```{r new_H4SiO4} mod.obigt("calc-H4SiO4", formula = "H4SiO4", ref1 = "this_vignette", date = today(), G = s_25C$G, H = s_25C$H, S = s_25C$S, Cp = s_25C$Cp, V = s_25C$V, z = 0) ``` -To prepare for the regression, combine the calculated data and convert ?C to K: +To prepare for the regression, combine the calculated data and convert °C to K: ```{r substuff} substuff <- rbind(s_near25, s_lowT, s_Psat, s_P500, s_P1000) substuff$T <- convert(substuff$T, "K") @@ -375,7 +375,7 @@ ``` Let's get ready to regress `r V0` data. -We use the strategy shown above to calculate non-solvation volume using ? from the `r Cp0` regression: +We use the strategy shown above to calculate non-solvation volume using ω from the `r Cp0` regression: ```{r V_H4SiO4_nonsolvation} Vdat <- substuff[, c("T", "P", "V")] QBorn <- EOSvar("QBorn", T = Vdat$T, P = Vdat$P) @@ -414,20 +414,20 @@ lines(s2$out$T, s2$out$G, lty = 2) abline(h = 0, lty = 3) legend("topright", legend = c("calc-H4SiO4 (this vignette)", - "H4SiO4", "(Stef?nsson, 2001)"), lty = c(1, 2, NA), bty = "n") + "H4SiO4", "(Stef\u00e1nsson, 2001)"), lty = c(1, 2, NA), bty = "n") text(225, 250, describe.reaction(s1$reaction)) ``` -Let's compare `H4SiO4` from Stef?nsson (2001) and the `calc-H4SiO4` we just made with the calculated properties of `r sio2` + 2 `r h2o` as a function of temperature: +Let's compare `H4SiO4` from Stefánsson (2001) and the `calc-H4SiO4` we just made with the calculated properties of `r sio2` + 2 `r h2o` as a function of temperature: ```{r subcrt_H4SiO4, eval=FALSE} ``` Ideally, the lines would be horizontal with a _y_-interecept of 0. -However, both the `calc-H4SiO4` we made here and the `H4SiO4` from Stef?nsson (2001) show deviations that increase at higher temperatures. +However, both the `calc-H4SiO4` we made here and the `H4SiO4` from Stefánsson (2001) show deviations that increase at higher temperatures. While they are not quite negligible, these deviations are comparatively small. For example, the almost 200 cal/mol offset in ΔG° at 350 °C corresponds to a difference in logK of only -0.07. -The following example uses the `H4SiO4` from Stef?nsson (2001) to make an activity diagram for the K2O-Al2O3-SiO2-H2O system. +The following example uses the `H4SiO4` from Stefánsson (2001) to make an activity diagram for the K2O-Al2O3-SiO2-H2O system. This is similar to diagrams found, for example, on p. 361 of [Garrels and Christ, 1965](http://www.worldcat.org/oclc/517586) and Figure 3 of [Steinmann et al., 1994](http://ccm.geoscienceworld.org/content/42/2/197), but is quantitatively a closer match to the diagram in the [User's Guide to PHREEQC](https://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc/html/final-75.html). ```{r activity_diagram, fig.margin=TRUE, fig.width=4, fig.height=4, small.mar=TRUE, echo=TRUE, results="hide", message=FALSE, dpi=dpi, out.width="100%", cache=TRUE, fig.cap="Activity diagram for K2O-Al2O3-SiO2-H2O.", pngquant=pngquant} From noreply at r-forge.r-project.org Wed Apr 17 02:48:50 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Wed, 17 Apr 2019 02:48:50 +0200 (CEST) Subject: [CHNOSZ-commits] r451 - in pkg/CHNOSZ: . demo inst/extdata/OBIGT Message-ID: <20190417004850.742E718D68D@r-forge.r-project.org> Author: jedick Date: 2019-04-17 02:48:50 +0200 (Wed, 17 Apr 2019) New Revision: 451 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/demo/aluminum.R pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_cr.csv.xz Log: demo/aluminum.R: update output from SUPCRTBL Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-16 13:16:32 UTC (rev 450) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-17 00:48:50 UTC (rev 451) @@ -1,6 +1,6 @@ -Date: 2019-04-16 +Date: 2019-04-17 Package: CHNOSZ -Version: 1.3.1-31 +Version: 1.3.1-32 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/aluminum.R =================================================================== --- pkg/CHNOSZ/demo/aluminum.R 2019-04-16 13:16:32 UTC (rev 450) +++ pkg/CHNOSZ/demo/aluminum.R 2019-04-17 00:48:50 UTC (rev 451) @@ -39,9 +39,9 @@ points(seq(125, 350, 25), -c(3.489, 3.217, 2.967, 2.734, 2.517, 2.314, 2.124, 1.946, 1.781, 1.628), pch = 4, col = "red") ## add legend and title title(main = describe.reaction(r1$reaction), cex.main = 1.1) -legend("bottomright", lty = c(0, 0, 2, 1, 2), pch = c(1, 4, NA, NA, NA), lwd = c(1, 1, 1, 1.5, 1), - col = c("black", "red", "black", "black", "red"), bty = "n", cex = 0.9, - legend = c("Hemley et al., 1980", "SUPCRTBL", "SUPCRT92", "CHNOSZ", 'add.obigt("AS04")')) +legend("bottomright", lty = c(0, 2, 0, 1, 2), pch = c(1, NA, 4, NA, NA), lwd = c(1, 1, 1, 1.5, 1), + col = c("black", "black", "red", "black", "red"), bty = "n", cex = 0.9, + legend = c("Hemley et al., 1980", "SUPCRT92", "SUPCRTBL", "CHNOSZ", 'add.obigt("AS04")')) legend("topleft", c("Boehmite - Kaolinite", "After Zhu and Lu, 2009 Fig. A1"), bty = "n") reset() # Helgeson et al., 1978 (HDNB78): http://www.worldcat.org/oclc/13594862 @@ -66,18 +66,21 @@ species <- c("dawsonite", "H2O", "Al(OH)4-", "HCO3-", "Na+", "H+") coeffs <- c(-1, -2, 1, 1, 1, 1) Daw1 <- subcrt(species, coeffs, T = T) +lines(T, Daw1$out$logK, lwd = 1.5) # calculation 2: dawsonite with Cp = 0 mod.obigt("dawsonite", Cp = 0, a = 0, b = 0, c = 0) Daw2 <- subcrt(species, coeffs, T = T) -## plot the calculated logKs -lines(T, Daw1$out$logK, lwd = 1.5) lines(T, Daw2$out$logK, col = "red", lty = 2) ## add points calculated using the SUPCRTBL package -points(seq(25, 250, 25), c(-17.829, -16.523, -15.402, -14.425, -13.568, -12.815, -12.154, -11.581, -11.094, -10.699), pch=4, col="red") +#points(seq(25, 250, 25), c(-17.829, -16.523, -15.402, -14.425, -13.568, -12.815, -12.154, -11.581, -11.094, -10.699), pch=4, col="red") +## 20190417: recalculated using the SUPCRTBL package (timestamp: 20190309) +## with a locally updated data file that includes heat capacity coefficients of dawsonite +## from Robie and Hemingway, 1995, with typos corrected in Tutolo et al., 2014 +points(seq(25, 250, 25), c(-17.829, -16.546, -15.485, -14.599, -13.856, -13.236, -12.724, -12.312, -11.997, -11.782), pch=4, col="red") ## add legend and title title(main = describe.reaction(Daw1$reaction), cex.main = 0.95) -legend("bottomright", lty = c(0, 0, 1, 2), pch = c(1, 4, NA, NA), col = c("black", "red", "black", "red"), lwd = c(1, 1, 1.5, 1), - bty = "n", cex = 0.9, legend = c("Ben\u00e9z\u00e9th et al., 2007", "SUPCRTBL", "CHNOSZ", 'Cp(dawsonite) = 0')) +legend("bottomright", lty = c(0, 0, 0, 1, 2), pch = c(1, 4, NA, NA, NA), col = c("black", "red", NA, "black", "red"), lwd = c(1, 1, 0, 1.5, 1), + bty = "n", cex = 0.9, legend = c("Ben\u00e9z\u00e9th et al., 2007", "SUPCRTBL with modified", " data for Cp of dawsonite", "CHNOSZ", "Cp(dawsonite) = 0")) legend("topleft", c("Dawsonite solubility", "After Zimmer et al., 2016 Fig. 2"), bty = "n") reset() @@ -91,27 +94,31 @@ # plot line: default database invTK <- seq(3.5, 1.6, -0.02) T <- 1000/invTK - 273.15 -sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "SiO2", "H2O"), c(-1, -2, -5, 2, 2, 4), T = T) +sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "SiO2"), c(-1, -2, -1, 2, 2), T = T) pK <- -sres$out$logK lines(invTK, pK, lwd = 1.5) # plot line: default database with AS04 SiO2 add.obigt("AS04") -sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "SiO2", "H2O"), c(-1, -2, -5, 2, 2, 4), T = T) +sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "SiO2"), c(-1, -2, -1, 2, 2), T = T) pK <- -sres$out$logK lines(invTK, pK, col = "red", lty = 2) reset() # plot line: SUPCRT92 add.obigt("SUPCRT92") -sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "SiO2", "H2O"), c(-1, -2, -5, 2, 2, 4), T = T) +sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "SiO2"), c(-1, -2, -1, 2, 2), T = T) pK <- -sres$out$logK lines(invTK, pK, col = "blue", lty = 2) +# add points calculated using the SUPCRTBL package +T <- seq(25, 300, 25) +invTK <- 1000/(T + 273.15) +points(invTK, c(12.621, 11.441, 10.383, 9.402, 8.477, 7.597, 6.756, 5.948, 5.171, 4.422, 3.703, 3.023), pch = 4, col = "red") # add title and legend par(xpd = NA) -title(main = describe.reaction(sres$reaction), cex.main = 1) +title(main = describe.reaction(sres$reaction), cex.main = 1.1) par(xpd = FALSE) legend("topright", c("Kaolinite solubility", "After Tutolo et al., 2014 Fig. 2"), bty = "n") -legend("bottomleft", lty = c(0, 2, 1, 2), pch = c(1, NA, NA, NA), lwd = c(1, 1, 1.5, 1), col = c("black", "blue", "black", "red"), - legend = c("Tutolo et al., 2014", "SUPCRT92", "CHNOSZ", 'add.obigt("AS04")'), bty = "n", cex = 0.9) +legend("bottomleft", lty = c(0, 2, 0, 1, 2), pch = c(1, NA, 4, NA, NA), lwd = c(1, 1, 1, 1.5, 1), col = c("black", "blue", "red", "black", "red"), + legend = c("Tutolo et al., 2014", "SUPCRT92", "SUPCRTBL", "CHNOSZ", 'add.obigt("AS04")'), bty = "n", cex = 0.9) reset() ########### @@ -133,12 +140,17 @@ add.obigt("SUPCRT92") a <- affinity("K+" = c(4, 7), "Na+" = c(6, 9), T = 100, P = 150) diagram(a, col = "blue", lty = 2, add = TRUE, names = NULL) +# add SUPCRTBL calculation +logK_BL <- 2.092 +logaK <- seq(4, 7, 0.5) +logaNa <- logaK + logK_BL +points(logaK, logaNa, pch = 4, col = "red") # add title and legend sres <- subcrt(c("albite", "K+", "K-feldspar", "Na+"), c(-1, -1, 1, 1)) title(main = describe.reaction(sres$reaction), cex.main = 1.1) legend("topleft", c("Albite - K-feldspar", "After Tutolo et al., 2014 Fig. 5"), bty = "n", cex = 0.9) -legend("bottomright", lty = c(0, 2, 1), pch = c(1, NA, NA), lwd = c(1, 1, 1.5), col = c("black", "blue", "black"), - legend = c("Merino, 1975", "SUPCRT92", "CHNOSZ"), bty = "n", cex = 0.9) +legend("bottomright", lty = c(0, 2, 0, 1), pch = c(1, NA, 4, NA), lwd = c(1, 1, 1, 1.5), col = c("black", "blue", "red", "black"), + legend = c("Merino, 1975", "SUPCRT92", "SUPCRTBL", "CHNOSZ"), bty = "n", cex = 0.9) legend("right", describe.property(c("T", "P"), c(T, P)), bty = "n") reset() Modified: pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_cr.csv.xz =================================================================== --- pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_cr.csv.xz 2019-04-16 13:16:32 UTC (rev 450) +++ pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_cr.csv.xz 2019-04-17 00:48:50 UTC (rev 451) @@ -1,4 +1,4 @@ -?7zXZ???F!t/???8uO]7I??b???9??????TB;q?"?q???cL;?"????Q???7?.42&l{?3???a???Z?r??Xe Author: jedick Date: 2019-04-20 11:57:37 +0200 (Sat, 20 Apr 2019) New Revision: 452 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/NAMESPACE pkg/CHNOSZ/R/diagram.R pkg/CHNOSZ/R/nonideal.R pkg/CHNOSZ/R/retrieve.R pkg/CHNOSZ/R/util.plot.R pkg/CHNOSZ/R/zzz.R pkg/CHNOSZ/demo/aluminum.R pkg/CHNOSZ/demo/gold.R pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/inst/extdata/Berman/Ber88_1988.csv pkg/CHNOSZ/inst/extdata/Berman/SHD91_1991.csv pkg/CHNOSZ/inst/extdata/adds/obigt_check.csv pkg/CHNOSZ/man/EOSregress.Rd pkg/CHNOSZ/man/add.obigt.Rd pkg/CHNOSZ/man/diagram.Rd pkg/CHNOSZ/man/extdata.Rd pkg/CHNOSZ/man/util.plot.Rd Log: submit version 1.3.2 to CRAN Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-17 00:48:50 UTC (rev 451) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-20 09:57:37 UTC (rev 452) @@ -1,6 +1,6 @@ -Date: 2019-04-17 +Date: 2019-04-20 Package: CHNOSZ -Version: 1.3.1-32 +Version: 1.3.2 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/NAMESPACE =================================================================== --- pkg/CHNOSZ/NAMESPACE 2019-04-17 00:48:50 UTC (rev 451) +++ pkg/CHNOSZ/NAMESPACE 2019-04-20 09:57:37 UTC (rev 452) @@ -78,3 +78,5 @@ importFrom("utils", "browseURL", "capture.output", "combn", "demo", "example", "head", "installed.packages", "read.csv", "tail", "write.csv", "write.table", "read.table") +# 20190420 new R functions for HCL color palettes +if (getRversion() >= "3.6.0") importFrom("grDevices", "hcl.pals", "hcl.colors") Modified: pkg/CHNOSZ/R/diagram.R =================================================================== --- pkg/CHNOSZ/R/diagram.R 2019-04-17 00:48:50 UTC (rev 451) +++ pkg/CHNOSZ/R/diagram.R 2019-04-20 09:57:37 UTC (rev 452) @@ -554,10 +554,10 @@ # choose an HCL palette 20190411 # matching adapted from hcl.colors() fx <- function(x) tolower(gsub("[-, _, \\,, (, ), \\ , \\.]", "", x)) - p <- charmatch(fx(fill), fx(grDevices::hcl.pals())) + p <- charmatch(fx(fill), fx(hcl.pals())) if(!is.na(p)) { if(!p < 1L) { - fill <- grDevices::hcl.colors(ngroups, fill) + fill <- hcl.colors(ngroups, fill) } } } @@ -740,4 +740,3 @@ # return the indices return(id[imax, ]) } - Modified: pkg/CHNOSZ/R/nonideal.R =================================================================== --- pkg/CHNOSZ/R/nonideal.R 2019-04-17 00:48:50 UTC (rev 451) +++ pkg/CHNOSZ/R/nonideal.R 2019-04-20 09:57:37 UTC (rev 452) @@ -326,9 +326,9 @@ T40 <- c(175, seq(300, 1000, 5)); lines(T40, S40(T40), col=col[11]) T50 <- c(225, seq(300, 1000, 5)); lines(T50, S50(T50), col=col[12]) T60 <- c(250, seq(300, 1000, 5)); lines(T60, S60(T60), col=col[13]) - legend("topleft", pch=c(0, 1, 2, 5, 6), + legend("topleft", pch=c(0, 1, 2, 5, 6), bty = "n", legend=c("Helgeson, 1969", "Helgeson et al., 1981", "Manning et al., 2013", "spline control point", "high-P extrapolation")) - legend("bottomright", col=c(NA, rev(col)), lty=1, + legend("bottomright", col=c(NA, rev(col)), lty=1, bty = "n", legend=c("kbar", "60", "50", "40", "30", "20", "10", "5", "4", "3", "2", "1", "0.5", "Psat")) title(main=expression("Deybe-H\u00FCckel extended term ("*italic(b)[gamma]*") parameter")) } else if(showsplines=="P") { @@ -370,8 +370,8 @@ P <- seq(10000, 60000, 50); lines(log10(P), bgamma(800, P), col=col[9]) P <- seq(10000, 60000, 50); lines(log10(P), bgamma(900, P), col=col[10]) P <- seq(10000, 60000, 50); lines(log10(P), bgamma(1000, P), col=col[11]) - legend("topleft", col=c(NA, col), lty=1, legend=c("degrees C", 25, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000)) - legend("bottomright", pch=1, legend="points from iso-P splines") + legend("topleft", col=c(NA, col), lty=1, bty = "n", legend=c("degrees C", 25, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000)) + legend("bottomright", pch=1, bty = "n", legend="points from iso-P splines") title(main=expression("Deybe-H\u00FCckel extended term ("*italic(b)[gamma]*") parameter")) } else { # make T and P the same length Modified: pkg/CHNOSZ/R/retrieve.R =================================================================== --- pkg/CHNOSZ/R/retrieve.R 2019-04-17 00:48:50 UTC (rev 451) +++ pkg/CHNOSZ/R/retrieve.R 2019-04-20 09:57:37 UTC (rev 452) @@ -91,9 +91,11 @@ # for a chemical system, all species are included that do not contain any other elements ispecies <- unique(unlist(ispecies)) ielements <- colnames(thermo()$stoich) %in% elements - otherstoich <- thermo()$stoich[, !ielements] - iother <- rowSums(otherstoich[ispecies, ] != 0) > 0 - ispecies <- ispecies[!iother] + if(any(!ielements)) { + otherstoich <- thermo()$stoich[, !ielements] + iother <- rowSums(otherstoich[ispecies, ] != 0) > 0 + ispecies <- ispecies[!iother] + } } else { # get species that have all the elements; the species must be present in each vector # Reduce() hint from https://stackoverflow.com/questions/27520310/union-of-intersecting-vectors-in-a-list-in-r Modified: pkg/CHNOSZ/R/util.plot.R =================================================================== --- pkg/CHNOSZ/R/util.plot.R 2019-04-17 00:48:50 UTC (rev 451) +++ pkg/CHNOSZ/R/util.plot.R 2019-04-20 09:57:37 UTC (rev 452) @@ -214,8 +214,10 @@ if(thisside %in% c(1, 3)) pat <- par("usr")[1:2] if(thisside %in% c(2, 4)) pat <- par("usr")[3:4] mat <- setdiff(at, pat) - if(plot.line) axis(thisside, at=mat, labels=do.label, tick=TRUE, lwd=lwd, col.axis=col, col=col) - else axis(thisside, at=mat, labels=do.label, tick=TRUE, lwd=lwd, col.axis=col, col = NA, col.ticks = col) + if(plot.line) axis(thisside, at=mat, labels=FALSE, tick=TRUE, lwd=lwd, col.axis=col, col=col) + else axis(thisside, at=mat, labels=FALSE, tick=TRUE, lwd=lwd, col.axis=col, col = NA, col.ticks = col) + # plot only the labels at all major tick points (including plot limits) 20190417 + if(do.label) axis(thisside, at=at, tick=FALSE, col=col) ## plot minor tick marks # the distance between major tick marks Modified: pkg/CHNOSZ/R/zzz.R =================================================================== --- pkg/CHNOSZ/R/zzz.R 2019-04-17 00:48:50 UTC (rev 451) +++ pkg/CHNOSZ/R/zzz.R 2019-04-20 09:57:37 UTC (rev 452) @@ -5,7 +5,21 @@ # https://stackoverflow.com/questions/41954302/where-to-create-package-environment-variables CHNOSZ <- new.env() +.onLoad <- function(libname, pkgname) { + + # 20190420 add placeholder functions not present in earlier R versions + # code inspired by backports::import + if(getRversion() < "3.6.0") { + pkg = getNamespace(pkgname) + no.fun <- function(...) stop("this function is not available in this version of R") + assign("hcl.pals", no.fun, envir = pkg) + assign("hcl.colors", no.fun, envir = pkg) + } + +} + .onAttach <- function(libname,pkgname) { + # version figuring adapted from package mgcv pkghelp <- library(help=CHNOSZ)$info[[1]] # things are different for older versions of R @@ -16,8 +30,11 @@ date <- pkghelp[pmatch("Date:", pkghelp)] um <- strsplit(date, " ")[[1]] date <- um[nchar(um)>0][2] + # identify the program and version packageStartupMessage(paste("CHNOSZ version ", version, " (", date, ")", sep="")) + # initialize the 'thermo' data object reset() + } Modified: pkg/CHNOSZ/demo/aluminum.R =================================================================== --- pkg/CHNOSZ/demo/aluminum.R 2019-04-17 00:48:50 UTC (rev 451) +++ pkg/CHNOSZ/demo/aluminum.R 2019-04-20 09:57:37 UTC (rev 452) @@ -80,7 +80,7 @@ ## add legend and title title(main = describe.reaction(Daw1$reaction), cex.main = 0.95) legend("bottomright", lty = c(0, 0, 0, 1, 2), pch = c(1, 4, NA, NA, NA), col = c("black", "red", NA, "black", "red"), lwd = c(1, 1, 0, 1.5, 1), - bty = "n", cex = 0.9, legend = c("Ben\u00e9z\u00e9th et al., 2007", "SUPCRTBL with modified", " data for Cp of dawsonite", "CHNOSZ", "Cp(dawsonite) = 0")) + bty = "n", cex = 0.9, legend = c("Ben\u00e9z\u00e9th et al., 2007", "SUPCRTBL with Cp", " coefficients for dawsonite", "CHNOSZ", "Cp(dawsonite) = 0")) legend("topleft", c("Dawsonite solubility", "After Zimmer et al., 2016 Fig. 2"), bty = "n") reset() @@ -89,7 +89,7 @@ ########### # After Tutolo et al., 2014, Fig. 2 (doi:10.1016/j.gca.2014.02.036) dat <- read.csv(system.file("extdata/cpetc/TKSS14_Fig2.csv", package = "CHNOSZ")) -thermo.plot.new(c(3.5, 1.5), c(-2, 14), quote(1000 / italic(T)*"(K)"), "pK") +thermo.plot.new(c(3.5, 1.5), c(-2, 14), quote(1000 / italic(T)*"(K)"), quote(p*italic(K))) points(dat) # plot line: default database invTK <- seq(3.5, 1.6, -0.02) @@ -97,7 +97,7 @@ sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "SiO2"), c(-1, -2, -1, 2, 2), T = T) pK <- -sres$out$logK lines(invTK, pK, lwd = 1.5) -# plot line: default database with AS04 SiO2 +# plot line: SiO2 from Apps and Spycher, 2004 add.obigt("AS04") sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "SiO2"), c(-1, -2, -1, 2, 2), T = T) pK <- -sres$out$logK @@ -117,8 +117,8 @@ title(main = describe.reaction(sres$reaction), cex.main = 1.1) par(xpd = FALSE) legend("topright", c("Kaolinite solubility", "After Tutolo et al., 2014 Fig. 2"), bty = "n") -legend("bottomleft", lty = c(0, 2, 0, 1, 2), pch = c(1, NA, 4, NA, NA), lwd = c(1, 1, 1, 1.5, 1), col = c("black", "blue", "red", "black", "red"), - legend = c("Tutolo et al., 2014", "SUPCRT92", "SUPCRTBL", "CHNOSZ", 'add.obigt("AS04")'), bty = "n", cex = 0.9) +legend("bottomleft", lty = c(0, 0, 2, 0, 1, 2), pch = c(1, NA, NA, 4, NA, NA), lwd = c(1, 1, 1, 1, 1.5, 1), col = c("black", "black", "blue", "red", "black", "red"), + legend = c("Various sources \u2013", " see Tutolo et al., 2014", "SUPCRT92", "SUPCRTBL", "CHNOSZ", 'add.obigt("AS04")'), bty = "n", cex = 0.9) reset() ########### @@ -132,7 +132,7 @@ T <- 100 P <- 150 a <- affinity("K+" = c(4, 7), "Na+" = c(6, 9), T = T, P = P) -diagram(a, lwd = 1.5, xlab = ratlab("K+"), ylab = ratlab("Na+")) +diagram(a, lwd = 1.5, xlab = ratlab("K+"), ylab = ratlab("Na+"), names = NULL) # plot experimental data dat <- read.csv(system.file("extdata/cpetc/Mer75_Table4.csv", package = "CHNOSZ")) points(dat$log.aK..aH.., dat$log.aNa..aH..) @@ -151,7 +151,7 @@ legend("topleft", c("Albite - K-feldspar", "After Tutolo et al., 2014 Fig. 5"), bty = "n", cex = 0.9) legend("bottomright", lty = c(0, 2, 0, 1), pch = c(1, NA, 4, NA), lwd = c(1, 1, 1, 1.5), col = c("black", "blue", "red", "black"), legend = c("Merino, 1975", "SUPCRT92", "SUPCRTBL", "CHNOSZ"), bty = "n", cex = 0.9) -legend("right", describe.property(c("T", "P"), c(T, P)), bty = "n") +legend("left", describe.property(c("T", "P"), c(T, P)), bty = "n") reset() par(opar) Modified: pkg/CHNOSZ/demo/gold.R =================================================================== --- pkg/CHNOSZ/demo/gold.R 2019-04-17 00:48:50 UTC (rev 451) +++ pkg/CHNOSZ/demo/gold.R 2019-04-20 09:57:37 UTC (rev 452) @@ -105,7 +105,7 @@ NaCl <- NaCl(T = T, P = P, m_tot = m_NaCl + m_KCl) # calculate logK of K+ + Cl- = KCl, adjusted for ionic strength logKadj <- subcrt(c("K+", "Cl-", "KCl"), c(-1, -1, 1), T = T, P = P, IS = NaCl$IS)$out$logK - # what is the molality of K+ from 0.5 mol/kg KCl, assuming total chloride from above + # what is the molality of K+ from 0.5 mol KCl in solution with 2 mol total Cl m_K <- m_KCl / (10^logKadj * NaCl$m_Cl + 1) list(IS = NaCl$IS, m_Cl = NaCl$m_Cl, m_K = m_K) } Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2019-04-17 00:48:50 UTC (rev 451) +++ pkg/CHNOSZ/inst/NEWS 2019-04-20 09:57:37 UTC (rev 452) @@ -1,6 +1,8 @@ -CHANGES IN CHNOSZ 1.3.1-30 (2019-04-16) ---------------------------------------- +CHANGES IN CHNOSZ 1.3.2 (2019-04-20) +------------------------------------ +NEW FEATURES + - Add thermo/stoich.csv.xz (loaded as thermo()$stoich), containing a precalculated stochiometric matrix for the default database, to speed up retrieve(). @@ -11,24 +13,9 @@ - Add 'ligands' argument to retrieve(), for getting metal-bearing species with a range of possible elements in the ligands. -- In extdata/Berman, rename .csv files to include whole year. berman() - now uses the years in the filenames to assemble the data in reverse - chronological order, and keeps only the most recent data for any - duplicated minerals. - -- Add data for sudoite, daphnite, Mg-amesite, and Fe-amesite to - extdata/Berman (Vidal et al., 1992, 2001, 2005). - -- obigt.Rmd: Use Zenodo DOI for citations to slop98.dat, slop07.dat, and - slop16.dat. - - diagram(): Starting with R version 3.6.0, 'fill' can be the name of any available HCL-based color palette (see hcl.pals() for a list). -- Move transuranic actinide complexes to optional data (SLOP98), as - entropies of the elements at 298.15 K are not available to check the - self-consistency of the GHS values for the complexes. - - Add demo/contour.R for gold solubility contours on logfO2-pH diagram. - In the output of affinity(), the list of 'vals' (the values of the @@ -43,15 +30,34 @@ - Rename demo/go-IU.R to aluminum.R, and add plots from Tutolo et al., 2014. +- Add argument 'plot.box' (default TRUE) to thermo.plot.new() and + 'plot.line' (default FALSE) to thermo.axis() to prevent unecessary + plotting of axis lines. thermo.axis() also avoids plotting tick + marks at the plot limits. + +THERMODYNAMIC DATA + - OBIGT: use dawsonite Cp coefficients from Tutolo et al., 2014. - OBIGT: Move H4SiO4 (Stefánsson, 2001) to AS04.csv (optional data). -- Give thermo.plot.new() argument 'plot.box' (default TRUE) and - thermo.axis() argument 'plot.line' (default FALSE) to prevent - unecessary plotting of axis lines on a plot with a box. thermo.axis() - also avoids plotting tick marks at the plot limits. +- Berman: rename .csv files to include whole year. berman() + now uses the years in the filenames to assemble the data in reverse + chronological order, and keeps only the most recent data for any + duplicated minerals. +- Berman: Add data for sudoite, daphnite, Mg-amesite, and Fe-amesite + (Vidal et al., 1992, 2001, 2005). + +- Berman: make "albite" identical to "albite,low", not "albite,high". + +- Move transuranic actinide complexes to optional data (SLOP98), as + entropies of the elements at 298.15 K are not available to check the + self-consistency of the GHS values for the complexes. + +- obigt.Rmd: Use Zenodo DOI for citations of slop98.dat, slop07.dat, and + slop16.dat. + CHANGES IN CHNOSZ 1.3.1 (2019-03-02) ------------------------------------ Modified: pkg/CHNOSZ/inst/extdata/Berman/Ber88_1988.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/Ber88_1988.csv 2019-04-17 00:48:50 UTC (rev 451) +++ pkg/CHNOSZ/inst/extdata/Berman/Ber88_1988.csv 2019-04-20 09:57:37 UTC (rev 452) @@ -1,6 +1,6 @@ name,GfPrTr,HfPrTr,SPrTr,VPrTr,k0,k1,k2,k3,k4,k5,k6,v1,v2,v3,v4,Tlambda,Tref,dTdP,l1,l2,DtH,Tmax,Tmin,d0,d1,d2,d3,d4,Vad akermanite,-3663786,-3860441,212,9.252,387.06,-2938.8,0,-40790000,0,0,0,2.5011,0.00067224,-0.0785,0,358,298,0,0,0,452,,,,,,,, -albite,-3703293,-3921618,224.412,10.083,393.64,-2415.5,-7892800,1070640000,0,0,0,2.6307,0.00032407,-0.1945,0.0004861,,,,,,,,,,,,,, +albite,-3711715,-3935100,207.443,10.043,393.64,-2415.5,-7892800,1070640000,0,0,0,2.6307,0.00032407,-0.1945,0.0004861,,,,,,,,,,,,,, "albite,high",-3703293,-3921618,224.412,10.083,393.64,-2415.5,-7892800,1070640000,0,0,0,2.6307,0.00032407,-0.1945,0.0004861,,,,,,,,,,,,,, "albite,low",-3711715,-3935100,207.443,10.043,393.64,-2415.5,-7892800,1070640000,0,0,0,2.6307,0.00032407,-0.1945,0.0004861,,,,,,,,,,,,,, almandine,-4941728,-5265502,339.927,11.511,573.96,-1483.1,-29292000,5022080000,0,0,0,1.8613,0.00074539,-0.0558,3.21E-05,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/Berman/SHD91_1991.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/Berman/SHD91_1991.csv 2019-04-17 00:48:50 UTC (rev 451) +++ pkg/CHNOSZ/inst/extdata/Berman/SHD91_1991.csv 2019-04-20 09:57:37 UTC (rev 452) @@ -5,7 +5,7 @@ "K-feldspar,high",-3745498,-3966398,229.157,10.896,381.37,-1941,-12037300,1836430000,0,0,0,1.5145,0.0005485,-0.1805,0.0005112,,,,,,,,,,,,,, "K-feldspar,low",-3752109,-3977485,214.145,10.869,381.37,-1941,-12037300,1836430000,0,0,0,1.5145,0.0005485,-0.1805,0.0005112,,,,,,,,,,,,,, paragonite,-5570375,-5951011,277.699,13.216,577.57,-1472.8,-32214400,5050080000,0,0,0,3.9424,0.00059701,-0.1973,0.0004933,,,,,,,,,,,,,, -albite,-3710096,-3928421,224.412,10.083,393.64,-2415.5,-7892800,1070640000,0,0,0,2.6307,0.00032407,-0.1945,0.0004861,,,,,,,,,,,,,, +albite,-3718518,-3941903,207.443,10.043,393.64,-2415.5,-7892800,1070640000,0,0,0,2.6307,0.00032407,-0.1945,0.0004861,,,,,,,,,,,,,, "albite,high",-3710096,-3928421,224.412,10.083,393.64,-2415.5,-7892800,1070640000,0,0,0,2.6307,0.00032407,-0.1945,0.0004861,,,,,,,,,,,,,, "albite,low",-3718518,-3941903,207.443,10.043,393.64,-2415.5,-7892800,1070640000,0,0,0,2.6307,0.00032407,-0.1945,0.0004861,,,,,,,,,,,,,, jadeite,-2853285,-3031921,133.574,6.034,311.29,-2005.1,-5350300,662570000,0,0,0,2.3118,0.00025785,-0.086,0.0002149,,,,,,,,,,,,,, Modified: pkg/CHNOSZ/inst/extdata/adds/obigt_check.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/adds/obigt_check.csv 2019-04-17 00:48:50 UTC (rev 451) +++ pkg/CHNOSZ/inst/extdata/adds/obigt_check.csv 2019-04-20 09:57:37 UTC (rev 452) @@ -61,145 +61,145 @@ "OBIGT",705,"Rh(SO4)3-3","aq",,-1.33, "OBIGT",708,"CF4","aq",5.9,, "OBIGT",715,"AsH3","aq",-2.67,, -"OBIGT",801,"AgCl","aq",,-1.88, -"OBIGT",802,"AgCl2-","aq",1.65,, -"OBIGT",807,"CuHS","aq",7.35,-16.2, -"OBIGT",815,"ZnO2-2","aq",,-1.17, -"OBIGT",841,"methane","aq",-2.61,, -"OBIGT",846,"hexane","aq",1.43,3.21, -"OBIGT",849,"ethylene","aq",6.12,-3.82, -"OBIGT",873,"propanol","aq",-1.89,, -"OBIGT",1002,"urea","aq",-23.26,23.32, -"OBIGT",1015,"propanoic acid","aq",1.42,, -"OBIGT",1038,"formate","aq",1.96,, -"OBIGT",1040,"propanoate","aq",1.68,, -"OBIGT",1047,"n-decanoate","aq",-1.93,, -"OBIGT",1063,"oxalate-2","aq",-3.19,, -"OBIGT",1330,"Li(Mal)-","aq",,-3.22, -"OBIGT",1334,"Pb(Mal)","aq",,1.16, -"OBIGT",1338,"Pb(Succ)","aq",,1.49, -"OBIGT",1339,"Na(Oxal)-","aq",,-3.14, -"OBIGT",1340,"K(Oxal)-","aq",,-2.75, -"OBIGT",1341,"Fe(Oxal)+","aq",,-2.19, -"OBIGT",1343,"Na(Mal)-","aq",,-3.11, -"OBIGT",1344,"K(Mal)-","aq",,-2.63, -"OBIGT",1346,"La(Mal)+","aq",,-1.92, -"OBIGT",1347,"Gd(Mal)+","aq",,-1.73, -"OBIGT",1348,"Lu(Mal)+","aq",,-2.25, -"OBIGT",1349,"Yb(Mal)+","aq",,-2.05, -"OBIGT",1350,"Th(Mal)+2","aq",-1.29,-4.79, -"OBIGT",1352,"Ce(Mal)+","aq",,-1.75, -"OBIGT",1353,"Nd(Mal)+","aq",4.52,, -"OBIGT",1354,"Sm(Mal)+","aq",,-1.77, -"OBIGT",1355,"Pr(Mal)+","aq",,-1.75, -"OBIGT",1356,"Eu(Mal)+","aq",,-1.87, -"OBIGT",1357,"Tb(Mal)+","aq",,-1.92, -"OBIGT",1358,"Dy(Mal)+","aq",,-1.89, -"OBIGT",1359,"Tm(Mal)+","aq",,-2.08, -"OBIGT",1360,"Ho(Mal)+","aq",,-2.08, -"OBIGT",1361,"Er(Mal)+","aq",,-2.11, -"OBIGT",1362,"Sc(Mal)+","aq",,-1.97, -"OBIGT",1363,"Fe(Mal)+","aq",,-1.97, -"OBIGT",1364,"Na(Succ)-","aq",,-2.82, -"OBIGT",1365,"K(Succ)-","aq",,-2.39, -"OBIGT",1371,"Th(Succ)+2","aq",-1.21,-4.47, -"OBIGT",1376,"NH4(Oxal)-","aq",,-2.62, -"OBIGT",1381,"Yb(Oxal)+","aq",,-2.02, -"OBIGT",1382,"Ce(Oxal)+","aq",,-1.8, -"OBIGT",1383,"Nd(Oxal)+","aq",,-1.8, -"OBIGT",1384,"Eu(Oxal)+","aq",,-1.89, -"OBIGT",1385,"Gd(Oxal)+","aq",,-1.8, -"OBIGT",1386,"Ru(Oxal)+","aq",,-2.41, -"OBIGT",1387,"Pa(Oxal)+2","aq",-1.25,-4.63, -"OBIGT",1388,"Th(Oxal)+2","aq",-1.27,-4.69, -"OBIGT",1389,"U(Oxal)+2","aq",-1.25,-4.63, -"OBIGT",1391,"Y(Oxal)+","aq",,-2.11, -"OBIGT",1396,"La(Oxal)+","aq",,-1.87, -"OBIGT",1397,"Tb(Oxal)+","aq",,-1.92, -"OBIGT",1398,"Er(Oxal)+","aq",,-2.05, -"OBIGT",1399,"Lu(Oxal)+","aq",,-2.19, -"OBIGT",1400,"Cr(Oxal)+","aq",,-2.58, -"OBIGT",1401,"Ga(Oxal)+","aq",,-2.66, -"OBIGT",1402,"Sc(Oxal)+","aq",,-2.13, -"OBIGT",1403,"In(Oxal)+","aq",,-2.19, -"OBIGT",1404,"Sm(Oxal)+","aq",,-1.84, -"OBIGT",1405,"Cs(Mal)-","aq",,-2.39, -"OBIGT",1406,"NH4(Mal)-","aq",,-2.54, -"OBIGT",1411,"In(Mal)+","aq",,-2.11, -"OBIGT",1412,"Y(Mal)+","aq",,-2.02, -"OBIGT",1420,"La(Succ)+","aq",,-1.52, -"OBIGT",1421,"NH4(Succ)-","aq",,-2.26, -"OBIGT",1423,"Fe(Succ)+","aq",,-1.92, -"OBIGT",1424,"Sc(Succ)+","aq",,-1.77, -"OBIGT",1426,"Sm(Succ)+","aq",,-1.48, -"OBIGT",1427,"Er(Succ)+","aq",,-1.68, -"OBIGT",1428,"U(Succ)+2","aq",-1.15,-4.27, -"OBIGT",1432,"La(Glut)+","aq",,-1.23, -"OBIGT",1433,"Y(Glut)+","aq",,-1.46, -"OBIGT",1434,"Sc(Glut)+","aq",,-1.5, -"OBIGT",1435,"Th(Glut)+2","aq",-1.09,-4.05, -"OBIGT",1438,"Fe(Glut)+","aq",,-1.05, -"OBIGT",1439,"Sm(Glut)+","aq",,-1.2, -"OBIGT",1441,"Er(Glut)+","aq",,-1.4, -"OBIGT",1443,"Ba(Adip)","aq",,1.19, -"OBIGT",1450,"Pb(Adip)","aq",,1.25, -"OBIGT",1451,"Sc(Adip)+","aq",,-1.22, -"OBIGT",1453,"Th(Adip)+2","aq",-1.02,-3.76, -"OBIGT",1454,"U(Adip)+2","aq",-1,-3.71, -"OBIGT",1456,"Li(Oxal)-","aq",,-3.3, -"OBIGT",1460,"Li(Succ)-","aq",,-2.94, -"OBIGT",1462,"Na(Glut)-","aq",,-2.34, -"OBIGT",1463,"K(Glut)-","aq",,-2.05, -"OBIGT",1464,"Li(Glut)-","aq",,-2.66, -"OBIGT",1469,"Na(Adip)-","aq",,-2.05, -"OBIGT",1470,"K(Adip)-","aq",,-1.76, -"OBIGT",1471,"Li(Adip)-","aq",,-2.38, -"OBIGT",1477,"cyclohexane","aq",9.35,6.64, -"OBIGT",1478,"Ar","aq",-1.24,-8.59, -"OBIGT",1479,"benzene","aq",,-1.14, -"OBIGT",1480,"CO2","aq",-4.94,, -"OBIGT",1481,"Xe","aq",2.8,, -"OBIGT",1491,"n-butanethiol","aq",2.19,, -"OBIGT",1513,"methyldiethanolamine","aq",1.61,, -"OBIGT",1523,"cysteinate","aq",-1,, -"OBIGT",1549,"glucose","aq",1.11,, -"OBIGT",1577,"guanine","aq",-4.26,, -"OBIGT",1621,"dHUMP-","aq",-3.13,, -"OBIGT",1718,"MgADP-","aq",-1.01,, -"OBIGT",1729,"HNicMP(ox)","aq",,9.4, -"OBIGT",1737,"ribose-5-phosphate","aq",,7.48, -"OBIGT",1739,"ribose-5-phosphate-2","aq",1.53,, -"OBIGT",1740,"H4NADP(red)","aq",1.73,, -"OBIGT",1741,"H3NADP(red)-","aq",2.41,, -"OBIGT",1742,"H2NADP(red)-2","aq",1.28,, -"OBIGT",1743,"HNADP(red)-3","aq",2.09,, -"OBIGT",1744,"NADP(red)-4","aq",1.09,, -"OBIGT",1746,"H3NADP(ox)","aq",1.05,, -"OBIGT",1817,"diglycine+","aq",-177.69,, -"OBIGT",1818,"diglycine-","aq",-49.22,, -"OBIGT",1819,"triglycine+","aq",,1.75, -"OBIGT",1820,"triglycine-","aq",,1.78, -"OBIGT",1950,"jarosite","cr",,,20697 -"OBIGT",1951,"natrojarosite","cr",,,17554 -"OBIGT",1970,"dawsonite","cr",,,4653 -"OBIGT",1991,"octadecane","cr",-2.63,, -"OBIGT",1992,"nonadecane","cr",-13.32,, -"OBIGT",1993,"eicosane","cr",-2.79,, -"OBIGT",1994,"heneicosane","cr",-8.61,, -"OBIGT",1995,"docosane","cr",-2.63,, -"OBIGT",1996,"tricosane","cr",-5.22,, -"OBIGT",1997,"tetracosane","cr",-2.02,, -"OBIGT",1998,"pentacosane","cr",-2.93,, -"OBIGT",1999,"hexacosane","cr",-1.29,, -"OBIGT",2000,"heptacosane","cr",-1.23,, -"OBIGT",2052,"carbazole","cr",-43.39,, -"OBIGT",2093,"triphenylene","cr",,,541 -"OBIGT",2406,"deoxyadenosine","cr",,,-2977 -"OBIGT",2597,"nonacontane","liq",,,635 -"OBIGT",2604,"2-methyloctane","liq",10,, -"OBIGT",3017,"5,6-dithiadecane","liq",2,, -"OBIGT",3097,"ethylene","gas",-4.59,, -"OBIGT",3107,"3,5-dimethylphenol","gas",,,628 +"OBIGT",800,"AgCl","aq",,-1.88, +"OBIGT",801,"AgCl2-","aq",1.65,, +"OBIGT",806,"CuHS","aq",7.35,-16.2, +"OBIGT",814,"ZnO2-2","aq",,-1.17, +"OBIGT",840,"methane","aq",-2.61,, +"OBIGT",845,"hexane","aq",1.43,3.21, +"OBIGT",848,"ethylene","aq",6.12,-3.82, +"OBIGT",872,"propanol","aq",-1.89,, +"OBIGT",1001,"urea","aq",-23.26,23.32, +"OBIGT",1014,"propanoic acid","aq",1.42,, +"OBIGT",1037,"formate","aq",1.96,, +"OBIGT",1039,"propanoate","aq",1.68,, +"OBIGT",1046,"n-decanoate","aq",-1.93,, +"OBIGT",1062,"oxalate-2","aq",-3.19,, +"OBIGT",1329,"Li(Mal)-","aq",,-3.22, +"OBIGT",1333,"Pb(Mal)","aq",,1.16, +"OBIGT",1337,"Pb(Succ)","aq",,1.49, +"OBIGT",1338,"Na(Oxal)-","aq",,-3.14, +"OBIGT",1339,"K(Oxal)-","aq",,-2.75, +"OBIGT",1340,"Fe(Oxal)+","aq",,-2.19, +"OBIGT",1342,"Na(Mal)-","aq",,-3.11, +"OBIGT",1343,"K(Mal)-","aq",,-2.63, +"OBIGT",1345,"La(Mal)+","aq",,-1.92, +"OBIGT",1346,"Gd(Mal)+","aq",,-1.73, +"OBIGT",1347,"Lu(Mal)+","aq",,-2.25, +"OBIGT",1348,"Yb(Mal)+","aq",,-2.05, +"OBIGT",1349,"Th(Mal)+2","aq",-1.29,-4.79, +"OBIGT",1351,"Ce(Mal)+","aq",,-1.75, +"OBIGT",1352,"Nd(Mal)+","aq",4.52,, +"OBIGT",1353,"Sm(Mal)+","aq",,-1.77, +"OBIGT",1354,"Pr(Mal)+","aq",,-1.75, +"OBIGT",1355,"Eu(Mal)+","aq",,-1.87, +"OBIGT",1356,"Tb(Mal)+","aq",,-1.92, +"OBIGT",1357,"Dy(Mal)+","aq",,-1.89, +"OBIGT",1358,"Tm(Mal)+","aq",,-2.08, +"OBIGT",1359,"Ho(Mal)+","aq",,-2.08, +"OBIGT",1360,"Er(Mal)+","aq",,-2.11, +"OBIGT",1361,"Sc(Mal)+","aq",,-1.97, +"OBIGT",1362,"Fe(Mal)+","aq",,-1.97, +"OBIGT",1363,"Na(Succ)-","aq",,-2.82, +"OBIGT",1364,"K(Succ)-","aq",,-2.39, +"OBIGT",1370,"Th(Succ)+2","aq",-1.21,-4.47, +"OBIGT",1375,"NH4(Oxal)-","aq",,-2.62, +"OBIGT",1380,"Yb(Oxal)+","aq",,-2.02, +"OBIGT",1381,"Ce(Oxal)+","aq",,-1.8, +"OBIGT",1382,"Nd(Oxal)+","aq",,-1.8, +"OBIGT",1383,"Eu(Oxal)+","aq",,-1.89, +"OBIGT",1384,"Gd(Oxal)+","aq",,-1.8, +"OBIGT",1385,"Ru(Oxal)+","aq",,-2.41, +"OBIGT",1386,"Pa(Oxal)+2","aq",-1.25,-4.63, +"OBIGT",1387,"Th(Oxal)+2","aq",-1.27,-4.69, +"OBIGT",1388,"U(Oxal)+2","aq",-1.25,-4.63, +"OBIGT",1390,"Y(Oxal)+","aq",,-2.11, +"OBIGT",1395,"La(Oxal)+","aq",,-1.87, +"OBIGT",1396,"Tb(Oxal)+","aq",,-1.92, +"OBIGT",1397,"Er(Oxal)+","aq",,-2.05, +"OBIGT",1398,"Lu(Oxal)+","aq",,-2.19, +"OBIGT",1399,"Cr(Oxal)+","aq",,-2.58, +"OBIGT",1400,"Ga(Oxal)+","aq",,-2.66, +"OBIGT",1401,"Sc(Oxal)+","aq",,-2.13, +"OBIGT",1402,"In(Oxal)+","aq",,-2.19, +"OBIGT",1403,"Sm(Oxal)+","aq",,-1.84, +"OBIGT",1404,"Cs(Mal)-","aq",,-2.39, +"OBIGT",1405,"NH4(Mal)-","aq",,-2.54, +"OBIGT",1410,"In(Mal)+","aq",,-2.11, +"OBIGT",1411,"Y(Mal)+","aq",,-2.02, +"OBIGT",1419,"La(Succ)+","aq",,-1.52, +"OBIGT",1420,"NH4(Succ)-","aq",,-2.26, +"OBIGT",1422,"Fe(Succ)+","aq",,-1.92, +"OBIGT",1423,"Sc(Succ)+","aq",,-1.77, +"OBIGT",1425,"Sm(Succ)+","aq",,-1.48, +"OBIGT",1426,"Er(Succ)+","aq",,-1.68, +"OBIGT",1427,"U(Succ)+2","aq",-1.15,-4.27, +"OBIGT",1431,"La(Glut)+","aq",,-1.23, +"OBIGT",1432,"Y(Glut)+","aq",,-1.46, +"OBIGT",1433,"Sc(Glut)+","aq",,-1.5, +"OBIGT",1434,"Th(Glut)+2","aq",-1.09,-4.05, +"OBIGT",1437,"Fe(Glut)+","aq",,-1.05, +"OBIGT",1438,"Sm(Glut)+","aq",,-1.2, +"OBIGT",1440,"Er(Glut)+","aq",,-1.4, +"OBIGT",1442,"Ba(Adip)","aq",,1.19, +"OBIGT",1449,"Pb(Adip)","aq",,1.25, +"OBIGT",1450,"Sc(Adip)+","aq",,-1.22, +"OBIGT",1452,"Th(Adip)+2","aq",-1.02,-3.76, +"OBIGT",1453,"U(Adip)+2","aq",-1,-3.71, +"OBIGT",1455,"Li(Oxal)-","aq",,-3.3, +"OBIGT",1459,"Li(Succ)-","aq",,-2.94, +"OBIGT",1461,"Na(Glut)-","aq",,-2.34, +"OBIGT",1462,"K(Glut)-","aq",,-2.05, +"OBIGT",1463,"Li(Glut)-","aq",,-2.66, +"OBIGT",1468,"Na(Adip)-","aq",,-2.05, +"OBIGT",1469,"K(Adip)-","aq",,-1.76, +"OBIGT",1470,"Li(Adip)-","aq",,-2.38, +"OBIGT",1476,"cyclohexane","aq",9.35,6.64, +"OBIGT",1477,"Ar","aq",-1.24,-8.59, +"OBIGT",1478,"benzene","aq",,-1.14, +"OBIGT",1479,"CO2","aq",-4.94,, +"OBIGT",1480,"Xe","aq",2.8,, +"OBIGT",1490,"n-butanethiol","aq",2.19,, +"OBIGT",1512,"methyldiethanolamine","aq",1.61,, +"OBIGT",1522,"cysteinate","aq",-1,, +"OBIGT",1548,"glucose","aq",1.11,, +"OBIGT",1576,"guanine","aq",-4.26,, +"OBIGT",1620,"dHUMP-","aq",-3.13,, +"OBIGT",1717,"MgADP-","aq",-1.01,, +"OBIGT",1728,"HNicMP(ox)","aq",,9.4, +"OBIGT",1736,"ribose-5-phosphate","aq",,7.48, +"OBIGT",1738,"ribose-5-phosphate-2","aq",1.53,, +"OBIGT",1739,"H4NADP(red)","aq",1.73,, +"OBIGT",1740,"H3NADP(red)-","aq",2.41,, +"OBIGT",1741,"H2NADP(red)-2","aq",1.28,, +"OBIGT",1742,"HNADP(red)-3","aq",2.09,, +"OBIGT",1743,"NADP(red)-4","aq",1.09,, +"OBIGT",1745,"H3NADP(ox)","aq",1.05,, +"OBIGT",1816,"diglycine+","aq",-177.69,, +"OBIGT",1817,"diglycine-","aq",-49.22,, +"OBIGT",1818,"triglycine+","aq",,1.75, +"OBIGT",1819,"triglycine-","aq",,1.78, +"OBIGT",1949,"jarosite","cr",,,20697 +"OBIGT",1950,"natrojarosite","cr",,,17554 +"OBIGT",1969,"dawsonite","cr",,,4653 +"OBIGT",1990,"octadecane","cr",-2.63,, +"OBIGT",1991,"nonadecane","cr",-13.32,, +"OBIGT",1992,"eicosane","cr",-2.79,, +"OBIGT",1993,"heneicosane","cr",-8.61,, +"OBIGT",1994,"docosane","cr",-2.63,, +"OBIGT",1995,"tricosane","cr",-5.22,, +"OBIGT",1996,"tetracosane","cr",-2.02,, +"OBIGT",1997,"pentacosane","cr",-2.93,, +"OBIGT",1998,"hexacosane","cr",-1.29,, +"OBIGT",1999,"heptacosane","cr",-1.23,, +"OBIGT",2051,"carbazole","cr",-43.39,, +"OBIGT",2092,"triphenylene","cr",,,541 +"OBIGT",2405,"deoxyadenosine","cr",,,-2977 +"OBIGT",2596,"nonacontane","liq",,,635 +"OBIGT",2603,"2-methyloctane","liq",10,, +"OBIGT",3016,"5,6-dithiadecane","liq",2,, +"OBIGT",3096,"ethylene","gas",-4.59,, +"OBIGT",3106,"3,5-dimethylphenol","gas",,,628 "DEW",15,"BO(OH)","aq",,,-1111 "DEW",19,"CaCl+","aq",,,-593 "DEW",20,"CaCl2","aq",,,-7937 Modified: pkg/CHNOSZ/man/EOSregress.Rd =================================================================== --- pkg/CHNOSZ/man/EOSregress.Rd 2019-04-17 00:48:50 UTC (rev 451) +++ pkg/CHNOSZ/man/EOSregress.Rd 2019-04-20 09:57:37 UTC (rev 452) @@ -121,7 +121,7 @@ \dontshow{reset()} ## fit experimental heat capacities of CH4 ## using revised Helgeson-Kirkham-Flowers equations -# read the data from Hnědkovský and Wood, 1997 +# read the data from Hnedkovsky and Wood, 1997 f <- system.file("extdata/cpetc/Cp.CH4.HW97.csv", package="CHNOSZ") d <- read.csv(f) # have to convert J to cal and MPa to bar Modified: pkg/CHNOSZ/man/add.obigt.Rd =================================================================== --- pkg/CHNOSZ/man/add.obigt.Rd 2019-04-17 00:48:50 UTC (rev 451) +++ pkg/CHNOSZ/man/add.obigt.Rd 2019-04-20 09:57:37 UTC (rev 452) @@ -123,8 +123,8 @@ lines(DLH06$out$T, DLH06$out$G/1000, lty = 2) legend("topleft", c("Dick et al., 2006", "Kitadai, 2014"), lty = c(2, 1)) title(main = "AABB = UPBB + H2O; after Figure 9 of Kitadai, 2014") -# reset to default database -obigt() +# reset database *and* settings (units) +reset() # Another use of add.obigt(): calculate Delta G of # H4SiO4 = SiO2 + 2H2O using different data for SiO2. Modified: pkg/CHNOSZ/man/diagram.Rd =================================================================== --- pkg/CHNOSZ/man/diagram.Rd 2019-04-17 00:48:50 UTC (rev 451) +++ pkg/CHNOSZ/man/diagram.Rd 2019-04-20 09:57:37 UTC (rev 452) @@ -136,7 +136,7 @@ \code{fill} determines the color of the predominance fields, \code{col} that of the boundary lines. The default of NULL for \code{fill} produces transparent predominance fields. \code{fill} can be any \code{\link{colors}}, or the word \samp{rainbow}, \samp{heat}, \samp{terrain}, \samp{topo}, or \samp{cm}, indicating a palette from \pkg{grDevices}. -Starting with \R version 3.6.0, \code{fill} can be the name of any available HCL color palette, matched in the same way as the \code{palette} argument of \code{\link{hcl.colors}}. +Starting with \R version 3.6.0, \code{fill} can be the name of any available HCL color palette, matched in the same way as the \code{palette} argument of \code{hcl.colors}. \code{fill.NA} gives the color for empty fields, i.e. points for which NA values are present, possibly by using \code{\link{equilibrate}} at extreme conditions (see \code{test-diagram.Rd}). \code{fill.NA} is also used to specify the color outside the water stability limits on Eh-pH or pe-pH diagrams, when \code{limit.water} is TRUE. Modified: pkg/CHNOSZ/man/extdata.Rd =================================================================== --- pkg/CHNOSZ/man/extdata.Rd 2019-04-17 00:48:50 UTC (rev 451) +++ pkg/CHNOSZ/man/extdata.Rd 2019-04-20 09:57:37 UTC (rev 452) @@ -151,7 +151,7 @@ Hnědkovský, L. and Wood, R. H. (1997) Apparent molar heat capacities of aqueous solutions of \CH4, \CO2, \H2S, and \NH3 at temperatures from 304 K to 704 K at a pressure of 28 MPa. \emph{J. Chem. Thermodyn.} \bold{29}, 731--747. \url{https://doi.org/10.1006/jcht.1997.0192} -Joint Genome Institute (2007) Bison Pool Environmental Genome. Protein sequence files downloaded from IMG/M (\url{http://img.jgi.doe.gov/cgi-bin/m/main.cgi?section=FindGenomes&page=findGenomes}) +Joint Genome Institute (2007) Bison Pool Environmental Genome. Protein sequence files downloaded from IMG/M (\url{https://img.jgi.doe.gov/}) Merino, E. (1975) Diagenesis in teriary sandstones from Kettleman North Dome, California. II. Interstitial solutions: distribution of aqueous species at 100°C and chemical relation to diagenetic mineralogy. \emph{Geochim. Cosmochim. Acta} \bold{39}, 1629--1645. \url{https://doi.org/10.1016/0016-7037(75)90085-X} Modified: pkg/CHNOSZ/man/util.plot.Rd =================================================================== --- pkg/CHNOSZ/man/util.plot.Rd 2019-04-17 00:48:50 UTC (rev 451) +++ pkg/CHNOSZ/man/util.plot.Rd 2019-04-20 09:57:37 UTC (rev 452) @@ -122,7 +122,7 @@ title(main = 'diagram(a, grid = "major")') diagram(a, grid = "minor") title(main = 'diagram(a, grid = "minor")') -diagram(a, fill = "set3") +diagram(a, fill = "terrain") thermo.axis(grid = "major", col.grid = "slategray") title(main = 'thermo.axis(grid = "major")') par(thermo()$opar) From noreply at r-forge.r-project.org Tue Apr 23 07:21:08 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 23 Apr 2019 07:21:08 +0200 (CEST) Subject: [CHNOSZ-commits] r453 - in pkg/CHNOSZ: . vignettes Message-ID: <20190423052108.172E2185888@r-forge.r-project.org> Author: jedick Date: 2019-04-23 07:21:07 +0200 (Tue, 23 Apr 2019) New Revision: 453 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/vignettes/mklinks.sh pkg/CHNOSZ/vignettes/obigt.bib Log: obigt.bib: use Unicode degree symbol instead of LaTeX \circ Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-20 09:57:37 UTC (rev 452) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-23 05:21:07 UTC (rev 453) @@ -1,6 +1,6 @@ -Date: 2019-04-20 +Date: 2019-04-23 Package: CHNOSZ -Version: 1.3.2 +Version: 1.3.2-1 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/vignettes/mklinks.sh =================================================================== --- pkg/CHNOSZ/vignettes/mklinks.sh 2019-04-20 09:57:37 UTC (rev 452) +++ pkg/CHNOSZ/vignettes/mklinks.sh 2019-04-23 05:21:07 UTC (rev 453) @@ -37,7 +37,7 @@ sed -i '120,$s/diagram()<\/code>/diagram()<\/a><\/code>/g' anintro.html sed -i '120,$s/basis()<\/code>/basis()<\/a><\/code>/g' anintro.html sed -i '120,$s/species()<\/code>/species()<\/a><\/code>/g' anintro.html -sed -i '120,$s/reset()<\/code>/reset()<\/a><\/code>/g' anintro.html +sed -i '120,$s/reset()<\/code>/reset()<\/a><\/code>/g' anintro.html sed -i '120,$s/describe.reaction()<\/code>/describe.reaction()<\/a><\/code>/g' anintro.html sed -i '120,$s/swap.basis()<\/code>/swap.basis()<\/a><\/code>/g' anintro.html sed -i '120,$s/water.lines()<\/code>/water.lines()<\/a><\/code>/g' anintro.html @@ -99,5 +99,5 @@ # add links to obigt.Rmd sed -i '120,$s/add.obigt()<\/code>/add.obigt()<\/a><\/code>/g' obigt.html -sed -i '120,$s/reset()<\/code>/reset()<\/a><\/code>/g' obigt.html +sed -i '120,$s/reset()<\/code>/reset()<\/a><\/code>/g' obigt.html sed -i 's/?add.obigt<\/code>/?add.obigt<\/a><\/code>/g' obigt.html Modified: pkg/CHNOSZ/vignettes/obigt.bib =================================================================== --- pkg/CHNOSZ/vignettes/obigt.bib 2019-04-20 09:57:37 UTC (rev 452) +++ pkg/CHNOSZ/vignettes/obigt.bib 2019-04-23 05:21:07 UTC (rev 453) @@ -16,7 +16,7 @@ @Article{AVZP06, author = {Akinfiev, N. N. and Voronin, M. V. and Zotov, A. V. and Prokof'ev, V. {\relax Yu}.}, journal = {Geochemistry International}, - title = {{E}xperimental investigation of the stability of a chloroborate complex and thermodynamic description of aqueous species in the {B}-{N}a-{C}l-{O}-{H} system up to 350$^\circ${C}}, + title = {{E}xperimental investigation of the stability of a chloroborate complex and thermodynamic description of aqueous species in the {B}-{N}a-{C}l-{O}-{H} system up to 350°{C}}, year = {2006}, volume = {44}, number = {9}, @@ -27,7 +27,7 @@ @Article{AZ01, author = {Akinfiev, N. N. and Zotov, A. V.}, journal = {Geochemistry International}, - title = {{T}hermodynamic description of chloride, hydrosulfide, and hydroxo complexes of {A}g({I}), {C}u({I}), and {A}u({I}) at temperatures of 25-500$^\circ${C} and pressures of 1-2000 bar}, + title = {{T}hermodynamic description of chloride, hydrosulfide, and hydroxo complexes of {A}g({I}), {C}u({I}), and {A}u({I}) at temperatures of 25-500°{C} and pressures of 1-2000 bar}, year = {2001}, volume = {39}, number = {10}, @@ -36,14 +36,14 @@ } @Article{AH97b, - author = {Amend, Jan P. and Helgeson, Harold C.}, - journal = {Journal of the Chemical Society, Faraday Transactions}, - title = {{C}alculation of the standard molal thermodynamic properties of aqueous biomolecules at elevated temperatures and pressures. {P}art 1. \textsc{l}-{$\alpha$}-amino acids}, - year = {1997}, - volume = {93}, - number = {10}, - pages = {1927--1941}, - doi = {10.1039/A608126F}, + author = {Amend, Jan P. and Helgeson, Harold C.}, + journal = {Journal of the Chemical Society, Faraday Transactions}, + title = {{C}alculation of the standard molal thermodynamic properties of aqueous biomolecules at elevated temperatures and pressures. {P}art 1. \textsc{l}-{$\alpha$}-amino acids}, + year = {1997}, + volume = {93}, + number = {10}, + pages = {1927--1941}, + doi = {10.1039/A608126F}, } @Article{AP01, @@ -91,13 +91,13 @@ } @Article{CS16, - author = {Canovas, III, Peter A. and Shock, Everett L.}, - journal = {Geochimica et Cosmochimica Acta}, - title = {{G}eobiochemistry of metabolism: {S}tandard state thermodynamic properties of the citric acid cycle}, - year = {2016}, - volume = {195}, - pages = {293--322}, - doi = {10.1016/j.gca.2016.08.028}, + author = {Canovas, III, Peter A. and Shock, Everett L.}, + journal = {Geochimica et Cosmochimica Acta}, + title = {{G}eobiochemistry of metabolism: {S}tandard state thermodynamic properties of the citric acid cycle}, + year = {2016}, + volume = {195}, + pages = {293--322}, + doi = {10.1016/j.gca.2016.08.028}, } @Article{DSM+97, @@ -131,25 +131,25 @@ } @Article{DEH+13, - author = {Dick, Jeffrey M. and Evans, Katy A. and Holman, Alex I. and Jaraula, Caroline M. B. and Grice, Kliti}, - journal = {Geochimica et Cosmochimica Acta}, - title = {{E}stimation and application of the thermodynamic properties of aqueous phenanthrene and isomers of methylphenanthrene at high temperature}, - year = {2013}, - volume = {122}, - pages = {247--266}, - booktitle = {34th International Geological Congress}, - doi = {10.1016/j.gca.2013.08.020}, + author = {Dick, Jeffrey M. and Evans, Katy A. and Holman, Alex I. and Jaraula, Caroline M. B. and Grice, Kliti}, + journal = {Geochimica et Cosmochimica Acta}, + title = {{E}stimation and application of the thermodynamic properties of aqueous phenanthrene and isomers of methylphenanthrene at high temperature}, + year = {2013}, + volume = {122}, + pages = {247--266}, + booktitle = {34th International Geological Congress}, + doi = {10.1016/j.gca.2013.08.020}, } @Article{DLH06, - author = {Dick, Jeffrey M. and LaRowe, Douglas E. and Helgeson, Harold C.}, - journal = {Biogeosciences}, - title = {{T}emperature, pressure, and electrochemical constraints on protein speciation: {G}roup additivity calculation of the standard molal thermodynamic properties of ionized unfolded proteins}, - year = {2006}, - volume = {3}, - number = {3}, - pages = {311--336}, - doi = {10.5194/bg-3-311-2006}, + author = {Dick, Jeffrey M. and LaRowe, Douglas E. and Helgeson, Harold C.}, + journal = {Biogeosciences}, + title = {{T}emperature, pressure, and electrochemical constraints on protein speciation: {G}roup additivity calculation of the standard molal thermodynamic properties of ionized unfolded proteins}, + year = {2006}, + volume = {3}, + number = {3}, + pages = {311--336}, + doi = {10.5194/bg-3-311-2006}, } @Article{GKL02, @@ -164,13 +164,13 @@ } @Book{HGK84, - author = {Haar, Lester and Gallagher, John S. and Kell, George S.}, - publisher = {Hemisphere Publishing Corporation}, - title = {{NBS}/{NRC} {S}team {T}ables: {T}hermodynamic and {T}ransport {P}roperties and {C}omputer {P}rograms for {V}apor and {L}iquid {S}tates of {W}ater in {SI} {U}nits}, - year = {1984}, - address = {Washington, D. C.}, - pages = {320}, - url = {http://www.worldcat.org/oclc/858456124}, + author = {Haar, Lester and Gallagher, John S. and Kell, George S.}, + publisher = {Hemisphere Publishing Corporation}, + title = {{NBS}/{NRC} {S}team {T}ables: {T}hermodynamic and {T}ransport {P}roperties and {C}omputer {P}rograms for {V}apor and {L}iquid {S}tates of {W}ater in {SI} {U}nits}, + year = {1984}, + address = {Washington, D. C.}, + pages = {320}, + url = {http://www.worldcat.org/oclc/858456124}, } @Article{HSS95, @@ -230,14 +230,14 @@ } @Article{HRMNS09, - author = {Helgeson, Harold C. and Richard, Laurent and McKenzie, William F. and Norton, Denis L. and Schmitt, Alexandra}, - journal = {Geochimica et Cosmochimica Acta}, - title = {{A} chemical and thermodynamic model of oil generation in hydrocarbon source rocks}, - year = {2009}, - volume = {73}, - number = {3}, - pages = {594--695}, - doi = {10.1016/j.gca.2008.03.004}, + author = {Helgeson, Harold C. and Richard, Laurent and McKenzie, William F. and Norton, Denis L. and Schmitt, Alexandra}, + journal = {Geochimica et Cosmochimica Acta}, + title = {{A} chemical and thermodynamic model of oil generation in hydrocarbon source rocks}, + year = {2009}, + volume = {73}, + number = {3}, + pages = {594--695}, + doi = {10.1016/j.gca.2008.03.004}, } @Article{JH85, @@ -252,14 +252,14 @@ } @Article{JOH92, - author = {Johnson, James W. and Oelkers, Eric H. and Helgeson, Harold C.}, - journal = {Computers \& Geosciences}, - title = {{SUPCRT}92: {A} software package for calculating the standard molal thermodynamic properties of minerals, gases, aqueous species, and reactions from 1 to 5000 bar and 0 to 1000°{C}}, - year = {1992}, - volume = {18}, - number = {7}, - pages = {899--947}, - doi = {10.1016/0098-3004(92)90029-Q}, + author = {Johnson, James W. and Oelkers, Eric H. and Helgeson, Harold C.}, + journal = {Computers \& Geosciences}, + title = {{SUPCRT}92: {A} software package for calculating the standard molal thermodynamic properties of minerals, gases, aqueous species, and reactions from 1 to 5000 bar and 0 to 1000°{C}}, + year = {1992}, + volume = {18}, + number = {7}, + pages = {899--947}, + doi = {10.1016/0098-3004(92)90029-Q}, } @Book{Kel60, @@ -273,47 +273,47 @@ } @Article{Kit14, - author = {Kitadai, Norio}, - journal = {Journal of Molecular Evolution}, - title = {{T}hermodynamic prediction of glycine polymerization as a function of temperature and p{H} consistent with experimentally obtained results}, - year = {2014}, - volume = {78}, - number = {3-4}, - pages = {171--187}, - doi = {10.1007/s00239-014-9616-1}, - issn = {0022-2844}, + author = {Kitadai, Norio}, + journal = {Journal of Molecular Evolution}, + title = {{T}hermodynamic prediction of glycine polymerization as a function of temperature and p{H} consistent with experimentally obtained results}, + year = {2014}, + volume = {78}, + number = {3-4}, + pages = {171--187}, + doi = {10.1007/s00239-014-9616-1}, + issn = {0022-2844}, } @Article{LD12, - author = {LaRowe, Douglas E. and Dick, Jeffrey M.}, - journal = {Geochimica et Cosmochimica Acta}, - title = {{C}alculation of the standard molal thermodynamic properties of crystalline peptides}, - year = {2012}, - volume = {80}, - pages = {70--91}, - doi = {10.1016/j.gca.2011.11.041}, + author = {LaRowe, Douglas E. and Dick, Jeffrey M.}, + journal = {Geochimica et Cosmochimica Acta}, + title = {{C}alculation of the standard molal thermodynamic properties of crystalline peptides}, + year = {2012}, + volume = {80}, + pages = {70--91}, + doi = {10.1016/j.gca.2011.11.041}, } @Article{LH06a, - author = {LaRowe, Douglas E. and Helgeson, Harold C.}, - journal = {Geochimica et Cosmochimica Acta}, - title = {{B}iomolecules in hydrothermal systems: {C}alculation of the standard molal thermodynamic properties of nucleic-acid bases, nucleosides, and nucleotides at elevated temperatures and pressures}, - year = {2006}, - volume = {70}, - number = {18}, - pages = {4680--4724}, - doi = {10.1016/j.gca.2006.04.010}, + author = {LaRowe, Douglas E. and Helgeson, Harold C.}, + journal = {Geochimica et Cosmochimica Acta}, + title = {{B}iomolecules in hydrothermal systems: {C}alculation of the standard molal thermodynamic properties of nucleic-acid bases, nucleosides, and nucleotides at elevated temperatures and pressures}, + year = {2006}, + volume = {70}, + number = {18}, + pages = {4680--4724}, + doi = {10.1016/j.gca.2006.04.010}, } @Article{LH06b, - author = {LaRowe, Douglas E. and Helgeson, Harold C.}, - journal = {Thermochimica Acta}, - title = {{T}he energetics of metabolism in hydrothermal systems: {C}alculation of the standard molal thermodynamic properties of magnesium-complexed adenosine nucleotides and {NAD} and {NADP} at elevated temperatures and pressures}, - year = {2006}, - volume = {448}, - number = {2}, - pages = {82--106}, - doi = {10.1016/j.tca.2006.06.008}, + author = {LaRowe, Douglas E. and Helgeson, Harold C.}, + journal = {Thermochimica Acta}, + title = {{T}he energetics of metabolism in hydrothermal systems: {C}alculation of the standard molal thermodynamic properties of magnesium-complexed adenosine nucleotides and {NAD} and {NADP} at elevated temperatures and pressures}, + year = {2006}, + volume = {448}, + number = {2}, + pages = {82--106}, + doi = {10.1016/j.tca.2006.06.008}, } @Article{MGN03, @@ -330,16 +330,16 @@ } @Article{MLS+03, - author = {Majzlan, Juraj and Lang, Brian E. and Stevens, Rebecca and Navrotsky, Alexandra and Woodfield, Brian F. and Boerio-Goates, Juliana}, - journal = {American Mineralogist}, - title = {{T}hermodynamics of {F}e oxides: {P}art {I}. {E}ntropy at standard temperature and pressure and heat capacity of goethite ($\alpha$-{F}e{OOH}), lepidocrocite ($\gamma$-{F}e{OOH}), and maghemite ($\gamma$-{F}e$_2${O}$_3$)}, - year = {2003}, - volume = {88}, - number = {5-6}, - pages = {846--854}, - day = {JUN}, - doi = {10.2138/am-2003-5-613}, - issn = {0003-004X}, + author = {Majzlan, Juraj and Lang, Brian E. and Stevens, Rebecca and Navrotsky, Alexandra and Woodfield, Brian F. and Boerio-Goates, Juliana}, + journal = {American Mineralogist}, + title = {{T}hermodynamics of {F}e oxides: {P}art {I}. {E}ntropy at standard temperature and pressure and heat capacity of goethite ($\alpha$-{F}e{OOH}), lepidocrocite ($\gamma$-{F}e{OOH}), and maghemite ($\gamma$-{F}e$_2${O}$_3$)}, + year = {2003}, + volume = {88}, + number = {5-6}, + pages = {846--854}, + day = {JUN}, + doi = {10.2138/am-2003-5-613}, + issn = {0003-004X}, } @Article{MNM+06, @@ -535,20 +535,20 @@ } @Article{RH98, - author = {Richard, Laurent and Helgeson, Harold C.}, - journal = {Geochimica et Cosmochimica Acta}, - title = {{C}alculation of the thermodynamic properties at elevated temperatures and pressures of saturated and aromatic high molecular weight solid and liquid hydrocarbons in kerogen, bitumen, petroleum, and other organic matter of biogeochemical interest}, - year = {1998}, - volume = {62}, - number = {23-24}, - pages = {3591--3636}, - doi = {10.1016/S0016-7037(97)00345-1}, + author = {Richard, Laurent and Helgeson, Harold C.}, + journal = {Geochimica et Cosmochimica Acta}, + title = {{C}alculation of the thermodynamic properties at elevated temperatures and pressures of saturated and aromatic high molecular weight solid and liquid hydrocarbons in kerogen, bitumen, petroleum, and other organic matter of biogeochemical interest}, + year = {1998}, + volume = {62}, + number = {23-24}, + pages = {3591--3636}, + doi = {10.1016/S0016-7037(97)00345-1}, } @Book{RH95, author = {Robie, Richard A. and Hemingway, Bruce S.}, publisher = {U. S. Geological Survey}, - title = {{T}hermodynamic {P}roperties of {M}inerals and {R}elated {S}ubstances at 298.15 {K} and 1 {B}ar ($10^5$ {P}ascals) {P}ressure and at {H}igher {T}emperatures}, + title = {{T}hermodynamic {P}roperties of {M}inerals and {R}elated {S}ubstances at 298.15 {K} and 1 {B}ar (10\textsuperscript{5} {P}ascals) {P}ressure and at {H}igher {T}emperatures}, year = {1995}, series = {Bulletin 2131}, address = {Washington, D. C.}, @@ -645,15 +645,15 @@ } @Article{Sho95, - author = {Shock, Everett L.}, - journal = {American Journal of Science}, - title = {{O}rganic acids in hydrothermal solutions: {S}tandard molal thermodynamic properties of carboxylic acids and estimates of dissociation constants at high temperatures and pressures}, - year = {1995}, - volume = {295}, - number = {5}, - pages = {496--580}, - doi = {10.2475/ajs.295.5.496}, - size = {85 p.}, + author = {Shock, Everett L.}, + journal = {American Journal of Science}, + title = {{O}rganic acids in hydrothermal solutions: {S}tandard molal thermodynamic properties of carboxylic acids and estimates of dissociation constants at high temperatures and pressures}, + year = {1995}, + volume = {295}, + number = {5}, + pages = {496--580}, + doi = {10.2475/ajs.295.5.496}, + size = {85 p.}, } @Article{Sho09, @@ -677,14 +677,14 @@ } @Article{SH88, - author = {Shock, Everett L. and Helgeson, Harold C.}, - journal = {Geochimica et Cosmochimica Acta}, - title = {{C}alculation of the thermodynamic and transport properties of aqueous species at high pressures and temperatures: {C}orrelation algorithms for ionic species and equation of state predictions to 5 kb and 1000$^\circ${C}}, - year = {1988}, - volume = {52}, - number = {8}, - pages = {2009--2036}, - doi = {10.1016/0016-7037(88)90181-0}, + author = {Shock, Everett L. and Helgeson, Harold C.}, + journal = {Geochimica et Cosmochimica Acta}, + title = {{C}alculation of the thermodynamic and transport properties of aqueous species at high pressures and temperatures: {C}orrelation algorithms for ionic species and equation of state predictions to 5 kb and 1000°{C}}, + year = {1988}, + volume = {52}, + number = {8}, + pages = {2009--2036}, + doi = {10.1016/0016-7037(88)90181-0}, } @Article{SH90, @@ -721,14 +721,14 @@ } @Article{SK95, - author = {Shock, Everett L. and Koretsky, Carla M.}, - journal = {Geochimica et Cosmochimica Acta}, - title = {{M}etal-organic complexes in geochemical processes: {E}stimation of standard partial molal thermodynamic properties of aqueous complexes between metal cations and monovalent organic acid ligands at high pressures and temperatures}, - year = {1995}, - volume = {59}, - number = {8}, - pages = {1497--1532}, - doi = {10.1016/0016-7037(95)00058-8}, + author = {Shock, Everett L. and Koretsky, Carla M.}, + journal = {Geochimica et Cosmochimica Acta}, + title = {{M}etal-organic complexes in geochemical processes: {E}stimation of standard partial molal thermodynamic properties of aqueous complexes between metal cations and monovalent organic acid ligands at high pressures and temperatures}, + year = {1995}, + volume = {59}, + number = {8}, + pages = {1497--1532}, + doi = {10.1016/0016-7037(95)00058-8}, } @Article{SM93, @@ -754,14 +754,14 @@ } @Article{SSWS97, - author = {Shock, Everett L. and Sassani, David C. and Willis, Marc and Sverjensky, Dimitri A.}, - journal = {Geochimica et Cosmochimica Acta}, - title = {{I}norganic species in geologic fluids: {C}orrelations among standard molal thermodynamic properties of aqueous ions and hydroxide complexes}, - year = {1997}, - volume = {61}, - number = {5}, - pages = {907--950}, - doi = {10.1016/S0016-7037(96)00339-0}, + author = {Shock, Everett L. and Sassani, David C. and Willis, Marc and Sverjensky, Dimitri A.}, + journal = {Geochimica et Cosmochimica Acta}, + title = {{I}norganic species in geologic fluids: {C}orrelations among standard molal thermodynamic properties of aqueous ions and hydroxide complexes}, + year = {1997}, + volume = {61}, + number = {5}, + pages = {907--950}, + doi = {10.1016/S0016-7037(96)00339-0}, } @Article{Ste01, @@ -788,25 +788,25 @@ } @Article{SHA14, - author = {Sverjensky, Dimitri A. and Harrison, Brandon and Azzolini, David}, - journal = {Geochimica et Cosmochimica Acta}, - title = {{W}ater in the deep {E}arth: {T}he dielectric constant and the solubilities of quartz and corundum to 60 kb and 1,200 $^\circ${C}}, - year = {2014}, - volume = {129}, - pages = {125--145}, - doi = {10.1016/j.gca.2013.12.019}, - issn = {0016-7037}, + author = {Sverjensky, Dimitri A. and Harrison, Brandon and Azzolini, David}, + journal = {Geochimica et Cosmochimica Acta}, + title = {{W}ater in the deep {E}arth: {T}he dielectric constant and the solubilities of quartz and corundum to 60 kb and 1,200 °{C}}, + year = {2014}, + volume = {129}, + pages = {125--145}, + doi = {10.1016/j.gca.2013.12.019}, + issn = {0016-7037}, } @Article{SSH97, - author = {Sverjensky, D. A. and Shock, E. L. and Helgeson, H. C.}, - journal = {Geochimica et Cosmochimica Acta}, - title = {{P}rediction of the thermodynamic properties of aqueous metal complexes to 1000$^\circ${C} and 5 kb}, - year = {1997}, - volume = {61}, - number = {7}, - pages = {1359--1412}, - doi = {10.1016/S0016-7037(97)00009-4}, + author = {Sverjensky, D. A. and Shock, E. L. and Helgeson, H. C.}, + journal = {Geochimica et Cosmochimica Acta}, + title = {{P}rediction of the thermodynamic properties of aqueous metal complexes to 1000°{C} and 5 kb}, + year = {1997}, + volume = {61}, + number = {7}, + pages = {1359--1412}, + doi = {10.1016/S0016-7037(97)00009-4}, } @Article{TS01, @@ -823,7 +823,7 @@ @Article{TZA97, author = {Tagirov, B. R. and Zotov, A. V. and Akinfiev, N. N.}, journal = {Geochimica et Cosmochimica Acta}, - title = {{E}xperimental study of dissociation of {HC}l from 350 to 500$^\circ${C} and from 500 to 2500 bars: {T}hermodynamic properties of {HC}l$_\mathrm{(aq)}^\circ$}, + title = {{E}xperimental study of dissociation of {HC}l from 350 to 500°{C} and from 500 to 2500 bars: {T}hermodynamic properties of {HC}l°\textsubscript{(aq)}}, year = {1997}, volume = {61}, number = {20}, @@ -865,14 +865,14 @@ } @Article{WP02, - author = {Wagner, W. and Pru{\ss}, A.}, - journal = {Journal of Physical and Chemical Reference Data}, - title = {{T}he {IAPWS} formulation 1995 for the thermodynamic properties of ordinary water substance for general and scientific use}, - year = {2002}, - volume = {31}, - number = {2}, - pages = {387--535}, - doi = {10.1063/1.1461829}, + author = {Wagner, W. and Pru{\ss}, A.}, + journal = {Journal of Physical and Chemical Reference Data}, + title = {{T}he {IAPWS} formulation 1995 for the thermodynamic properties of ordinary water substance for general and scientific use}, + year = {2002}, + volume = {31}, + number = {2}, + pages = {387--535}, + doi = {10.1063/1.1461829}, } @Article{ZZL+16, @@ -1000,14 +1000,14 @@ } @Article{LCT17, - author = {Alexander R. Lowe and Jenny S. Cox and Peter R. Tremaine}, - journal = {Journal of Chemical Thermodynamics}, - title = {{T}hermodynamics of aqueous adenine: {S}tandard partial molar volumes and heat capacities of adenine, adeninium chloride, and sodium adeninate from ${T}$ = 278.15 {K} to 393.15 {K}}, - year = {2017}, - volume = {112}, - pages = {129--145}, - doi = {10.1016/j.jct.2017.04.005}, - issn = {0021-9614}, + author = {Alexander R. Lowe and Jenny S. Cox and Peter R. Tremaine}, + journal = {Journal of Chemical Thermodynamics}, + title = {{T}hermodynamics of aqueous adenine: {S}tandard partial molar volumes and heat capacities of adenine, adeninium chloride, and sodium adeninate from ${T}$ = 278.15 {K} to 393.15 {K}}, + year = {2017}, + volume = {112}, + pages = {129--145}, + doi = {10.1016/j.jct.2017.04.005}, + issn = {0021-9614}, } @Misc{DEW17, @@ -1032,15 +1032,15 @@ } @Article{FDM+14, - author = {Facq, Sébastien and Daniel, Isabelle and Montagnac, Gilles and Cardon, Hervé and Sverjensky, Dimitri A.}, - journal = {Geochimica et Cosmochimica Acta}, - title = {\emph{In situ} {R}aman study and thermodynamic model of aqueous carbonate speciation in equilibrium with aragonite under subduction zone conditions}, - year = {2014}, - volume = {132}, - number = {Supplement C}, - pages = {375--390}, - doi = {10.1016/j.gca.2014.01.030}, - issn = {0016-7037}, + author = {Facq, Sébastien and Daniel, Isabelle and Montagnac, Gilles and Cardon, Hervé and Sverjensky, Dimitri A.}, + journal = {Geochimica et Cosmochimica Acta}, + title = {\emph{In situ} {R}aman study and thermodynamic model of aqueous carbonate speciation in equilibrium with aragonite under subduction zone conditions}, + year = {2014}, + volume = {132}, + number = {Supplement C}, + pages = {375--390}, + doi = {10.1016/j.gca.2014.01.030}, + issn = {0016-7037}, } @Article{HP97, @@ -1080,14 +1080,14 @@ } @Article{SHD91, - author = {Sverjensky, Dimitri A. and Hemley, J. J. and D'Angelo, W. M.}, - journal = {Geochimica et Cosmochimica Acta}, - title = {{T}hermodynamic assessment of hydrothermal alkali feldspar-mica-aluminosilicate equilibria}, - year = {1991}, - volume = {55}, - number = {4}, - pages = {989--1004}, - doi = {10.1016/0016-7037(91)90157-Z}, + author = {Sverjensky, Dimitri A. and Hemley, J. J. and D'Angelo, W. M.}, + journal = {Geochimica et Cosmochimica Acta}, + title = {{T}hermodynamic assessment of hydrothermal alkali feldspar-mica-aluminosilicate equilibria}, + year = {1991}, + volume = {55}, + number = {4}, + pages = {989--1004}, + doi = {10.1016/0016-7037(91)90157-Z}, } @Article{Eva90, @@ -1177,25 +1177,25 @@ } @TechReport{AS04, - author = {Apps, J. and Spycher, N.}, - title = {{D}ata qualification for thermodynamic data used to support {THC} calculations}, - institution = {Bechtel SAIC Company, LLC}, - year = {2004}, - number = {ANL-NBS-HS-000043 REV 00 (DOC.20041118.0004)}, - address = {Las Vegas, NV}, - pages = {172}, + author = {Apps, J. and Spycher, N.}, + title = {{D}ata qualification for thermodynamic data used to support {THC} calculations}, + institution = {Bechtel SAIC Company, LLC}, + year = {2004}, + number = {ANL-NBS-HS-000043 REV 00 (DOC.20041118.0004)}, + address = {Las Vegas, NV}, + pages = {172}, } @Incollection{NA03, - author = {Nordstrom, D. Kirk and Archer, Donald G.}, - booktitle = {Arsenic in Groundwater}, - publisher = {Springer}, - title = {{A}rsenic thermodynamic data and environmental geochemistry}, - year = {2003}, - editor = {Welch, Alan H. and Stollenwerk, Kenneth G.}, - pages = {1--25}, - address = {New York}, - doi = {10.1007/0-306-47956-7_1}, + author = {Nordstrom, D. Kirk and Archer, Donald G.}, + booktitle = {Arsenic in Groundwater}, + publisher = {Springer}, + title = {{A}rsenic thermodynamic data and environmental geochemistry}, + year = {2003}, + editor = {Welch, Alan H. and Stollenwerk, Kenneth G.}, + pages = {1--25}, + address = {New York}, + doi = {10.1007/0-306-47956-7_1}, } @TechReport{BN91, @@ -1234,16 +1234,16 @@ } @Article{HP11, - author = {Holland, T. J. B. and Powell, R.}, - journal = {Journal of Metamorphic Geology}, - title = {{A}n improved and extended internally consistent thermodynamic dataset for phases of petrological interest, involving a new equation of state for solids}, - year = {2011}, - volume = {29}, - number = {3}, - pages = {333--383}, - doi = {10.1111/j.1525-1314.2010.00923.x}, - sn = {0263-4929}, - z9 = {2}, + author = {Holland, T. J. B. and Powell, R.}, + journal = {Journal of Metamorphic Geology}, + title = {{A}n improved and extended internally consistent thermodynamic dataset for phases of petrological interest, involving a new equation of state for solids}, + year = {2011}, + volume = {29}, + number = {3}, + pages = {333--383}, + doi = {10.1111/j.1525-1314.2010.00923.x}, + sn = {0263-4929}, + z9 = {2}, } @Article{HRA91, @@ -1258,15 +1258,15 @@ } @Article{BPAH07, - author = {Pascale B\'en\'ezeth and Donald A. Palmer and Lawrence M. Anovitz and Juske Horita}, - journal = {Geochimica et Cosmochimica Acta}, - title = {{D}awsonite synthesis and reevaluation of its thermodynamic properties from solubility measurements: {I}mplications for mineral trapping of {CO}$_2$}, - year = {2007}, - volume = {71}, - number = {18}, - pages = {4438--4455}, - doi = {10.1016/j.gca.2007.07.003}, - issn = {0016-7037}, + author = {Pascale B\'en\'ezeth and Donald A. Palmer and Lawrence M. Anovitz and Juske Horita}, + journal = {Geochimica et Cosmochimica Acta}, + title = {{D}awsonite synthesis and reevaluation of its thermodynamic properties from solubility measurements: {I}mplications for mineral trapping of {CO}$_2$}, + year = {2007}, + volume = {71}, + number = {18}, + pages = {4438--4455}, + doi = {10.1016/j.gca.2007.07.003}, + issn = {0016-7037}, } @Book{FSR76, @@ -1281,32 +1281,32 @@ } @Article{DS10, - author = {Delgado Martín, Jordi and Soler i Gil, Albert}, - journal = {European Journal of Mineralogy}, - title = {{I}lvaite stability in skarns from the northern contact of the {M}aladeta batholith, {C}entral {P}yrenees ({S}pain)}, - year = {2010}, - volume = {22}, - number = {3}, - pages = {363--380}, - issn = {0935-1221}, - url = {http://www.ingentaconnect.com/content/10.1127/0935-1221/2010/0022-2021}, + author = {Delgado Martín, Jordi and Soler i Gil, Albert}, + journal = {European Journal of Mineralogy}, + title = {{I}lvaite stability in skarns from the northern contact of the {M}aladeta batholith, {C}entral {P}yrenees ({S}pain)}, + year = {2010}, + volume = {22}, + number = {3}, + pages = {363--380}, + doi = {10.1127/0935-1221/2010/0022-2021}, + issn = {0935-1221}, } @Article{AKAE19, - author = {M.R. Azadi and A. Karrech and M. Attar and M. Elchalakani}, - journal = {Fluid Phase Equilibria}, - title = {{D}ata analysis and estimation of thermodynamic properties of aqueous monovalent metal-glycinate complexes}, - year = {2019}, - volume = {480}, - pages = {25--40}, - doi = {10.1016/j.fluid.2018.10.002}, - issn = {0378-3812}, + author = {M.R. Azadi and A. Karrech and M. Attar and M. Elchalakani}, + journal = {Fluid Phase Equilibria}, + title = {{D}ata analysis and estimation of thermodynamic properties of aqueous monovalent metal-glycinate complexes}, + year = {2019}, + volume = {480}, + pages = {25--40}, + doi = {10.1016/j.fluid.2018.10.002}, + issn = {0378-3812}, } @Article{AZ10, author = {Akinfiev, N. N. and Zotov, A. V.}, journal = {Geochemistry International}, - title = {{T}hermodynamic description of aqueous species in the system {C}u-{A}g-{A}u-{S}-{O}-{H} at temperatures of 0-600{A} degrees {C} and pressures of 1-3000 bar}, [TRUNCATED] To get the complete diff run: svnlook diff /svnroot/chnosz -r 453 From noreply at r-forge.r-project.org Sat Apr 27 15:06:54 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sat, 27 Apr 2019 15:06:54 +0200 (CEST) Subject: [CHNOSZ-commits] r454 - in pkg/CHNOSZ: . demo inst man vignettes Message-ID: <20190427130654.1BCFE187F1F@r-forge.r-project.org> Author: jedick Date: 2019-04-27 15:06:53 +0200 (Sat, 27 Apr 2019) New Revision: 454 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/demo/aluminum.R pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/man/diagram.Rd pkg/CHNOSZ/vignettes/obigt.Rmd Log: fix some typos Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-23 05:21:07 UTC (rev 453) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-27 13:06:53 UTC (rev 454) @@ -1,6 +1,6 @@ -Date: 2019-04-23 +Date: 2019-04-27 Package: CHNOSZ -Version: 1.3.2-1 +Version: 1.3.2-2 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/aluminum.R =================================================================== --- pkg/CHNOSZ/demo/aluminum.R 2019-04-23 05:21:07 UTC (rev 453) +++ pkg/CHNOSZ/demo/aluminum.R 2019-04-27 13:06:53 UTC (rev 454) @@ -18,32 +18,31 @@ thermo.plot.new(xlim = range(T), ylim = c(-3.5, -1.5), xlab = axis.label("T"), ylab = axis.label("SiO2")) points(xT, xlogaSiO2) basis(delete = TRUE) -## first calculation: as in SUPCRT92 +## first calculation: CHNOSZ default +# kaolinite from Berman, 1988 +# boehmite from Hemingway et al., 1991 +r1 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T = T, P = 1000, exceed.Ttr = TRUE) +## second calculation: minerals as in SUPCRT92 add.obigt("SUPCRT92") # gets kaolinite and boehmite from HDNB78 -r1 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T = T, P = 1000, exceed.Ttr = TRUE) # we need exceed.Ttr = TRUE because the T limit for boehmite is 500 K (Helgeson et al., 1978) -## second calculation: CHNOSZ default -# kaolinite from Berman, 1988 -# boehmite from Hemingway et al., 1991 -# SiO2 from Apps and Spycher, 2004 +r2 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T = T, P = 1000, exceed.Ttr = TRUE) reset() -r2 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T = T, P = 1000, exceed.Ttr = TRUE) -## third calculation: get SiO2(aq) from SHS89 +## third calculation: get SiO2(aq) from Apps and Spycher, 2004 add.obigt("AS04") r3 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T = T, P = 1000, exceed.Ttr = TRUE) +reset() ## log activity of SiO2 is -ve logK -lines(T, -r1$out$logK, col = "blue1", lty = 2) -lines(T, -r2$out$logK, lwd = 1.5) +lines(T, -r1$out$logK, lwd = 1.5) +lines(T, -r2$out$logK, col = "blue1", lty = 2) lines(T, -r3$out$logK, col = "red", lty = 2) ## add points calculated using the SUPCRTBL package points(seq(125, 350, 25), -c(3.489, 3.217, 2.967, 2.734, 2.517, 2.314, 2.124, 1.946, 1.781, 1.628), pch = 4, col = "red") ## add legend and title -title(main = describe.reaction(r1$reaction), cex.main = 1.1) +title(main = describe.reaction(r2$reaction), cex.main = 1.1) legend("bottomright", lty = c(0, 2, 0, 1, 2), pch = c(1, NA, 4, NA, NA), lwd = c(1, 1, 1, 1.5, 1), - col = c("black", "black", "red", "black", "red"), bty = "n", cex = 0.9, + col = c("black", "blue", "red", "black", "red"), bty = "n", cex = 0.9, legend = c("Hemley et al., 1980", "SUPCRT92", "SUPCRTBL", "CHNOSZ", 'add.obigt("AS04")')) legend("topleft", c("Boehmite - Kaolinite", "After Zhu and Lu, 2009 Fig. A1"), bty = "n") -reset() # Helgeson et al., 1978 (HDNB78): http://www.worldcat.org/oclc/13594862 # Shock et al., 1989 (SHS89): doi:10.1016/0016-7037(89)90341-4 # Berman, 1988 (Ber88): doi:10.1093/petrology/29.2.445 Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2019-04-23 05:21:07 UTC (rev 453) +++ pkg/CHNOSZ/inst/NEWS 2019-04-27 13:06:53 UTC (rev 454) @@ -31,7 +31,7 @@ 2014. - Add argument 'plot.box' (default TRUE) to thermo.plot.new() and - 'plot.line' (default FALSE) to thermo.axis() to prevent unecessary + 'plot.line' (default FALSE) to thermo.axis() to prevent unnecessary plotting of axis lines. thermo.axis() also avoids plotting tick marks at the plot limits. Modified: pkg/CHNOSZ/man/diagram.Rd =================================================================== --- pkg/CHNOSZ/man/diagram.Rd 2019-04-23 05:21:07 UTC (rev 453) +++ pkg/CHNOSZ/man/diagram.Rd 2019-04-27 13:06:53 UTC (rev 454) @@ -265,7 +265,6 @@ text(3, 21, describe.property(c("T", "P"), c(25, 1), oneline=TRUE)) ## aqueous Al species, after Tagirov and Schott, 2001 -# this uses a HCL palette for the fill colors basis(c("Al+3", "F-", "H+", "O2", "H2O")) AlOH <- c("Al(OH)4-", "Al(OH)3", "Al(OH)2+", "AlOH+2") Al <- "Al+3" Modified: pkg/CHNOSZ/vignettes/obigt.Rmd =================================================================== --- pkg/CHNOSZ/vignettes/obigt.Rmd 2019-04-23 05:21:07 UTC (rev 453) +++ pkg/CHNOSZ/vignettes/obigt.Rmd 2019-04-27 13:06:53 UTC (rev 454) @@ -119,7 +119,7 @@ * Data from SUPCRT92 which have been superseded by the Berman data are listed under **Optional Data** / **SUPCRT92**. -* Superseded data from SLOP98 (inlucding Al, As, and Au species) are listed under **Optional Data** / **SLOP98**. +* Superseded data from SLOP98 (including Al, As, and Au species) are listed under **Optional Data** / **SLOP98**. # Sources of data {.tabset .tabset-fade} From noreply at r-forge.r-project.org Sun Apr 28 10:31:53 2019 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Sun, 28 Apr 2019 10:31:53 +0200 (CEST) Subject: [CHNOSZ-commits] r455 - in pkg/CHNOSZ: . demo inst inst/extdata/OBIGT inst/extdata/thermo tests/testthat Message-ID: <20190428083153.20CF91886E6@r-forge.r-project.org> Author: jedick Date: 2019-04-28 10:31:52 +0200 (Sun, 28 Apr 2019) New Revision: 455 Modified: pkg/CHNOSZ/DESCRIPTION pkg/CHNOSZ/demo/aluminum.R pkg/CHNOSZ/inst/NEWS pkg/CHNOSZ/inst/extdata/OBIGT/AkDi.csv pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_gas.csv.xz pkg/CHNOSZ/inst/extdata/thermo/stoich.csv.xz pkg/CHNOSZ/tests/testthat/test-eos.R Log: demo/aluminum.R: add calculations with Si(OH)4 from add.obigt("AkDi") Modified: pkg/CHNOSZ/DESCRIPTION =================================================================== --- pkg/CHNOSZ/DESCRIPTION 2019-04-27 13:06:53 UTC (rev 454) +++ pkg/CHNOSZ/DESCRIPTION 2019-04-28 08:31:52 UTC (rev 455) @@ -1,6 +1,6 @@ -Date: 2019-04-27 +Date: 2019-04-28 Package: CHNOSZ -Version: 1.3.2-2 +Version: 1.3.2-3 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/aluminum.R =================================================================== --- pkg/CHNOSZ/demo/aluminum.R 2019-04-27 13:06:53 UTC (rev 454) +++ pkg/CHNOSZ/demo/aluminum.R 2019-04-28 08:31:52 UTC (rev 455) @@ -22,26 +22,32 @@ # kaolinite from Berman, 1988 # boehmite from Hemingway et al., 1991 r1 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T = T, P = 1000, exceed.Ttr = TRUE) -## second calculation: minerals as in SUPCRT92 +## second calculation: get SiO2(aq) from Apps and Spycher, 2004 +add.obigt("AS04") +r2 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T = T, P = 1000, exceed.Ttr = TRUE) +reset() +## third calculation: get Si(OH)4 from Akinfiev and Plyasunov, 2014 +add.obigt("AkDi") +r3 <- subcrt(c("boehmite", "Si(OH)4", "H2O", "kaolinite"), c(-1, -1, 1.5, 0.5), T = T, P = 1000, exceed.Ttr = TRUE) +reset() +## fourth calculation: minerals as in SUPCRT92 add.obigt("SUPCRT92") # gets kaolinite and boehmite from HDNB78 # we need exceed.Ttr = TRUE because the T limit for boehmite is 500 K (Helgeson et al., 1978) -r2 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T = T, P = 1000, exceed.Ttr = TRUE) +r4 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T = T, P = 1000, exceed.Ttr = TRUE) reset() -## third calculation: get SiO2(aq) from Apps and Spycher, 2004 -add.obigt("AS04") -r3 <- subcrt(c("boehmite", "H2O", "SiO2", "kaolinite"), c(-1, -0.5, -1, 0.5), T = T, P = 1000, exceed.Ttr = TRUE) -reset() ## log activity of SiO2 is -ve logK lines(T, -r1$out$logK, lwd = 1.5) -lines(T, -r2$out$logK, col = "blue1", lty = 2) -lines(T, -r3$out$logK, col = "red", lty = 2) +lines(T, -r2$out$logK, col = "red", lty = 2) +lines(T, -r3$out$logK, col = "purple", lty = 3) +lines(T, -r4$out$logK, col = "blue1", lty = 4) ## add points calculated using the SUPCRTBL package points(seq(125, 350, 25), -c(3.489, 3.217, 2.967, 2.734, 2.517, 2.314, 2.124, 1.946, 1.781, 1.628), pch = 4, col = "red") ## add legend and title -title(main = describe.reaction(r2$reaction), cex.main = 1.1) -legend("bottomright", lty = c(0, 2, 0, 1, 2), pch = c(1, NA, 4, NA, NA), lwd = c(1, 1, 1, 1.5, 1), - col = c("black", "blue", "red", "black", "red"), bty = "n", cex = 0.9, - legend = c("Hemley et al., 1980", "SUPCRT92", "SUPCRTBL", "CHNOSZ", 'add.obigt("AS04")')) +title(main = describe.reaction(r4$reaction), cex.main = 1.1) +legend("bottomright", lty = c(0, 0, 1, 2, 3, 0), pch = c(1, 4, NA, NA, NA, NA), lwd = c(1, 1, 1.5, 1, 1, 0), + col = c("black", "red", "black", "red", "purple", NA), bty = "n", cex = 0.9, + legend = c("Hemley et al., 1980", "SUPCRTBL", "CHNOSZ", 'add.obigt("AS04")', 'add.obigt("AkDi")', "")) +legend("bottomright", lty = 4, pch = NA, lwd = 1, col = "blue", legend = 'add.obigt("SUPCRT92")', bty = "n", cex = 0.9) legend("topleft", c("Boehmite - Kaolinite", "After Zhu and Lu, 2009 Fig. A1"), bty = "n") # Helgeson et al., 1978 (HDNB78): http://www.worldcat.org/oclc/13594862 # Shock et al., 1989 (SHS89): doi:10.1016/0016-7037(89)90341-4 @@ -102,11 +108,18 @@ pK <- -sres$out$logK lines(invTK, pK, col = "red", lty = 2) reset() +# plot line: Si(OH)4 from Akinfiev and Plyasunov, 2014 +add.obigt("AkDi") +sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "Si(OH)4"), c(-1, -2, -5, 2, 2), T = T) +pK <- -sres$out$logK +lines(invTK, pK, col = "purple", lty = 3) +reset() # plot line: SUPCRT92 add.obigt("SUPCRT92") sres <- subcrt(c("kaolinite", "OH-", "H2O", "Al(OH)4-", "SiO2"), c(-1, -2, -1, 2, 2), T = T) pK <- -sres$out$logK -lines(invTK, pK, col = "blue", lty = 2) +lines(invTK, pK, col = "blue", lty = 4) +reset() # add points calculated using the SUPCRTBL package T <- seq(25, 300, 25) invTK <- 1000/(T + 273.15) @@ -116,9 +129,10 @@ title(main = describe.reaction(sres$reaction), cex.main = 1.1) par(xpd = FALSE) legend("topright", c("Kaolinite solubility", "After Tutolo et al., 2014 Fig. 2"), bty = "n") -legend("bottomleft", lty = c(0, 0, 2, 0, 1, 2), pch = c(1, NA, NA, 4, NA, NA), lwd = c(1, 1, 1, 1, 1.5, 1), col = c("black", "black", "blue", "red", "black", "red"), - legend = c("Various sources \u2013", " see Tutolo et al., 2014", "SUPCRT92", "SUPCRTBL", "CHNOSZ", 'add.obigt("AS04")'), bty = "n", cex = 0.9) -reset() +legend("bottomleft", lty = c(0, 0, 0, 1, 2, 3, 4), pch = c(1, NA, 4, NA, NA, NA, NA), + lwd = c(1, 1, 1, 1.5, 1, 1, 1), col = c("black", "black", "red", "black", "red", "purple", "blue"), + legend = c("Various sources \u2013", " see Tutolo et al., 2014", "SUPCRTBL", "CHNOSZ", 'add.obigt("AS04")', 'add.obigt("AkDi")', 'add.obigt("SUPCRT92")'), + bty = "n", cex = 0.9) ########### ### plot 4: albite - K-feldspar exchange @@ -138,7 +152,7 @@ # plot line calculated using SUPCRT92 data add.obigt("SUPCRT92") a <- affinity("K+" = c(4, 7), "Na+" = c(6, 9), T = 100, P = 150) -diagram(a, col = "blue", lty = 2, add = TRUE, names = NULL) +diagram(a, col = "blue", lty = 4, add = TRUE, names = NULL) # add SUPCRTBL calculation logK_BL <- 2.092 logaK <- seq(4, 7, 0.5) @@ -148,8 +162,9 @@ sres <- subcrt(c("albite", "K+", "K-feldspar", "Na+"), c(-1, -1, 1, 1)) title(main = describe.reaction(sres$reaction), cex.main = 1.1) legend("topleft", c("Albite - K-feldspar", "After Tutolo et al., 2014 Fig. 5"), bty = "n", cex = 0.9) -legend("bottomright", lty = c(0, 2, 0, 1), pch = c(1, NA, 4, NA), lwd = c(1, 1, 1, 1.5), col = c("black", "blue", "red", "black"), - legend = c("Merino, 1975", "SUPCRT92", "SUPCRTBL", "CHNOSZ"), bty = "n", cex = 0.9) +legend("bottomright", lty = c(0, 0, 1, 0), pch = c(1, 4, NA, NA), lwd = c(1, 1, 1.5, 0), col = c("black", "red", "black", NA), + legend = c("Merino, 1975", "SUPCRTBL", "CHNOSZ", ""), bty = "n", cex = 0.9) +legend("bottomright", lty = 4, pch = NA, lwd = 1, col = "blue", legend = 'add.obigt("SUPCRT92")', bty = "n", cex = 0.9) legend("left", describe.property(c("T", "P"), c(T, P)), bty = "n") reset() Modified: pkg/CHNOSZ/inst/NEWS =================================================================== --- pkg/CHNOSZ/inst/NEWS 2019-04-27 13:06:53 UTC (rev 454) +++ pkg/CHNOSZ/inst/NEWS 2019-04-28 08:31:52 UTC (rev 455) @@ -1,3 +1,9 @@ +CHANGES IN CHNOSZ 1.3.2-3 (2019-04-28) +-------------------------------------- + +- demo/aluminum.R: add calculations using Si(OH)4 from Akinfiev-Diamond + model (SiO2 in these reactions is replaced by Si(OH)4 - 2 H2O). + CHANGES IN CHNOSZ 1.3.2 (2019-04-20) ------------------------------------ Modified: pkg/CHNOSZ/inst/extdata/OBIGT/AkDi.csv =================================================================== --- pkg/CHNOSZ/inst/extdata/OBIGT/AkDi.csv 2019-04-27 13:06:53 UTC (rev 454) +++ pkg/CHNOSZ/inst/extdata/OBIGT/AkDi.csv 2019-04-28 08:31:52 UTC (rev 455) @@ -20,3 +20,6 @@ B(OH)3,NA,B(OH)3,aq,AP14,NA,22.Feb.19,NA,NA,NA,NA,NA,-4.2561,4.0194,-1.057,NA,NA,NA,NA,NA Si(OH)4,NA,Si(OH)4,aq,AP14,NA,22.Feb.19,NA,NA,NA,NA,NA,0.9285,-0.9409,-1.8933,NA,NA,NA,NA,NA As(OH)3,NA,As(OH)3,aq,AP14,NA,22.Feb.19,NA,NA,NA,NA,NA,-9.903,7.6818,-1.23,NA,NA,NA,NA,NA +B(OH)3,NA,B(OH)3,gas,AP14,NA,22.Feb.19,-222523.9,NA,66.589,NA,0,46.7734,-0.097,0.5932,-522.4665,0,0,0,1000 +Si(OH)4,NA,Si(OH)4,gas,AP14,NA,22.Feb.19,-296285.9,NA,82.784,NA,0,22.9685,37.6434,-4.4407,0,-2.7782,7.923E-09,3,1000 +As(OH)3,NA,As(OH)3,gas,AP14,NA,22.Feb.19,-143112.8,NA,73.599,NA,0,22.6338,-16.3623,-3.7213,0,-1.0194,2.7414E-09,3,1000 Modified: pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_gas.csv.xz =================================================================== --- pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_gas.csv.xz 2019-04-27 13:06:53 UTC (rev 454) +++ pkg/CHNOSZ/inst/extdata/OBIGT/inorganic_gas.csv.xz 2019-04-28 08:31:52 UTC (rev 455) @@ -1,7 +1,5 @@ -�7zXZ�ִF!t/�� �v]7I��b���9��˦��TB;q�"�q���cL;�"ߓ<��b�g�;��K�䇥�f��1�w?oz��C��a�]I؎��5i�*s@/�L��e�EEK8u�A�ˆ�*�s����7d�/��=���C�x�+Z�x����:�y��;H�w i�p/�|���A��aC��G!�V- @��A"I�#ÿ\zN���u� ��Wu,a2����&T#I���O��9�}����v/�C���8�aU�G��_�ա�X�-:;t�2:��Hb�C*3���E���0��T���Ҭ9~b��|��m��"qٜ�>�W�I�������uw(��ǟk��n�f;� +�7zXZ�ִF!t/��|�]7I��b���9��˦��TB;q�"�q���cL;�"ߓ<��b�g�;��K�䇥�f��1�w?oz��C��a�]I؎��5i�*s@/�L��e�EEK8u�A�ˆ�*�s����7d�/��=���C�x�+Z�x����:�y��;H�w i�p/�|���A��aC��G!�V- @��A"I�#ÿ\zN���u� ��Wu,a2����&T#I���O��9�}����v/�C���8�aU�G��_�ա�X�-:;t�2:��Hb�C*3���E���0��T���Ҭ9~b��|��m��"qٜ�>�W�I�������uw(��ǟk��n�f;� 뵏?�}z� y���`�Ix�}�i�����z�;v��}��X���q�QNI_y��S�?ٲ���qLH�0��y �Լ� Y�-�W_�4&}�_WV�]eF<� ��%H��E���[(3���ճu��D��[�C -�D�紁7 r|\� �Q�"���ku���(�&}ϑ��7����w��%U����E�1�[��TQ�}_JƄ��$����}q��Dc`o�*&:fD��`7׃=g�����VR��Hd�'��&���/��H_Ȟ����$�(pf��(�˥���������z��g����gK��� m�;�e_ {&eڏ�y�#�v�G6�_{�Ɏ����#��#s8m�"!v�]�>�U�c�Ǵ.�I at -�����*�#�/�z�P3cP���� ,o�SMw�!�?�p����u�y�.�4��پ-������T�dL��B��_� ll2w����1�� �����/eD�WWP׾$�m�9gy& -��f�'�B��h�d���6��AO�G����(�-���f3H���p=��N_>� -���o���b�����g�YZ \ No newline at end of file +�D�紁7 r|\� �Q�"���ku���(�&}ϑ��7����w��%U����E�1�[��TQ�}_JƄ��$����}q��Dc`o�*&:fD��`7׃=g�����VR��Hd�'��&���/��H_Ȟ����$�(pf��(�˥���������z��g����gK��� m�;�e_ {&eڏ�y�#�v�G6�_{�Ɏ����#��#s8m�"!v�]�>�U�c�Ǵ.�I at -�����*�#�/�z�P3cP���� ,o�SMw���+��$śj���9���g�YZ \ No newline at end of file Modified: pkg/CHNOSZ/inst/extdata/thermo/stoich.csv.xz =================================================================== (Binary files differ) Modified: pkg/CHNOSZ/tests/testthat/test-eos.R =================================================================== --- pkg/CHNOSZ/tests/testthat/test-eos.R 2019-04-27 13:06:53 UTC (rev 454) +++ pkg/CHNOSZ/tests/testthat/test-eos.R 2019-04-28 08:31:52 UTC (rev 455) @@ -101,9 +101,10 @@ # compare Gibbs energies at 25 degrees calculated with AkDi model to database values iAkDi <- add.obigt("AkDi") - # remove Si(OH)4 and As(OH)3 because no HKF aqueous species are available - iAkDi <- head(iAkDi, -2) - # this would produce an error if any of the corresponding gases were unavailable + # remove hydroxides because they aren't in the default database (except B(OH)3(aq)) + iAkDi <- iAkDi[-grep("OH", info(iAkDi)$name)] + # this would produce an error if any calculations failed + # (e.g. because gases corresponding to any aqueous species were unavailable) sAkDi <- subcrt(iAkDi, T = 25) GAkDi <- do.call(rbind, sAkDi$out)$G # now get the parameters from default OBIGT