crn-craft 0.2.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 (206) hide show
  1. crn_craft-0.2.0/Cargo.lock +333 -0
  2. crn_craft-0.2.0/Cargo.toml +29 -0
  3. crn_craft-0.2.0/LICENSE +21 -0
  4. crn_craft-0.2.0/PKG-INFO +112 -0
  5. crn_craft-0.2.0/THIRD_PARTY_NOTICES.md +48 -0
  6. crn_craft-0.2.0/bindings/python/Cargo.lock +416 -0
  7. crn_craft-0.2.0/bindings/python/Cargo.toml +17 -0
  8. crn_craft-0.2.0/bindings/python/src/lib.rs +460 -0
  9. crn_craft-0.2.0/bindings/python/src/rules.rs +162 -0
  10. crn_craft-0.2.0/crates/crn-craft/Cargo.toml +29 -0
  11. crn_craft-0.2.0/crates/crn-craft/LICENSE +21 -0
  12. crn_craft-0.2.0/crates/crn-craft/README.md +31 -0
  13. crn_craft-0.2.0/crates/crn-craft/THIRD_PARTY_NOTICES.md +48 -0
  14. crn_craft-0.2.0/crates/crn-craft/build.rs +30 -0
  15. crn_craft-0.2.0/crates/crn-craft/examples/bench_ssa.rs +109 -0
  16. crn_craft-0.2.0/crates/crn-craft/examples/generate_kernel.rs +12 -0
  17. crn_craft-0.2.0/crates/crn-craft/examples/profile_ssa.rs +83 -0
  18. crn_craft-0.2.0/crates/crn-craft/src/analysis.rs +212 -0
  19. crn_craft-0.2.0/crates/crn-craft/src/analysis_v1.rs +161 -0
  20. crn_craft-0.2.0/crates/crn-craft/src/archive.rs +658 -0
  21. crn_craft-0.2.0/crates/crn-craft/src/codegen.rs +89 -0
  22. crn_craft-0.2.0/crates/crn-craft/src/cone.rs +340 -0
  23. crn_craft-0.2.0/crates/crn-craft/src/conservation.rs +358 -0
  24. crn_craft-0.2.0/crates/crn-craft/src/contracts.rs +393 -0
  25. crn_craft-0.2.0/crates/crn-craft/src/diagnostic.rs +80 -0
  26. crn_craft-0.2.0/crates/crn-craft/src/export.rs +229 -0
  27. crn_craft-0.2.0/crates/crn-craft/src/fsp.rs +550 -0
  28. crn_craft-0.2.0/crates/crn-craft/src/kinetics.rs +278 -0
  29. crn_craft-0.2.0/crates/crn-craft/src/lib.rs +512 -0
  30. crn_craft-0.2.0/crates/crn-craft/src/linkage.rs +156 -0
  31. crn_craft-0.2.0/crates/crn-craft/src/network.rs +572 -0
  32. crn_craft-0.2.0/crates/crn-craft/src/next_reaction.rs +94 -0
  33. crn_craft-0.2.0/crates/crn-craft/src/parameters.rs +419 -0
  34. crn_craft-0.2.0/crates/crn-craft/src/rates.rs +505 -0
  35. crn_craft-0.2.0/crates/crn-craft/src/sampling.rs +534 -0
  36. crn_craft-0.2.0/crates/crn-craft/src/simulation.rs +1172 -0
  37. crn_craft-0.2.0/crates/crn-craft/src/ssa/bounds.rs +534 -0
  38. crn_craft-0.2.0/crates/crn-craft/src/ssa/selectors.rs +613 -0
  39. crn_craft-0.2.0/crates/crn-craft/src/ssa/ziggurat.rs +161 -0
  40. crn_craft-0.2.0/crates/crn-craft/src/ssa/ziggurat_tables.rs +779 -0
  41. crn_craft-0.2.0/crates/crn-craft/src/ssa.rs +1234 -0
  42. crn_craft-0.2.0/crates/crn-craft/src/strict_json.rs +210 -0
  43. crn_craft-0.2.0/crates/crn-craft/src/tau.rs +751 -0
  44. crn_craft-0.2.0/crates/crn-craft/src/validate.rs +536 -0
  45. crn_craft-0.2.0/crates/crn-craft/tests/archives.rs +341 -0
  46. crn_craft-0.2.0/crates/crn-craft/tests/contracts.rs +676 -0
  47. crn_craft-0.2.0/crates/crn-craft/tests/fsp.rs +134 -0
  48. crn_craft-0.2.0/crates/crn-craft/tests/kinetics.rs +60 -0
  49. crn_craft-0.2.0/crates/crn-craft/tests/network.rs +657 -0
  50. crn_craft-0.2.0/crates/crn-craft/tests/ssa.rs +676 -0
  51. crn_craft-0.2.0/crates/crn-craft/tests/ssa_alternatives.rs +425 -0
  52. crn_craft-0.2.0/crates/crn-craft/tests/structure.rs +511 -0
  53. crn_craft-0.2.0/crates/crn-craft/tests/tau.rs +144 -0
  54. crn_craft-0.2.0/crates/crn-craft-cli/Cargo.toml +25 -0
  55. crn_craft-0.2.0/crates/crn-craft-cli/LICENSE +21 -0
  56. crn_craft-0.2.0/crates/crn-craft-cli/README.md +22 -0
  57. crn_craft-0.2.0/crates/crn-craft-cli/THIRD_PARTY_NOTICES.md +48 -0
  58. crn_craft-0.2.0/crates/crn-craft-cli/src/main.rs +230 -0
  59. crn_craft-0.2.0/crates/crn-craft-cli/tests/cli.rs +372 -0
  60. crn_craft-0.2.0/crates/crn-craft-rules/Cargo.toml +26 -0
  61. crn_craft-0.2.0/crates/crn-craft-rules/LICENSE +21 -0
  62. crn_craft-0.2.0/crates/crn-craft-rules/README.md +57 -0
  63. crn_craft-0.2.0/crates/crn-craft-rules/THIRD_PARTY_NOTICES.md +48 -0
  64. crn_craft-0.2.0/crates/crn-craft-rules/examples/benchmark_rules.rs +27 -0
  65. crn_craft-0.2.0/crates/crn-craft-rules/examples/generate_rules_kernel.rs +15 -0
  66. crn_craft-0.2.0/crates/crn-craft-rules/examples/generate_rules_loop.rs +15 -0
  67. crn_craft-0.2.0/crates/crn-craft-rules/src/atp.rs +186 -0
  68. crn_craft-0.2.0/crates/crn-craft-rules/src/engine.rs +985 -0
  69. crn_craft-0.2.0/crates/crn-craft-rules/src/expr.rs +1186 -0
  70. crn_craft-0.2.0/crates/crn-craft-rules/src/flat.rs +849 -0
  71. crn_craft-0.2.0/crates/crn-craft-rules/src/flat_path.rs +270 -0
  72. crn_craft-0.2.0/crates/crn-craft-rules/src/generated.rs +297 -0
  73. crn_craft-0.2.0/crates/crn-craft-rules/src/generated_loop.rs +428 -0
  74. crn_craft-0.2.0/crates/crn-craft-rules/src/leap.rs +567 -0
  75. crn_craft-0.2.0/crates/crn-craft-rules/src/lib.rs +2154 -0
  76. crn_craft-0.2.0/crates/crn-craft-rules/src/loop_host.rs +272 -0
  77. crn_craft-0.2.0/crates/crn-craft-rules/src/model.rs +1018 -0
  78. crn_craft-0.2.0/crates/crn-craft-rules/src/mtdna.rs +301 -0
  79. crn_craft-0.2.0/crates/crn-craft-rules/src/mtdna_path.rs +146 -0
  80. crn_craft-0.2.0/crates/crn-craft-rules/src/observe.rs +633 -0
  81. crn_craft-0.2.0/crates/crn-craft-rules/src/tests.rs +693 -0
  82. crn_craft-0.2.0/crates/crn-craft-rules/src/tests_review.rs +563 -0
  83. crn_craft-0.2.0/crates/crn-craft-rules/src/thinning.rs +181 -0
  84. crn_craft-0.2.0/crates/crn-craft-rules/src/tree.rs +386 -0
  85. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/loop_count_range.rules.json +48 -0
  86. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/loop_count_range_loop.rs +70 -0
  87. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/loop_edges_fraction.rules.json +193 -0
  88. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/loop_edges_fraction_loop.rs +265 -0
  89. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/loop_edges_nan.rules.json +193 -0
  90. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/loop_edges_nan_loop.rs +268 -0
  91. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/loop_empty.rules.json +44 -0
  92. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/loop_empty_loop.rs +36 -0
  93. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/loop_invalid_rate.rules.json +68 -0
  94. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/loop_invalid_rate_loop.rs +74 -0
  95. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/loop_overflow.rules.json +56 -0
  96. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/loop_overflow_loop.rs +74 -0
  97. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/loop_pairs.rules.json +103 -0
  98. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/loop_pairs_loop.rs +130 -0
  99. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/loop_resolution.rules.json +86 -0
  100. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/loop_resolution_loop.rs +106 -0
  101. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/loop_stop_operators.rules.json +103 -0
  102. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/loop_stop_operators_loop.rs +130 -0
  103. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/mtdna_three_class_kernel.rs +57 -0
  104. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/mtdna_three_class_stop.rules.json +212 -0
  105. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated/mtdna_three_class_stop_loop.rs +243 -0
  106. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated_kernel.rs +96 -0
  107. crn_craft-0.2.0/crates/crn-craft-rules/tests/generated_loop.rs +569 -0
  108. crn_craft-0.2.0/docs/campaign/M10.md +23 -0
  109. crn_craft-0.2.0/docs/campaign/M3.md +29 -0
  110. crn_craft-0.2.0/docs/campaign/M4a.md +21 -0
  111. crn_craft-0.2.0/docs/campaign/M4b.md +19 -0
  112. crn_craft-0.2.0/docs/campaign/M5.md +26 -0
  113. crn_craft-0.2.0/docs/campaign/M6.md +57 -0
  114. crn_craft-0.2.0/docs/campaign/M7-targets.md +19 -0
  115. crn_craft-0.2.0/docs/campaign/M7.md +87 -0
  116. crn_craft-0.2.0/docs/campaign/M8.md +38 -0
  117. crn_craft-0.2.0/docs/campaign/M9-targets.md +21 -0
  118. crn_craft-0.2.0/docs/campaign/M9.md +30 -0
  119. crn_craft-0.2.0/docs/campaign/README.md +49 -0
  120. crn_craft-0.2.0/docs/campaign/acceptance.md +63 -0
  121. crn_craft-0.2.0/docs/campaign/fast-generic-rules-implementation-log-2026-11-03.md +101 -0
  122. crn_craft-0.2.0/docs/campaign/fast-generic-rules-review-log-2026-11-03.md +83 -0
  123. crn_craft-0.2.0/docs/campaign/fast-implementation-log-2026-11-02.md +144 -0
  124. crn_craft-0.2.0/docs/campaign/generated-loop-followups-log-2026-11-04.md +112 -0
  125. crn_craft-0.2.0/docs/campaign/generated-rules-loop-log-2026-11-03.md +121 -0
  126. crn_craft-0.2.0/docs/campaign/generic-rules-structural-log-2026-11-03.md +92 -0
  127. crn_craft-0.2.0/docs/campaign/implementation-log-2026-11-01.md +206 -0
  128. crn_craft-0.2.0/docs/campaign/julia-gap-implementation-log-2026-11-02.md +130 -0
  129. crn_craft-0.2.0/docs/campaign/julia-gap10-implementation-log-2026-11-02.md +375 -0
  130. crn_craft-0.2.0/docs/campaign/julia-gap10-source-investigation.md +51 -0
  131. crn_craft-0.2.0/docs/campaign/mtdna-a0-a6-implementation-log-2026-11-03.md +226 -0
  132. crn_craft-0.2.0/docs/campaign/mtdna-a0-a6-review-log-2026-11-03.md +111 -0
  133. crn_craft-0.2.0/docs/campaign/performance-p11-p20.md +196 -0
  134. crn_craft-0.2.0/docs/campaign/performance.md +76 -0
  135. crn_craft-0.2.0/docs/campaign/reusable-parameters-implementation-log-2026-11-02.md +219 -0
  136. crn_craft-0.2.0/docs/campaign/review-2026-11-01.md +47 -0
  137. crn_craft-0.2.0/docs/campaign/rules-k1-implementation-log-2026-11-02.md +152 -0
  138. crn_craft-0.2.0/docs/campaign/ssa-acceleration-implementation-log-2026-11-02.md +190 -0
  139. crn_craft-0.2.0/models/analysis/cone-gap.model.json +55 -0
  140. crn_craft-0.2.0/models/examples/enzyme-mechanism.model.json +73 -0
  141. crn_craft-0.2.0/models/examples/enzyme-mechanism.run.json +38 -0
  142. crn_craft-0.2.0/models/examples/immigration-death.fsp.run.json +37 -0
  143. crn_craft-0.2.0/models/examples/immigration-death.model.json +40 -0
  144. crn_craft-0.2.0/models/examples/immigration-death.run.json +38 -0
  145. crn_craft-0.2.0/models/examples/immigration-death.state.json +4 -0
  146. crn_craft-0.2.0/models/examples/michaelis-menten.model.json +37 -0
  147. crn_craft-0.2.0/models/examples/michaelis-menten.run.json +38 -0
  148. crn_craft-0.2.0/models/examples/repressilator.model.json +196 -0
  149. crn_craft-0.2.0/models/examples/repressilator.run.json +38 -0
  150. crn_craft-0.2.0/models/examples/vilar-noise.model.json +274 -0
  151. crn_craft-0.2.0/models/invalid/duplicate-key.model.json +1 -0
  152. crn_craft-0.2.0/models/invalid/duplicate-save-time.run.json +38 -0
  153. crn_craft-0.2.0/models/invalid/duplicate-species.model.json +44 -0
  154. crn_craft-0.2.0/models/invalid/expected.json +93 -0
  155. crn_craft-0.2.0/models/invalid/hash-mismatch.run.json +38 -0
  156. crn_craft-0.2.0/models/invalid/missing-fsp-bound.run.json +35 -0
  157. crn_craft-0.2.0/models/invalid/missing-parameter.model.json +40 -0
  158. crn_craft-0.2.0/models/invalid/model.json +40 -0
  159. crn_craft-0.2.0/models/invalid/negative-count.model.json +40 -0
  160. crn_craft-0.2.0/models/invalid/negative-stoichiometry.model.json +40 -0
  161. crn_craft-0.2.0/models/invalid/nonfinite-number.model.json +1 -0
  162. crn_craft-0.2.0/models/invalid/parent-path.run.json +38 -0
  163. crn_craft-0.2.0/models/invalid/unknown-species.model.json +40 -0
  164. crn_craft-0.2.0/models/invalid/unsupported-expression-reference.model.json +40 -0
  165. crn_craft-0.2.0/models/invalid/wrong-convention.model.json +40 -0
  166. crn_craft-0.2.0/models/rules/aggregation-constant.rules.json +64 -0
  167. crn_craft-0.2.0/models/rules/aggregation-multiplicative.rules.json +66 -0
  168. crn_craft-0.2.0/models/rules/immigration-death.rules.json +44 -0
  169. crn_craft-0.2.0/models/rules/immigration-dimerization.rules.json +48 -0
  170. crn_craft-0.2.0/models/rules/mtdna-fixed.rules.json +121 -0
  171. crn_craft-0.2.0/models/rules/mtdna-three-class-atp.rules.json +223 -0
  172. crn_craft-0.2.0/models/rules/mtdna-three-class-cme.rules.json +211 -0
  173. crn_craft-0.2.0/models/rules/mtdna-three-class.rules.json +211 -0
  174. crn_craft-0.2.0/pyproject.toml +55 -0
  175. crn_craft-0.2.0/python/README.md +83 -0
  176. crn_craft-0.2.0/python/crn_craft/__init__.py +364 -0
  177. crn_craft-0.2.0/python/crn_craft/__main__.py +128 -0
  178. crn_craft-0.2.0/python/crn_craft/importers.py +628 -0
  179. crn_craft-0.2.0/python/crn_craft/models/enzyme-mechanism.model.json +73 -0
  180. crn_craft-0.2.0/python/crn_craft/models/immigration-death.model.json +40 -0
  181. crn_craft-0.2.0/python/crn_craft/models/michaelis-menten.model.json +37 -0
  182. crn_craft-0.2.0/python/crn_craft/models/repressilator.model.json +196 -0
  183. crn_craft-0.2.0/python/crn_craft/models/vilar-noise.model.json +274 -0
  184. crn_craft-0.2.0/python/crn_craft/observables.py +112 -0
  185. crn_craft-0.2.0/python/crn_craft/rules.py +238 -0
  186. crn_craft-0.2.0/schemas/analysis-v1.schema.json +327 -0
  187. crn_craft-0.2.0/schemas/analysis.schema.json +536 -0
  188. crn_craft-0.2.0/schemas/archive-check.schema.json +140 -0
  189. crn_craft-0.2.0/schemas/archive.schema.json +58 -0
  190. crn_craft-0.2.0/schemas/check.schema.json +96 -0
  191. crn_craft-0.2.0/schemas/export.schema.json +149 -0
  192. crn_craft-0.2.0/schemas/fsp-result.schema.json +159 -0
  193. crn_craft-0.2.0/schemas/model.schema.json +279 -0
  194. crn_craft-0.2.0/schemas/result-v1.schema.json +118 -0
  195. crn_craft-0.2.0/schemas/result.schema.json +332 -0
  196. crn_craft-0.2.0/schemas/rules-check.schema.json +85 -0
  197. crn_craft-0.2.0/schemas/rules-model.schema.json +391 -0
  198. crn_craft-0.2.0/schemas/rules-result.schema.json +728 -0
  199. crn_craft-0.2.0/schemas/rules-run.schema.json +430 -0
  200. crn_craft-0.2.0/schemas/run.schema.json +266 -0
  201. crn_craft-0.2.0/schemas/ssa-result.schema.json +475 -0
  202. crn_craft-0.2.0/schemas/ssa-run.schema.json +273 -0
  203. crn_craft-0.2.0/schemas/state.schema.json +33 -0
  204. crn_craft-0.2.0/schemas/tau-request.schema.json +303 -0
  205. crn_craft-0.2.0/schemas/tau-result.schema.json +322 -0
  206. crn_craft-0.2.0/validation/rng-vectors.json +419 -0
@@ -0,0 +1,333 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "block-buffer"
7
+ version = "0.10.4"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
10
+ dependencies = [
11
+ "generic-array",
12
+ ]
13
+
14
+ [[package]]
15
+ name = "cfg-if"
16
+ version = "1.0.5"
17
+ source = "registry+https://github.com/rust-lang/crates.io-index"
18
+ checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
19
+
20
+ [[package]]
21
+ name = "cpufeatures"
22
+ version = "0.2.17"
23
+ source = "registry+https://github.com/rust-lang/crates.io-index"
24
+ checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
25
+ dependencies = [
26
+ "libc",
27
+ ]
28
+
29
+ [[package]]
30
+ name = "crn-craft"
31
+ version = "0.2.0"
32
+ dependencies = [
33
+ "libm",
34
+ "rand_chacha",
35
+ "rand_core",
36
+ "schemars",
37
+ "serde",
38
+ "serde_json",
39
+ "serde_path_to_error",
40
+ "sha2",
41
+ ]
42
+
43
+ [[package]]
44
+ name = "crn-craft-cli"
45
+ version = "0.2.0"
46
+ dependencies = [
47
+ "crn-craft",
48
+ "crn-craft-rules",
49
+ "serde_json",
50
+ ]
51
+
52
+ [[package]]
53
+ name = "crn-craft-rules"
54
+ version = "0.2.0"
55
+ dependencies = [
56
+ "crn-craft",
57
+ "libm",
58
+ "rand_chacha",
59
+ "rand_core",
60
+ "schemars",
61
+ "serde",
62
+ "serde_json",
63
+ "sha2",
64
+ ]
65
+
66
+ [[package]]
67
+ name = "crypto-common"
68
+ version = "0.1.7"
69
+ source = "registry+https://github.com/rust-lang/crates.io-index"
70
+ checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
71
+ dependencies = [
72
+ "generic-array",
73
+ "typenum",
74
+ ]
75
+
76
+ [[package]]
77
+ name = "digest"
78
+ version = "0.10.7"
79
+ source = "registry+https://github.com/rust-lang/crates.io-index"
80
+ checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
81
+ dependencies = [
82
+ "block-buffer",
83
+ "crypto-common",
84
+ ]
85
+
86
+ [[package]]
87
+ name = "dyn-clone"
88
+ version = "1.0.20"
89
+ source = "registry+https://github.com/rust-lang/crates.io-index"
90
+ checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"
91
+
92
+ [[package]]
93
+ name = "generic-array"
94
+ version = "0.14.7"
95
+ source = "registry+https://github.com/rust-lang/crates.io-index"
96
+ checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
97
+ dependencies = [
98
+ "typenum",
99
+ "version_check",
100
+ ]
101
+
102
+ [[package]]
103
+ name = "itoa"
104
+ version = "1.0.18"
105
+ source = "registry+https://github.com/rust-lang/crates.io-index"
106
+ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
107
+
108
+ [[package]]
109
+ name = "libc"
110
+ version = "0.2.191"
111
+ source = "registry+https://github.com/rust-lang/crates.io-index"
112
+ checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
113
+
114
+ [[package]]
115
+ name = "libm"
116
+ version = "0.2.15"
117
+ source = "registry+https://github.com/rust-lang/crates.io-index"
118
+ checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de"
119
+
120
+ [[package]]
121
+ name = "memchr"
122
+ version = "2.8.3"
123
+ source = "registry+https://github.com/rust-lang/crates.io-index"
124
+ checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
125
+
126
+ [[package]]
127
+ name = "ppv-lite86"
128
+ version = "0.2.21"
129
+ source = "registry+https://github.com/rust-lang/crates.io-index"
130
+ checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
131
+ dependencies = [
132
+ "zerocopy",
133
+ ]
134
+
135
+ [[package]]
136
+ name = "proc-macro2"
137
+ version = "1.0.107"
138
+ source = "registry+https://github.com/rust-lang/crates.io-index"
139
+ checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
140
+ dependencies = [
141
+ "unicode-ident",
142
+ ]
143
+
144
+ [[package]]
145
+ name = "quote"
146
+ version = "1.0.47"
147
+ source = "registry+https://github.com/rust-lang/crates.io-index"
148
+ checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
149
+ dependencies = [
150
+ "proc-macro2",
151
+ ]
152
+
153
+ [[package]]
154
+ name = "rand_chacha"
155
+ version = "0.3.1"
156
+ source = "registry+https://github.com/rust-lang/crates.io-index"
157
+ checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
158
+ dependencies = [
159
+ "ppv-lite86",
160
+ "rand_core",
161
+ ]
162
+
163
+ [[package]]
164
+ name = "rand_core"
165
+ version = "0.6.4"
166
+ source = "registry+https://github.com/rust-lang/crates.io-index"
167
+ checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
168
+
169
+ [[package]]
170
+ name = "schemars"
171
+ version = "0.8.22"
172
+ source = "registry+https://github.com/rust-lang/crates.io-index"
173
+ checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615"
174
+ dependencies = [
175
+ "dyn-clone",
176
+ "schemars_derive",
177
+ "serde",
178
+ "serde_json",
179
+ ]
180
+
181
+ [[package]]
182
+ name = "schemars_derive"
183
+ version = "0.8.22"
184
+ source = "registry+https://github.com/rust-lang/crates.io-index"
185
+ checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d"
186
+ dependencies = [
187
+ "proc-macro2",
188
+ "quote",
189
+ "serde_derive_internals",
190
+ "syn 2.0.119",
191
+ ]
192
+
193
+ [[package]]
194
+ name = "serde"
195
+ version = "1.0.229"
196
+ source = "registry+https://github.com/rust-lang/crates.io-index"
197
+ checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
198
+ dependencies = [
199
+ "serde_core",
200
+ "serde_derive",
201
+ ]
202
+
203
+ [[package]]
204
+ name = "serde_core"
205
+ version = "1.0.229"
206
+ source = "registry+https://github.com/rust-lang/crates.io-index"
207
+ checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
208
+ dependencies = [
209
+ "serde_derive",
210
+ ]
211
+
212
+ [[package]]
213
+ name = "serde_derive"
214
+ version = "1.0.229"
215
+ source = "registry+https://github.com/rust-lang/crates.io-index"
216
+ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
217
+ dependencies = [
218
+ "proc-macro2",
219
+ "quote",
220
+ "syn 3.0.9",
221
+ ]
222
+
223
+ [[package]]
224
+ name = "serde_derive_internals"
225
+ version = "0.29.1"
226
+ source = "registry+https://github.com/rust-lang/crates.io-index"
227
+ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
228
+ dependencies = [
229
+ "proc-macro2",
230
+ "quote",
231
+ "syn 2.0.119",
232
+ ]
233
+
234
+ [[package]]
235
+ name = "serde_json"
236
+ version = "1.0.154"
237
+ source = "registry+https://github.com/rust-lang/crates.io-index"
238
+ checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6"
239
+ dependencies = [
240
+ "itoa",
241
+ "memchr",
242
+ "serde",
243
+ "serde_core",
244
+ "zmij",
245
+ ]
246
+
247
+ [[package]]
248
+ name = "serde_path_to_error"
249
+ version = "0.1.20"
250
+ source = "registry+https://github.com/rust-lang/crates.io-index"
251
+ checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457"
252
+ dependencies = [
253
+ "itoa",
254
+ "serde",
255
+ "serde_core",
256
+ ]
257
+
258
+ [[package]]
259
+ name = "sha2"
260
+ version = "0.10.9"
261
+ source = "registry+https://github.com/rust-lang/crates.io-index"
262
+ checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
263
+ dependencies = [
264
+ "cfg-if",
265
+ "cpufeatures",
266
+ "digest",
267
+ ]
268
+
269
+ [[package]]
270
+ name = "syn"
271
+ version = "2.0.119"
272
+ source = "registry+https://github.com/rust-lang/crates.io-index"
273
+ checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
274
+ dependencies = [
275
+ "proc-macro2",
276
+ "quote",
277
+ "unicode-ident",
278
+ ]
279
+
280
+ [[package]]
281
+ name = "syn"
282
+ version = "3.0.9"
283
+ source = "registry+https://github.com/rust-lang/crates.io-index"
284
+ checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b"
285
+ dependencies = [
286
+ "proc-macro2",
287
+ "quote",
288
+ "unicode-ident",
289
+ ]
290
+
291
+ [[package]]
292
+ name = "typenum"
293
+ version = "1.20.1"
294
+ source = "registry+https://github.com/rust-lang/crates.io-index"
295
+ checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
296
+
297
+ [[package]]
298
+ name = "unicode-ident"
299
+ version = "1.0.27"
300
+ source = "registry+https://github.com/rust-lang/crates.io-index"
301
+ checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
302
+
303
+ [[package]]
304
+ name = "version_check"
305
+ version = "0.9.5"
306
+ source = "registry+https://github.com/rust-lang/crates.io-index"
307
+ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
308
+
309
+ [[package]]
310
+ name = "zerocopy"
311
+ version = "0.8.63"
312
+ source = "registry+https://github.com/rust-lang/crates.io-index"
313
+ checksum = "e5fe1f8f1b06191a00962174c61aa5005e0bb391a6d80d07e24d115c01a92ed8"
314
+ dependencies = [
315
+ "zerocopy-derive",
316
+ ]
317
+
318
+ [[package]]
319
+ name = "zerocopy-derive"
320
+ version = "0.8.63"
321
+ source = "registry+https://github.com/rust-lang/crates.io-index"
322
+ checksum = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f"
323
+ dependencies = [
324
+ "proc-macro2",
325
+ "quote",
326
+ "syn 2.0.119",
327
+ ]
328
+
329
+ [[package]]
330
+ name = "zmij"
331
+ version = "1.0.23"
332
+ source = "registry+https://github.com/rust-lang/crates.io-index"
333
+ checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
@@ -0,0 +1,29 @@
1
+ [workspace]
2
+ members = ["crates/crn-craft", "crates/crn-craft-cli", "crates/crn-craft-rules"]
3
+ resolver = "3"
4
+
5
+ [workspace.package]
6
+ version = "0.2.0"
7
+ edition = "2024"
8
+ rust-version = "1.85"
9
+ license = "MIT"
10
+ repository = "https://github.com/dietmarwo/CRN-craft"
11
+ homepage = "https://github.com/dietmarwo/CRN-craft"
12
+ keywords = ["reaction-network", "gillespie", "ssa", "stochastic", "simulation"]
13
+ categories = ["science", "simulation"]
14
+
15
+ [workspace.dependencies]
16
+ serde = { version = "=1.0.229", features = ["derive"] }
17
+ # float_roundtrip: decimal literals parse to the correctly rounded double.
18
+ serde_json = { version = "=1.0.154", features = ["float_roundtrip"] }
19
+ serde_path_to_error = "=0.1.20"
20
+ schemars = "=0.8.22"
21
+ sha2 = "=0.10.9"
22
+ libm = "=0.2.15"
23
+ rand_chacha = { version = "=0.3.1", default-features = false, features = ["std"] }
24
+ rand_core = { version = "=0.6.4", default-features = false }
25
+ crn-craft = { path = "crates/crn-craft", version = "0.2.0" }
26
+ crn-craft-rules = { path = "crates/crn-craft-rules", version = "0.2.0" }
27
+
28
+ [workspace.lints.rust]
29
+ unsafe_code = "forbid"
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dietmar Wolz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,112 @@
1
+ Metadata-Version: 2.4
2
+ Name: crn-craft
3
+ Version: 0.2.0
4
+ Classifier: Development Status :: 3 - Alpha
5
+ Classifier: Intended Audience :: Science/Research
6
+ Classifier: Programming Language :: Python :: 3
7
+ Classifier: Programming Language :: Rust
8
+ Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
9
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
10
+ Requires-Dist: numpy>=1.24,<3
11
+ Requires-Dist: scipy==1.17.0 ; extra == 'fit'
12
+ Requires-Dist: fcmaes-rust==0.2.1 ; extra == 'fit'
13
+ Requires-Dist: sqp-craft==0.17.0 ; extra == 'fit'
14
+ Provides-Extra: fit
15
+ License-File: LICENSE
16
+ License-File: THIRD_PARTY_NOTICES.md
17
+ Summary: Reproducible well-mixed reaction network simulation and analysis
18
+ Keywords: chemical reaction networks,stochastic simulation,Gillespie,SSA,systems biology,Rust
19
+ License-Expression: MIT
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
22
+ Project-URL: Documentation, https://github.com/dietmarwo/CRN-craft/blob/main/docs/tutorial.md
23
+ Project-URL: Issues, https://github.com/dietmarwo/CRN-craft/issues
24
+ Project-URL: Changelog, https://github.com/dietmarwo/CRN-craft/blob/main/CHANGELOG.md
25
+ Project-URL: Optimization ecosystem, https://dietmarwo.github.io/optimization-jobs/
26
+ Project-URL: AI agent guide, https://github.com/dietmarwo/CRN-craft/blob/main/docs/ai-context.md
27
+ Project-URL: Repository, https://github.com/dietmarwo/CRN-craft
28
+
29
+ # CRN-craft
30
+
31
+ ![CRN-craft: chemical reaction networks in native Rust with stochastic simulation](https://raw.githubusercontent.com/dietmarwo/CRN-craft/main/docs/images/crn-craft-banner.jpg)
32
+
33
+ Reproducible simulation and analysis of well-mixed chemical reaction networks,
34
+ with a native Rust core. Models, requests and results are versioned JSON
35
+ documents with strict input checks, explicit budgets and replayable seeds.
36
+
37
+ ```bash
38
+ pip install crn-craft
39
+ ```
40
+
41
+ Wheels for CPython 3.10 and newer (stable ABI) on Linux x86_64, Windows x64
42
+ and macOS (x86_64 and arm64); other platforms build from the source
43
+ distribution with a Rust toolchain.
44
+
45
+ ## Example
46
+
47
+ Immigration–death (birth rate 4, death rate 0.2, starting from zero) has a
48
+ Poisson law with mean `20 (1 - exp(-0.2 t))`: 12.64 at t = 5 and 17.29 at
49
+ t = 10.
50
+
51
+ ```python
52
+ import crn_craft as crn
53
+
54
+ model = crn.load_example("immigration-death")
55
+ request = crn.ssa_spec(
56
+ model, end=10.0, save_times=[0.0, 5.0, 10.0], replicates=1000, seed=1
57
+ )
58
+ result = crn.simulate_ssa(model, request)
59
+ print(result["sampler"])
60
+ print(result["statistics"]["mean"], result["statistics"]["mean_standard_error"])
61
+ ```
62
+
63
+ ```text
64
+ xoshiro256pp-u53/direct_cr/inverse/fast-1
65
+ [[0.0], [12.618], [17.22500000000001]] [[0.0], [0.10959967193421745], [0.13107843665743252]]
66
+ ```
67
+
68
+ Both means lie within one standard error of the exact values. The same seed
69
+ gives the same result on every run and for every thread count.
70
+
71
+ ## What is included
72
+
73
+ - Exact stochastic simulation: `direct`, `cached_direct`, `direct_cr`,
74
+ `sorting_direct` and `rssa_cr`, with inverse or Ziggurat waiting times.
75
+ `fast` (the default) emulates JumpProcesses.jl; `fast=False` selects the
76
+ checked policy, which rejects lost increments and channels below the 53-bit
77
+ selection resolution.
78
+ - Prepared simulations and reusable parameter templates for optimization
79
+ loops (`crn.prepare_ssa`, `crn.prepare_parameters`).
80
+ - Sparse finite state projection (`crn.fsp`), explicitly approximate Poisson
81
+ leaping (`crn.tau`), network analysis and conservation checks.
82
+ - Strict SBML and BioNetGen import subsets (`crn-craft-import`) and the
83
+ `crn-craft` command for archives, verification and export.
84
+ - `pip install "crn-craft[fit]"` adds the pinned SciPy, fcmaes-rust and
85
+ SQP-craft versions used by the fitting examples.
86
+
87
+ The rules engine for dynamic, attributed species is in the wheel as
88
+ `crn_craft.rules`: prepared parallel ensembles, trackers, event logs and
89
+ callbacks, and the mtDNA methods; see the
90
+ [mtDNA user manual](https://github.com/dietmarwo/CRN-craft/blob/main/docs/mtdna-user-manual.md).
91
+ Its command-line tools (`rules-check`, `rules`) are in the native CLI
92
+ (`cargo install crn-craft-cli --locked`, crates
93
+ [crn-craft](https://crates.io/crates/crn-craft) and
94
+ [crn-craft-rules](https://crates.io/crates/crn-craft-rules)), which installs a
95
+ `crn-craft` command of the same name as the wheel's. The optional diffsol BDF
96
+ integrator with forward sensitivities and the job worker for
97
+ [optimization-jobs](https://github.com/dietmarwo/optimization-jobs) build from
98
+ the repository and are not part of the wheel.
99
+
100
+ ## Documentation
101
+
102
+ - [Repository and README](https://github.com/dietmarwo/CRN-craft)
103
+ - [Tutorial](https://github.com/dietmarwo/CRN-craft/blob/main/docs/tutorial.md)
104
+ - [Alternative exact SSA methods and the `fast` switch](https://github.com/dietmarwo/CRN-craft/blob/main/docs/alternative-ssa.md)
105
+ - [Optimization tutorials C1–C4](https://github.com/dietmarwo/CRN-craft/blob/main/tutorials/optimization/README.md)
106
+ - [Agent context](https://github.com/dietmarwo/CRN-craft/blob/main/docs/ai-context.md)
107
+ - [Changelog](https://github.com/dietmarwo/CRN-craft/blob/main/CHANGELOG.md)
108
+
109
+ A successful numerical run is not biological validation. MIT licensed; see
110
+ [THIRD_PARTY_NOTICES.md](https://github.com/dietmarwo/CRN-craft/blob/main/THIRD_PARTY_NOTICES.md)
111
+ for the Ziggurat tables adapted from Julia.
112
+
@@ -0,0 +1,48 @@
1
+ # Third-party notices
2
+
3
+ ## Exponential Ziggurat sampler
4
+
5
+ The exponential tables and algorithm in `crates/crn-craft/src/ssa/ziggurat*`
6
+ are adapted from Julia 1.13.3, `stdlib/Random/src/normal.jl`. The adaptation
7
+ uses CRN-craft random streams, explicit work/cancellation checks, iterative
8
+ rejection and strict positive-wait checks; it does not promise Julia RNG replay.
9
+
10
+ Upstream: https://github.com/JuliaLang/julia/blob/v1.13.3/stdlib/Random/src/normal.jl
11
+
12
+ MIT License
13
+
14
+ Copyright (c) 2009-2025: Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and other contributors: https://github.com/JuliaLang/julia/contributors
15
+
16
+ Permission is hereby granted, free of charge, to any person obtaining
17
+ a copy of this software and associated documentation files (the
18
+ "Software"), to deal in the Software without restriction, including
19
+ without limitation the rights to use, copy, modify, merge, publish,
20
+ distribute, sublicense, and/or sell copies of the Software, and to
21
+ permit persons to whom the Software is furnished to do so, subject to
22
+ the following conditions:
23
+
24
+ The above copyright notice and this permission notice shall be
25
+ included in all copies or substantial portions of the Software.
26
+
27
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
28
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
29
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
30
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
31
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
32
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
33
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34
+
35
+ end of terms and conditions
36
+
37
+ [Julia's LICENSE.md ends with a pointer to its own THIRDPARTY.md, which
38
+ covers other software in the Julia repository; none of it is used here.]
39
+
40
+ ## Optional parameter-optimization references
41
+
42
+ The isolated `validation/parameter-optimization/worker` workspace uses rebop
43
+ 0.10.0 as an optional benchmark reference. Its generated wrappers invoke the
44
+ upstream macro API; it is not a dependency or implementation of the default
45
+ CRN-craft engine. The upstream MIT notice is preserved in
46
+ `validation/parameter-optimization/REBOP_LICENSE.txt`. Cargo.lock pins its
47
+ reference dependencies. Python fcmaes-rust/rebop dependencies are separately
48
+ listed in that directory's requirements file.