SciML / Catalyst.jl

Chemical reaction network and systems biology interface for scientific machine learning (SciML). High performance, GPU-parallelized, and O(1) solvers in open source software.
https://docs.sciml.ai/Catalyst/stable/
Other
443 stars 71 forks source link

Obtaining a reaction network from the system of differential equations #259

Open yewalenikhil65 opened 3 years ago

yewalenikhil65 commented 3 years ago

This question is out of a curiosity, As the documentation says , odesys = convert(ODESystem, repressilator) will convert a reaction network called repressilator to a system of ODEs.

Is it possible to do reverse using Catalyst ? obtain the reaction network of species from an ODEsystem ?

isaacsas commented 3 years ago

Not at the moment, but this is certainly a feature we could think about.

yewalenikhil65 commented 3 years ago

That would be great. Thank you sir!

isaacsas commented 3 years ago

Let's keep this open so this stays on our radar.

yewalenikhil65 commented 3 years ago

I think following mentioned model might be useful for this issue as a reference

  1. MOCCASIN: converting MATLAB ODE models to SBML https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4908318/

  2. https://www.sciencedirect.com/science/article/pii/S0304397514006197#se0020

yewalenikhil65 commented 3 years ago

Hi @isaacsas This fails if I try solving it using GIllespie SSAStepper() as I think jump/gillespie problems require only reaction functions to work ?

Linking and commenting the same issue here as I think it is related to this issue also somehow (converting ODEs to reaction network). May help in future

isaacsas commented 3 years ago

To use SSAStepper you need to describe your system as a collection of (constant rate) jumps, not as the derivative function you give the ODEs. It can't take an arbitrary function that represents the RHS of an ODE and decompose it into a collection of jumps for you. Some things that can be represented in an ODE are fundamentally not representable as a jump within a Poisson process (for example, a time-dependent forcing function that you apply to a system).

That said, can't you formulate the coagulation model as a jump process to begin with?

yewalenikhil65 commented 3 years ago

Commenting on original issue to continue