[CHNOSZ-commits] r11 - in pkg: . CHNOSZ CHNOSZ/R CHNOSZ/data CHNOSZ/inst CHNOSZ/inst/doc CHNOSZ/inst/extdata CHNOSZ/inst/extdata/abundance CHNOSZ/inst/extdata/bison CHNOSZ/inst/extdata/cpetc CHNOSZ/inst/extdata/fasta CHNOSZ/inst/extdata/js CHNOSZ/inst/extdata/protein CHNOSZ/inst/extdata/refseq CHNOSZ/inst/extdata/taxonomy CHNOSZ/inst/extdata/thermo CHNOSZ/inst/tests CHNOSZ/man CHNOSZ/src CHNOSZ/tests CHNOSZ/vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Sep 21 14:28:22 CEST 2012


Author: jedick
Date: 2012-09-21 14:28:21 +0200 (Fri, 21 Sep 2012)
New Revision: 11

Added:
   pkg/CHNOSZ/
   pkg/CHNOSZ/.Rinstignore
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/LICENSE
   pkg/CHNOSZ/NAMESPACE
   pkg/CHNOSZ/R/
   pkg/CHNOSZ/R/EOSregress.R
   pkg/CHNOSZ/R/affinity.R
   pkg/CHNOSZ/R/anim.R
   pkg/CHNOSZ/R/basis.R
   pkg/CHNOSZ/R/buffer.R
   pkg/CHNOSZ/R/cgl.R
   pkg/CHNOSZ/R/diagram.R
   pkg/CHNOSZ/R/eqdata.R
   pkg/CHNOSZ/R/equil.R
   pkg/CHNOSZ/R/examples.R
   pkg/CHNOSZ/R/findit.R
   pkg/CHNOSZ/R/hkf.R
   pkg/CHNOSZ/R/info.R
   pkg/CHNOSZ/R/ionize.aa.R
   pkg/CHNOSZ/R/iprotein.R
   pkg/CHNOSZ/R/makeup.R
   pkg/CHNOSZ/R/more.aa.R
   pkg/CHNOSZ/R/msgout.R
   pkg/CHNOSZ/R/protein.info.R
   pkg/CHNOSZ/R/read.expr.R
   pkg/CHNOSZ/R/revisit.R
   pkg/CHNOSZ/R/species.R
   pkg/CHNOSZ/R/subcrt.R
   pkg/CHNOSZ/R/swap.basis.R
   pkg/CHNOSZ/R/taxonomy.R
   pkg/CHNOSZ/R/transfer.R
   pkg/CHNOSZ/R/util.affinity.R
   pkg/CHNOSZ/R/util.args.R
   pkg/CHNOSZ/R/util.array.R
   pkg/CHNOSZ/R/util.blast.R
   pkg/CHNOSZ/R/util.character.R
   pkg/CHNOSZ/R/util.data.R
   pkg/CHNOSZ/R/util.expression.R
   pkg/CHNOSZ/R/util.fasta.R
   pkg/CHNOSZ/R/util.formula.R
   pkg/CHNOSZ/R/util.list.R
   pkg/CHNOSZ/R/util.matrix.R
   pkg/CHNOSZ/R/util.misc.R
   pkg/CHNOSZ/R/util.plot.R
   pkg/CHNOSZ/R/util.program.R
   pkg/CHNOSZ/R/util.seq.R
   pkg/CHNOSZ/R/util.stat.R
   pkg/CHNOSZ/R/util.supcrt.R
   pkg/CHNOSZ/R/util.units.R
   pkg/CHNOSZ/R/water.R
   pkg/CHNOSZ/R/wjd.R
   pkg/CHNOSZ/R/zzz.R
   pkg/CHNOSZ/data/
   pkg/CHNOSZ/data/OBIGT.csv
   pkg/CHNOSZ/data/buffer.csv
   pkg/CHNOSZ/data/element.csv
   pkg/CHNOSZ/data/groups.csv
   pkg/CHNOSZ/data/opt.csv
   pkg/CHNOSZ/data/protein.csv
   pkg/CHNOSZ/data/refs.csv
   pkg/CHNOSZ/data/thermo.R
   pkg/CHNOSZ/data/xxx.R
   pkg/CHNOSZ/data/yyy.R
   pkg/CHNOSZ/inst/
   pkg/CHNOSZ/inst/CHECKLIST
   pkg/CHNOSZ/inst/CITATION
   pkg/CHNOSZ/inst/FAQ
   pkg/CHNOSZ/inst/NEWS
   pkg/CHNOSZ/inst/ONEWS
   pkg/CHNOSZ/inst/TODO
   pkg/CHNOSZ/inst/doc/
   pkg/CHNOSZ/inst/doc/anintro.pdf
   pkg/CHNOSZ/inst/doc/hs-chemistry.pdf
   pkg/CHNOSZ/inst/doc/wjd.pdf
   pkg/CHNOSZ/inst/extdata/
   pkg/CHNOSZ/inst/extdata/abundance/
   pkg/CHNOSZ/inst/extdata/abundance/AA03.csv
   pkg/CHNOSZ/inst/extdata/abundance/ISR+08.csv.xz
   pkg/CHNOSZ/inst/extdata/abundance/stress.csv
   pkg/CHNOSZ/inst/extdata/abundance/yeastgfp.csv.xz
   pkg/CHNOSZ/inst/extdata/bison/
   pkg/CHNOSZ/inst/extdata/bison/bisonN_vs_refseq49.blastp.xz
   pkg/CHNOSZ/inst/extdata/bison/bisonP_vs_refseq49.blastp.xz
   pkg/CHNOSZ/inst/extdata/bison/bisonQ_vs_refseq49.blastp.xz
   pkg/CHNOSZ/inst/extdata/bison/bisonR_vs_refseq49.blastp.xz
   pkg/CHNOSZ/inst/extdata/bison/bisonS_vs_refseq49.blastp.xz
   pkg/CHNOSZ/inst/extdata/bison/gi.taxid.txt.xz
   pkg/CHNOSZ/inst/extdata/cpetc/
   pkg/CHNOSZ/inst/extdata/cpetc/BKM60_Fig7.csv
   pkg/CHNOSZ/inst/extdata/cpetc/Cp.CH4.HW97.csv
   pkg/CHNOSZ/inst/extdata/cpetc/PM90.csv
   pkg/CHNOSZ/inst/extdata/cpetc/RH95.csv
   pkg/CHNOSZ/inst/extdata/cpetc/RT71.csv
   pkg/CHNOSZ/inst/extdata/cpetc/SC10_Rainbow.csv
   pkg/CHNOSZ/inst/extdata/cpetc/SOJSH.csv
   pkg/CHNOSZ/inst/extdata/cpetc/V.CH4.HWM96.csv
   pkg/CHNOSZ/inst/extdata/fasta/
   pkg/CHNOSZ/inst/extdata/fasta/EF-Tu.aln
   pkg/CHNOSZ/inst/extdata/fasta/HTCC1062.faa.xz
   pkg/CHNOSZ/inst/extdata/js/
   pkg/CHNOSZ/inst/extdata/js/sorttable.js
   pkg/CHNOSZ/inst/extdata/protein/
   pkg/CHNOSZ/inst/extdata/protein/Eco.csv.xz
   pkg/CHNOSZ/inst/extdata/protein/Sce.csv.xz
   pkg/CHNOSZ/inst/extdata/refseq/
   pkg/CHNOSZ/inst/extdata/refseq/README.txt
   pkg/CHNOSZ/inst/extdata/refseq/gencat.sh
   pkg/CHNOSZ/inst/extdata/refseq/mkfaa.sh
   pkg/CHNOSZ/inst/extdata/refseq/protein.refseq.R
   pkg/CHNOSZ/inst/extdata/refseq/protein_refseq.csv.xz
   pkg/CHNOSZ/inst/extdata/refseq/taxid.names.R
   pkg/CHNOSZ/inst/extdata/refseq/taxid_names.csv.xz
   pkg/CHNOSZ/inst/extdata/taxonomy/
   pkg/CHNOSZ/inst/extdata/taxonomy/names.dmp
   pkg/CHNOSZ/inst/extdata/taxonomy/nodes.dmp
   pkg/CHNOSZ/inst/extdata/thermo/
   pkg/CHNOSZ/inst/extdata/thermo/DLEN67.csv
   pkg/CHNOSZ/inst/extdata/thermo/OBIGT-2.csv
   pkg/CHNOSZ/inst/extdata/thermo/RH98_Table15.csv
   pkg/CHNOSZ/inst/extdata/thermo/groups_big.csv
   pkg/CHNOSZ/inst/extdata/thermo/groups_small.csv
   pkg/CHNOSZ/inst/extdata/thermo/obigt_check.csv
   pkg/CHNOSZ/inst/tests/
   pkg/CHNOSZ/inst/tests/test-affinity.R
   pkg/CHNOSZ/inst/tests/test-basis.R
   pkg/CHNOSZ/inst/tests/test-diagram.R
   pkg/CHNOSZ/inst/tests/test-eos.R
   pkg/CHNOSZ/inst/tests/test-examples.R
   pkg/CHNOSZ/inst/tests/test-findit.R
   pkg/CHNOSZ/inst/tests/test-info.R
   pkg/CHNOSZ/inst/tests/test-ionize.aa.R
   pkg/CHNOSZ/inst/tests/test-ionize.aa_pK.R
   pkg/CHNOSZ/inst/tests/test-iprotein.R
   pkg/CHNOSZ/inst/tests/test-makeup.R
   pkg/CHNOSZ/inst/tests/test-more.aa.R
   pkg/CHNOSZ/inst/tests/test-protein.info.R
   pkg/CHNOSZ/inst/tests/test-revisit.R
   pkg/CHNOSZ/inst/tests/test-species.R
   pkg/CHNOSZ/inst/tests/test-subcrt.R
   pkg/CHNOSZ/inst/tests/test-swap.basis.R
   pkg/CHNOSZ/inst/tests/test-thermo.R
   pkg/CHNOSZ/inst/tests/test-util.R
   pkg/CHNOSZ/inst/tests/test-util.affinity.R
   pkg/CHNOSZ/inst/tests/test-util.data.R
   pkg/CHNOSZ/inst/tests/test-wjd.R
   pkg/CHNOSZ/inst/tests/test-yeastgfp.R
   pkg/CHNOSZ/man/
   pkg/CHNOSZ/man/CHNOSZ-package.Rd
   pkg/CHNOSZ/man/EOSregress.Rd
   pkg/CHNOSZ/man/affinity.Rd
   pkg/CHNOSZ/man/anim.Rd
   pkg/CHNOSZ/man/basis.Rd
   pkg/CHNOSZ/man/buffer.Rd
   pkg/CHNOSZ/man/data.Rd
   pkg/CHNOSZ/man/diagram.Rd
   pkg/CHNOSZ/man/eos.Rd
   pkg/CHNOSZ/man/eqdata.Rd
   pkg/CHNOSZ/man/equil.Rd
   pkg/CHNOSZ/man/examples.Rd
   pkg/CHNOSZ/man/extdata.Rd
   pkg/CHNOSZ/man/findit.Rd
   pkg/CHNOSZ/man/info.Rd
   pkg/CHNOSZ/man/ionize.aa.Rd
   pkg/CHNOSZ/man/iprotein.Rd
   pkg/CHNOSZ/man/makeup.Rd
   pkg/CHNOSZ/man/more.aa.Rd
   pkg/CHNOSZ/man/protein.Rd
   pkg/CHNOSZ/man/protein.info.Rd
   pkg/CHNOSZ/man/read.expr.Rd
   pkg/CHNOSZ/man/revisit.Rd
   pkg/CHNOSZ/man/sideeffects.Rd
   pkg/CHNOSZ/man/species.Rd
   pkg/CHNOSZ/man/subcrt.Rd
   pkg/CHNOSZ/man/swap.basis.Rd
   pkg/CHNOSZ/man/taxonomy.Rd
   pkg/CHNOSZ/man/transfer.Rd
   pkg/CHNOSZ/man/util.affinity.Rd
   pkg/CHNOSZ/man/util.args.Rd
   pkg/CHNOSZ/man/util.array.Rd
   pkg/CHNOSZ/man/util.blast.Rd
   pkg/CHNOSZ/man/util.character.Rd
   pkg/CHNOSZ/man/util.data.Rd
   pkg/CHNOSZ/man/util.expression.Rd
   pkg/CHNOSZ/man/util.fasta.Rd
   pkg/CHNOSZ/man/util.formula.Rd
   pkg/CHNOSZ/man/util.list.Rd
   pkg/CHNOSZ/man/util.matrix.Rd
   pkg/CHNOSZ/man/util.misc.Rd
   pkg/CHNOSZ/man/util.plot.Rd
   pkg/CHNOSZ/man/util.program.Rd
   pkg/CHNOSZ/man/util.seq.Rd
   pkg/CHNOSZ/man/util.stat.Rd
   pkg/CHNOSZ/man/util.units.Rd
   pkg/CHNOSZ/man/water.Rd
   pkg/CHNOSZ/man/wjd.Rd
   pkg/CHNOSZ/src/
   pkg/CHNOSZ/src/H2O92D.f
   pkg/CHNOSZ/tests/
   pkg/CHNOSZ/tests/test-all.R
   pkg/CHNOSZ/vignettes/
   pkg/CHNOSZ/vignettes/anintro.Rnw
   pkg/CHNOSZ/vignettes/anintro.lyx
   pkg/CHNOSZ/vignettes/chnosz_new.pdf
   pkg/CHNOSZ/vignettes/hs-chemistry.Rnw
   pkg/CHNOSZ/vignettes/hs-chemistry.lyx
   pkg/CHNOSZ/vignettes/vig.bib
   pkg/CHNOSZ/vignettes/wjd.Rnw
   pkg/CHNOSZ/vignettes/wjd.lyx
Removed:
   pkg/.Rinstignore
   pkg/DESCRIPTION
   pkg/LICENSE
   pkg/NAMESPACE
   pkg/R/
   pkg/data/
   pkg/inst/
   pkg/man/
   pkg/src/
   pkg/tests/
   pkg/vignettes/
Log:
move files to pkg/CHNOSZ/


Deleted: pkg/.Rinstignore
===================================================================
--- pkg/.Rinstignore	2012-09-20 01:03:23 UTC (rev 10)
+++ pkg/.Rinstignore	2012-09-21 12:28:21 UTC (rev 11)
@@ -1,5 +0,0 @@
-chnosz_new.pdf
-rxn_.*.pdf
-EF-Tu_.*.pdf
-vig.bib
-.*.lyx

Copied: pkg/CHNOSZ/.Rinstignore (from rev 10, pkg/.Rinstignore)
===================================================================
--- pkg/CHNOSZ/.Rinstignore	                        (rev 0)
+++ pkg/CHNOSZ/.Rinstignore	2012-09-21 12:28:21 UTC (rev 11)
@@ -0,0 +1,5 @@
+chnosz_new.pdf
+rxn_.*.pdf
+EF-Tu_.*.pdf
+vig.bib
+.*.lyx

Copied: pkg/CHNOSZ/DESCRIPTION (from rev 10, pkg/DESCRIPTION)
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	                        (rev 0)
+++ pkg/CHNOSZ/DESCRIPTION	2012-09-21 12:28:21 UTC (rev 11)
@@ -0,0 +1,20 @@
+Date: 2012-09-20
+Package: CHNOSZ
+Version: 0.9-7.98
+Title: Chemical Thermodynamics and Activity Diagrams
+Author: Jeffrey M. Dick
+Maintainer: Jeffrey M. Dick <jmdick at asu.edu>
+Depends: R (>= 2.10.0), utils
+Suggests: testthat, parallel, limSolve
+Description: This package includes functions and data sets to support chemical thermodynamic 
+  modeling in biochemistry and low-temperature geochemistry. The features include calculation
+  of the standard molal thermodynamic properties and chemical affinities of reactions involving 
+  minerals and/or biomolecules; a database of thermodynamic properties of aqueous, crystalline 
+  and gaseous species; amino acid group additivity for the standard molal thermodynamic 
+  properties of neutral and ionized proteins; use of the revised Helgeson-Kirkham-Flowers 
+  equations of state for aqueous species; construction of equilibrium activity diagrams as a
+  function of temperature, pressure, and chemical activities or fugacities of basis species.
+License: GPL (>= 2)
+BuildResaveData: no
+ZipData: no
+URL: http://www.chnosz.net/

Copied: pkg/CHNOSZ/LICENSE (from rev 10, pkg/LICENSE)
===================================================================
--- pkg/CHNOSZ/LICENSE	                        (rev 0)
+++ pkg/CHNOSZ/LICENSE	2012-09-21 12:28:21 UTC (rev 11)
@@ -0,0 +1,339 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+
+	    How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License along
+    with this program; if not, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.

Copied: pkg/CHNOSZ/NAMESPACE (from rev 10, pkg/NAMESPACE)
===================================================================
--- pkg/CHNOSZ/NAMESPACE	                        (rev 0)
+++ pkg/CHNOSZ/NAMESPACE	2012-09-21 12:28:21 UTC (rev 11)
@@ -0,0 +1,13 @@
+# modified from
+# Default NAMESPACE created by R
+
+# Export all names
+exportPattern(".")
+
+# Import all packages listed as Imports or Depends
+import(
+  utils
+)
+
+# Load shared objects
+useDynLib(CHNOSZ)

Copied: pkg/CHNOSZ/R/EOSregress.R (from rev 10, pkg/R/EOSregress.R)
===================================================================
--- pkg/CHNOSZ/R/EOSregress.R	                        (rev 0)
+++ pkg/CHNOSZ/R/EOSregress.R	2012-09-21 12:28:21 UTC (rev 11)
@@ -0,0 +1,182 @@
+# CHNOSZ/EOSregress.R  
+# model volumes and heat capacities of aqueous species
+# 20091105 first version
+# 20110429 revise and merge with CHNOSZ package
+
+EOSvar <- function(var,T,P) {
+  # get the variables of a term in a regression equation
+  # T (K), P (bar)
+  out <- switch(EXPR = var,
+    "(Intercept)" = rep(1,length(T)),
+    "T" = T,
+    "P" = P,
+    "TTheta" = T-thermo$opt$Theta,                 # T-Theta
+    "invTTheta" = (T-thermo$opt$Theta)^-1,         # 1/(T-Theta)
+    "TTheta2" = (T-thermo$opt$Theta)^2,            # (T-Theta)^2
+    "invTTheta2" = (T-thermo$opt$Theta)^-2,        # 1/(T-Theta)^2
+    "V" = water(var,T=T,P=P)[,1],
+    "E" = water(var,T=T,P=P)[,1],
+    "kT" = water(var,T=T,P=P)[,1],
+    "alpha" = water(var,T=T,P=P)[,1],
+    "beta" = water(var,T=T,P=P)[,1],
+    "X" = water(var,T=T,P=P)[,1],
+    "Q" = water(var,T=T,P=P)[,1],
+    "TX" = T*water("X",T=T,P=P)[,1],
+    "drho.dT" = -water("rho",T=T,P=P)[,1]*water("E",T=T,P=P)[,1],
+    "V.kT" = water("V",T=T,P=P)[,1]*water("kT",T=T,P=P)[,1],
+    NA
+  )
+  return(out)
+}
+
+EOSlab <- function(var,coeff="") {
+  # make pretty labels for the variables
+  lab <- switch(EXPR = var,
+    "(Intercept)" = substitute(YYY*" ",list(YYY=coeff)),
+    "TTheta" = substitute(YYY%*%(italic(T)-Theta),list(YYY=coeff)),
+    "invTTheta" = substitute(YYY/(italic(T)-Theta),list(YYY=coeff)),
+    "TTheta2" = substitute(YYY%*%(italic(T)-Theta)^2,list(YYY=coeff)),
+    "invTTheta2" = substitute(YYY/(italic(T)-Theta)^2,list(YYY=coeff)),
+    "T" = substitute(YYY%*%italic(XXX),list(XXX=var,YYY=coeff)),
+    "P" = substitute(YYY%*%italic(XXX),list(XXX=var,YYY=coeff)),
+    "V" = substitute(YYY%*%italic(XXX),list(XXX=var,YYY=coeff)),
+    "E" = substitute(YYY%*%italic(XXX),list(XXX=var,YYY=coeff)),
+    "X" = substitute(YYY%*%italic(XXX),list(XXX=var,YYY=coeff)),
+    "Q" = substitute(YYY%*%italic(XXX),list(XXX=var,YYY=coeff)),
+    "TX" = substitute(YYY%*%italic(XXX),list(XXX=var,YYY=coeff)),
+    "kT" = substitute(YYY%*%kappa[italic(T)],list(YYY=coeff)),
+    "alpha" = substitute(YYY%*%alpha,list(YYY=coeff)),
+    "beta" = substitute(YYY%*%beta,list(YYY=coeff)),
+    "drho.dT" = substitute(YYY%*%(d~rho/dT),list(YYY=coeff)),
+    "V.kT" = substitute(YYY%*%V~kappa[italic(T)],list(YYY=coeff)),
+    NA
+  )
+  return(lab)
+}
+
+EOSregress <- function(exptdata,var="",T.max=9999) {
+  # regress exptdata using terms listed in fun 
+  # which values to use
+  iT <- which(exptdata$T <= T.max)
+  exptdata <- exptdata[iT,]
+  # temperature and pressure
+  T <- exptdata$T
+  P <- exptdata$P
+  # the third column is the property of interest: Cp or V
+  X <- exptdata[,3]
+  # now build a regression formula 
+  if(length(var) == 0) stop("var is missing")
+  fmla <- as.formula(paste("X ~ ",paste(var,collapse="+")))
+  # retrieve the values of the variables
+  for(i in seq_along(var)) assign(var[i],EOSvar(var[i],T=T,P=P))
+  # now regress away!
+  EOSlm <- lm(fmla)
+  return(EOSlm)
+}
+
+EOScalc <- function(coefficients,T,P) {
+  # calculate values of volume
+  # or heat capacity from regression fit
+  X <- 0
+  for(i in 1:length(coefficients)) {
+    coeff.i <- coefficients[[i]]
+    fun.i <- EOSvar(names(coefficients)[i],T,P)
+    X <- X + coeff.i * fun.i
+  }
+  return(X)
+}
+
+EOSplot <- function(exptdata,var=NULL,T.max=9999,T.plot=NULL,
+  P=NULL,fun.legend="topleft",coefficients=NULL) {
+  # plot experimental and modelled volumes and heat capacities
+  # first figure out the property (Cp or V) from the exptdata
+  prop <- colnames(exptdata)[3]
+  # if var is NULL use HKF equations
+  if(is.null(var)) {
+    if(prop=="Cp") var <- c("invTTheta2","TX")
+    if(prop=="V") var <- c("invTTheta","Q")
+  }
+  expt <- exptdata
+  # perform the regression, only using temperatures up to T.max
+  if(is.null(coefficients)) {
+    EOSlm <- EOSregress(expt,var,T.max)
+    coefficients <- EOSlm$coefficients
+  }
+  # only plot points below a certain temperature
+  iexpt <- 1:nrow(expt)
+  if(!is.null(T.plot)) iexpt <- which(expt$T < T.plot)
+  iX <- match(prop,colnames(expt))
+  ylim <- extendrange(expt[iexpt,iX],f=0.1)
+  xlim <- extendrange(expt$T[iexpt],f=0.1)
+  # start plot
+  thermo.plot.new(xlim=xlim,ylim=ylim,xlab=axis.label("T", units="K"),
+    ylab=axis.label(paste(prop,"0",sep="")),yline=2,mar=NULL)
+  # we group the data by pressure ranges;
+  # assume increasing temperatures are in the
+  # same pressure range but a decrease in temperature
+  # signals the next pressure range
+  idrop <- c(1,which(diff(expt$T)<0)+1,length(expt$T)+1)
+  Plab <- character()
+  pch.open <- c(1,0,2)
+  pch.filled <- c(16,15,17)
+  for(i in 1:(length(idrop)-1)) {
+    ip <- idrop[i]:(idrop[i+1]-1)
+    # find the calculated values at these conditions
+    myT <- expt$T[ip]
+    myP <- expt$P[ip]
+    calc.X <- EOScalc(coefficients,myT,myP)
+    expt.X <- expt[ip,iX]
+    # are we within 10% of the values
+    in10 <- which(abs((calc.X-expt.X)/expt.X) < 0.1)
+    pch <- rep(pch.open[i],length(myT))
+    pch[in10] <- pch.filled[i]
+    points(myT,expt[ip,iX],pch=pch)
+    # if we calculate lines at a constant P, do that
+    xs <- seq(xlim[1],xlim[2],length.out=200)
+    if(!is.null(P)) {
+      myT <- xs
+      myP <- P
+      calc.X <- EOScalc(coefficients,myT,myP)
+    } 
+    # take out NAs and Infinite values
+    iNA <- is.na(calc.X) | is.infinite(calc.X)
+    xs <- xs[!iNA]
+    calc.X <- calc.X[!iNA]
+    myT <- myT[!iNA]
+    # plot regression line
+    lines(xs,splinefun(myT,calc.X,method="monoH.FC")(xs))
+    Plim <- range(expt$P[ip])
+    Plab <- c(Plab,paste(Plim[1],"-",Plim[2],"bar"))
+  }
+  # make legend
+  if(!is.null(fun.legend)) {
+    coeffs <- as.character(round(as.numeric(coefficients),4))
+    # so that positive ones appear with a plus sign
+    ipos <- which(coeffs >= 0)
+    coeffs[ipos] <- paste("+",coeffs[ipos],sep="")
+    # make labels for the functions
+    fun.lab <- as.expression(lapply(1:length(coeffs),
+      function(x) {EOSlab(names(coefficients)[x],coeffs[x])} ))
+    #fun.lab <- paste(names(coeffs),round(as.numeric(coeffs),4))
+    legend(fun.legend,legend=fun.lab,pt.cex=0.1)
+  }
+  return(invisible(list(xlim=range(expt$T[iexpt]))))
+}
+
+EOScoeffs <- function(species,property) {
+  # get the HKF coefficients for species in the database
+  iis <- info(info(species,"aq"))
+  if(property=="Cp") {
+    out <- iis[,c("c1","c2","omega")]
+    names(out) <- c("(Intercept)","invTTheta2","TX")
+  } else if(property=="V") {
+    iis <- iis[,c("a1","a2","a3","a4","omega")]
+    sigma <- ( iis$a1 + iis$a2 / (2600 + 1) ) * 41.84
+    xi <- ( iis$a3 + iis$a4 / (2600 + 1) ) * 41.84
+    # watch for the negative sign on omega here!
+    out <- data.frame(sigma,xi,-iis$omega)
+    names(out) <- c("(Intercept)","invTTheta","Q")
+  }
+  return(out)
+}
+

Copied: pkg/CHNOSZ/R/affinity.R (from rev 10, pkg/R/affinity.R)
===================================================================
--- pkg/CHNOSZ/R/affinity.R	                        (rev 0)
+++ pkg/CHNOSZ/R/affinity.R	2012-09-21 12:28:21 UTC (rev 11)
@@ -0,0 +1,206 @@
+# CHNOSZ/affinity.R
+# calculate affinities of formation reactions
+
+affinity <- function(...,property=NULL,sout=NULL,exceed.Ttr=FALSE,
+  return.buffer=FALSE,balance="PBB",iprotein=NULL,loga.protein=-3) {
+  # ...: variables over which to calculate
+  # property: what type of energy
+  #   (G.basis,G.species,logact.basis,logK,logQ,A)
+  # return.buffer: return buffered activities
+  # balance: balance protein buffers on PBB
+  # exceed.Ttr: extrapolate Gibbs energies
+  #   of minerals beyond their T-limits?
+  # sout: provide a previously calculated output from subcrt
+  # iprotein: build these proteins from residues (speed optimization)
+
+  # history: 20061027 jmd version 1
+  # this is where energy.args() used to sit
+  # this is where energy() used to sit
+
+  # the argument list
+  args <- energy.args(list(...))
+  args <- c(args,list(sout=sout,exceed.Ttr=exceed.Ttr))
+
+  # the species we're given
+  mybasis <- thermo$basis
+  myspecies <- thermo$species
+
+  if(!is.null(property)) {
+    # the user just wants an energy property
+    buffer <- FALSE
+    args$what <- property
+    out <- do.call("energy",args)
+    a <- out$a
+    sout <- out$sout
+  } else {
+
+    # affinity calculations
+    property <- args$what
+
+    # iprotein stuff
+    # note that this affinities of the residues are subject
+    # to ionization calculations in energy() so no explicit accounting
+    # is needed here
+    if(!is.null(iprotein)) {
+      # add protein residues to the species list
+      resnames <- c("H2O",aminoacids(3))
+      # residue activities set to zero;
+      # account for protein activities later
+      resprot <- paste(resnames,"RESIDUE",sep="_")
+      species(resprot, 0)
+      ires <- match(resprot, thermo$species$name)
+    }
+
+    # buffer stuff
+    buffer <- FALSE
+    ibufbasis <- which(!can.be.numeric(mybasis$logact))
+    if(!is.null(mybasis) & length(ibufbasis) > 0) {
+      buffer <- TRUE
+      msgout('affinity: loading buffer species\n')
+      if(!is.null(thermo$species)) is.species <- 1:nrow(thermo$species) else is.species <- numeric()
+      is.buffer <- buffer(logK=NULL)
+      is.buff <- numeric()
+      for(i in 1:length(is.buffer)) is.buff <- c(is.buff,as.numeric(is.buffer[[i]]))
+      is.only.buffer <- is.buff[!is.buff %in% is.species]
+      buffers <- names(is.buffer)
+      # reorder the buffers according to thermo$buffers
+      buffers <- buffers[order(match(buffers,thermo$buffers$name))]
+    }
+
+    # here we call 'energy'
+    aa <- do.call("energy",args)
+    a <- aa$a
+    sout <- aa$sout
+
+    # more buffer stuff
+    if(buffer) {
+      args$what <- "logact.basis"
+      args$sout <- sout
+      logact.basis.new <- logact.basis <- do.call("energy",args)$a
+      ibasis.new <- numeric()
+      for(k in 1:length(buffers)) {
+        ibasis <- which(as.character(mybasis$logact)==buffers[k])
+        # calculate the logKs from the affinities
+        logK <- a
+        for(i in 1:length(logK)) {
+          logK[[i]] <- logK[[i]] + thermo$species$logact[i]
+          for(j in 1:length(logact.basis.new)) {
+            logK[[i]] <- logK[[i]] - logact.basis.new[[j]] * thermo$species[i,j]
+            # add ionization correction to proteins
+            #if(i %in% is.buffer & length(grep('_',as.character(thermo$species$name[i])))>0 & 
+            #  thermo$opt$ionize & rownames(mybasis)[j]=='H+') {
+            #  logK[[i]] <- logK[[i]] - logact.basis[[j]] * 
+            #    as.data.frame(charge[[match(thermo$species$ispecies[i],names(charge))]]) 
+            #}
+          }
+        }
+        lbn <- buffer(logK=logK,ibasis=ibasis,logact.basis=logact.basis.new,
+          is.buffer=as.numeric(is.buffer[[which(names(is.buffer)==buffers[k])]]),balance=balance)
+        for(j in 1:length(logact.basis.new)) if(j %in% ibasis) logact.basis.new[[j]] <- lbn[[2]][[j]]
+        # calculation of the buffered activities' effect on chemical affinities
+        is.only.buffer.new <- is.only.buffer[is.only.buffer %in% is.buffer[[k]]]
+        for(i in 1:length(a)) {
+          if(i %in% is.only.buffer.new) next
+          for(j in 1:nrow(mybasis)) {
+            # let's only do this for the basis species specified by the user
+            # even if others could be buffered
+            if(!j %in% ibufbasis) next
+            if(!j %in% ibasis) next
+            aa <- a[[i]]
+            a[[i]] <- aa + (logact.basis.new[[j]] - logact.basis[[j]]) * thermo$species[i,j]
+            #if(!identical(a[[i]],aa)) print(paste(i,j))
+          }
+        }
+        if(k==length(buffers) & return.buffer) {
+          logact.basis.new <- lbn[[2]]
+          ibasis.new <- c(ibasis.new,lbn[[1]])
+        } else ibasis.new <- c(ibasis.new,ibasis)
+      }
+      species(is.only.buffer,delete=TRUE)
+      if(length(is.only.buffer) > 0) a <- a[-is.only.buffer]
+      # to return the activities of buffered basis species
+      tb <- logact.basis.new[unique(ibasis.new)]
+      if(!is.null(ncol(tb[[1]]))) {
+        nd <- length(which(dim(tb[[1]]) > 1))
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/chnosz -r 11


More information about the CHNOSZ-commits mailing list