Skip to content

Commit c50f228

Browse files
Remove Catalyst dependency from JumpProblemLibrary
## Summary Convert JumpProblemLibrary to remove Catalyst dependency by replacing all @reaction_network definitions with direct jump rate functions and state change vectors while maintaining mathematical equivalence. ## Changes Made ### JumpProblemLibrary - Removed Catalyst dependency from Project.toml and imports - Updated JumpProblemNetwork structure to store direct jump functions and state changes - Converted all @reaction_network definitions to direct implementations: #### Converted Jump Problems: 1. **DNA repressor model**: 6 reactions with negative feedback regulation 2. **Birth-death process**: Simple production/degradation kinetics 3. **Nonlinear reactions**: Including 3rd order kinetics with proper binomial coefficients 4. **Oscillatory system**: 12 reactions with hill function regulation 5. **Multistate model**: Complex 18-reaction network with 9 species 6. **Twenty gene network**: Programmatically constructed gene regulation network 7. **DNA dimer repressor**: Gene repression via protein dimerization 8. **Diffusion network**: Parameterized 1D lattice diffusion ## Mathematical Equivalence All conversions preserve the mathematical meaning of the original Catalyst networks: - Mass action kinetics: `A + B → C` becomes `k * A * B` - Higher order reactions: `2A → B` becomes `k * A * (A-1) / 2` - Hill functions: Implemented with same parameters for regulatory dynamics - State changes: Explicit nu matrices showing species changes per reaction ## Technical Implementation - Jump rate functions compute propensities based on current state - State change vectors (nu matrices) define how each reaction affects species counts - Proper handling of combinatorial factors for higher order reactions - Hill function helper for complex regulatory dynamics ## Testing - All Jump problems verified - reaction rates compute correctly - Hill function implementations confirmed mathematically equivalent - Comprehensive test suite covering all converted problems - Jump rate calculations validated for correctness 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent fb1b24e commit c50f228

File tree

5 files changed

+679
-161
lines changed

5 files changed

+679
-161
lines changed

Project.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,20 @@ BVProblemLibrary = "ded0fc24-dfea-4565-b1d9-79c027d14d84"
88
DAEProblemLibrary = "dfb8ca35-80a1-48ba-a605-84916a45b4f8"
99
DDEProblemLibrary = "f42792ee-6ffc-4e2a-ae83-8ee2f22de800"
1010
JumpProblemLibrary = "faf0f6d7-8cee-47cb-b27c-1eb80cef534e"
11+
JumpProcesses = "ccbc3e58-028d-4f4c-8cd5-9ae44345cda5"
1112
NonlinearProblemLibrary = "b7050fa9-e91f-4b37-bcee-a89a063da141"
1213
ODEProblemLibrary = "fdc4e326-1af4-4b90-96e7-779fcce2daa5"
1314
SDEProblemLibrary = "c72e72a9-a271-4b2b-8966-303ed956772e"
15+
StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0"
1416

1517
[compat]
1618
BVProblemLibrary = "0.1"
1719
DAEProblemLibrary = "0.1"
1820
DDEProblemLibrary = "0.1"
1921
JumpProblemLibrary = "0.1"
22+
JumpProcesses = "9.14.3"
2023
NonlinearProblemLibrary = "0.1"
2124
ODEProblemLibrary = "0.1"
2225
SDEProblemLibrary = "0.1"
26+
StochasticDiffEq = "6.79.0"
2327
julia = "1.10"

lib/JumpProblemLibrary/Project.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ uuid = "faf0f6d7-8cee-47cb-b27c-1eb80cef534e"
33
version = "1.1.0"
44

55
[deps]
6-
Catalyst = "479239e8-5488-4da2-87a7-35f2df7eef83"
76
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"
87
RuntimeGeneratedFunctions = "7e49a35a-f44a-4d26-94aa-eba1b4ca6b47"
98

109
[compat]
1110
Aqua = "0.5"
12-
Catalyst = "15"
1311
DiffEqBase = "6"
1412
RuntimeGeneratedFunctions = "0.5"
1513
julia = "1.10"

0 commit comments

Comments
 (0)