Skip to content

Commit 1fb5e45

Browse files
authored
Merge pull request #1123 from SciML/add_nomassact_arrow_doc
Add non-fileld arrow (`=>`) documentation to DSL docs
2 parents 54b8166 + facee97 commit 1fb5e45

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

docs/src/introduction_to_catalyst/math_models_intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ while the jump process propensity function is
7373
a(\mathbf{X}(t)) = k A (A-1) B.
7474
```
7575

76-
## Reaction Rate Equation (RRE) ODE Models
76+
## [Reaction Rate Equation (RRE) ODE Models](@id math_models_in_catalyst_rre_odes)
7777
The RRE ODE models Catalyst creates for a general system correspond to the coupled system of ODEs given by
7878
```math
7979
\frac{d X_m}{dt} =\sum_{k=1}^K \nu_m^k a_k(\mathbf{X}(t),t), \quad m = 1,\dots,M.

docs/src/model_creation/dsl_advanced.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,3 +540,37 @@ nothing # hide
540540

541541
!!! note
542542
When using interpolation, expressions like `2$spec` won't work; the multiplication symbol must be explicitly included like `2*$spec`.
543+
544+
## [Disabling mass action for reactions](@id dsl_advanced_options_disable_ma)
545+
546+
As [described previously](@ref math_models_in_catalyst_rre_odes), Catalyst uses *mass action kinetics* to generate ODEs from reactions. Here, each reaction generates a term for each of its reactants, which consists of the reaction's rate, substrates, and the reactant's stoichiometry. E.g. the following reaction:
547+
```@example dsl_advanced_disable_ma
548+
using Catalyst # hide
549+
rn = @reaction_network begin
550+
k, X --> ∅
551+
end
552+
```
553+
generates a single term $-k*[X]$:
554+
```@example dsl_advanced_disable_ma
555+
using Latexify
556+
latexify(rn; form = :ode)
557+
```
558+
559+
It is possible to remove the substrate contribution by using any of the following non-filled arrows when declaring the reaction: `<=`, ``, ``, `=>`, ``, ``, ``, ``. This means that the reaction
560+
```@example dsl_advanced_disable_ma
561+
rn = @reaction_network begin
562+
k, X => ∅
563+
end
564+
latexify(rn; form = :ode)
565+
```
566+
will occur at rate $d[X]/dt = -k$ (which might become a problem since $[X]$ will be degraded at a constant rate even when very small or equal to 0). This functionality allows the user to fully customise the ODEs generated by their models.
567+
568+
Note, stoichiometric coefficients are still included, i.e. the reaction
569+
```@example dsl_advanced_disable_ma
570+
rn = @reaction_network begin
571+
k, 2*X ⇒ ∅
572+
end
573+
latexify(rn; form = :ode)
574+
```
575+
has rate $d[X]/dt = -2 k$.
576+

docs/src/model_creation/dsl_basics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,4 +373,4 @@ It should be noted that the following symbols are *not permitted* to be used as
373373
- `` ([used for production/degradation reactions](@ref dsl_description_symbols_empty_set)).
374374
- `im` (used in Julia to represent [complex numbers](https://docs.julialang.org/en/v1/manual/complex-and-rational-numbers/#Complex-Numbers)).
375375
- `nothing` (used in Julia to denote [nothing](https://docs.julialang.org/en/v1/base/constants/#Core.nothing)).
376-
- `Γ` (used by Catalyst to represent conserved quantities).
376+
- `Γ` (used by Catalyst to represent [conserved quantities](@ref constraint_equations)).

0 commit comments

Comments
 (0)