Catalyst.jl icon indicating copy to clipboard operation
Catalyst.jl copied to clipboard

Representing Spatial Reaction Networks

Open isaacsas opened this issue 5 years ago • 3 comments

Issues to consider

  • representing continuous domains and BCs
  • Unstructured vs structured grids for spatial domains and graph geometries
  • BCs
  • simply reusing one reaction network everywhere vs allowing spatially varying rates
  • species dependent transition rates, allowing them to be spatially varying?
  • spatial reactions i.e. A_i + B_j -> C_k + D_l and such.

isaacsas avatar Jul 21 '20 16:07 isaacsas

Talking about epidemiological modeling, it could be also nice to take into account the possibility of having some ways to specify compartments. Say we have a simple SIR model, with I = {I_1,I_2,...,I_n}, instead of writing all the reactions "by hand" (which in this case is doable), there could be the possibility to let the user specify all the "type" of reactions that he wants, which rates etc and then call the @reaction_network macro with this information to build the network.
I am currently working on a proof of concept using catalyst for this, maybe I can provide some code in the near future to help brainstorming. As discussed with isaacsas on slack, this could be related to "spatial" information of the network.

ludoro avatar Sep 17 '20 12:09 ludoro

Some modalities to consider:

  • Reactions on graphs or meshes; given an implicit or explicit connectivity (i.e. a graph / adj. matrix) allow users to specify several types of reactions on graphs: a. First order "spatial" transitions between nodes, i.e. S_i -> S_j where i and j denote different nodes / mesh cells / compartments. These are usually restricted to i and j that are neighbors. b. Non-spatial reactions that are replicated at each node, i.e. A_i + B_i <-> C_i, A_i <-> B_i, 0 <-> A_i, etc, at all nodes, i. Here we should support isotropic rates and varying rates that depend on i. c. Spatial interactions A_i + B_j <-> C_k for different nodes, i, j, k. An important point here is that such reactions might be desired for sites that are not nearest neighbors in the spatial transition sense (a. above). i.e. we either want a separate graph for neighbors for these types of reactions, or to allow non-neighbor interactions.

isaacsas avatar Sep 21 '20 13:09 isaacsas

Would it make sense to allow an arbitrary number of graphs to be in the input, and then reactions could use "neighbours" through any select graph?

In the case of a system where one has reactions using neighbours and neighbours neighbours, there's one graph associated with each type. That way one could avoid having to handle various weird connection schemes, and leave it to the users to come up with a way of producing the appropriate graphs for their desired type? (possibly adding a helper method for producing common graphs, like neighbours neighbours, from a given one)

Never really doing much spatial stuff and not to sure about this stuff, but just throwing it out there.

TorkelE avatar Sep 21 '20 21:09 TorkelE

(Simple) spatial models are currently possible. I have also created an issue for gathering future steps for improving spatial implementations at: https://github.com/SciML/Catalyst.jl/issues/726. Would it make sense to close this and gather future spatial discussions there?

TorkelE avatar Dec 03 '23 00:12 TorkelE

Stuff from here is now intergrated to https://github.com/SciML/Catalyst.jl/issues/726

TorkelE avatar Dec 04 '23 17:12 TorkelE