IsoSpecPy 2.2.2__tar.gz → 2.3.0__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 (220) hide show
  1. {IsoSpecPy-2.2.2 → isospecpy-2.3.0}/LICENCE +1 -1
  2. isospecpy-2.3.0/PKG-INFO +43 -0
  3. isospecpy-2.3.0/pyproject.toml +58 -0
  4. isospecpy-2.3.0/skbuild/CMakeLists.txt +18 -0
  5. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/cwrapper.h +29 -23
  6. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/element_tables.cpp +1 -1
  7. {IsoSpecPy-2.2.2/IsoSpecR/src → isospecpy-2.3.0/src/IsoSpec++}/element_tables.h +2 -0
  8. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/fasta.h +22 -0
  9. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/fixedEnvelopes.cpp +1 -0
  10. {IsoSpecPy-2.2.2/IsoSpecR/src → isospecpy-2.3.0/src/IsoSpec++}/isoMath.cpp +2 -3
  11. {IsoSpecPy-2.2.2/IsoSpecR/src → isospecpy-2.3.0/src/IsoSpec++}/isoMath.h +2 -2
  12. {IsoSpecPy-2.2.2/IsoSpecR/src → isospecpy-2.3.0/src/IsoSpec++}/isoSpec++.cpp +40 -26
  13. {IsoSpecPy-2.2.2/IsoSpecR/src → isospecpy-2.3.0/src/IsoSpec++}/isoSpec++.h +86 -35
  14. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/marginalTrek++.cpp +45 -0
  15. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/marginalTrek++.h +157 -0
  16. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/misc.cpp +5 -5
  17. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/misc.h +16 -11
  18. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/mman.cpp +1 -0
  19. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/operators.h +2 -2
  20. {IsoSpecPy-2.2.2/IsoSpecR/src → isospecpy-2.3.0/src/IsoSpec++}/platform.h +5 -1
  21. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpecPy/IsoSpecPy.py +18 -5
  22. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpecPy/IsoSpecPyOld.py +5 -2
  23. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpecPy/__init__.py +2 -2
  24. isospecpy-2.3.0/src/IsoSpecPy/__main__.py +25 -0
  25. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpecPy/isoFFI.py +37 -16
  26. IsoSpecPy-2.2.2/.github/workflows/build_wheels.yml +0 -37
  27. IsoSpecPy-2.2.2/CHANGELOG +0 -156
  28. IsoSpecPy-2.2.2/CMakeLists.txt +0 -184
  29. IsoSpecPy-2.2.2/CMakeStuff/doxyfile.in +0 -2512
  30. IsoSpecPy-2.2.2/CMakeStuff/isospec_logo2_high.svg.in +0 -33999
  31. IsoSpecPy-2.2.2/CMakeStuff/isospec_logo2_long.svg.in +0 -34011
  32. IsoSpecPy-2.2.2/CMakeStuff/modules/FindIsoSpec++.cmake +0 -38
  33. IsoSpecPy-2.2.2/CMakeStuff/modules/IsoSpec++Config.cmake.in +0 -24
  34. IsoSpecPy-2.2.2/CMakeStuff/modules/pkgconfig/libisospec++.pc.in +0 -12
  35. IsoSpecPy-2.2.2/CMakeStuff/outputColors.cmake +0 -18
  36. IsoSpecPy-2.2.2/CMakeStuff/systemUname.cmake +0 -20
  37. IsoSpecPy-2.2.2/CMakeStuff/toolchains/apple-macport-toolchain.cmake +0 -23
  38. IsoSpecPy-2.2.2/CMakeStuff/toolchains/mxe-toolchain.cmake +0 -29
  39. IsoSpecPy-2.2.2/CMakeStuff/toolchains/unix-toolchain.cmake +0 -42
  40. IsoSpecPy-2.2.2/CMakeStuff/toolchains/win10-mingw64-toolchain.cmake +0 -14
  41. IsoSpecPy-2.2.2/Examples/C++/COMPILING +0 -13
  42. IsoSpecPy-2.2.2/Examples/C++/radiolabelling.cpp +0 -50
  43. IsoSpecPy-2.2.2/Examples/C++/water.cpp +0 -102
  44. IsoSpecPy-2.2.2/Examples/CMakeLists.txt +0 -16
  45. IsoSpecPy-2.2.2/Examples/Python/custom_elements.py +0 -66
  46. IsoSpecPy-2.2.2/Examples/Python/fasta.py +0 -14
  47. IsoSpecPy-2.2.2/Examples/Python/radiolabelling.py +0 -73
  48. IsoSpecPy-2.2.2/Examples/Python/water.py +0 -77
  49. IsoSpecPy-2.2.2/Examples/R/radiolabelling.R +0 -34
  50. IsoSpecPy-2.2.2/Examples/R/water.R +0 -72
  51. IsoSpecPy-2.2.2/INSTALL +0 -87
  52. IsoSpecPy-2.2.2/IsoSpec++/CMakeLists.txt +0 -62
  53. IsoSpecPy-2.2.2/IsoSpec++/CPPLINT.cfg +0 -10
  54. IsoSpecPy-2.2.2/IsoSpec++/IsoSpecConfig.cmake.in +0 -20
  55. IsoSpecPy-2.2.2/IsoSpec++/Makefile +0 -35
  56. IsoSpecPy-2.2.2/IsoSpec++/element_tables.h +0 -48
  57. IsoSpecPy-2.2.2/IsoSpec++/isoMath.cpp +0 -163
  58. IsoSpecPy-2.2.2/IsoSpec++/isoMath.h +0 -87
  59. IsoSpecPy-2.2.2/IsoSpec++/isoSpec++.cpp +0 -942
  60. IsoSpecPy-2.2.2/IsoSpec++/isoSpec++.h +0 -642
  61. IsoSpecPy-2.2.2/IsoSpec++/platform.h +0 -107
  62. IsoSpecPy-2.2.2/IsoSpec++/test.cpp +0 -6
  63. IsoSpecPy-2.2.2/IsoSpecPy.egg-info/PKG-INFO +0 -31
  64. IsoSpecPy-2.2.2/IsoSpecPy.egg-info/SOURCES.txt +0 -214
  65. IsoSpecPy-2.2.2/IsoSpecPy.egg-info/dependency_links.txt +0 -1
  66. IsoSpecPy-2.2.2/IsoSpecPy.egg-info/not-zip-safe +0 -1
  67. IsoSpecPy-2.2.2/IsoSpecPy.egg-info/requires.txt +0 -5
  68. IsoSpecPy-2.2.2/IsoSpecPy.egg-info/top_level.txt +0 -2
  69. IsoSpecPy-2.2.2/IsoSpecR/.Rbuildignore +0 -2
  70. IsoSpecPy-2.2.2/IsoSpecR/DESCRIPTION +0 -31
  71. IsoSpecPy-2.2.2/IsoSpecR/LICENCE +0 -3
  72. IsoSpecPy-2.2.2/IsoSpecR/NAMESPACE +0 -6
  73. IsoSpecPy-2.2.2/IsoSpecR/R/IsoSpecR.R +0 -75
  74. IsoSpecPy-2.2.2/IsoSpecR/R/RcppExports.R +0 -7
  75. IsoSpecPy-2.2.2/IsoSpecR/R/add_custom_isotopes.R +0 -35
  76. IsoSpecPy-2.2.2/IsoSpecR/R/data_description.R +0 -30
  77. IsoSpecPy-2.2.2/IsoSpecR/R/sysdata.rda +0 -0
  78. IsoSpecPy-2.2.2/IsoSpecR/data/isotopicData.rda +0 -0
  79. IsoSpecPy-2.2.2/IsoSpecR/inst/CITATION +0 -38
  80. IsoSpecPy-2.2.2/IsoSpecR/man/IsoSpecify.Rd +0 -50
  81. IsoSpecPy-2.2.2/IsoSpecR/man/custom_isotopes_example.Rd +0 -11
  82. IsoSpecPy-2.2.2/IsoSpecR/man/isotopicData.Rd +0 -26
  83. IsoSpecPy-2.2.2/IsoSpecR/src/IsoSpecR_init.c +0 -20
  84. IsoSpecPy-2.2.2/IsoSpecR/src/RcppExports.cpp +0 -27
  85. IsoSpecPy-2.2.2/IsoSpecR/src/Rinterface.cpp +0 -209
  86. IsoSpecPy-2.2.2/IsoSpecR/src/allocator.cpp +0 -51
  87. IsoSpecPy-2.2.2/IsoSpecR/src/allocator.h +0 -69
  88. IsoSpecPy-2.2.2/IsoSpecR/src/btrd.h +0 -206
  89. IsoSpecPy-2.2.2/IsoSpecR/src/conf.h +0 -38
  90. IsoSpecPy-2.2.2/IsoSpecR/src/cwrapper.cpp +0 -459
  91. IsoSpecPy-2.2.2/IsoSpecR/src/cwrapper.h +0 -173
  92. IsoSpecPy-2.2.2/IsoSpecR/src/dirtyAllocator.cpp +0 -58
  93. IsoSpecPy-2.2.2/IsoSpecR/src/dirtyAllocator.h +0 -58
  94. IsoSpecPy-2.2.2/IsoSpecR/src/element_tables.cpp +0 -2992
  95. IsoSpecPy-2.2.2/IsoSpecR/src/fasta.cpp +0 -315
  96. IsoSpecPy-2.2.2/IsoSpecR/src/fasta.h +0 -45
  97. IsoSpecPy-2.2.2/IsoSpecR/src/fixedEnvelopes.cpp +0 -1179
  98. IsoSpecPy-2.2.2/IsoSpecR/src/fixedEnvelopes.h +0 -244
  99. IsoSpecPy-2.2.2/IsoSpecR/src/marginalTrek++.cpp +0 -698
  100. IsoSpecPy-2.2.2/IsoSpecR/src/marginalTrek++.h +0 -416
  101. IsoSpecPy-2.2.2/IsoSpecR/src/misc.cpp +0 -68
  102. IsoSpecPy-2.2.2/IsoSpecR/src/misc.h +0 -199
  103. IsoSpecPy-2.2.2/IsoSpecR/src/mman.cpp +0 -204
  104. IsoSpecPy-2.2.2/IsoSpecR/src/mman.h +0 -67
  105. IsoSpecPy-2.2.2/IsoSpecR/src/operators.cpp +0 -38
  106. IsoSpecPy-2.2.2/IsoSpecR/src/operators.h +0 -150
  107. IsoSpecPy-2.2.2/IsoSpecR/src/platform_incl.h +0 -34
  108. IsoSpecPy-2.2.2/IsoSpecR/src/pod_vector.h +0 -399
  109. IsoSpecPy-2.2.2/IsoSpecR/src/summator.h +0 -118
  110. IsoSpecPy-2.2.2/IsoSpecR/src/unity-build.cpp +0 -40
  111. IsoSpecPy-2.2.2/IsoSpecR/tests/testthat/envipat.Rd +0 -0
  112. IsoSpecPy-2.2.2/IsoSpecR/tests/testthat/test-numerical-stability.R +0 -21
  113. IsoSpecPy-2.2.2/IsoSpecR/tests/testthat.R +0 -4
  114. IsoSpecPy-2.2.2/MANIFEST.in +0 -3
  115. IsoSpecPy-2.2.2/Makefile +0 -19
  116. IsoSpecPy-2.2.2/PKG-INFO +0 -31
  117. IsoSpecPy-2.2.2/TODO.md +0 -20
  118. IsoSpecPy-2.2.2/debian/changelog +0 -124
  119. IsoSpecPy-2.2.2/debian/control +0 -86
  120. IsoSpecPy-2.2.2/debian/copyright +0 -58
  121. IsoSpecPy-2.2.2/debian/doxyfile +0 -2517
  122. IsoSpecPy-2.2.2/debian/libisospec++-dev.install +0 -8
  123. IsoSpecPy-2.2.2/debian/libisospec++-dev.links +0 -8
  124. IsoSpecPy-2.2.2/debian/libisospec++-dev.manpages +0 -1
  125. IsoSpecPy-2.2.2/debian/libisospec++-doc.doc-base +0 -14
  126. IsoSpecPy-2.2.2/debian/libisospec++-doc.install +0 -1
  127. IsoSpecPy-2.2.2/debian/libisospec++2.install +0 -1
  128. IsoSpecPy-2.2.2/debian/libisospec++2.links +0 -9
  129. IsoSpecPy-2.2.2/debian/patches/0001-Ensure-the-header-files-are-found-in-the-system.patch +0 -35
  130. IsoSpecPy-2.2.2/debian/patches/0002-Remove-the-mtune-native-march-native.patch +0 -22
  131. IsoSpecPy-2.2.2/debian/patches/series +0 -3
  132. IsoSpecPy-2.2.2/debian/repack.sh +0 -111
  133. IsoSpecPy-2.2.2/debian/replace-mathjax-cloudflare-url-local-file.sh +0 -13
  134. IsoSpecPy-2.2.2/debian/rules +0 -91
  135. IsoSpecPy-2.2.2/debian/shlibs.local +0 -1
  136. IsoSpecPy-2.2.2/debian/source/format +0 -1
  137. IsoSpecPy-2.2.2/debian/source_package_build.bash +0 -70
  138. IsoSpecPy-2.2.2/debian/upstream/metadata +0 -15
  139. IsoSpecPy-2.2.2/debian/watch +0 -19
  140. IsoSpecPy-2.2.2/experiments/abyss-wass-opt/distances.py +0 -17
  141. IsoSpecPy-2.2.2/experiments/abyss-wass-opt/flows.py +0 -97
  142. IsoSpecPy-2.2.2/experiments/abyss-wass-opt/gradients.py +0 -87
  143. IsoSpecPy-2.2.2/experiments/abyss-wass-opt/parameters.py +0 -13
  144. IsoSpecPy-2.2.2/experiments/abyss-wass-opt/test_spectra.py +0 -55
  145. IsoSpecPy-2.2.2/experiments/isobuild.py +0 -11
  146. IsoSpecPy-2.2.2/experiments/log_vs_natural.cpp +0 -23
  147. IsoSpecPy-2.2.2/experiments/threshold-search/exp1.cpp +0 -87
  148. IsoSpecPy-2.2.2/man/CMakeLists.txt +0 -67
  149. IsoSpecPy-2.2.2/man/doxyfile +0 -2512
  150. IsoSpecPy-2.2.2/man/images/isospec_logo2_high_versioned.png +0 -0
  151. IsoSpecPy-2.2.2/man/images/isospec_logo2_high_versioned.svg +0 -33999
  152. IsoSpecPy-2.2.2/man/images/isospec_logo2_long_versioned.png +0 -0
  153. IsoSpecPy-2.2.2/man/images/isospec_logo2_long_versioned.svg +0 -34011
  154. IsoSpecPy-2.2.2/man/images/logo2_high.pdf +0 -0
  155. IsoSpecPy-2.2.2/man/images/logo2_long.pdf +0 -0
  156. IsoSpecPy-2.2.2/man/logo2_high.pdf +0 -0
  157. IsoSpecPy-2.2.2/man/logo2_long.pdf +0 -0
  158. IsoSpecPy-2.2.2/setup.cfg +0 -4
  159. IsoSpecPy-2.2.2/setup.py +0 -238
  160. IsoSpecPy-2.2.2/tests/C/Makefile +0 -9
  161. IsoSpecPy-2.2.2/tests/C/test_IsoOrderedGenerator.c +0 -30
  162. IsoSpecPy-2.2.2/tests/C/test_IsoThresholdGenerator.c +0 -33
  163. IsoSpecPy-2.2.2/tests/C/test_arrays.c +0 -33
  164. IsoSpecPy-2.2.2/tests/C++/IsoThresholdGenerator.cpp +0 -53
  165. IsoSpecPy-2.2.2/tests/C++/Makefile +0 -100
  166. IsoSpecPy-2.2.2/tests/C++/element_zero.cpp +0 -60
  167. IsoSpecPy-2.2.2/tests/C++/empty_iso.cpp +0 -66
  168. IsoSpecPy-2.2.2/tests/C++/from_formula_layered.cpp +0 -55
  169. IsoSpecPy-2.2.2/tests/C++/from_formula_layered_generator.cpp +0 -68
  170. IsoSpecPy-2.2.2/tests/C++/from_formula_ordered.cpp +0 -66
  171. IsoSpecPy-2.2.2/tests/C++/from_formula_stochastic.cpp +0 -57
  172. IsoSpecPy-2.2.2/tests/C++/from_formula_threshold.cpp +0 -77
  173. IsoSpecPy-2.2.2/tests/C++/from_formula_threshold_profile.cpp +0 -42
  174. IsoSpecPy-2.2.2/tests/C++/from_formula_threshold_simple.cpp +0 -59
  175. IsoSpecPy-2.2.2/tests/C++/layered-test.cpp +0 -40
  176. IsoSpecPy-2.2.2/tests/C++/main_test.cpp +0 -68
  177. IsoSpecPy-2.2.2/tests/C++/marginal-test.cpp +0 -44
  178. IsoSpecPy-2.2.2/tests/C++/mass_range.cpp +0 -118
  179. IsoSpecPy-2.2.2/tests/C++/nr_conf.cpp +0 -111
  180. IsoSpecPy-2.2.2/tests/C++/tabulator_test.cpp +0 -31
  181. IsoSpecPy-2.2.2/tests/C++/test_marginal_ordered.cpp +0 -57
  182. IsoSpecPy-2.2.2/tests/C++/titin-test.cpp +0 -35
  183. IsoSpecPy-2.2.2/tests/C++/wasserstein_matching.cpp +0 -25
  184. IsoSpecPy-2.2.2/tests/Python/test_IsoSpecPy.py +0 -140
  185. IsoSpecPy-2.2.2/tests/Python/test_all_configs_output.py +0 -46
  186. IsoSpecPy-2.2.2/tests/Python/test_estimates.py +0 -27
  187. IsoSpecPy-2.2.2/tests/Python/test_iface.py +0 -126
  188. IsoSpecPy-2.2.2/tests/Python/test_mass_predict.py +0 -51
  189. IsoSpecPy-2.2.2/tests/Python/test_sampling.py +0 -247
  190. IsoSpecPy-2.2.2/tests/correctness/envipat_results.tar.xz +0 -0
  191. IsoSpecPy-2.2.2/tests/correctness/molecules_2_cpp.R +0 -92
  192. IsoSpecPy-2.2.2/tests/cppyy/IsoSpecCppyy/__init__.py +0 -29
  193. IsoSpecPy-2.2.2/tests/cppyy/cpt.py +0 -8
  194. IsoSpecPy-2.2.2/tests/cppyy/overhead-cppyy.py +0 -16
  195. IsoSpecPy-2.2.2/tests/cppyy/overhead.py +0 -8
  196. IsoSpecPy-2.2.2/tools/gen.py +0 -15
  197. IsoSpecPy-2.2.2/tools/rcheck.sh +0 -6
  198. /IsoSpecPy-2.2.2/README → /isospecpy-2.3.0/README.md +0 -0
  199. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/allocator.cpp +0 -0
  200. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/allocator.h +0 -0
  201. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/btrd.h +0 -0
  202. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/conf.h +0 -0
  203. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/cwrapper.cpp +0 -0
  204. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/dirtyAllocator.cpp +0 -0
  205. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/dirtyAllocator.h +0 -0
  206. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/fasta.cpp +0 -0
  207. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/fixedEnvelopes.h +0 -0
  208. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/mman.h +0 -0
  209. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/operators.cpp +0 -0
  210. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/platform_incl.h +0 -0
  211. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/pod_vector.h +0 -0
  212. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/python-build.cpp +0 -0
  213. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/summator.h +0 -0
  214. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpec++/unity-build.cpp +0 -0
  215. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpecPy/Advanced.py +0 -0
  216. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpecPy/Distributions.py +0 -0
  217. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpecPy/Formulas.py +0 -0
  218. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpecPy/PeriodicTbl.py +0 -0
  219. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpecPy/approximations.py +0 -0
  220. {IsoSpecPy-2.2.2 → isospecpy-2.3.0/src}/IsoSpecPy/confs_passthrough.py +0 -0
@@ -8,7 +8,7 @@ your own software, but you are under no legal obligation to do so.
8
8
  -------------------------------------------------------------------------
9
9
 
10
10
 
11
- Copyright (c) 2015-2020, Micha� Startek and Mateusz ��cki
11
+ Copyright (c) 2015-2025, Michał Startek and Mateusz Łącki
12
12
 
13
13
  All rights reserved.
14
14
 
@@ -0,0 +1,43 @@
1
+ Metadata-Version: 2.4
2
+ Name: IsoSpecPy
3
+ Version: 2.3.0
4
+ Summary: IsoSpecPy is a Python library for computing isotopic distributions of molecules.
5
+ Keywords: isotopic distribution,mass spectrometry,chemistry,isotopic envelope,isotopologues
6
+ Author: Michał Startek, Mateusz Łącki
7
+ License-Expression: BSD-2-Clause
8
+ License-File: LICENCE
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.6
11
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Operating System :: OS Independent
14
+ Project-URL: Homepage, https://github.com/MatteoLacki/IsoSpec
15
+ Project-URL: Repository, https://github.com/MatteoLacki/IsoSpec
16
+ Requires-Python: >=3.6
17
+ Requires-Dist: cffi
18
+ Provides-Extra: testing
19
+ Requires-Dist: pytest; extra == "testing"
20
+ Requires-Dist: OldIsoSpecPy; extra == "testing"
21
+ Description-Content-Type: text/markdown
22
+
23
+ IsoSpec, the isotopic fine structure calculator
24
+ ===============================================
25
+
26
+ The main purpose of this software package is to be used as a library,
27
+ mostly in mass spectrometry software. We do not provide any standalone
28
+ programs, except for those in Examples directory which are intended to
29
+ showcase the usage of the library.
30
+
31
+ Please see the code in Examples directory for example usage.
32
+
33
+ The software is publically available under a 2-clause BSD licence. If
34
+ you require other licensing terms, please contact the authors. See
35
+ LICENCE file for more details.
36
+
37
+ More details about the program may be found in the following Analytical
38
+ Chemistry publications:
39
+
40
+ https://pubs.acs.org/doi/10.1021/acs.analchem.0c00959
41
+ https://pubs.acs.org/doi/abs/10.1021/acs.analchem.6b01459
42
+
43
+ See especially the Supporting Information for details about the algorithm.
@@ -0,0 +1,58 @@
1
+ [build-system]
2
+ requires = ["setuptools", "scikit-build-core"]
3
+ build-backend = "scikit_build_core.build"
4
+
5
+ [tool.scikit-build]
6
+ cmake.source-dir = "skbuild"
7
+
8
+ [project]
9
+ name = "IsoSpecPy"
10
+ dependencies = ["cffi"]
11
+ description = "IsoSpecPy is a Python library for computing isotopic distributions of molecules."
12
+ version = "2.3.0"
13
+ license = "BSD-2-Clause"
14
+ license-files = ["LICENCE"]
15
+ authors = [{name = "Michał Startek"}, {name = "Mateusz Łącki"}]
16
+ readme = "README.md"
17
+ requires-python = ">=3.6"
18
+ classifiers = [
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.6",
21
+ "Topic :: Software Development :: Libraries :: Python Modules",
22
+ "Development Status :: 5 - Production/Stable",
23
+ "Operating System :: OS Independent",
24
+ ]
25
+ keywords = ["isotopic distribution", "mass spectrometry", "chemistry", "isotopic envelope", "isotopologues"]
26
+
27
+ [project.urls]
28
+ Homepage = "https://github.com/MatteoLacki/IsoSpec"
29
+ Repository = "https://github.com/MatteoLacki/IsoSpec"
30
+
31
+
32
+
33
+ [project.optional-dependencies]
34
+ testing = ["pytest", "OldIsoSpecPy"]
35
+
36
+ [tool.pytest.ini_options]
37
+ testpaths = ["tests/Python"]
38
+
39
+ [tool.cibuildwheel]
40
+ enable = ["pypy"]
41
+ skip = ["cp36-*", "cp37-*", "pp37-*"]
42
+ test-command = "python -m pytest {project}/tests/Python"
43
+ #test-sources = ["tests/Python"]
44
+ test-extras = ["testing"]
45
+
46
+ [tool.scikit-build.sdist]
47
+ exclude = ["**/*"]
48
+ include = [
49
+ "/src/IsoSpecPy/*.py",
50
+ "/src/IsoSpec++/*.c",
51
+ "/src/IsoSpec++/*.h",
52
+ "/src/IsoSpec++/*.hpp",
53
+ "/src/IsoSpec++/*.cpp",
54
+ "/LICENCE",
55
+ "/README.md",
56
+ "/pyproject.toml",
57
+ "/skbuild/CMakeLists.txt"
58
+ ]
@@ -0,0 +1,18 @@
1
+ cmake_minimum_required(VERSION 3.15)
2
+
3
+ project(IsoSpecPy CXX)
4
+
5
+ set(CMAKE_CXX_STANDARD 17)
6
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
7
+ set(CMAKE_CXX_EXTENSIONS OFF)
8
+
9
+ #find_package(PythonExtensions REQUIRED)
10
+ #find_package(Python COMPONENTS Interpreter Development REQUIRED)
11
+
12
+ add_library(IsoSpecCppPy SHARED ../src/IsoSpec++/unity-build.cpp)
13
+ target_compile_features(IsoSpecCppPy PRIVATE cxx_std_17)
14
+ #python_extension_module(IsoSpecCppPy)
15
+ install(TARGETS IsoSpecCppPy LIBRARY DESTINATION IsoSpecPy)
16
+ install(DIRECTORY ../src/IsoSpec++/ DESTINATION IsoSpecPy/IsoSpec++
17
+ FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp" PATTERN "*.hxx"
18
+ )
@@ -16,6 +16,8 @@
16
16
 
17
17
  #pragma once
18
18
 
19
+ #include "platform.h"
20
+
19
21
  #define ISOSPEC_ALGO_LAYERED 0
20
22
  #define ISOSPEC_ALGO_ORDERED 1
21
23
  #define ISOSPEC_ALGO_THRESHOLD_ABSOLUTE 2
@@ -50,22 +52,6 @@ ISOSPEC_C_API double* getMarginalLogSizeEstimates(void* iso, double target_total
50
52
 
51
53
  ISOSPEC_C_API void deleteIso(void* iso);
52
54
 
53
- #define ISOSPEC_C_FN_HEADER(generatorType, dataType, method)\
54
- ISOSPEC_C_API dataType method##generatorType(void* generator);
55
-
56
- #define ISOSPEC_C_FN_HEADER_GET_CONF_SIGNATURE(generatorType)\
57
- ISOSPEC_C_API void method##generatorType(void* generator);
58
-
59
- #define ISOSPEC_C_FN_HEADERS(generatorType)\
60
- ISOSPEC_C_FN_HEADER(generatorType, double, mass) \
61
- ISOSPEC_C_FN_HEADER(generatorType, double, lprob) \
62
- ISOSPEC_C_FN_HEADER(generatorType, double, prob) \
63
- ISOSPEC_C_FN_HEADER_GET_CONF_SIGNATURE(generatorType) \
64
- ISOSPEC_C_FN_HEADER(generatorType, bool, advanceToNextConfiguration) \
65
- ISOSPEC_C_FN_HEADER(generatorType, void, delete)
66
-
67
-
68
-
69
55
 
70
56
  // ______________________________________________________THRESHOLD GENERATOR
71
57
  ISOSPEC_C_API void* setupIsoThresholdGenerator(void* iso,
@@ -74,7 +60,12 @@ ISOSPEC_C_API void* setupIsoThresholdGenerator(void* iso,
74
60
  int _tabSize,
75
61
  int _hashSize,
76
62
  bool reorder_marginals);
77
- ISOSPEC_C_FN_HEADERS(IsoThresholdGenerator)
63
+ ISOSPEC_C_API double massIsoThresholdGenerator(void* generator);
64
+ ISOSPEC_C_API double lprobIsoThresholdGenerator(void* generator);
65
+ ISOSPEC_C_API double probIsoThresholdGenerator(void* generator);
66
+ ISOSPEC_C_API void get_conf_signatureIsoThresholdGenerator(void* generator, int* space);
67
+ ISOSPEC_C_API bool advanceToNextConfigurationIsoThresholdGenerator(void* generator);
68
+ ISOSPEC_C_API void deleteIsoThresholdGenerator(void* generator);
78
69
 
79
70
 
80
71
  // ______________________________________________________LAYERED GENERATOR
@@ -83,20 +74,35 @@ ISOSPEC_C_API void* setupIsoLayeredGenerator(void* iso,
83
74
  int _hashSize,
84
75
  bool reorder_marginals,
85
76
  double t_prob_hint);
86
- ISOSPEC_C_FN_HEADERS(IsoLayeredGenerator)
77
+ ISOSPEC_C_API double massIsoLayeredGenerator(void* generator);
78
+ ISOSPEC_C_API double lprobIsoLayeredGenerator(void* generator);
79
+ ISOSPEC_C_API double probIsoLayeredGenerator(void* generator);
80
+ ISOSPEC_C_API void get_conf_signatureIsoLayeredGenerator(void* generator, int* space);
81
+ ISOSPEC_C_API bool advanceToNextConfigurationIsoLayeredGenerator(void* generator);
82
+ ISOSPEC_C_API void deleteIsoLayeredGenerator(void* generator);
87
83
 
88
84
  // ______________________________________________________ORDERED GENERATOR
89
85
  ISOSPEC_C_API void* setupIsoOrderedGenerator(void* iso,
90
86
  int _tabSize,
91
87
  int _hashSize);
92
- ISOSPEC_C_FN_HEADERS(IsoOrderedGenerator)
93
-
88
+ ISOSPEC_C_API double massIsoOrderedGenerator(void* generator);
89
+ ISOSPEC_C_API double lprobIsoOrderedGenerator(void* generator);
90
+ ISOSPEC_C_API double probIsoOrderedGenerator(void* generator);
91
+ ISOSPEC_C_API void get_conf_signatureIsoOrderedGenerator(void* generator, int* space);
92
+ ISOSPEC_C_API bool advanceToNextConfigurationIsoOrderedGenerator(void* generator);
93
+ ISOSPEC_C_API void deleteIsoOrderedGenerator(void* generator);
94
+
95
+ // ______________________________________________________STOCHASTIC GENERATOR
94
96
  ISOSPEC_C_API void* setupIsoStochasticGenerator(void* iso,
95
97
  size_t no_molecules,
96
98
  double precision,
97
99
  double beta_bias);
98
- ISOSPEC_C_FN_HEADERS(IsoStochasticGenerator)
99
-
100
+ ISOSPEC_C_API double massIsoStochasticGenerator(void* generator);
101
+ ISOSPEC_C_API double lprobIsoStochasticGenerator(void* generator);
102
+ ISOSPEC_C_API double probIsoStochasticGenerator(void* generator);
103
+ ISOSPEC_C_API void get_conf_signatureIsoStochasticGenerator(void* generator, int* space);
104
+ ISOSPEC_C_API bool advanceToNextConfigurationIsoStochasticGenerator(void* generator);
105
+ ISOSPEC_C_API void deleteIsoStochasticGenerator(void* generator);
100
106
 
101
107
  ISOSPEC_C_API void* setupThresholdFixedEnvelope(void* iso,
102
108
  double threshold,
@@ -143,7 +149,7 @@ ISOSPEC_C_API double orientedWassersteinDistance(void* tabulator1, void* tabulat
143
149
  ISOSPEC_C_API double abyssalWassersteinDistance(void* tabulator1, void* tabulator2, double abyss_depth, double other_scale);
144
150
  //ISOSPEC_C_API double abyssalWassersteinDistanceGrad(void* const* envelopes, const double* scales, double* ret_gradient, size_t N, double abyss_depth_exp, double abyss_depth_the);
145
151
 
146
- ISOSPEC_C_API struct ws_match_res{
152
+ struct ws_match_res{
147
153
  double res1;
148
154
  double res2;
149
155
  double flow;
@@ -23,7 +23,7 @@ namespace IsoSpec
23
23
  extern "C" {
24
24
  #endif
25
25
 
26
- const size_t isospec_number_of_isotopic_entries = ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES;
26
+ const ::size_t isospec_number_of_isotopic_entries = ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES;
27
27
 
28
28
  const int elem_table_ID [ISOSPEC_NUMBER_OF_ISOTOPIC_ENTRIES] = {
29
29
  1,
@@ -18,6 +18,8 @@
18
18
 
19
19
  #include <stddef.h>
20
20
 
21
+ #include "platform.h"
22
+
21
23
  namespace IsoSpec
22
24
  {
23
25
 
@@ -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
@@ -16,6 +16,7 @@
16
16
 
17
17
  #include "fixedEnvelopes.h"
18
18
  #include <limits>
19
+ #include <cassert>
19
20
  #include "isoMath.h"
20
21
 
21
22
  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
  */