# Using Catalyst.jl with large reaction networks

**URL:** https://discourse.julialang.org/t/using-catalyst-jl-with-large-reaction-networks/123061
**Category:** General Usage
**Created:** [November 25, 2024, 10:09pm UTC](https://discourse.julialang.org/t/using-catalyst-jl-with-large-reaction-networks/123061 "2024-11-25T22:09:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tb877](https://avatars.discourse-cdn.com/v4/letter/t/d26b3c/32.png) [@tb877](https://discourse.julialang.org/u/tb877)
#### Post date: [November 25, 2024, 10:09pm UTC](https://discourse.julialang.org/t/using-catalyst-jl-with-large-reaction-networks/123061/1 "2024-11-25T22:09:04Z")

</div>

Hi all,

I’m looking into a way to simulate additive integer chemistry, i.e.

```julia
1+1→2
1+2→3
1+3→4
...
2+2→4
2+3→5
2+4→6
...

```

I’m quite new to Julia, but have noticed that `Catalyst.jl` lets you define `reaction_network` objects of this type. The end goal would be to simulate the reaction network with a Gillespie-type algorithm, which I also know `JumpProcess.jl` implements.

My question is this: a reaction network based on this type of integer chemistry is unbounded, i.e. integers can become arbitrarily large. Is there a way to make these tractable using `Catalyst.jl` ?

---

<div class="post-metadata">

### Author: ![isaacsas](https://avatars.discourse-cdn.com/v4/letter/i/f6c823/32.png) [@isaacsas](https://discourse.julialang.org/u/isaacsas)
#### Post date: [November 26, 2024, 12:45am UTC](https://discourse.julialang.org/t/using-catalyst-jl-with-large-reaction-networks/123061/2 "2024-11-26T00:45:36Z")

</div>

Is your question whether you can encode an infinite system of (structured) reactions with Catalyst? If so, unfortunately not at this time. Catalyst currently requires you to be able to enumerate all possible reactions that can occur (as does JumpProcesses’ Gillespie methods).

It sounds like you want something like a “network-free” method (that is the name often used in systems biology), which tracks each individual particle/chemical’s state and dynamical resolves the current set of possible reactions (which are always finite). That is something we’d like to add to both JumpProcesses and Catalyst, but it doesn’t exist as of now unfortunately. (You could probably put a solver together using JumpProcesses though by building custom `ConstantRateJump`s to handle the reaction logic, but it doesn’t currently have a solver that can dynamically add / remove reactions from the system.)

---

<div class="post-metadata">

### Author: ![tb877](https://avatars.discourse-cdn.com/v4/letter/t/d26b3c/32.png) [@tb877](https://discourse.julialang.org/u/tb877)
#### Post date: [November 29, 2024, 1:27am UTC](https://discourse.julialang.org/t/using-catalyst-jl-with-large-reaction-networks/123061/3 "2024-11-29T01:27:27Z")

</div>

Yes, my question was about encoding an infinite system of reactions: integers get added together, and have no upper bound. So the network is in principle infinite. Sorry if this wasn’t clear, I’m quite new to this. I guess what you describe as a “network-free” approach would be what I’m after, yes.

Too bad it’s not implemented, I would have loved using Catalyst.jl, it seems like an extraordinary well written package!

Thanks for the reply.
