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
463 stars 78 forks source link

Deficiency theorem zero applied to the reaction network #410

Closed yewalenikhil65 closed 4 months ago

yewalenikhil65 commented 3 years ago

Quoting from M. Feinberg, Foundations of Chemical Reaction Network Theory, Applied Mathematical Sciences 202, https://doi.org/10.1007/978-3-030-03858-8_7 Deficiency zero theorem:

Theorem 7.1.1 (The Deficiency Zero Theorem). Let {S ,C ,R (species, complexes and reactions)} be a reaction network of deficiency zero. (i) If the network is not weakly reversible, then, for an arbitrary kinetics K, the differential equations for the kinetic system {S ,C,R, K } cannot admit a positive equilibrium, nor can they admit a cyclic composition trajectory containing a composition at which all species concentrations are positive. (ii) If the network is weakly reversible (in particular, if it is reversible) and the kinetics is mass action, then, regardless of rate constant values, the resulting differential equations have the following properties: There exists within each positive stoichiometric compatibility class precisely one equilibrium; that equilibrium is asymptotically stable, and there cannot exist a nontrivial cyclic composition trajectory along which all species concentrations are positive.

There is also deficiency one theorem, but let's focus on this first. @isaacsas do you recommend, to add the summarize function along these lines? like, to check if network has deficiency zero or not, and checking if it's weakly reversible, and then some form of output that comments on positive equilibrium / unique positive equilibrium?

isaacsas commented 3 years ago

I think we need a bit of thought about how we want to handle this (i.e. maybe we should be storing all the network properties within some object and just passing it around -- that would simplify the interface on them). So let's hold off on summarize for the moment while I think about that.

Could you put together a nice tutorial showing how to use all the new functions, along with graphs illustrating what they are calculating? (Just make sure to pick a system with a mix of reactions and multiple LCs.)

yewalenikhil65 commented 3 years ago

Could you put together a nice tutorial showing how to use all the new functions, along with graphs illustrating what they are calculating? (Just make sure to pick a system with a mix of reactions and multiple LCs.)

Would building upon this topic as a tutorial make sense ? https://github.com/yewalenikhil65/Catalyst.jl/discussions/2

isaacsas commented 3 years ago

I’m not sure what you mean? Explaining what the various things you are calculating are, and their significance, as part of the tutorial would make sense.

yewalenikhil65 commented 3 years ago

I’m not sure what you mean? Explaining what the various things you are calculating are, and their significance, as part of the tutorial would make sense.

i mean, the topic mentioned in the link, is for reducing a large network systematically, using some functions like complexstoichmat, linkageclasses and loadrxnetwork of complexmatriximporters from ReactionNetworkImporters etc. Its partly why I tried to write these functions

yewalenikhil65 commented 3 years ago

At any rate, I will be able to add the tutorial only after Sunday due to some health issues. I hope benchmarking gillespy2 is not very urgent till then I will do it as soon as I start on Sunday

isaacsas commented 3 years ago

No rush! I hope you feel better soon.

I think the stuff on model reduction should be skipped for now. In particular, that method doesn't seem to work that well on the system you showed. I'd say just focus the tutorial on showing off the functions we've added and explaining why they are useful without adding lots of additional code / functions.

yewalenikhil65 commented 3 years ago

I think the stuff on model reduction should be skipped for now. In particular, that method doesn't seem to work that well on the system you showed. I'd say just focus the tutorial on showing off the functions we've added and explaining why they are useful without adding lots of additional code / functions.

I will consult matrin fernberg's book for this. I think the book has some nice explanations for some of the functions we have added in network analysis, (like what's the purpose of deficiency and what complexgraph tells us is a lot more than what meets the eye without solving the (some)reaction system for a particular set of parameters) I will read it up and come with this tutorial

About the model reduction method, I directed you to earlier, it was not really perfectly presented. It does work on the network I showed but I think I missed something while plotting it. Once I am done with the network analysis tutorial, I will get back later on the model reduction method too

isaacsas commented 3 years ago

Sounds great!

yewalenikhil65 commented 3 years ago

bdw, do take a look at https://niemeyer-research-group.github.io/pyMARS/ this package is known for model reduction of chemical kinetics. I think Catalyst could be interested to add a group of these model reduction methods(including the ones not listed in the package) ?