You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Broadly, results from chemical reaction network theory relate a purely
14
18
graph-structural property (e.g. deficiency) to dynamical properties of the reaction system
15
-
(e.g. complex balance).
16
-
17
-
We'll now illustrate some of the types of network properties that Catalyst can determine,
18
-
using the [reaction complex representation](@ref network_analysis_reaction_complexes) in these calculations.
19
+
(e.g. complex balance). The relevant graph here is the one corresponding to the [reaction complex representation](@ref network_analysis_reaction_complexes)
20
+
of the network, where the nodes represent the reaction complexes and the edges represent reactions.
21
+
Let us illustrate some of the types of network properties that
22
+
Catalyst can determine.
19
23
20
-
Throughout this seciton, we will consider the [reaction complex representation](@ref network_analysis_reaction_complexes) of the following reaction network.
24
+
To begin, consider the following reaction network:
21
25
```@example s1
22
26
using Catalyst
23
27
rn = @reaction_network begin
@@ -34,7 +38,7 @@ with graph
34
38
plot_complexes(rn)
35
39
```
36
40
37
-
###[Linkage classes and sub-networks of the reaction network](@id network_analysis_structural_aspects_linkage)
41
+
## [Linkage classes and sub-networks of the reaction network](@id network_analysis_structural_aspects_linkage)
38
42
The preceding reaction complex graph shows that `rn` is composed of two
39
43
disconnected sub-graphs, one containing the complexes ``A+B``, ``C``, ``D+E``, and
40
44
``F``, the other containing the complexes ``2A``, ``B + G``, and ``H``. These sets,
@@ -69,10 +73,7 @@ and,
69
73
plot_complexes(subnets[2])
70
74
```
71
75
72
-

73
-
74
-
75
-
# [Deficiency of the network](@id network_analysis_structural_aspects_deficiency)
76
+
## [Deficiency of the network](@id network_analysis_structural_aspects_deficiency)
76
77
A famous theorem in Chemical Reaction Network Theory, the Deficiency Zero
77
78
Theorem [^1], allows us to use knowledge of the net stoichiometry matrix and the
78
79
linkage classes of a *mass action*[RRE ODE system](@ref network_analysis_matrix_vector_representation) to draw conclusions about the
@@ -127,7 +128,7 @@ Quoting Feinberg [^1]
127
128
> linkage classes will allow.
128
129
129
130
130
-
###[Reversibility of the network](@id network_analysis_structural_aspects_reversibility)
131
+
## [Reversibility of the network](@id network_analysis_structural_aspects_reversibility)
131
132
A reaction network is *reversible* if the "arrows" of the reactions are
132
133
symmetric so that every reaction is accompanied by its reverse reaction.
133
134
Catalyst's API provides the [`isreversible`](@ref) function to determine whether
which we see is mass action and has deficiency zero, but is not weakly
@@ -268,26 +269,29 @@ RRE ODEs cannot have a positive equilibrium solution.
268
269
satisfiesdeficiencyzero
269
270
```
270
271
271
-
###Deficiency One Theorem
272
+
## Deficiency One Theorem
272
273
Very analogous to the deficiency zero theorem is the deficiency one theorem. The deficiency one theorem applies to a network with the following properties:
273
274
1. The deficiency of each *linkage class* of the network is at most 1,
274
275
2. The sum of the linkage class deficiencies is the total deficiency of the network, and
275
-
3. Each linkage class has at most one terminal linkage class.
276
+
3. Each linkage class has at most one terminal linkage class, which is a linkage class that is 1) strongly connected, and 2) has no outgoing reactions.
277
+
278
+
For the set of reactions $A \to B, B \to A, B \to C$, $\{A, B, C\}$ is a linkage class, and $\{A, B\}$ is a strong linkage class (since A is reachable from B and vice versa). However, $\{A, B\}$ is not a terminal linkage class, because the reaction $B \to C$ goes to a complex outside the linkage class.
276
279
277
280
If these conditions are met, then the network will have at most one steady state in each stoichiometric compatibility class for any choice of rate constants and parameters.
278
281
Unlike the deficiency zero theorem, networks obeying the deficiency one theorem are not guaranteed to have stable solutions.
282
+
279
283
```@docs; canonical=false
280
284
satisfiesdeficiencyone
281
285
```
282
286
283
-
###[Complex and Detailed Balance](@id network_analysis_complex_and_detailed_balance)
287
+
## [Complex and Detailed Balance](@id network_analysis_complex_and_detailed_balance)
284
288
A reaction network's steady state is **complex-balanced** if the total production of each *complex* is zero at the steady state. A reaction network's steady state is **detailed balanced** if every reaction is balanced by its reverse reaction at the steady-state (this corresponds to the usual notion of chemical equilibrium; note that this requires every reaction be reversible).
285
289
286
290
Note that detailed balance at a given steady state implies complex balance for that steady state, i.e. detailed balance is a stronger property than complex balance.
287
291
288
292
Remarkably, having just one positive steady state that is complex (detailed) balance implies that complex (detailed) balance obtains at *every* positive steady state, so we say that a network is complex (detailed) balanced if any one of its steady states are complex (detailed) balanced. Additionally, there will be exactly one steady state in every positive stoichiometric compatibility class, and this steady state is asymptotically stable. (For proofs of these results, please consult Martin Feinberg's *Foundations of Chemical Reaction Network Theory*[^1]). So knowing that a network is complex balanced is really quite powerful.
289
293
290
-
Let's check that the reaction network defined above is complex balanced by providing a set of rates:
294
+
Let's check whether the reaction network defined above is complex balanced by providing a set of rates:
Copy file name to clipboardExpand all lines: docs/src/network_analysis/odes.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
# [Decomposing the Reaction Network ODEs](@id network_analysis_odes)
2
2
3
3
In this tutorial we will discuss the specific mathematical
4
-
structure of the ODEs that arise from the mass-action dynamics
4
+
structure of the [ODEs that arise from the mass-action dynamics](@ref math_models_in_catalyst_rre_odes)
5
5
of chemical reaction networks, and decompose them as a product
6
6
of matrices that describe the network. A complete summary of
7
-
the exported functions is given in the API section [`Network-Analysis-and-Representations`](https://docs.sciml.ai/Catalyst/stable/api/catalyst_api/#Network-Analysis-and-Representations). See Feinberg's *Foundations of Chemical Reaction
7
+
the exported functions is given in the API section [NetworkAnalysisandRepresentations](@ref api_network_analysis). Please consult Feinberg's *Foundations of Chemical Reaction
8
8
Network Theory*[^1] for more discussion about the concepts on this page.
9
9
10
10
Note, currently API functions for network analysis and conservation law analysis
@@ -240,14 +240,16 @@ K = fluxmat(rn)
240
240
241
241
Since we have that $\mathbf{v} = K\Phi$, we can rewrite the above decompositions as follows:
242
242
```math
243
+
\begin{align}
243
244
\frac{d\mathbf{x}}{dt} &= N \mathbf{v}(\mathbf{x}(t),t) \\
244
245
&= N K \Phi(\mathbf{x}(t),t) \\
245
246
&= Z B K \Phi(\mathbf{x}(t),t).
247
+
\end{align}
246
248
```
247
249
248
250
The final matrix to discuss is the product of $A_k = BK$, which is a $C$-by-$C$ matrix that turns out to be exactly the negative of the [graph Laplacian](https://en.wikipedia.org/wiki/Laplacian_matrix) of the weighted graph whose nodes are reaction complexes and whose edges represent reactions, weighted by the rate constants. The API function for $A_k$ is the `laplacianmat`:
249
251
```@example s1
250
-
A_k = incidencemat(rn)
252
+
A_k = laplacianmat(rn)
251
253
```
252
254
We can check that
253
255
```@example s1
@@ -256,10 +258,12 @@ A_k == B * K
256
258
257
259
In sum, we have that
258
260
```math
261
+
\begin{align}
259
262
\frac{d\mathbf{x}}{dt} &= N \mathbf{v}(\mathbf{x}(t),t) \\
260
263
&= N K \Phi(\mathbf{x}(t),t) \\
261
264
&= Z B K \Phi(\mathbf{x}(t),t).
262
265
&= Z A_k \Phi(\mathbf{x}(t),t).
266
+
\end{align}
263
267
```
264
268
265
269
All three of the objects introduced in this section (the flux matrix, mass-action vector, Laplacian matrix) will return symbolic outputs by default, but can be made to return numerical outputs if values are specified.
Copy file name to clipboardExpand all lines: src/network_analysis.jl
+10-6Lines changed: 10 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -198,6 +198,8 @@ end
198
198
Return the negative of the graph Laplacian of the reaction network. The ODE system of a chemical reaction network can be factorized as ``\frac{dx}{dt} = Y A_k Φ(x)``, where ``Y`` is the [`complexstoichmat`](@ref) and ``A_k`` is the negative of the graph Laplacian, and ``Φ`` is the [`massactionvector`](@ref). ``A_k`` is an n-by-n matrix, where n is the number of complexes, where ``A_{ij} = k_{ij}`` if a reaction exists between the two complexes and 0 otherwise.
199
199
Returns a symbolic matrix by default, but will return a numerical matrix if parameter values are specified via pmap.
200
200
201
+
Returns a symbolic matrix by default, but will return a numerical matrix if parameter values are specified via pmap.
202
+
201
203
**Warning**: Unlike other Catalyst functions, the `laplacianmat` function will return a `Matrix{Num}` in the symbolic case. This is to allow easier computation of the matrix decomposition of the ODEs, and to ensure that multiplying the sparse form of the matrix will work.
Return an r×c matrix ``K`` such that, if complex ``j`` is the substrate complex of reaction ``i``, then ``K_{ij} = k``, the rate constant for this reaction. Mostly a helper function for the network Laplacian, [`laplacianmat`](@ref). Has the useful property that ``\frac{dx}{dt} = S*K*Φ(x)``, where S is the [`netstoichmat`](@ref) or net stoichiometry matrix and ``Φ(x)`` is the [`massactionvector`](@ref).
214
+
Return an r×c matrix ``K`` such that, if complex ``j`` is the substrate complex of reaction ``i``, then ``K_{ij} = k``, the rate constant for this reaction. Mostly a helper function for the network Laplacian, [`laplacianmat`](@ref). Has the useful property that ``\frac{dx}{dt} = S*K*Φ(x)``, where S is the [`netstoichmat`](@ref) or net stoichiometry matrix and ``Φ(x)`` is the [`massactionvector`](@ref).
213
215
Returns a symbolic matrix by default, but will return a numerical matrix if rate constants are specified as a `Tuple`, `Vector`, or `Dict` of symbol-value pairs via `pmap`.
214
216
215
-
**Warning**: Unlike other Catalyst functions, the `fluxmat` function will return a `Matrix{Num}` in the symbolic case. This is to allow easier computation of the matrix decomposition of the ODEs, and to ensure that multiplying the sparse form of the matrix will work.
217
+
**Warning**: Unlike other Catalyst functions, the `fluxmat` function will return a `Matrix{Num}` in the symbolic case. This is to allow easier computation of the matrix decomposition of the ODEs, and to ensure that multiplying the sparse form of the matrix will work.
Return the vector whose entries correspond to the "mass action products" of each complex. For example, given the complex A + B, the corresponding entry of the vector would be ``A*B``, and for the complex 2X + Y, the corresponding entry would be ``X^2*Y``. The ODE system of a chemical reaction network can be factorized as ``\frac{dx}{dt} = Y A_k Φ(x)``, where ``Y`` is the [`complexstoichmat`](@ref) and ``A_k`` is the negative of the [`laplacianmat`](@ref). This utility returns ``Φ(x)``.
290
-
Returns a symbolic vector by default, but will return a numerical vector if species concentrations are specified as a tuple, vector, or dictionary via scmap.
291
-
If the `combinatoric_ratelaws` option is set, will include prefactors for that (see [introduction to Catalyst's rate laws](@ref introduction_to_catalyst_ratelaws). Will default to the default for the system.
291
+
Return the vector whose entries correspond to the "mass action products" of each complex. For example, given the complex A + B, the corresponding entry of the vector would be ``A*B``, and for the complex 2X + Y, the corresponding entry would be ``X^2*Y``. The ODE system of a chemical reaction network can be factorized as ``\frac{dx}{dt} = Y A_k Φ(x)``, where ``Y`` is the [`complexstoichmat`](@ref) and ``A_k`` is the negative of the [`laplacianmat`](@ref). This utility returns ``Φ(x)``.
292
+
293
+
Returns a symbolic vector by default, but will return a numerical vector if species concentrations are specified as a tuple, vector, or dictionary via scmap.
294
+
295
+
If the `combinatoric_ratelaws` option is set, will include prefactors for that (see [introduction to Catalyst's rate laws](@ref introduction_to_catalyst_ratelaws). Will default to the default for the system.
292
296
293
-
**Warning**: Unlike other Catalyst functions, the `massactionvector` function will return a `Vector{Num}` in the symbolic case. This is to allow easier computation of the matrix decomposition of the ODEs.
297
+
**Warning**: Unlike other Catalyst functions, the `massactionvector` function will return a `Vector{Num}` in the symbolic case. This is to allow easier computation of the matrix decomposition of the ODEs.
0 commit comments