IsoSpecPy 2.2.3__tar.gz → 2.3.0.dev3__tar.gz

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 (298) hide show
  1. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/.github/workflows/build_wheels.yml +2 -2
  2. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/Makefile +1 -1
  3. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/fasta.h +22 -0
  4. {isospecpy-2.2.3/IsoSpecR/src → isospecpy-2.3.0.dev3/IsoSpec++}/isoMath.cpp +2 -3
  5. {isospecpy-2.2.3/IsoSpecR/src → isospecpy-2.3.0.dev3/IsoSpec++}/isoMath.h +2 -2
  6. {isospecpy-2.2.3/IsoSpecR/src → isospecpy-2.3.0.dev3/IsoSpec++}/isoSpec++.cpp +40 -26
  7. {isospecpy-2.2.3/IsoSpecR/src → isospecpy-2.3.0.dev3/IsoSpec++}/isoSpec++.h +83 -32
  8. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/marginalTrek++.cpp +42 -0
  9. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/marginalTrek++.h +157 -0
  10. {isospecpy-2.2.3/IsoSpecR/src → isospecpy-2.3.0.dev3/IsoSpec++}/misc.h +5 -0
  11. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/mman.cpp +1 -0
  12. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecPy/IsoSpecPy.py +1 -1
  13. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecPy/__init__.py +2 -2
  14. isospecpy-2.3.0.dev3/IsoSpecPy/__main__.py +25 -0
  15. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecPy/isoFFI.py +1 -0
  16. isospecpy-2.3.0.dev3/IsoSpecR/src/allocator.cpp +1 -0
  17. isospecpy-2.3.0.dev3/IsoSpecR/src/allocator.h +1 -0
  18. isospecpy-2.3.0.dev3/IsoSpecR/src/btrd.h +1 -0
  19. isospecpy-2.3.0.dev3/IsoSpecR/src/conf.h +1 -0
  20. isospecpy-2.3.0.dev3/IsoSpecR/src/cwrapper.cpp +1 -0
  21. isospecpy-2.3.0.dev3/IsoSpecR/src/cwrapper.h +1 -0
  22. isospecpy-2.3.0.dev3/IsoSpecR/src/dirtyAllocator.cpp +1 -0
  23. isospecpy-2.3.0.dev3/IsoSpecR/src/dirtyAllocator.h +1 -0
  24. isospecpy-2.3.0.dev3/IsoSpecR/src/element_tables.cpp +1 -0
  25. isospecpy-2.3.0.dev3/IsoSpecR/src/element_tables.h +1 -0
  26. isospecpy-2.3.0.dev3/IsoSpecR/src/fasta.cpp +1 -0
  27. isospecpy-2.3.0.dev3/IsoSpecR/src/fasta.h +1 -0
  28. isospecpy-2.3.0.dev3/IsoSpecR/src/fixedEnvelopes.cpp +1 -0
  29. isospecpy-2.3.0.dev3/IsoSpecR/src/fixedEnvelopes.h +1 -0
  30. isospecpy-2.3.0.dev3/IsoSpecR/src/isoMath.cpp +1 -0
  31. isospecpy-2.3.0.dev3/IsoSpecR/src/isoMath.h +1 -0
  32. isospecpy-2.3.0.dev3/IsoSpecR/src/isoSpec++.cpp +1 -0
  33. isospecpy-2.3.0.dev3/IsoSpecR/src/isoSpec++.h +1 -0
  34. isospecpy-2.3.0.dev3/IsoSpecR/src/marginalTrek++.cpp +1 -0
  35. isospecpy-2.3.0.dev3/IsoSpecR/src/marginalTrek++.h +1 -0
  36. isospecpy-2.3.0.dev3/IsoSpecR/src/misc.cpp +1 -0
  37. isospecpy-2.3.0.dev3/IsoSpecR/src/misc.h +1 -0
  38. isospecpy-2.3.0.dev3/IsoSpecR/src/mman.cpp +1 -0
  39. isospecpy-2.3.0.dev3/IsoSpecR/src/mman.h +1 -0
  40. isospecpy-2.3.0.dev3/IsoSpecR/src/operators.cpp +1 -0
  41. isospecpy-2.3.0.dev3/IsoSpecR/src/operators.h +1 -0
  42. isospecpy-2.3.0.dev3/IsoSpecR/src/platform.h +1 -0
  43. isospecpy-2.3.0.dev3/IsoSpecR/src/pod_vector.h +1 -0
  44. isospecpy-2.3.0.dev3/IsoSpecR/src/summator.h +1 -0
  45. isospecpy-2.3.0.dev3/IsoSpecR/src/unity-build.cpp +1 -0
  46. isospecpy-2.3.0.dev3/PKG-INFO +6 -0
  47. isospecpy-2.3.0.dev3/pyproject.toml +12 -0
  48. isospecpy-2.3.0.dev3/skbuild/CMakeLists.txt +14 -0
  49. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C++/element_zero.cpp +2 -2
  50. isospecpy-2.3.0.dev3/tests/C++/from_formula_layered_asan +0 -0
  51. isospecpy-2.3.0.dev3/tests/C++/from_formula_layered_clang +0 -0
  52. isospecpy-2.3.0.dev3/tests/C++/from_formula_layered_dbg +0 -0
  53. isospecpy-2.3.0.dev3/tests/C++/from_formula_layered_gcc +0 -0
  54. isospecpy-2.3.0.dev3/tests/C++/from_formula_layered_generator_asan +0 -0
  55. isospecpy-2.3.0.dev3/tests/C++/from_formula_layered_generator_clang +0 -0
  56. isospecpy-2.3.0.dev3/tests/C++/from_formula_layered_generator_dbg +0 -0
  57. isospecpy-2.3.0.dev3/tests/C++/from_formula_layered_generator_gcc +0 -0
  58. isospecpy-2.3.0.dev3/tests/C++/from_formula_layered_generator_memsan +0 -0
  59. isospecpy-2.3.0.dev3/tests/C++/from_formula_layered_memsan +0 -0
  60. isospecpy-2.3.0.dev3/tests/C++/from_formula_ordered_asan +0 -0
  61. isospecpy-2.3.0.dev3/tests/C++/from_formula_ordered_clang +0 -0
  62. isospecpy-2.3.0.dev3/tests/C++/from_formula_ordered_dbg +0 -0
  63. isospecpy-2.3.0.dev3/tests/C++/from_formula_ordered_gcc +0 -0
  64. isospecpy-2.3.0.dev3/tests/C++/from_formula_ordered_memsan +0 -0
  65. isospecpy-2.3.0.dev3/tests/C++/from_formula_stochastic_asan +0 -0
  66. isospecpy-2.3.0.dev3/tests/C++/from_formula_stochastic_clang +0 -0
  67. isospecpy-2.3.0.dev3/tests/C++/from_formula_stochastic_dbg +0 -0
  68. isospecpy-2.3.0.dev3/tests/C++/from_formula_stochastic_gcc +0 -0
  69. isospecpy-2.3.0.dev3/tests/C++/from_formula_stochastic_memsan +0 -0
  70. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C++/from_formula_threshold.cpp +2 -2
  71. isospecpy-2.3.0.dev3/tests/C++/from_formula_threshold_asan +0 -0
  72. isospecpy-2.3.0.dev3/tests/C++/from_formula_threshold_clang +0 -0
  73. isospecpy-2.3.0.dev3/tests/C++/from_formula_threshold_dbg +0 -0
  74. isospecpy-2.3.0.dev3/tests/C++/from_formula_threshold_gcc +0 -0
  75. isospecpy-2.3.0.dev3/tests/C++/from_formula_threshold_gprof_clang +0 -0
  76. isospecpy-2.3.0.dev3/tests/C++/from_formula_threshold_gprof_gcc +0 -0
  77. isospecpy-2.3.0.dev3/tests/C++/from_formula_threshold_memsan +0 -0
  78. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C++/from_formula_threshold_profile.cpp +3 -3
  79. isospecpy-2.3.0.dev3/tests/C++/from_formula_threshold_profile_clang +0 -0
  80. isospecpy-2.3.0.dev3/tests/C++/from_formula_threshold_profile_gcc +0 -0
  81. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C++/from_formula_threshold_simple.cpp +2 -2
  82. isospecpy-2.3.0.dev3/tests/C++/from_formula_threshold_simple_asan +0 -0
  83. isospecpy-2.3.0.dev3/tests/C++/from_formula_threshold_simple_clang +0 -0
  84. isospecpy-2.3.0.dev3/tests/C++/from_formula_threshold_simple_dbg +0 -0
  85. isospecpy-2.3.0.dev3/tests/C++/from_formula_threshold_simple_gcc +0 -0
  86. isospecpy-2.3.0.dev3/tests/C++/from_formula_threshold_simple_memsan +0 -0
  87. isospecpy-2.3.0.dev3/tests/C++/main_test_asan +0 -0
  88. isospecpy-2.3.0.dev3/tests/C++/main_test_cfi +0 -0
  89. isospecpy-2.3.0.dev3/tests/C++/main_test_clang +0 -0
  90. isospecpy-2.3.0.dev3/tests/C++/main_test_dbg +0 -0
  91. isospecpy-2.3.0.dev3/tests/C++/main_test_dbg_fast +0 -0
  92. isospecpy-2.3.0.dev3/tests/C++/main_test_gcc +0 -0
  93. isospecpy-2.3.0.dev3/tests/C++/main_test_memsan +0 -0
  94. isospecpy-2.3.0.dev3/tests/C++/main_test_ss +0 -0
  95. isospecpy-2.3.0.dev3/tests/C++/mass_range_asan +0 -0
  96. isospecpy-2.3.0.dev3/tests/C++/mass_range_clang +0 -0
  97. isospecpy-2.3.0.dev3/tests/C++/mass_range_dbg +0 -0
  98. isospecpy-2.3.0.dev3/tests/C++/mass_range_gcc +0 -0
  99. isospecpy-2.3.0.dev3/tests/C++/mass_range_memsan +0 -0
  100. isospecpy-2.3.0.dev3/tests/C++/single_atom_stochastic.cpp +44 -0
  101. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/Python/test_iface.py +1 -1
  102. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/Python/test_mass_predict.py +1 -1
  103. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/Python/test_sampling.py +1 -1
  104. isospecpy-2.2.3/IsoSpec++/isoMath.cpp +0 -163
  105. isospecpy-2.2.3/IsoSpec++/isoMath.h +0 -87
  106. isospecpy-2.2.3/IsoSpec++/isoSpec++.cpp +0 -942
  107. isospecpy-2.2.3/IsoSpec++/isoSpec++.h +0 -642
  108. isospecpy-2.2.3/IsoSpec++/misc.h +0 -199
  109. isospecpy-2.2.3/IsoSpecR/src/allocator.cpp +0 -51
  110. isospecpy-2.2.3/IsoSpecR/src/allocator.h +0 -69
  111. isospecpy-2.2.3/IsoSpecR/src/btrd.h +0 -206
  112. isospecpy-2.2.3/IsoSpecR/src/conf.h +0 -38
  113. isospecpy-2.2.3/IsoSpecR/src/cwrapper.cpp +0 -459
  114. isospecpy-2.2.3/IsoSpecR/src/cwrapper.h +0 -173
  115. isospecpy-2.2.3/IsoSpecR/src/dirtyAllocator.cpp +0 -58
  116. isospecpy-2.2.3/IsoSpecR/src/dirtyAllocator.h +0 -58
  117. isospecpy-2.2.3/IsoSpecR/src/element_tables.cpp +0 -2992
  118. isospecpy-2.2.3/IsoSpecR/src/element_tables.h +0 -48
  119. isospecpy-2.2.3/IsoSpecR/src/fasta.cpp +0 -315
  120. isospecpy-2.2.3/IsoSpecR/src/fasta.h +0 -45
  121. isospecpy-2.2.3/IsoSpecR/src/fixedEnvelopes.cpp +0 -1179
  122. isospecpy-2.2.3/IsoSpecR/src/fixedEnvelopes.h +0 -244
  123. isospecpy-2.2.3/IsoSpecR/src/marginalTrek++.cpp +0 -698
  124. isospecpy-2.2.3/IsoSpecR/src/marginalTrek++.h +0 -416
  125. isospecpy-2.2.3/IsoSpecR/src/misc.cpp +0 -68
  126. isospecpy-2.2.3/IsoSpecR/src/mman.cpp +0 -204
  127. isospecpy-2.2.3/IsoSpecR/src/mman.h +0 -67
  128. isospecpy-2.2.3/IsoSpecR/src/operators.cpp +0 -38
  129. isospecpy-2.2.3/IsoSpecR/src/operators.h +0 -150
  130. isospecpy-2.2.3/IsoSpecR/src/platform.h +0 -107
  131. isospecpy-2.2.3/IsoSpecR/src/pod_vector.h +0 -399
  132. isospecpy-2.2.3/IsoSpecR/src/summator.h +0 -118
  133. isospecpy-2.2.3/IsoSpecR/src/unity-build.cpp +0 -40
  134. isospecpy-2.2.3/PKG-INFO +0 -45
  135. isospecpy-2.2.3/TODO.md +0 -20
  136. isospecpy-2.2.3/setup.cfg +0 -4
  137. isospecpy-2.2.3/setup.py +0 -243
  138. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/CHANGELOG +0 -0
  139. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/CMakeLists.txt +0 -0
  140. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/CMakeStuff/doxyfile.in +0 -0
  141. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/CMakeStuff/isospec_logo2_high.svg.in +0 -0
  142. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/CMakeStuff/isospec_logo2_long.svg.in +0 -0
  143. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/CMakeStuff/modules/FindIsoSpec++.cmake +0 -0
  144. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/CMakeStuff/modules/IsoSpec++Config.cmake.in +0 -0
  145. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/CMakeStuff/modules/pkgconfig/libisospec++.pc.in +0 -0
  146. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/CMakeStuff/outputColors.cmake +0 -0
  147. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/CMakeStuff/systemUname.cmake +0 -0
  148. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/CMakeStuff/toolchains/apple-macport-toolchain.cmake +0 -0
  149. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/CMakeStuff/toolchains/mxe-toolchain.cmake +0 -0
  150. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/CMakeStuff/toolchains/unix-toolchain.cmake +0 -0
  151. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/CMakeStuff/toolchains/win10-mingw64-toolchain.cmake +0 -0
  152. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/Examples/C++/COMPILING +0 -0
  153. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/Examples/C++/radiolabelling.cpp +0 -0
  154. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/Examples/C++/water.cpp +0 -0
  155. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/Examples/CMakeLists.txt +0 -0
  156. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/Examples/Python/custom_elements.py +0 -0
  157. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/Examples/Python/fasta.py +0 -0
  158. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/Examples/Python/radiolabelling.py +0 -0
  159. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/Examples/Python/water.py +0 -0
  160. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/Examples/R/radiolabelling.R +0 -0
  161. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/Examples/R/water.R +0 -0
  162. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/INSTALL +0 -0
  163. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/CMakeLists.txt +0 -0
  164. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/CPPLINT.cfg +0 -0
  165. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/IsoSpecConfig.cmake.in +0 -0
  166. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/allocator.cpp +0 -0
  167. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/allocator.h +0 -0
  168. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/btrd.h +0 -0
  169. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/conf.h +0 -0
  170. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/cwrapper.cpp +0 -0
  171. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/cwrapper.h +0 -0
  172. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/dirtyAllocator.cpp +0 -0
  173. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/dirtyAllocator.h +0 -0
  174. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/element_tables.cpp +0 -0
  175. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/element_tables.h +0 -0
  176. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/fasta.cpp +0 -0
  177. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/fixedEnvelopes.cpp +0 -0
  178. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/fixedEnvelopes.h +0 -0
  179. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/misc.cpp +0 -0
  180. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/mman.h +0 -0
  181. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/operators.cpp +0 -0
  182. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/operators.h +0 -0
  183. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/platform.h +0 -0
  184. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/platform_incl.h +0 -0
  185. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/pod_vector.h +0 -0
  186. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/python-build.cpp +0 -0
  187. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/summator.h +0 -0
  188. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/test.cpp +0 -0
  189. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpec++/unity-build.cpp +0 -0
  190. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecPy/Advanced.py +0 -0
  191. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecPy/Distributions.py +0 -0
  192. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecPy/Formulas.py +0 -0
  193. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecPy/IsoSpecPyOld.py +0 -0
  194. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecPy/PeriodicTbl.py +0 -0
  195. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecPy/approximations.py +0 -0
  196. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecPy/confs_passthrough.py +0 -0
  197. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecPy.egg-info/PKG-INFO +0 -0
  198. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecPy.egg-info/SOURCES.txt +0 -0
  199. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecPy.egg-info/dependency_links.txt +0 -0
  200. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecPy.egg-info/not-zip-safe +0 -0
  201. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecPy.egg-info/requires.txt +0 -0
  202. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecPy.egg-info/top_level.txt +0 -0
  203. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/.Rbuildignore +0 -0
  204. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/DESCRIPTION +0 -0
  205. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/LICENCE +0 -0
  206. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/NAMESPACE +0 -0
  207. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/R/IsoSpecR.R +0 -0
  208. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/R/RcppExports.R +0 -0
  209. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/R/add_custom_isotopes.R +0 -0
  210. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/R/data_description.R +0 -0
  211. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/R/sysdata.rda +0 -0
  212. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/data/isotopicData.rda +0 -0
  213. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/inst/CITATION +0 -0
  214. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/man/IsoSpecify.Rd +0 -0
  215. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/man/custom_isotopes_example.Rd +0 -0
  216. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/man/isotopicData.Rd +0 -0
  217. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/src/IsoSpecR_init.c +0 -0
  218. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/src/RcppExports.cpp +0 -0
  219. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/src/Rinterface.cpp +0 -0
  220. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/src/platform_incl.h +0 -0
  221. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/tests/testthat/envipat.Rd +0 -0
  222. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/tests/testthat/test-numerical-stability.R +0 -0
  223. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/IsoSpecR/tests/testthat.R +0 -0
  224. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/LICENCE +0 -0
  225. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/MANIFEST.in +0 -0
  226. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/Makefile +0 -0
  227. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/README +0 -0
  228. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/changelog +0 -0
  229. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/control +0 -0
  230. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/copyright +0 -0
  231. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/doxyfile +0 -0
  232. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/libisospec++-dev.install +0 -0
  233. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/libisospec++-dev.links +0 -0
  234. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/libisospec++-dev.manpages +0 -0
  235. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/libisospec++-doc.doc-base +0 -0
  236. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/libisospec++-doc.install +0 -0
  237. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/libisospec++2.install +0 -0
  238. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/libisospec++2.links +0 -0
  239. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/patches/0001-Ensure-the-header-files-are-found-in-the-system.patch +0 -0
  240. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/patches/0002-Remove-the-mtune-native-march-native.patch +0 -0
  241. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/patches/series +0 -0
  242. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/repack.sh +0 -0
  243. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/replace-mathjax-cloudflare-url-local-file.sh +0 -0
  244. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/rules +0 -0
  245. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/shlibs.local +0 -0
  246. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/source/format +0 -0
  247. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/source_package_build.bash +0 -0
  248. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/upstream/metadata +0 -0
  249. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/debian/watch +0 -0
  250. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/experiments/abyss-wass-opt/distances.py +0 -0
  251. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/experiments/abyss-wass-opt/flows.py +0 -0
  252. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/experiments/abyss-wass-opt/gradients.py +0 -0
  253. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/experiments/abyss-wass-opt/parameters.py +0 -0
  254. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/experiments/abyss-wass-opt/test_spectra.py +0 -0
  255. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/experiments/isobuild.py +0 -0
  256. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/experiments/log_vs_natural.cpp +0 -0
  257. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/experiments/threshold-search/exp1.cpp +0 -0
  258. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/man/CMakeLists.txt +0 -0
  259. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/man/doxyfile +0 -0
  260. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/man/images/isospec_logo2_high_versioned.png +0 -0
  261. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/man/images/isospec_logo2_high_versioned.svg +0 -0
  262. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/man/images/isospec_logo2_long_versioned.png +0 -0
  263. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/man/images/isospec_logo2_long_versioned.svg +0 -0
  264. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/man/images/logo2_high.pdf +0 -0
  265. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/man/images/logo2_long.pdf +0 -0
  266. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/man/logo2_high.pdf +0 -0
  267. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/man/logo2_long.pdf +0 -0
  268. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C/Makefile +0 -0
  269. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C/test_IsoOrderedGenerator.c +0 -0
  270. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C/test_IsoThresholdGenerator.c +0 -0
  271. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C/test_arrays.c +0 -0
  272. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C++/IsoThresholdGenerator.cpp +0 -0
  273. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C++/Makefile +0 -0
  274. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C++/empty_iso.cpp +0 -0
  275. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C++/from_formula_layered.cpp +0 -0
  276. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C++/from_formula_layered_generator.cpp +0 -0
  277. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C++/from_formula_ordered.cpp +0 -0
  278. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C++/from_formula_stochastic.cpp +0 -0
  279. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C++/layered-test.cpp +0 -0
  280. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C++/main_test.cpp +0 -0
  281. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C++/marginal-test.cpp +0 -0
  282. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C++/mass_range.cpp +0 -0
  283. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C++/nr_conf.cpp +0 -0
  284. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C++/tabulator_test.cpp +0 -0
  285. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C++/test_marginal_ordered.cpp +0 -0
  286. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C++/titin-test.cpp +0 -0
  287. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/C++/wasserstein_matching.cpp +0 -0
  288. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/Python/test_IsoSpecPy.py +0 -0
  289. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/Python/test_all_configs_output.py +0 -0
  290. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/Python/test_estimates.py +0 -0
  291. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/correctness/envipat_results.tar.xz +0 -0
  292. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/correctness/molecules_2_cpp.R +0 -0
  293. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/cppyy/IsoSpecCppyy/__init__.py +0 -0
  294. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/cppyy/cpt.py +0 -0
  295. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/cppyy/overhead-cppyy.py +0 -0
  296. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tests/cppyy/overhead.py +0 -0
  297. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tools/gen.py +0 -0
  298. {isospecpy-2.2.3 → isospecpy-2.3.0.dev3}/tools/rcheck.sh +0 -0
@@ -15,7 +15,7 @@ jobs:
15
15
  strategy:
16
16
  matrix:
17
17
  #os: [ubuntu-20.04, windows-2019, macos-10.15]
18
- os: [windows-latest, macos-13, macos-14, macos-15]
18
+ os: [ubuntu-22.04, windows-latest, macos-13, macos-14, macos-15]
19
19
 
20
20
  steps:
21
21
  - uses: actions/checkout@v4
@@ -31,7 +31,7 @@ jobs:
31
31
  # to supply options, put them in 'env', like:
32
32
  env:
33
33
  GITHUB_BUILDING_WHEELS: 1
34
- CIBW_SKIP: pp*-*
34
+ CIBW_SKIP: pp*-* cp36-* cp37-*
35
35
 
36
36
 
37
37
  - uses: actions/upload-artifact@v4
@@ -1,6 +1,6 @@
1
1
  OPTFLAGS=-O3 -march=native -mtune=native
2
2
  DEBUGFLAGS=-O0 -g -Werror -DISOSPEC_DEBUG -DDEBUG -D_GLIBCXX_DEBUG
3
- CXXFLAGS=-std=c++11 -Wall -pedantic -Wextra -Wshadow -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-include-dirs -Wno-old-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wno-sign-conversion -Wsign-promo -Wswitch-default -Wundef
3
+ CXXFLAGS=-std=c++17 -Wall -pedantic -Wextra -Wshadow -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-include-dirs -Wno-old-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wno-sign-conversion -Wsign-promo -Wswitch-default -Wundef
4
4
  SRCFILES=cwrapper.cpp allocator.cpp dirtyAllocator.cpp isoSpec++.cpp isoMath.cpp marginalTrek++.cpp operators.cpp element_tables.cpp misc.cpp mman.cpp fixedEnvelopes.cpp fasta.cpp
5
5
 
6
6
  all: unitylib
@@ -30,6 +30,11 @@ extern const double aa_elem_probabilities[19];
30
30
 
31
31
  extern const int aa_symbol_to_elem_counts[256*6];
32
32
 
33
+ //! Count elemental composition of an unmodificed sequence of amino acids, resulting in CHNOSSe counts.
34
+ /*!
35
+ WARNING!!! This function does not add the terminating H and OH groups, resulting in a residue backbone skeleton formula.
36
+ If you don't know what that means, you should probably be using parse_fasta_full function.
37
+ */
33
38
  inline void parse_fasta(const char* fasta, int atomCounts[6])
34
39
  {
35
40
  memset(atomCounts, 0, sizeof(decltype(atomCounts[0]))*6);
@@ -42,4 +47,21 @@ inline void parse_fasta(const char* fasta, int atomCounts[6])
42
47
  }
43
48
  }
44
49
 
50
+ //! Turn an input FASTA aminoacid sequence into atom counts, in CHNOSSe order.
51
+ /*!
52
+ Unlike parse_fasta, this function includes the H and OH groups at the N- and C- termini of the skeleton, resulting in a formula of a full (inert) molecule.
53
+ */
54
+ inline void parse_fasta_full(const char* fasta, int atomCounts[6])
55
+ {
56
+ parse_fasta(fasta, atomCounts);
57
+ // Add terminal water (H2O) for either precursor or fragment.
58
+ const int H_INDEX = 1; // Indexing: 0=C, 1=H, 2=N, 3=O, 4=S, 5=Se
59
+ const int O_INDEX = 3;
60
+
61
+ atomCounts[H_INDEX] += 2;
62
+ atomCounts[O_INDEX] += 1;
63
+ }
64
+
65
+
66
+
45
67
  } // namespace IsoSpec
@@ -146,9 +146,8 @@ double InverseLowerIncompleteGamma2(int a, double x)
146
146
  return s;
147
147
  }
148
148
 
149
- std::random_device random_dev;
150
- std::mt19937 random_gen(random_dev());
151
- std::uniform_real_distribution<double> stdunif(0.0, 1.0);
149
+ thread_local std::mt19937 random_gen(std::random_device{}());
150
+ thread_local std::uniform_real_distribution<double> stdunif(0.0, 1.0);
152
151
 
153
152
  size_t rdvariate_binom(size_t tries, double succ_prob, std::mt19937& rgen)
154
153
  {
@@ -70,8 +70,8 @@ inline double InverseChiSquareCDF2(int k, double x)
70
70
  return InverseLowerIncompleteGamma2(k, x*tgamma(static_cast<double>(k)/2.0)) * 2.0;
71
71
  }
72
72
 
73
- extern std::mt19937 random_gen;
74
- extern std::uniform_real_distribution<double> stdunif;
73
+ extern thread_local std::mt19937 random_gen;
74
+ extern thread_local std::uniform_real_distribution<double> stdunif;
75
75
 
76
76
  inline double rdvariate_beta_1_b(double b, std::mt19937& rgen = random_gen)
77
77
  {
@@ -650,22 +650,22 @@ IsoThresholdGenerator::~IsoThresholdGenerator()
650
650
  * ------------------------------------------------------------------------------------------------------------------------
651
651
  */
652
652
 
653
-
654
- IsoLayeredGenerator::IsoLayeredGenerator(Iso&& iso, int tabSize, int hashSize, bool reorder_marginals, double t_prob_hint)
653
+ template <typename MarginalType>
654
+ IsoLayeredGeneratorTemplate<MarginalType>::IsoLayeredGeneratorTemplate(Iso&& iso, int tabSize, int hashSize, bool reorder_marginals, double t_prob_hint)
655
655
  : IsoGenerator(std::move(iso))
656
656
  {
657
657
  counter = new int[dimNumber];
658
658
  maxConfsLPSum = new double[dimNumber-1];
659
659
  currentLThreshold = nextafter(mode_lprob, -std::numeric_limits<double>::infinity());
660
660
  lastLThreshold = (std::numeric_limits<double>::min)();
661
- marginalResultsUnsorted = new LayeredMarginal*[dimNumber];
661
+ marginalResultsUnsorted = new MarginalType*[dimNumber];
662
662
  resetPositions = new const double*[dimNumber];
663
663
  marginalsNeedSorting = doMarginalsNeedSorting();
664
664
 
665
665
  memset(counter, 0, sizeof(int)*dimNumber);
666
666
 
667
667
  for(int ii = 0; ii < dimNumber; ii++)
668
- marginalResultsUnsorted[ii] = new LayeredMarginal(std::move(*(marginals[ii])), tabSize, hashSize);
668
+ marginalResultsUnsorted[ii] = new MarginalType(std::move(*(marginals[ii])), tabSize, hashSize);
669
669
 
670
670
  if(reorder_marginals && dimNumber > 1)
671
671
  {
@@ -681,7 +681,7 @@ IsoLayeredGenerator::IsoLayeredGenerator(Iso&& iso, int tabSize, int hashSize, b
681
681
  TableOrder<double> TO(marginal_priorities);
682
682
 
683
683
  std::sort(tmpMarginalOrder, tmpMarginalOrder + dimNumber, TO);
684
- marginalResults = new LayeredMarginal*[dimNumber];
684
+ marginalResults = new MarginalType*[dimNumber];
685
685
 
686
686
  for(int ii = 0; ii < dimNumber; ii++)
687
687
  marginalResults[ii] = marginalResultsUnsorted[tmpMarginalOrder[ii]];
@@ -715,10 +715,11 @@ IsoLayeredGenerator::IsoLayeredGenerator(Iso&& iso, int tabSize, int hashSize, b
715
715
  counter[0]--;
716
716
  lProbs_ptr--;
717
717
  lastLThreshold = 10.0;
718
- IsoLayeredGenerator::nextLayer(-0.00001);
718
+ IsoLayeredGeneratorTemplate<MarginalType>::nextLayer(-0.00001);
719
719
  }
720
720
 
721
- bool IsoLayeredGenerator::nextLayer(double offset)
721
+ template <typename MarginalType>
722
+ bool IsoLayeredGeneratorTemplate<MarginalType>::nextLayer(double offset)
722
723
  {
723
724
  size_t first_mrg_size = marginalResults[0]->get_no_confs();
724
725
 
@@ -746,7 +747,8 @@ bool IsoLayeredGenerator::nextLayer(double offset)
746
747
  return true;
747
748
  }
748
749
 
749
- bool IsoLayeredGenerator::carry()
750
+ template <typename MarginalType>
751
+ bool IsoLayeredGeneratorTemplate<MarginalType>::carry()
750
752
  {
751
753
  // If we reached this point, a carry is needed
752
754
 
@@ -781,8 +783,8 @@ bool IsoLayeredGenerator::carry()
781
783
  return false;
782
784
  }
783
785
 
784
-
785
- void IsoLayeredGenerator::terminate_search()
786
+ template<typename MarginalType>
787
+ void IsoLayeredGeneratorTemplate<MarginalType>::terminate_search()
786
788
  {
787
789
  for(int ii = 0; ii < dimNumber; ii++)
788
790
  {
@@ -793,7 +795,8 @@ void IsoLayeredGenerator::terminate_search()
793
795
  lProbs_ptr = lProbs_ptr_start + marginalResults[0]->get_no_confs()-1;
794
796
  }
795
797
 
796
- IsoLayeredGenerator::~IsoLayeredGenerator()
798
+ template<typename MarginalType>
799
+ IsoLayeredGeneratorTemplate<MarginalType>::~IsoLayeredGeneratorTemplate()
797
800
  {
798
801
  delete[] counter;
799
802
  delete[] maxConfsLPSum;
@@ -805,33 +808,35 @@ IsoLayeredGenerator::~IsoLayeredGenerator()
805
808
  delete[] marginalOrder;
806
809
  }
807
810
 
811
+ template class IsoLayeredGeneratorTemplate<LayeredMarginal>;
812
+ //template class IsoLayeredGeneratorTemplate<PrecalculatedMarginal>;
813
+ //template class IsoLayeredGeneratorTemplate<MarginalTrek>;
814
+ template class IsoLayeredGeneratorTemplate<SingleAtomMarginal<true>>;
808
815
 
809
816
  /*
810
817
  * ------------------------------------------------------------------------------------------------------------------------
811
818
  */
812
819
 
813
-
814
- IsoOrderedGenerator::IsoOrderedGenerator(Iso&& iso, int _tabSize, int _hashSize) :
820
+ template<typename MarginalType>
821
+ IsoOrderedGeneratorTemplate<MarginalType>::IsoOrderedGeneratorTemplate(Iso&& iso, int _tabSize, int _hashSize) :
815
822
  IsoGenerator(std::move(iso), false), allocator(dimNumber, _tabSize)
816
823
  {
817
824
  partialLProbs = &currentLProb;
818
825
  partialMasses = &currentMass;
819
826
  partialProbs = &currentProb;
820
827
 
821
- marginalResults = new MarginalTrek*[dimNumber];
828
+ marginalResults = new MarginalType*[dimNumber];
822
829
 
823
830
  for(int i = 0; i < dimNumber; i++)
824
- marginalResults[i] = new MarginalTrek(std::move(*(marginals[i])), _tabSize, _hashSize);
831
+ marginalResults[i] = new MarginalType(std::move(*(marginals[i])), _tabSize, _hashSize);
825
832
 
826
833
  logProbs = new const pod_vector<double>*[dimNumber];
827
834
  masses = new const pod_vector<double>*[dimNumber];
828
- marginalConfs = new const pod_vector<int*>*[dimNumber];
829
835
 
830
836
  for(int i = 0; i < dimNumber; i++)
831
837
  {
832
838
  masses[i] = &marginalResults[i]->conf_masses();
833
839
  logProbs[i] = &marginalResults[i]->conf_lprobs();
834
- marginalConfs[i] = &marginalResults[i]->confs();
835
840
  }
836
841
 
837
842
  topConf = allocator.newConf();
@@ -851,20 +856,19 @@ IsoGenerator(std::move(iso), false), allocator(dimNumber, _tabSize)
851
856
  pq.push(topConf);
852
857
  }
853
858
 
854
-
855
- IsoOrderedGenerator::~IsoOrderedGenerator()
859
+ template<typename MarginalType>
860
+ IsoOrderedGeneratorTemplate<MarginalType>::~IsoOrderedGeneratorTemplate()
856
861
  {
857
- dealloc_table<MarginalTrek*>(marginalResults, dimNumber);
862
+ dealloc_table<MarginalType*>(marginalResults, dimNumber);
858
863
  delete[] logProbs;
859
864
  delete[] masses;
860
- delete[] marginalConfs;
861
865
  partialLProbs = nullptr;
862
866
  partialMasses = nullptr;
863
867
  partialProbs = nullptr;
864
868
  }
865
869
 
866
-
867
- bool IsoOrderedGenerator::advanceToNextConfiguration()
870
+ template<typename MarginalType>
871
+ bool IsoOrderedGeneratorTemplate<MarginalType>::advanceToNextConfiguration()
868
872
  {
869
873
  if(pq.size() < 1)
870
874
  return false;
@@ -914,22 +918,32 @@ bool IsoOrderedGenerator::advanceToNextConfiguration()
914
918
  return true;
915
919
  }
916
920
 
921
+ template class IsoOrderedGeneratorTemplate<MarginalTrek>;
922
+ template class IsoOrderedGeneratorTemplate<SingleAtomMarginal<false>>;
923
+
917
924
 
918
925
  /*
919
926
  * ---------------------------------------------------------------------------------------------------
920
927
  */
921
928
 
922
-
923
- IsoStochasticGenerator::IsoStochasticGenerator(Iso&& iso, size_t no_molecules, double _precision, double _beta_bias) :
929
+ template<typename IsoType>
930
+ IsoStochasticGeneratorTemplate<IsoType>::IsoStochasticGeneratorTemplate(Iso&& iso, size_t no_molecules, double _precision, double _beta_bias, std::mt19937& _rng) :
924
931
  IsoGenerator(std::move(iso)),
925
932
  ILG(std::move(*this)),
926
933
  to_sample_left(no_molecules),
927
934
  precision(_precision),
928
935
  beta_bias(_beta_bias),
929
936
  confs_prob(0.0),
930
- chasing_prob(0.0)
937
+ chasing_prob(0.0),
938
+ rdvariate_gen(_rng)
931
939
  {}
932
940
 
941
+ template class IsoStochasticGeneratorTemplate<IsoLayeredGeneratorTemplate<LayeredMarginal>>;
942
+ template class IsoStochasticGeneratorTemplate<IsoLayeredGeneratorTemplate<SingleAtomMarginal<true>>>;
943
+ template class IsoStochasticGeneratorTemplate<IsoOrderedGeneratorTemplate<MarginalTrek>>;
944
+ template class IsoStochasticGeneratorTemplate<IsoOrderedGeneratorTemplate<SingleAtomMarginal<false>>>;
945
+ //template class IsoStochasticGeneratorTemplate<IsoThresholdGenerator>;
946
+
933
947
  /*
934
948
  * ---------------------------------------------------------------------------------------------------
935
949
  */
@@ -21,6 +21,7 @@
21
21
  #include <limits>
22
22
  #include <string>
23
23
  #include <vector>
24
+ #include <algorithm>
24
25
  #include "platform.h"
25
26
  #include "dirtyAllocator.h"
26
27
  #include "summator.h"
@@ -233,24 +234,24 @@ class ISOSPEC_EXPORT_SYMBOL IsoGenerator : public Iso
233
234
  This algorithm take O(N*log(N)) to compute the N isotopologues because of using the Priority Queue data structure.
234
235
  Obtaining the N isotopologues can be achieved in O(N) if they are not required to be spit out in the descending order.
235
236
  */
236
- class ISOSPEC_EXPORT_SYMBOL IsoOrderedGenerator: public IsoGenerator
237
+ template<typename MarginalType>
238
+ class ISOSPEC_EXPORT_SYMBOL IsoOrderedGeneratorTemplate: public IsoGenerator
237
239
  {
238
240
  private:
239
- MarginalTrek** marginalResults; /*!< Table of pointers to marginal distributions of subisotopologues. */
241
+ MarginalType** marginalResults; /*!< Table of pointers to marginal distributions of subisotopologues. */
240
242
  std::priority_queue<void*, pod_vector<void*>, ConfOrder> pq; /*!< The priority queue used to generate isotopologues ordered by descending probability. */
241
243
  void* topConf; /*!< Most probable configuration. */
242
244
  DirtyAllocator allocator; /*!< Structure used for alocating memory for isotopologues. */
243
245
  const pod_vector<double>** logProbs; /*!< Obtained log-probabilities. */
244
246
  const pod_vector<double>** masses; /*!< Obtained masses. */
245
- const pod_vector<Conf>** marginalConfs; /*!< Obtained counts of isotopes. */
246
247
  double currentLProb; /*!< The log-probability of the current isotopologue. */
247
248
  double currentMass; /*!< The mass of the current isotopologue. */
248
249
  double currentProb; /*!< The probability of the current isotopologue. */
249
250
  int ccount;
250
251
 
251
252
  public:
252
- IsoOrderedGenerator(const IsoOrderedGenerator& other) = delete;
253
- IsoOrderedGenerator& operator=(const IsoOrderedGenerator& other) = delete;
253
+ IsoOrderedGeneratorTemplate(const IsoOrderedGeneratorTemplate& other) = delete;
254
+ IsoOrderedGeneratorTemplate& operator=(const IsoOrderedGeneratorTemplate& other) = delete;
254
255
 
255
256
  bool advanceToNextConfiguration() override final;
256
257
 
@@ -261,29 +262,49 @@ class ISOSPEC_EXPORT_SYMBOL IsoOrderedGenerator: public IsoGenerator
261
262
  */
262
263
  inline void get_conf_signature(int* space) const override final
263
264
  {
264
- int* c = getConf(topConf);
265
+ if constexpr (std::is_same<MarginalType, MarginalTrek>::value)
266
+ {
267
+ int* c = getConf(topConf);
265
268
 
266
- if (ccount >= 0)
267
- c[ccount]--;
269
+ if (ccount >= 0)
270
+ c[ccount]--;
268
271
 
269
- for(int ii = 0; ii < dimNumber; ii++)
270
- {
271
- memcpy(space, marginalResults[ii]->confs()[c[ii]], isotopeNumbers[ii]*sizeof(int));
272
- space += isotopeNumbers[ii];
273
- }
272
+ for(int ii = 0; ii < dimNumber; ii++)
273
+ {
274
+ memcpy(space, marginalResults[ii]->confs()[c[ii]], isotopeNumbers[ii]*sizeof(int));
275
+ space += isotopeNumbers[ii];
276
+ }
274
277
 
275
- if (ccount >= 0)
276
- c[ccount]++;
278
+ if (ccount >= 0)
279
+ c[ccount]++;
280
+ }
281
+ else
282
+ throw std::runtime_error("IsoOrderedGeneratorTemplate::get_conf_signature() called on a non-MarginalTrek generator. This is not supported yet.");
277
283
  };
278
284
 
279
285
  //! The move-contstructor.
280
- IsoOrderedGenerator(Iso&& iso, int _tabSize = 1000, int _hashSize = 1000); // NOLINT(runtime/explicit) - constructor deliberately left to be used as a conversion
286
+ IsoOrderedGeneratorTemplate(Iso&& iso, int _tabSize = 1000, int _hashSize = 1000); // NOLINT(runtime/explicit) - constructor deliberately left to be used as a conversion
281
287
 
282
288
  //! Destructor.
283
- virtual ~IsoOrderedGenerator();
284
- };
289
+ virtual ~IsoOrderedGeneratorTemplate();
285
290
 
291
+ inline void get_conf_by_indexes(int* space)
292
+ {
293
+ if constexpr (std::is_same<MarginalType, SingleAtomMarginal<false>>::value)
294
+ {
295
+ if(dimNumber == 0)
296
+ return;
286
297
 
298
+ int* c = getConf(topConf);
299
+ space[0] = std::max(c[0]-1, 0);
300
+
301
+ for(int ii = 1; ii < dimNumber; ii++)
302
+ space[ii] = c[ii];
303
+ }
304
+ }
305
+ };
306
+
307
+ using IsoOrderedGenerator = IsoOrderedGeneratorTemplate<MarginalTrek>;
287
308
 
288
309
 
289
310
  //! The generator of isotopologues above a given threshold value.
@@ -435,15 +456,15 @@ class ISOSPEC_EXPORT_SYMBOL IsoThresholdGenerator: public IsoGenerator
435
456
 
436
457
 
437
458
 
438
-
439
- class ISOSPEC_EXPORT_SYMBOL IsoLayeredGenerator : public IsoGenerator
459
+ template<typename MarginalType>
460
+ class ISOSPEC_EXPORT_SYMBOL IsoLayeredGeneratorTemplate : public IsoGenerator
440
461
  {
441
462
  private:
442
463
  int* counter; /*!< An array storing the position of an isotopologue in terms of the subisotopologues ordered by decreasing probability. */
443
464
  double* maxConfsLPSum;
444
465
  double currentLThreshold, lastLThreshold;
445
- LayeredMarginal** marginalResults;
446
- LayeredMarginal** marginalResultsUnsorted;
466
+ MarginalType** marginalResults;
467
+ MarginalType** marginalResultsUnsorted;
447
468
  int* marginalOrder;
448
469
 
449
470
  const double* lProbs_ptr;
@@ -455,8 +476,8 @@ class ISOSPEC_EXPORT_SYMBOL IsoLayeredGenerator : public IsoGenerator
455
476
 
456
477
 
457
478
  public:
458
- IsoLayeredGenerator(const IsoLayeredGenerator& other) = delete;
459
- IsoLayeredGenerator& operator=(const IsoLayeredGenerator& other) = delete;
479
+ IsoLayeredGeneratorTemplate(const IsoLayeredGeneratorTemplate& other) = delete;
480
+ IsoLayeredGeneratorTemplate& operator=(const IsoLayeredGeneratorTemplate& other) = delete;
460
481
 
461
482
  inline void get_conf_signature(int* space) const override final
462
483
  {
@@ -482,9 +503,9 @@ class ISOSPEC_EXPORT_SYMBOL IsoLayeredGenerator : public IsoGenerator
482
503
 
483
504
  inline double get_currentLThreshold() const { return currentLThreshold; }
484
505
 
485
- IsoLayeredGenerator(Iso&& iso, int _tabSize = 1000, int _hashSize = 1000, bool reorder_marginals = true, double t_prob_hint = 0.99); // NOLINT(runtime/explicit) - constructor deliberately left to be used as a conversion
506
+ IsoLayeredGeneratorTemplate(Iso&& iso, int _tabSize = 1000, int _hashSize = 1000, bool reorder_marginals = true, double t_prob_hint = 0.99); // NOLINT(runtime/explicit) - constructor deliberately left to be used as a conversion
486
507
 
487
- ~IsoLayeredGenerator();
508
+ ~IsoLayeredGeneratorTemplate();
488
509
 
489
510
  ISOSPEC_FORCE_INLINE bool advanceToNextConfiguration() override final
490
511
  {
@@ -492,7 +513,7 @@ class ISOSPEC_EXPORT_SYMBOL IsoLayeredGenerator : public IsoGenerator
492
513
  {
493
514
  if(advanceToNextConfigurationWithinLayer())
494
515
  return true;
495
- } while(IsoLayeredGenerator::nextLayer(-2.0));
516
+ } while(IsoLayeredGeneratorTemplate<MarginalType>::nextLayer(-2.0));
496
517
  return false;
497
518
  }
498
519
 
@@ -533,24 +554,48 @@ class ISOSPEC_EXPORT_SYMBOL IsoLayeredGenerator : public IsoGenerator
533
554
 
534
555
  bool nextLayer(double offset);
535
556
 
557
+ void get_conf_by_indexes(int* space) const
558
+ {
559
+ if constexpr (std::is_same<MarginalType, SingleAtomMarginal<true>>::value)
560
+ {
561
+ counter[0] = lProbs_ptr - lProbs_ptr_start;
562
+ if(marginalOrder != nullptr)
563
+ {
564
+ for(int ii = 0; ii < dimNumber; ii++)
565
+ {
566
+ int jj = marginalOrder[ii];
567
+ space[ii] = marginalResultsUnsorted[ii]->get_original_position(counter[jj]);
568
+ }
569
+ }
570
+ else
571
+ {
572
+ for(int ii = 0; ii < dimNumber; ii++)
573
+ space[ii] = marginalResultsUnsorted[ii]->get_original_position(counter[ii]);
574
+ }
575
+ }
576
+ else
577
+ throw std::runtime_error("IsoLayeredGeneratorTemplate::get_conf_by_indexes() called on a non-SingleAtomMarginal generator. This is not supported yet.");
578
+ }
579
+
536
580
  private:
537
581
  bool carry();
538
582
  };
583
+ using IsoLayeredGenerator = IsoLayeredGeneratorTemplate<LayeredMarginal>;
539
584
 
540
-
541
-
542
- class IsoStochasticGenerator : public IsoGenerator
585
+ template<typename IsoType>
586
+ class IsoStochasticGeneratorTemplate : public IsoGenerator
543
587
  {
544
- IsoLayeredGenerator ILG;
588
+ IsoType ILG;
545
589
  size_t to_sample_left;
546
590
  const double precision;
547
591
  const double beta_bias;
548
592
  double confs_prob;
549
593
  double chasing_prob;
550
594
  size_t current_count;
595
+ std::mt19937& rdvariate_gen; /*!< The random number generator used to generate random numbers. */
551
596
 
552
597
  public:
553
- IsoStochasticGenerator(Iso&& iso, size_t no_molecules, double precision = 0.9999, double beta_bias = 5.0);
598
+ IsoStochasticGeneratorTemplate(Iso&& iso, size_t no_molecules, double precision = 0.9999, double beta_bias = 5.0, std::mt19937& rdvariate_gen = random_gen);
554
599
 
555
600
  ISOSPEC_FORCE_INLINE size_t count() const { return current_count; }
556
601
 
@@ -636,7 +681,13 @@ class IsoStochasticGenerator : public IsoGenerator
636
681
  }
637
682
  };
638
683
  }
684
+
685
+ ISOSPEC_FORCE_INLINE void get_indexes(int* space)
686
+ {
687
+ ILG.get_conf_by_indexes(space);
688
+ }
639
689
  };
640
690
 
691
+ using IsoStochasticGenerator = IsoStochasticGeneratorTemplate<IsoLayeredGenerator>;
641
692
 
642
693
  } // namespace IsoSpec
@@ -695,4 +695,46 @@ double LayeredMarginal::get_max_mass() const
695
695
  return ret;
696
696
  }
697
697
 
698
+ /* =============================================================== */
699
+
700
+ template<bool add_guards>
701
+ SingleAtomMarginal<add_guards>::SingleAtomMarginal(Marginal&& m, int, int)
702
+ : Marginal(std::move(m)), current_threshold(1.0), extended_to_idx(0)
703
+ {
704
+ original_indexes.resize(isotopeNo);
705
+ for(size_t ii = 0; ii < isotopeNo; ++ii)
706
+ original_indexes[ii] = ii;
707
+
708
+ std::sort(original_indexes.begin(), original_indexes.end(), [&](int a, int b) {
709
+ return atom_lProbs[a] > atom_lProbs[b];
710
+ });
711
+
712
+
713
+ masses.reserve(isotopeNo);
714
+ probs.reserve(isotopeNo);
715
+
716
+ if constexpr (add_guards)
717
+ {
718
+ lProbs.reserve(isotopeNo+2);
719
+ lProbs.push_back(std::numeric_limits<double>::infinity());
720
+ }
721
+ else
722
+ lProbs.reserve(isotopeNo);
723
+
724
+ for(size_t idx : original_indexes)
725
+ {
726
+ lProbs.push_back(atom_lProbs[idx]);
727
+ probs.push_back(exp(lProbs.back()));
728
+ masses.push_back(atom_masses[idx]);
729
+ }
730
+
731
+ if constexpr (add_guards)
732
+ {
733
+ lProbs.push_back(-std::numeric_limits<double>::infinity());
734
+ guarded_lProbs = lProbs.data()+1;
735
+ }
736
+ else
737
+ guarded_lProbs = lProbs.data();
738
+ }
739
+
698
740
  } // namespace IsoSpec