pyEQL 1.4.0rc9__cp310-cp310-macosx_10_9_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (491) hide show
  1. pyEQL/__init__.py +50 -0
  2. pyEQL/_phreeqc.cpython-310-darwin.so +0 -0
  3. pyEQL/activity_correction.py +879 -0
  4. pyEQL/database/geothermal.dat +5693 -0
  5. pyEQL/database/llnl.dat +19305 -0
  6. pyEQL/database/phreeqc_license.txt +54 -0
  7. pyEQL/database/pyeql_db.json +35607 -0
  8. pyEQL/engines.py +1153 -0
  9. pyEQL/equilibrium.py +227 -0
  10. pyEQL/functions.py +281 -0
  11. pyEQL/phreeqc/__init__.py +5 -0
  12. pyEQL/phreeqc/bindings.cpp +84 -0
  13. pyEQL/phreeqc/core.py +239 -0
  14. pyEQL/phreeqc/database/Amm.dat +1968 -0
  15. pyEQL/phreeqc/database/CMakeLists.txt +32 -0
  16. pyEQL/phreeqc/database/ColdChem.dat +267 -0
  17. pyEQL/phreeqc/database/Concrete_PHR.dat +158 -0
  18. pyEQL/phreeqc/database/Concrete_PZ.dat +195 -0
  19. pyEQL/phreeqc/database/Kinec.v2.dat +12039 -0
  20. pyEQL/phreeqc/database/Kinec_v3.dat +12159 -0
  21. pyEQL/phreeqc/database/Makefile.am +28 -0
  22. pyEQL/phreeqc/database/Makefile.in +530 -0
  23. pyEQL/phreeqc/database/PHREEQC_ThermoddemV1.10_15Dec2020.dat +12965 -0
  24. pyEQL/phreeqc/database/Tipping_Hurley.dat +4137 -0
  25. pyEQL/phreeqc/database/__init__.py +0 -0
  26. pyEQL/phreeqc/database/core10.dat +6824 -0
  27. pyEQL/phreeqc/database/frezchem.dat +634 -0
  28. pyEQL/phreeqc/database/iso.dat +7235 -0
  29. pyEQL/phreeqc/database/llnl.dat +19310 -0
  30. pyEQL/phreeqc/database/minteq.dat +5654 -0
  31. pyEQL/phreeqc/database/minteq.v4.dat +13212 -0
  32. pyEQL/phreeqc/database/phreeqc.dat +1972 -0
  33. pyEQL/phreeqc/database/phreeqc_rates.dat +3158 -0
  34. pyEQL/phreeqc/database/pitzer.dat +1044 -0
  35. pyEQL/phreeqc/database/sit.dat +14348 -0
  36. pyEQL/phreeqc/database/wateq4f.dat +4036 -0
  37. pyEQL/phreeqc/ext/README.md +10 -0
  38. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/CMakeLists.txt +476 -0
  39. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/INSTALL +302 -0
  40. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/IPhreeqc.rc +61 -0
  41. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/IPhreeqcConfig.cmake.in +4 -0
  42. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/Makefile.am +8 -0
  43. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/Makefile.in +816 -0
  44. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/aclocal.m4 +1217 -0
  45. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/CTestScript.cmake +167 -0
  46. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/CSelectedOutput.cpp.o +0 -0
  47. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/IPhreeqc.cpp.o +0 -0
  48. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/IPhreeqcLib.cpp.o +0 -0
  49. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/IPhreeqc_interface_F.cpp.o +0 -0
  50. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/Var.c.o +0 -0
  51. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Dictionary.cpp.o +0 -0
  52. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ExchComp.cxx.o +0 -0
  53. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Exchange.cxx.o +0 -0
  54. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/GasComp.cxx.o +0 -0
  55. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/GasPhase.cxx.o +0 -0
  56. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ISolution.cxx.o +0 -0
  57. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ISolutionComp.cxx.o +0 -0
  58. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/KineticsComp.cxx.o +0 -0
  59. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/NameDouble.cxx.o +0 -0
  60. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/NumKeyword.cxx.o +0 -0
  61. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PBasic.cpp.o +0 -0
  62. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PHRQ_io_output.cpp.o +0 -0
  63. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PPassemblage.cxx.o +0 -0
  64. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PPassemblageComp.cxx.o +0 -0
  65. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Phreeqc.cpp.o +0 -0
  66. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/PhreeqcKeywords/Keywords.cpp.o +0 -0
  67. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Pressure.cxx.o +0 -0
  68. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Reaction.cxx.o +0 -0
  69. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/ReadClass.cxx.o +0 -0
  70. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SS.cxx.o +0 -0
  71. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SSassemblage.cxx.o +0 -0
  72. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SScomp.cxx.o +0 -0
  73. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SelectedOutput.cpp.o +0 -0
  74. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Serializer.cxx.o +0 -0
  75. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Solution.cxx.o +0 -0
  76. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SolutionIsotope.cxx.o +0 -0
  77. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/StorageBin.cxx.o +0 -0
  78. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/StorageBinList.cpp.o +0 -0
  79. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Surface.cxx.o +0 -0
  80. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SurfaceCharge.cxx.o +0 -0
  81. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/SurfaceComp.cxx.o +0 -0
  82. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/System.cxx.o +0 -0
  83. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Temperature.cxx.o +0 -0
  84. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/Use.cpp.o +0 -0
  85. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/UserPunch.cpp.o +0 -0
  86. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/advection.cpp.o +0 -0
  87. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/basicsubs.cpp.o +0 -0
  88. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cl1.cpp.o +0 -0
  89. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/PHRQ_base.cxx.o +0 -0
  90. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/PHRQ_io.cpp.o +0 -0
  91. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/Parser.cxx.o +0 -0
  92. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/common/Utils.cxx.o +0 -0
  93. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cvdense.cpp.o +0 -0
  94. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cvode.cpp.o +0 -0
  95. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cxxKinetics.cxx.o +0 -0
  96. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/cxxMix.cxx.o +0 -0
  97. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/dense.cpp.o +0 -0
  98. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/dumper.cpp.o +0 -0
  99. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/gases.cpp.o +0 -0
  100. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/input.cpp.o +0 -0
  101. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/integrate.cpp.o +0 -0
  102. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/inverse.cpp.o +0 -0
  103. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/isotopes.cpp.o +0 -0
  104. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/kinetics.cpp.o +0 -0
  105. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/mainsubs.cpp.o +0 -0
  106. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/model.cpp.o +0 -0
  107. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/nvector.cpp.o +0 -0
  108. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/nvector_serial.cpp.o +0 -0
  109. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/parse.cpp.o +0 -0
  110. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/phqalloc.cpp.o +0 -0
  111. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/pitzer.cpp.o +0 -0
  112. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/pitzer_structures.cpp.o +0 -0
  113. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/prep.cpp.o +0 -0
  114. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/print.cpp.o +0 -0
  115. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/read.cpp.o +0 -0
  116. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/readtr.cpp.o +0 -0
  117. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/runner.cpp.o +0 -0
  118. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/sit.cpp.o +0 -0
  119. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/smalldense.cpp.o +0 -0
  120. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/spread.cpp.o +0 -0
  121. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/step.cpp.o +0 -0
  122. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/structures.cpp.o +0 -0
  123. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/sundialsmath.cpp.o +0 -0
  124. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/tally.cpp.o +0 -0
  125. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/tidy.cpp.o +0 -0
  126. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/transport.cpp.o +0 -0
  127. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CMakeFiles/IPhreeqc.dir/src/phreeqcpp/utilities.cpp.o +0 -0
  128. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/CTestTestfile.cmake +6 -0
  129. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/DartConfiguration.tcl +109 -0
  130. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/cmake_install.cmake +45 -0
  131. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/build/libIPhreeqc.a +0 -0
  132. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/ar-lib +270 -0
  133. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/compile +347 -0
  134. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/config.guess +1441 -0
  135. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/config.sub +1813 -0
  136. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/depcomp +791 -0
  137. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/install-sh +508 -0
  138. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/ltmain.sh +11156 -0
  139. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/missing +215 -0
  140. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/config/test-driver +148 -0
  141. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/configure +23867 -0
  142. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/configure.ac +136 -0
  143. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Amm.dat +1968 -0
  144. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/CMakeLists.txt +32 -0
  145. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/ColdChem.dat +267 -0
  146. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Concrete_PHR.dat +158 -0
  147. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Concrete_PZ.dat +195 -0
  148. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Kinec.v2.dat +12039 -0
  149. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Kinec_v3.dat +12159 -0
  150. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Makefile.am +28 -0
  151. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Makefile.in +530 -0
  152. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/PHREEQC_ThermoddemV1.10_15Dec2020.dat +12965 -0
  153. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/Tipping_Hurley.dat +4137 -0
  154. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/core10.dat +6824 -0
  155. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/frezchem.dat +634 -0
  156. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/iso.dat +7235 -0
  157. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/llnl.dat +19310 -0
  158. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/minteq.dat +5654 -0
  159. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/minteq.v4.dat +13212 -0
  160. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/phreeqc.dat +1972 -0
  161. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/phreeqc_rates.dat +3158 -0
  162. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/pitzer.dat +1044 -0
  163. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/sit.dat +14348 -0
  164. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/database/wateq4f.dat +4036 -0
  165. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/CMakeLists.txt +35 -0
  166. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/IPhreeqc.pdf +0 -0
  167. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Makefile.am +24 -0
  168. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Makefile.in +545 -0
  169. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/NOTICE +51 -0
  170. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Phreeqc_2_1999_manual.pdf +0 -0
  171. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/Phreeqc_3_2013_manual.pdf +0 -0
  172. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/README +428 -0
  173. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/RELEASE +7294 -0
  174. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8h.html +5096 -0
  175. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8h_source.html +389 -0
  176. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8hpp.html +83 -0
  177. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/IPhreeqc_8hpp_source.html +478 -0
  178. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/Var_8h.html +318 -0
  179. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/Var_8h_source.html +200 -0
  180. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/bc_s.png +0 -0
  181. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/bdwn.png +0 -0
  182. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqc.html +2274 -0
  183. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqc.png +0 -0
  184. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqcStop.html +69 -0
  185. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/classIPhreeqcStop.png +0 -0
  186. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/closed.png +0 -0
  187. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html +68 -0
  188. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/doxygen.css +1440 -0
  189. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/doxygen.png +0 -0
  190. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/dynsections.js +97 -0
  191. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2blank.png +0 -0
  192. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2doc.png +0 -0
  193. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2folderclosed.png +0 -0
  194. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2folderopen.png +0 -0
  195. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2lastnode.png +0 -0
  196. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2link.png +0 -0
  197. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2mlastnode.png +0 -0
  198. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2mnode.png +0 -0
  199. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2node.png +0 -0
  200. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2plastnode.png +0 -0
  201. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2pnode.png +0 -0
  202. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2splitbar.png +0 -0
  203. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/ftv2vertline.png +0 -0
  204. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/index.html +58 -0
  205. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/jquery.js +31 -0
  206. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_f.png +0 -0
  207. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_g.png +0 -0
  208. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/nav_h.png +0 -0
  209. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/open.png +0 -0
  210. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/structVAR.html +143 -0
  211. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/sync_off.png +0 -0
  212. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/sync_on.png +0 -0
  213. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_a.png +0 -0
  214. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_b.png +0 -0
  215. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_h.png +0 -0
  216. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tab_s.png +0 -0
  217. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/html/tabs.css +60 -0
  218. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/doc/phreeqc3.chm +0 -0
  219. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/CMakeLists.txt +11 -0
  220. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/Makefile.am +88 -0
  221. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/Makefile.in +696 -0
  222. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/CMakeLists.txt +1 -0
  223. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/CMakeLists.txt +35 -0
  224. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/CMakeLists.txt.in +21 -0
  225. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/README.txt +44 -0
  226. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/advect.c +101 -0
  227. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/ic +17 -0
  228. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/c/advect/phreeqc.dat +1579 -0
  229. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/CMakeLists.txt +10 -0
  230. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/README.txt +3 -0
  231. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/CMakeLists.txt +9 -0
  232. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/phreeqc.dat +1582 -0
  233. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/runphreeqc.xls +0 -0
  234. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/excel/withcallback.xls +0 -0
  235. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/CMakeLists.txt +11 -0
  236. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/Gypsum.py +52 -0
  237. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/parallel_advect.py +465 -0
  238. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/phreeqc.dat +1582 -0
  239. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/pitzer.dat +790 -0
  240. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/com/python/wateq4f.dat +3846 -0
  241. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/CMakeLists.txt +1 -0
  242. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/CMakeLists.txt +35 -0
  243. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/CMakeLists.txt.in +20 -0
  244. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/README.txt +45 -0
  245. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/advect.cpp +110 -0
  246. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/ic +17 -0
  247. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/cpp/advect/phreeqc.dat +1579 -0
  248. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/CMakeLists.txt +1 -0
  249. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/CMakeLists.txt +44 -0
  250. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/CMakeLists.txt.in +24 -0
  251. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/README.txt +45 -0
  252. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/advect.F90 +102 -0
  253. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/ic +17 -0
  254. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/fortran/advect/phreeqc.dat +1579 -0
  255. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/CMakeLists.txt +26 -0
  256. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/CMakeLists.txt.in +20 -0
  257. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/README.txt +37 -0
  258. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/ex2 +26 -0
  259. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/main.cpp +20 -0
  260. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/phreeqc.dat +1837 -0
  261. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/examples/using-cmake/post-install.cmake.in +7 -0
  262. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/CMakeLists.txt +185 -0
  263. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/FileTest.cpp +171 -0
  264. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/FileTest.h +34 -0
  265. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/Makefile.am +18 -0
  266. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/Makefile.in +466 -0
  267. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestCVar.cpp +9 -0
  268. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestIPhreeqc.cpp +4901 -0
  269. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestIPhreeqcLib.cpp +4644 -0
  270. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestSelectedOutput.cpp +669 -0
  271. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/TestVar.cpp +10 -0
  272. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/conv_fail.in +11 -0
  273. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/dump +42 -0
  274. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/iso.dat +7231 -0
  275. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/kinn20140218 +349 -0
  276. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/missing_e.dat +1556 -0
  277. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/multi_punch +105 -0
  278. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/multi_punch_no_set +102 -0
  279. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/phreeqc.dat.90a6449 +1935 -0
  280. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/gtest/phreeqc.dat.old +1556 -0
  281. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/libtool.m4 +8388 -0
  282. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltoptions.m4 +437 -0
  283. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltsugar.m4 +124 -0
  284. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/ltversion.m4 +23 -0
  285. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/m4/lt~obsolete.m4 +99 -0
  286. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/resource.h +14 -0
  287. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CSelectedOutput.cpp +401 -0
  288. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CSelectedOutput.hxx +77 -0
  289. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/CVar.hxx +162 -0
  290. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Debug.h +12 -0
  291. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/ErrorReporter.hxx +70 -0
  292. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.cpp +1889 -0
  293. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.f.inc +91 -0
  294. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.f90.inc +603 -0
  295. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.h +2182 -0
  296. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc.hpp +1027 -0
  297. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcCallbacks.h +19 -0
  298. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcF.f +653 -0
  299. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqcLib.cpp +1098 -0
  300. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface.F90 +1283 -0
  301. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface_F.cpp +535 -0
  302. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/IPhreeqc_interface_F.h +162 -0
  303. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Makefile.am +210 -0
  304. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Makefile.in +1294 -0
  305. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/README.Fortran +17 -0
  306. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Var.c +84 -0
  307. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Var.h +152 -0
  308. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/Version.h +36 -0
  309. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fimpl.h +282 -0
  310. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap.cpp +646 -0
  311. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap.h +163 -0
  312. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap1.cpp +24 -0
  313. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap2.cpp +24 -0
  314. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap3.cpp +24 -0
  315. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap4.cpp +24 -0
  316. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap5.cpp +24 -0
  317. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap6.cpp +25 -0
  318. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap7.cpp +25 -0
  319. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/fwrap8.cpp +24 -0
  320. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartHandler.cpp +225 -0
  321. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartHandler.h +59 -0
  322. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartObject.cpp +1382 -0
  323. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ChartObject.h +444 -0
  324. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/CurveObject.cpp +42 -0
  325. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/CurveObject.h +79 -0
  326. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Dictionary.cpp +41 -0
  327. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Dictionary.h +28 -0
  328. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ExchComp.cxx +398 -0
  329. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ExchComp.h +117 -0
  330. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Exchange.cxx +466 -0
  331. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Exchange.h +74 -0
  332. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Form1.h +1184 -0
  333. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Form1.resX +36 -0
  334. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasComp.cxx +265 -0
  335. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasComp.h +59 -0
  336. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasPhase.cxx +659 -0
  337. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/GasPhase.h +103 -0
  338. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolution.cxx +40 -0
  339. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolution.h +53 -0
  340. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolutionComp.cxx +202 -0
  341. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ISolutionComp.h +138 -0
  342. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/KineticsComp.cxx +318 -0
  343. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/KineticsComp.h +81 -0
  344. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NA.h +1 -0
  345. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NameDouble.cxx +537 -0
  346. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NameDouble.h +66 -0
  347. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NumKeyword.cxx +190 -0
  348. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/NumKeyword.h +67 -0
  349. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PBasic.cpp +8350 -0
  350. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PBasic.h +572 -0
  351. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PHRQ_io_output.cpp +411 -0
  352. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblage.cxx +375 -0
  353. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblage.h +70 -0
  354. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblageComp.cxx +441 -0
  355. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PPassemblageComp.h +83 -0
  356. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Phreeqc.cpp +2087 -0
  357. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Phreeqc.h +2164 -0
  358. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PhreeqcKeywords/Keywords.cpp +242 -0
  359. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/PhreeqcKeywords/Keywords.h +104 -0
  360. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Pressure.cxx +417 -0
  361. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Pressure.h +43 -0
  362. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Reaction.cxx +284 -0
  363. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Reaction.h +57 -0
  364. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ReadClass.cxx +1150 -0
  365. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SS.cxx +609 -0
  366. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SS.h +128 -0
  367. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SSassemblage.cxx +317 -0
  368. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SSassemblage.h +59 -0
  369. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SScomp.cxx +297 -0
  370. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SScomp.h +66 -0
  371. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SelectedOutput.cpp +115 -0
  372. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SelectedOutput.h +209 -0
  373. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Serializer.cxx +213 -0
  374. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Serializer.h +42 -0
  375. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Solution.cxx +1795 -0
  376. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Solution.h +154 -0
  377. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SolutionIsotope.cxx +333 -0
  378. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SolutionIsotope.h +85 -0
  379. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBin.cxx +1507 -0
  380. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBin.h +141 -0
  381. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBinList.cpp +358 -0
  382. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/StorageBinList.h +81 -0
  383. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Surface.cxx +837 -0
  384. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Surface.h +108 -0
  385. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceCharge.cxx +617 -0
  386. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceCharge.h +137 -0
  387. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceComp.cxx +509 -0
  388. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/SurfaceComp.h +70 -0
  389. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/System.cxx +103 -0
  390. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/System.h +89 -0
  391. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Temperature.cxx +423 -0
  392. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Temperature.h +42 -0
  393. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Use.cpp +78 -0
  394. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/Use.h +159 -0
  395. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/UserPunch.cpp +32 -0
  396. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/UserPunch.h +39 -0
  397. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/ZedGraph.dll +0 -0
  398. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/advection.cpp +140 -0
  399. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/basicsubs.cpp +4333 -0
  400. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cl1.cpp +881 -0
  401. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_base.cxx +117 -0
  402. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_base.h +48 -0
  403. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_exports.h +20 -0
  404. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_io.cpp +914 -0
  405. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/PHRQ_io.h +207 -0
  406. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Parser.cxx +1331 -0
  407. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Parser.h +310 -0
  408. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Utils.cxx +263 -0
  409. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/Utils.h +29 -0
  410. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/common/phrqtype.h +18 -0
  411. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvdense.cpp +566 -0
  412. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvdense.h +267 -0
  413. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvode.cpp +3939 -0
  414. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cvode.h +940 -0
  415. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxKinetics.cxx +617 -0
  416. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxKinetics.h +78 -0
  417. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxMix.cxx +154 -0
  418. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/cxxMix.h +58 -0
  419. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dense.cpp +175 -0
  420. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dense.h +341 -0
  421. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dumper.cpp +277 -0
  422. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/dumper.h +60 -0
  423. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/gases.cpp +748 -0
  424. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/global_structures.h +1672 -0
  425. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/input.cpp +133 -0
  426. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/integrate.cpp +1219 -0
  427. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/inverse.cpp +5135 -0
  428. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/isotopes.cpp +1813 -0
  429. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/kinetics.cpp +3180 -0
  430. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/mainsubs.cpp +2320 -0
  431. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/model.cpp +5843 -0
  432. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector.cpp +272 -0
  433. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector.h +485 -0
  434. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector_serial.cpp +1032 -0
  435. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/nvector_serial.h +369 -0
  436. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/parse.cpp +1044 -0
  437. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/phqalloc.cpp +316 -0
  438. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/phqalloc.h +47 -0
  439. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/pitzer.cpp +2709 -0
  440. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/pitzer_structures.cpp +225 -0
  441. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/prep.cpp +6267 -0
  442. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/print.cpp +3673 -0
  443. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/read.cpp +10245 -0
  444. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/readtr.cpp +1495 -0
  445. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/runner.cpp +158 -0
  446. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/runner.h +33 -0
  447. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sit.cpp +1684 -0
  448. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/smalldense.cpp +324 -0
  449. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/smalldense.h +261 -0
  450. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/spread.cpp +1309 -0
  451. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/step.cpp +1566 -0
  452. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/structures.cpp +3381 -0
  453. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialsmath.cpp +133 -0
  454. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialsmath.h +162 -0
  455. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/sundialstypes.h +183 -0
  456. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/tally.cpp +1288 -0
  457. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/tidy.cpp +5600 -0
  458. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/transport.cpp +6403 -0
  459. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/phreeqcpp/utilities.cpp +1339 -0
  460. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/src/thread.h +64 -0
  461. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/CMakeLists.txt +133 -0
  462. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/Makefile.am +45 -0
  463. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/Makefile.in +1128 -0
  464. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/ex2.in +26 -0
  465. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main.f90 +31 -0
  466. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main77.f +6 -0
  467. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/main_fortran.cxx +8 -0
  468. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/phreeqc.dat.in +1556 -0
  469. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_c.c +148 -0
  470. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_cxx.cxx +152 -0
  471. pyEQL/phreeqc/ext/iphreeqc-3.8.6-17100/tests/test_f90.F90 +328 -0
  472. pyEQL/phreeqc/iphreeqc_wrapper.cpp +75 -0
  473. pyEQL/phreeqc/solution.py +74 -0
  474. pyEQL/phreeqc/var.py +50 -0
  475. pyEQL/presets/Ringers lactate.yaml +20 -0
  476. pyEQL/presets/__init__.py +17 -0
  477. pyEQL/presets/normal saline.yaml +17 -0
  478. pyEQL/presets/rainwater.yaml +17 -0
  479. pyEQL/presets/seawater.yaml +29 -0
  480. pyEQL/presets/urine.yaml +26 -0
  481. pyEQL/presets/wastewater.yaml +21 -0
  482. pyEQL/py.typed +0 -0
  483. pyEQL/salt_ion_match.py +112 -0
  484. pyEQL/solute.py +163 -0
  485. pyEQL/solution.py +2714 -0
  486. pyEQL/utils.py +237 -0
  487. pyeql-1.4.0rc9.dist-info/METADATA +130 -0
  488. pyeql-1.4.0rc9.dist-info/RECORD +491 -0
  489. pyeql-1.4.0rc9.dist-info/WHEEL +6 -0
  490. pyeql-1.4.0rc9.dist-info/licenses/AUTHORS.md +21 -0
  491. pyeql-1.4.0rc9.dist-info/licenses/LICENSE.txt +20 -0
@@ -0,0 +1,1044 @@
1
+ #include "Phreeqc.h"
2
+ #include "phqalloc.h"
3
+ #include "Utils.h"
4
+
5
+ #if defined(PHREEQCI_GUI)
6
+ #ifdef _DEBUG
7
+ #define new DEBUG_NEW
8
+ #undef THIS_FILE
9
+ static char THIS_FILE[] = __FILE__;
10
+ #endif
11
+ #endif
12
+
13
+ /* ---------------------------------------------------------------------- */
14
+ int Phreeqc::
15
+ parse_eq(char* eqn, std::vector<class elt_list>& new_elt_list, int association)
16
+ /* ---------------------------------------------------------------------- */
17
+ /*
18
+ * function to break equation up into component species
19
+ * returns species name, coefficient, and charge in global variable "rxn_list".
20
+ * Also returns pointer to elt_list structure array with list of elements
21
+ * and coefficients in species.
22
+ * rxn_list global variable, output with contiguous rxn_list structures,
23
+ * which is the reaction. Target species is first in
24
+ * list, coefficient is -1.0.
25
+ *
26
+ * Argurments:
27
+ * *eqn input, pointer to equation to be parsed.
28
+ * **elt_ptr output, pointer to contiguous elt_list structures,
29
+ * which is list of elements and coefficients in the
30
+ * target species.
31
+ * association input, TRUE or FALSE if reaction is an association reaction
32
+ */
33
+ {
34
+ int i;
35
+ LDBLE coef, l_z;
36
+ char c;
37
+ const char* cptr;
38
+ char token[MAX_LENGTH];
39
+
40
+ paren_count = 0;
41
+ /*
42
+ * Remove white space
43
+ */
44
+ squeeze_white(eqn);
45
+ /*
46
+ * Check for illegal characters
47
+ */
48
+ for (i = 0; (c = eqn[i]) != '\0'; i++)
49
+ {
50
+ if (islegit(c) == FALSE)
51
+ {
52
+ error_string = sformatf("Character is not allowed,\
53
+ %c (octal: %o).", c, c);
54
+ error_msg(error_string, CONTINUE);
55
+ return (ERROR);
56
+ }
57
+ }
58
+
59
+ /*
60
+ * Find coefficients, name, and charge for each species for lhs
61
+ */
62
+ count_trxn = 0;
63
+ trxn.dz[0] = trxn.dz[1] = trxn.dz[2] = 0.0;
64
+ cptr = eqn;
65
+ c = cptr[0];
66
+ for (;;)
67
+ {
68
+ if (c == '=')
69
+ break;
70
+ if (c == '\0')
71
+ {
72
+ error_string = sformatf("Equation has no equal sign.\n\t%s", eqn);
73
+ error_msg(error_string, CONTINUE);
74
+ return (ERROR);
75
+ }
76
+ if (get_species(&cptr) == ERROR)
77
+ {
78
+ return (ERROR);
79
+ }
80
+ c = cptr[0];
81
+ if (association == FALSE)
82
+ {
83
+ trxn.token[count_trxn].coef *= -1.0;
84
+ }
85
+ count_trxn++;
86
+ }
87
+ /*
88
+ * Get coefficient, name, and charge of species for dissociation reaction
89
+ */
90
+ cptr++;
91
+ if (association == TRUE)
92
+ {
93
+ if (get_species(&cptr) == ERROR)
94
+ {
95
+ return (ERROR);
96
+ }
97
+ trxn.token[count_trxn].coef *= -1.0;
98
+ /* Swap species into first structure position */
99
+ const char* char_ptr = trxn.token[0].name;
100
+ coef = trxn.token[0].coef;
101
+ l_z = trxn.token[0].z;
102
+ trxn.token[0].name = trxn.token[count_trxn].name;
103
+ trxn.token[0].coef = trxn.token[count_trxn].coef;
104
+ trxn.token[0].z = trxn.token[count_trxn].z;
105
+ trxn.token[count_trxn].name = char_ptr;
106
+ trxn.token[count_trxn].coef = coef;
107
+ trxn.token[count_trxn].z = l_z;
108
+ count_trxn++;
109
+ }
110
+ /*
111
+ * Get reaction species from rhs of equation
112
+ */
113
+ c = cptr[0];
114
+ for (;;)
115
+ {
116
+ if (c == '\0')
117
+ break;
118
+ if (get_species(&cptr) == ERROR)
119
+ {
120
+ return (ERROR);
121
+ }
122
+ c = cptr[0];
123
+ if (association == TRUE)
124
+ {
125
+ trxn.token[count_trxn].coef *= -1.0;
126
+ }
127
+ count_trxn++;
128
+ }
129
+ /*
130
+ * Sort list of reaction species
131
+ */
132
+ trxn_sort();
133
+ /*
134
+ * Get elements in species or mineral formula
135
+ */
136
+ count_elts = 0;
137
+ Utilities::strcpy_safe(token, MAX_LENGTH, trxn.token[0].name);
138
+ replace("(s)", "", token);
139
+ replace("(S)", "", token);
140
+ replace("(g)", "", token);
141
+ replace("(G)", "", token);
142
+ const char* char_ptr = token;
143
+
144
+ if (get_elts_in_species(&char_ptr, trxn.token[0].coef) == ERROR)
145
+ {
146
+ return (ERROR);
147
+ }
148
+ /*
149
+ * Sort elements in reaction and combine
150
+ */
151
+ if (elt_list_combine() == ERROR)
152
+ return (ERROR);
153
+ /*
154
+ * Malloc space and store element data for return
155
+ */
156
+ new_elt_list.resize(count_elts + 1);
157
+ for (i = 0; i < count_elts; i++)
158
+ {
159
+ new_elt_list[i].elt = elt_list[i].elt;
160
+ new_elt_list[i].coef = -elt_list[i].coef;
161
+ }
162
+ new_elt_list[count_elts].elt = NULL;
163
+
164
+ /*
165
+ * Debugging print of parsed equation
166
+ trxn_print();
167
+ */
168
+ return (OK);
169
+ }
170
+ /* ---------------------------------------------------------------------- */
171
+ int Phreeqc::
172
+ check_eqn(int association)
173
+ /* ---------------------------------------------------------------------- */
174
+ /*
175
+ * Check that equation is balanced reaction. Uses array "trxn.token" and
176
+ * assumes "count_trxn" is set to number of species in reaction.
177
+ * Charge and elements are checked.
178
+ *
179
+ * Arguments:
180
+ *
181
+ * association input, TRUE or FALSE if reaction is an association reaction.
182
+ */
183
+ {
184
+ int i;
185
+ int oops = 0;
186
+ LDBLE sumcharge;
187
+
188
+ paren_count = 0;
189
+ count_elts = 0;
190
+ /*
191
+ * Check that coefficient of first species is -1.0
192
+ */
193
+ if (equal(trxn.token[0].coef, -1.0, TOL) == FALSE)
194
+ {
195
+ if (association == TRUE)
196
+ {
197
+ error_string = sformatf(
198
+ "Coefficient of first species on rhs is not equal to 1.0.");
199
+ error_msg(error_string, CONTINUE);
200
+ }
201
+ else
202
+ {
203
+ error_string = sformatf(
204
+ "Coefficient of mineral (first on lhs) is not equal to 1.0.");
205
+ error_msg(error_string, CONTINUE);
206
+ }
207
+ return (ERROR);
208
+ }
209
+ /*
210
+ * Go through all species in the reaction; sum the charge and store elements
211
+ */
212
+ sumcharge = 0.0;
213
+ for (i = 0; i < count_trxn; i++)
214
+ {
215
+ sumcharge += (trxn.token[i].coef) * (trxn.token[i].z);
216
+ const char* t_ptr = trxn.token[i].name;
217
+ if (get_elts_in_species(&t_ptr, trxn.token[i].coef) == ERROR)
218
+ {
219
+ return (ERROR);
220
+ }
221
+ }
222
+ /*
223
+ * Sort elements in reaction and combine
224
+ */
225
+ if (elt_list_combine() == ERROR)
226
+ return (ERROR);
227
+ /*
228
+ * Check charge
229
+ */
230
+ if (equal(sumcharge, 0.0, TOL) == FALSE)
231
+ {
232
+ error_string = sformatf( "Equation is not charge balanced, right - left = %7.4f moles charge", sumcharge);
233
+ error_msg(error_string, CONTINUE);
234
+ oops++;
235
+ }
236
+ /*
237
+ * Check mass balance
238
+ */
239
+ for (i = 0; i < count_elts; i++)
240
+ {
241
+ if ((equal(elt_list[i].coef, 0.0, TOL) == FALSE) &&
242
+ strncmp((elt_list[i].elt)->name, "e", MAX_LENGTH) != 0)
243
+ {
244
+ error_string = sformatf(
245
+ "Equation does not balance for element, %s: right - left = %7.4f moles",
246
+ (elt_list[i].elt)->name, elt_list[i].coef);
247
+ error_msg(error_string, CONTINUE);
248
+ oops++;
249
+ }
250
+ }
251
+ if (oops == 0)
252
+ {
253
+ return (OK);
254
+ }
255
+ else
256
+ {
257
+ return (ERROR);
258
+ }
259
+ }
260
+
261
+ /* ---------------------------------------------------------------------- */
262
+ int Phreeqc::
263
+ get_charge(char *charge, size_t charge_size, LDBLE * l_z)
264
+ /* ---------------------------------------------------------------------- */
265
+ /*
266
+ * Function takes character string and calculates the charge on
267
+ * the species. Charge can be in two forms: (1) string of "+" or "-"
268
+ * or (2) + or - followed by an integer. Charge is reduced to form (2)
269
+ * and stored in the pointer location *charge.
270
+ *
271
+ * Arguments:
272
+ * *charge input, string containing charge
273
+ * output, string containing charge of the form + or -
274
+ * followed by an integer, if integer greater than 1.
275
+ * *z output, value of charge.
276
+ *
277
+ * Returns:
278
+ * ERROR,
279
+ * OK.
280
+ */
281
+ {
282
+ int i;
283
+ char* ptr;
284
+ char c, c1;
285
+ /*
286
+ * Charge is zero
287
+ */
288
+ if ((c = charge[0]) == '\0')
289
+ {
290
+ *l_z = 0.0;
291
+ return (OK);
292
+ }
293
+ /*
294
+ * Error check for + or - at start of string
295
+ */
296
+ if (c != '+' && c != '-')
297
+ {
298
+ error_string = sformatf(
299
+ "Character string for charge does not start with + or -,\t%s.",
300
+ charge);
301
+ error_msg(error_string, CONTINUE);
302
+ return (ERROR);
303
+ }
304
+ /*
305
+ * Count string of +'s or -'s
306
+ */
307
+ i = 0;
308
+ while (c == (c1 = charge[i++]));
309
+ i--;
310
+ if (c1 == '\0')
311
+ {
312
+ if (c == '-')
313
+ i = -i;
314
+ }
315
+ else
316
+ {
317
+ /*
318
+ * + or - followed by a number
319
+ */
320
+ errno = 0;
321
+ i = strtol(charge, &ptr, 0);
322
+ /*
323
+ * Truncate fractional part of charge if all zeros
324
+ */
325
+ if (*ptr != '\0')
326
+ {
327
+ if (*ptr == '.')
328
+ {
329
+ while (*(++ptr) != '\0')
330
+ {
331
+ if (*ptr != '0')
332
+ {
333
+ char* ptr;
334
+ *l_z = strtod(charge, &ptr);
335
+ return (OK);
336
+ }
337
+ }
338
+ /*
339
+ * Non-numeric characters
340
+ */
341
+ }
342
+ else
343
+ {
344
+ error_string = sformatf(
345
+ "Error in character string for charge, %s.", charge);
346
+ error_msg(error_string, CONTINUE);
347
+ return (ERROR);
348
+ }
349
+ }
350
+ }
351
+ /*
352
+ * Charge is zero, must have had +0 or -0 in eqn
353
+ */
354
+ if (i == 0)
355
+ {
356
+ charge[0] = '\0';
357
+ }
358
+ /*
359
+ * Charge is +1 or -1, single + or -
360
+ */
361
+ if (abs(i) == 1)
362
+ {
363
+ charge[0] = c;
364
+ charge[1] = '\0';
365
+ }
366
+ /*
367
+ * Abs(z)>1, set charge to + or - plus integer
368
+ */
369
+ if (abs(i) > 1)
370
+ {
371
+ if (snprintf(charge, charge_size, "%-+d", i) == EOF)
372
+ {
373
+ error_string = sformatf(
374
+ "Error converting charge to character string, %s.",
375
+ charge);
376
+ error_msg(error_string, CONTINUE);
377
+ return (ERROR);
378
+ }
379
+ }
380
+ *l_z = i;
381
+ return (OK);
382
+ }
383
+
384
+ /* ---------------------------------------------------------------------- */
385
+ int Phreeqc::
386
+ get_coef(LDBLE * coef, const char **eqnaddr)
387
+ /* ---------------------------------------------------------------------- */
388
+ /*
389
+ * Function reads through eqn and determines the coefficient of the next
390
+ * species.
391
+ *
392
+ * Arguments:
393
+ * *coef output, coefficient of next species.
394
+ *
395
+ * **eqnaddr input, pointer to a position in eqn to start parsing
396
+ * output, pointer to next position after coefficient
397
+ *
398
+ * Returns:
399
+ * ERROR,
400
+ * OK.
401
+ */
402
+ {
403
+ int i;
404
+ char c, c1;
405
+ const char* cptr;
406
+ const char* rest;
407
+ char* ptr1;
408
+ char token[MAX_LENGTH];;
409
+
410
+ rest = *eqnaddr;
411
+ cptr = *eqnaddr; /* address of a position in eqn */
412
+ c = *cptr; /* character in eqn */
413
+ *coef = 0.0;
414
+ /*
415
+ * No leading sign or number
416
+ */
417
+ if (isalpha((int) c) ||
418
+ (c == '(') || (c == ')') || (c == '[') || (c == ']'))
419
+ {
420
+ *coef = 1.0;
421
+ return (OK);
422
+ }
423
+ /*
424
+ * Leading +, no digits
425
+ */
426
+ c1 = *(cptr + 1);
427
+ if (c == '+' &&
428
+ (isalpha((int) c1) ||
429
+ (c1 == '(') || (c1 == ')') || (c1 == '[') || (c1 == ']')))
430
+ {
431
+ *eqnaddr = ++cptr;
432
+ *coef = 1.0;
433
+ return (OK);
434
+ }
435
+ /*
436
+ * Leading -, no digits
437
+ */
438
+ if (c == '-' &&
439
+ (isalpha((int) c1) ||
440
+ (c1 == '(') || (c1 == ')') || (c1 == '[') || (c1 == ']')))
441
+ {
442
+ *eqnaddr = ++cptr;
443
+ *coef = -1.0;
444
+ return (OK);
445
+ }
446
+ i = 0;
447
+ /*
448
+ * Has number coefficient
449
+ */
450
+ if (isdigit((int) c) || c == '+' || c == '-' || c == '.')
451
+ {
452
+ while (isdigit((int) c) || c == '+' || c == '-' || c == '.')
453
+ {
454
+ token[i++] = c;
455
+ if (i >= MAX_LENGTH)
456
+ {
457
+ error_string = sformatf(
458
+ "Coefficient has more than MAX_LENGTH characters.");
459
+ error_msg(error_string, CONTINUE);
460
+ return (ERROR);
461
+ }
462
+ c = *(++cptr);
463
+ }
464
+ token[i] = '\0';
465
+ *eqnaddr = cptr;
466
+ errno = 0;
467
+ *coef = strtod(token, &ptr1);
468
+ if ((errno == ERANGE) || (*ptr1 != '\0'))
469
+ {
470
+ error_string = sformatf(
471
+ "Error converting coefficient in get_coef, %s.", token);
472
+ error_msg(error_string, CONTINUE);
473
+ return (ERROR);
474
+ }
475
+ return (OK);
476
+ }
477
+ /*
478
+ * None of the above, unknown construct
479
+ */
480
+ error_string = sformatf(
481
+ "Illegal equation construct detected in get_coef.\n\t%s.", rest);
482
+ error_msg(error_string, CONTINUE);
483
+ return (ERROR);
484
+ }
485
+
486
+ /* ---------------------------------------------------------------------- */
487
+ int Phreeqc::
488
+ get_elt(const char** t_ptr, std::string& element, int* i)
489
+ /* ---------------------------------------------------------------------- */
490
+ /*
491
+ * Function reads an element name out of the equation string.
492
+ * An element name is composed of a capital letter followed by any number
493
+ * of lower case characters.
494
+ *
495
+ * Arguments:
496
+ * **t_ptr input, points to position in the equation to begin
497
+ * output, points to next character of equation after
498
+ * element name.
499
+ * *element input pointer to place to return element character string
500
+ */
501
+ {
502
+ char c;
503
+
504
+ element.clear();
505
+ c = *(*t_ptr)++;
506
+ if (c == '\0')
507
+ {
508
+ error_string = sformatf(
509
+ "Empty string in get_elt. Expected an element name.");
510
+ error_msg(error_string, CONTINUE);
511
+ return (ERROR);
512
+ }
513
+ /*
514
+ * Load name into char array element
515
+ */
516
+ element.push_back(c);
517
+ *i = 1;
518
+ if (c == '[')
519
+ {
520
+ while ((c = (**t_ptr)) != ']')
521
+ {
522
+ element.push_back(c);
523
+ (*i)++;
524
+ (*t_ptr)++;
525
+ if ((c = (**t_ptr)) == ']')
526
+ {
527
+ element.push_back(c);
528
+ (*i)++;
529
+ (*t_ptr)++;
530
+ break;
531
+ }
532
+ else if (**t_ptr == '\0')
533
+ {
534
+ error_msg("No ending bracket (]) for element name", CONTINUE);
535
+ input_error++;
536
+ break;
537
+ }
538
+ }
539
+ while (islower((int)(c = (**t_ptr))) || c == '_')
540
+ {
541
+ element.push_back(c);
542
+ (*i)++;
543
+ (*t_ptr)++;
544
+ }
545
+ }
546
+ else
547
+ {
548
+ while (islower((int)(c = (**t_ptr))) || c == '_')
549
+ {
550
+ element.push_back(c);
551
+ (*i)++;
552
+ (*t_ptr)++;
553
+ }
554
+ }
555
+ return (OK);
556
+ }
557
+
558
+ /* ---------------------------------------------------------------------- */
559
+ int Phreeqc::
560
+ get_elts_in_species(const char **t_ptr, LDBLE coef)
561
+ /* ---------------------------------------------------------------------- */
562
+ {
563
+ /*
564
+ * Makes a list of elements with their coefficients, stores elements
565
+ * in elt_list at position count_elts. Global variable count_elts is
566
+ * updated with each stored element. Also uses static global variable
567
+ * paren_count.
568
+ *
569
+ * Arguments:
570
+ * **t_ptr input, point in token string to start looking
571
+ * output, is next position to start looking
572
+ * coef input, coefficient to multiply subscripts by
573
+ */
574
+ int l;
575
+ size_t count;
576
+ char c, c1;
577
+ LDBLE d;
578
+ std::string element;
579
+ const char** t_ptr_save = t_ptr;
580
+ while (((c = **t_ptr) != '+') && (c != '-') && (c != '\0'))
581
+ {
582
+ /* close parenthesis */
583
+ if (c == ')')
584
+ {
585
+ paren_count--;
586
+ if (paren_count < 0)
587
+ {
588
+ error_string = sformatf( "Too many right parentheses.");
589
+ error_msg(error_string, CONTINUE);
590
+ return (ERROR);
591
+ }
592
+ (*t_ptr)++;
593
+ return (OK);
594
+ }
595
+ c1 = *((*t_ptr) + 1);
596
+ /* beginning of element name */
597
+ if (isupper((int) c) || (c == 'e' && c1 == '-') || (c == '['))
598
+ {
599
+ /*
600
+ * Get new element and subscript
601
+ */
602
+ if (get_elt(t_ptr, element, &l) == ERROR)
603
+ {
604
+ return (ERROR);
605
+ }
606
+ if (count_elts >= (int)elt_list.size())
607
+ {
608
+ elt_list.resize(count_elts + 1);
609
+ }
610
+ elt_list[count_elts].elt = element_store(element.c_str());
611
+ if (get_num(t_ptr, &d) == ERROR)
612
+ {
613
+ return (ERROR);
614
+ }
615
+ elt_list[count_elts].coef = d * coef;
616
+ count_elts++;
617
+ /*
618
+ * Expand working space for elements if necessary
619
+ */
620
+ if (count_elts >= (int)elt_list.size())
621
+ {
622
+ elt_list.resize(count_elts + 1);
623
+ }
624
+ continue;
625
+ }
626
+ /*
627
+ * Open parentheses
628
+ */
629
+ if (c == '(')
630
+ {
631
+ count = count_elts;
632
+ if (c1 == ')')
633
+ {
634
+ error_string = sformatf( "Empty parentheses.");
635
+ warning_msg(error_string);
636
+ }
637
+ paren_count++;
638
+ (*t_ptr)++;
639
+ if (get_elts_in_species(t_ptr, coef) == ERROR)
640
+ {
641
+ return (ERROR);
642
+ }
643
+ if (get_num(t_ptr, &d) == ERROR)
644
+ {
645
+ return (ERROR);
646
+ }
647
+ for (size_t i = count; i < count_elts; i++)
648
+ {
649
+ elt_list[i].coef *= d;
650
+ }
651
+ continue;
652
+ }
653
+ /*
654
+ * Colon
655
+ */
656
+ if (c == ':')
657
+ {
658
+ count = count_elts;
659
+ (*t_ptr)++;
660
+ if (get_num(t_ptr, &d) == ERROR)
661
+ {
662
+ return (ERROR);
663
+ }
664
+ if (get_elts_in_species(t_ptr, coef) == ERROR)
665
+ {
666
+ return (ERROR);
667
+ }
668
+ for (size_t i = count; i < count_elts; i++)
669
+ {
670
+ elt_list[i].coef *= d;
671
+ }
672
+ continue;
673
+ }
674
+ /*
675
+ * Not beginning of element and not opening paren
676
+ */
677
+ error_string = sformatf(
678
+ "Parsing error in get_elts_in_species, unexpected character, %c.",
679
+ c);
680
+ error_msg(error_string, CONTINUE);
681
+ input_error++;
682
+ return (ERROR);
683
+ }
684
+ if (paren_count != 0)
685
+ {
686
+ error_string = sformatf( "Unbalanced parentheses: %s", *t_ptr_save);
687
+ error_msg(error_string, CONTINUE);
688
+ input_error++;
689
+ return (ERROR);
690
+ }
691
+ return (OK);
692
+ }
693
+
694
+ /* ---------------------------------------------------------------------- */
695
+ int Phreeqc::
696
+ get_secondary(const char **t_ptr, char *element, int *i)
697
+ /* ---------------------------------------------------------------------- */
698
+ /*
699
+ * Function reads an element name out of the equation string.
700
+ * An element name is composed of a capital letter followed by any number
701
+ * of lower case characters.
702
+ *
703
+ * Arguments:
704
+ * **t_ptr input, points to position in the equation to begin
705
+ * output, points to next character of equation after
706
+ * element name.
707
+ * *element input pointer to place to return element character string
708
+ */
709
+ {
710
+ int j;
711
+ char c;
712
+ const char* cptr;
713
+
714
+ c = *(*t_ptr)++;
715
+ if (c == '\0')
716
+ {
717
+ error_string = sformatf(
718
+ "Empty string in get_elt. Expected an element name.");
719
+ error_msg(error_string, CONTINUE);
720
+ input_error++;
721
+ return (ERROR);
722
+ }
723
+ /*
724
+ * Load name into char array element
725
+ */
726
+ element[0] = c;
727
+ *i = 1;
728
+ if (c == '[')
729
+ {
730
+ while ((c = (**t_ptr)) != ']')
731
+ {
732
+ element[*i] = c;
733
+ (*i)++;
734
+ (*t_ptr)++;
735
+ if ((c = (**t_ptr)) == ']')
736
+ {
737
+ element[*i] = c;
738
+ (*i)++;
739
+ (*t_ptr)++;
740
+ c = (**t_ptr);
741
+ break;
742
+ }
743
+ else if ((c = (**t_ptr)) == '\0')
744
+ {
745
+ error_msg("Did not find ending bracket (])", CONTINUE);
746
+ input_error++;
747
+ return (ERROR);
748
+ }
749
+ }
750
+ while (islower((int) (c = (**t_ptr))) || c == '_')
751
+ {
752
+ element[*i] = c;
753
+ (*i)++;
754
+ (*t_ptr)++;
755
+ }
756
+ }
757
+ else
758
+ {
759
+ while (islower((int) (c = (**t_ptr))) || c == '_')
760
+ {
761
+ element[*i] = c;
762
+ (*i)++;
763
+ (*t_ptr)++;
764
+ }
765
+ }
766
+ /*
767
+ * Check if secondary master species element
768
+ */
769
+ j = *i;
770
+ cptr = *t_ptr;
771
+ if (c == '(')
772
+ {
773
+ /* copy parenthesis */
774
+ element[*i] = c;
775
+ (*i)++;
776
+ (*t_ptr)++;
777
+ /* copy number */
778
+ for (;;)
779
+ {
780
+ c = **t_ptr;
781
+ if (isdigit((int) c) || c == '-' || c == '.')
782
+ {
783
+ element[*i] = c;
784
+ (*i)++;
785
+ (*t_ptr)++;
786
+ }
787
+ else if (c == '+')
788
+ {
789
+ (*t_ptr)++;
790
+ }
791
+ else
792
+ {
793
+ break;
794
+ }
795
+ }
796
+ /* go back to before parenthesis */
797
+ if (c != ')')
798
+ {
799
+ *i = j;
800
+ *t_ptr = cptr;
801
+ /* put in closing parenthesis */
802
+ }
803
+ else
804
+ {
805
+ element[*i] = c;
806
+ (*i)++;
807
+ (*t_ptr)++;
808
+ }
809
+ }
810
+ element[*i] = '\0';
811
+ return (OK);
812
+ }
813
+
814
+ /* ---------------------------------------------------------------------- */
815
+ int Phreeqc::
816
+ get_secondary_in_species(const char **t_ptr, LDBLE coef)
817
+ /* ---------------------------------------------------------------------- */
818
+ {
819
+ /*
820
+ * Makes a list of elements with their coefficients, stores elements
821
+ * in elt_list at position count_elts. Global variable count_elts is
822
+ * updated with each stored element. Also uses static global variable
823
+ * paren_count.
824
+ *
825
+ * Arguments:
826
+ * **t_ptr input, point in token string to start looking
827
+ * output, is next position to start looking
828
+ * coef input, coefficient to multiply subscripts by
829
+ */
830
+ int l;
831
+ size_t count;
832
+ char c, c1;
833
+ LDBLE d;
834
+ char element[MAX_LENGTH];
835
+ const char** t_ptr_save = t_ptr;
836
+ while (((c = **t_ptr) != '+') && (c != '-') && (c != '\0'))
837
+ {
838
+ /* close parenthesis */
839
+ if (c == ')')
840
+ {
841
+ paren_count--;
842
+ if (paren_count < 0)
843
+ {
844
+ error_string = sformatf( "Too many right parentheses.");
845
+ error_msg(error_string, CONTINUE);
846
+ input_error++;
847
+ return (ERROR);
848
+ }
849
+ (*t_ptr)++;
850
+ return (OK);
851
+ }
852
+ c1 = *((*t_ptr) + 1);
853
+ /* beginning of element name */
854
+ if (isupper((int) c) || c == '[' || (c == 'e' && c1 == '-'))
855
+ {
856
+ /*
857
+ * Get new element and subscript
858
+ */
859
+ if (get_secondary(t_ptr, element, &l) == ERROR)
860
+ {
861
+ return (ERROR);
862
+ }
863
+ elt_list[count_elts].elt = element_store(element);
864
+ if (get_num(t_ptr, &d) == ERROR)
865
+ {
866
+ return (ERROR);
867
+ }
868
+ elt_list[count_elts].coef = d * coef;
869
+ count_elts++;
870
+ /*
871
+ * Expand working space for elements if necessary
872
+ */
873
+ if (count_elts >= (int)elt_list.size())
874
+ {
875
+ elt_list.resize(count_elts + 1);
876
+ }
877
+ continue;
878
+ }
879
+ /*
880
+ * Open parentheses
881
+ */
882
+ if (c == '(')
883
+ {
884
+ count = count_elts;
885
+ if (c1 == ')')
886
+ {
887
+ error_string = sformatf( "Empty parentheses.");
888
+ warning_msg(error_string);
889
+ }
890
+ paren_count++;
891
+ (*t_ptr)++;
892
+ if (get_secondary_in_species(t_ptr, coef) == ERROR)
893
+ {
894
+ return (ERROR);
895
+ }
896
+ if (get_num(t_ptr, &d) == ERROR)
897
+ {
898
+ return (ERROR);
899
+ }
900
+ for (size_t i = count; i < count_elts; i++)
901
+ {
902
+ elt_list[i].coef *= d;
903
+ }
904
+ continue;
905
+ }
906
+ /*
907
+ * Colon
908
+ */
909
+ if (c == ':')
910
+ {
911
+ count = count_elts;
912
+ (*t_ptr)++;
913
+ if (get_num(t_ptr, &d) == ERROR)
914
+ {
915
+ return (ERROR);
916
+ }
917
+ if (get_secondary_in_species(t_ptr, coef) == ERROR)
918
+ {
919
+ return (ERROR);
920
+ }
921
+ for (size_t i = count; i < count_elts; i++)
922
+ {
923
+ elt_list[i].coef *= d;
924
+ }
925
+ continue;
926
+ }
927
+ /*
928
+ * Not beginning of element and not opening paren
929
+ */
930
+ error_string = sformatf(
931
+ "Parsing error in get_secondary_in_species, unexpected character, %c.",
932
+ c);
933
+ error_msg(error_string, CONTINUE);
934
+ return (ERROR);
935
+ }
936
+ if (paren_count != 0)
937
+ {
938
+ error_string = sformatf("Unbalanced parentheses: %s", *t_ptr_save);
939
+ error_msg(error_string, CONTINUE);
940
+ return (ERROR);
941
+ }
942
+ return (OK);
943
+ }
944
+
945
+ /* ---------------------------------------------------------------------- */
946
+ int Phreeqc::
947
+ get_num(const char **t_ptr, LDBLE * num)
948
+ /* ---------------------------------------------------------------------- */
949
+ /*
950
+ * Function reads through a string looking for leading numeric field
951
+ * if no numeric field is found, the number is set to 1.0.
952
+ *
953
+ * Arguments:
954
+ *
955
+ * **t_ptr input, points to a position in a character string from which
956
+ * a number is to be extracted.
957
+ * output, points to next position to be parsed.
958
+ * *num address where the number is to be stored.
959
+ *
960
+ * Returns:
961
+ * ERROR,
962
+ * OK.
963
+ */
964
+ {
965
+ int i, decimal;
966
+ char c;
967
+ char* ptr1;
968
+ char token[MAX_LENGTH];
969
+
970
+ *num = 1.0;
971
+ i = 0;
972
+ c = **t_ptr;
973
+ decimal = 0;
974
+ if (isdigit((int) c) || (c == '.'))
975
+ {
976
+ while (isdigit((int) c) || (c == '.'))
977
+ {
978
+ if (c == '.')
979
+ decimal++;
980
+ if (decimal > 1)
981
+ break;
982
+ token[i++] = c;
983
+ /* check number length */
984
+ if (i >= MAX_LENGTH)
985
+ {
986
+ error_string = sformatf(
987
+ "Number was greater than MAX_LENGTH characters.");
988
+ error_msg(error_string, CONTINUE);
989
+ input_error++;
990
+ return (ERROR);
991
+ }
992
+ c = *(++(*t_ptr));
993
+ }
994
+ token[i] = '\0';
995
+ errno = 0;
996
+ *num = strtod(token, &ptr1);
997
+ if (errno == ERANGE)
998
+ {
999
+ error_string = sformatf( "Converting number in get_num, %s.", token);
1000
+ input_error++;
1001
+ error_msg(error_string, CONTINUE);
1002
+ return (ERROR);
1003
+ }
1004
+ }
1005
+ return (OK);
1006
+ }
1007
+
1008
+ /* ---------------------------------------------------------------------- */
1009
+ int Phreeqc::
1010
+ get_species(const char **cptr)
1011
+ /* ---------------------------------------------------------------------- */
1012
+ {
1013
+ /* Function reads next species out of the equation, including optional
1014
+ * preceding coefficient and optional trailing charge. Data are
1015
+ * store in trxn.token[count].
1016
+ *
1017
+ * Arguments:
1018
+ * **cptr input, points to the position in the equation to pick up the species.
1019
+ * output, points to the next character after the species charge.
1020
+ *
1021
+ */
1022
+ std::string string;
1023
+ int l;
1024
+
1025
+ if ((size_t) count_trxn + 1 > trxn.token.size())
1026
+ trxn.token.resize(count_trxn + 1);
1027
+ /* coefficient */
1028
+ if (get_coef(&(trxn.token[count_trxn].coef), cptr) == ERROR)
1029
+ {
1030
+ return (ERROR);
1031
+ }
1032
+ /* name and charge */
1033
+ if (get_token(cptr, string, &trxn.token[count_trxn].z, &l) == ERROR)
1034
+ {
1035
+ return (ERROR);
1036
+ }
1037
+ trxn.token[count_trxn].name = string_hsave(string.c_str());
1038
+ /*
1039
+ trxn.token[count_trxn].z = 0;
1040
+ trxn.token[count_trxn].s = NULL;
1041
+ trxn.token[count_trxn].unknown = NULL;
1042
+ */
1043
+ return (OK);
1044
+ }