Skip to content

Commit 15b78ab

Browse files
authored
Merge pull request #618 from isaacsas/doc_tweak
doc tweak
2 parents 9a460bf + 04ab0da commit 15b78ab

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/src/catalyst_functionality/parametric_stoichiometry.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ rn = @reaction_network begin
2828
end
2929
reactions(rn)
3030
```
31-
we see three species, `(A,B,C)`, however, `A` is treated as the stoichiometric
32-
coefficient of `C`, i.e.
31+
we see two species, `(B,C)`, with `A` treated as a parameter representing the
32+
stoichiometric coefficient of `C`, i.e.
3333
```@example s1
3434
rx = reactions(rn)[1]
3535
rx.substrates[1],rx.substoich[1]
@@ -52,10 +52,10 @@ rxs2 = [(@reaction k₊, m*A --> (m*n)*B),
5252
revsys3 = ReactionSystem(rxs2,t; name=:revsys)
5353
revsys3 == revsys
5454
```
55-
Note, the `@reaction` macro assumes all symbols are parameters except the right
56-
most symbols in the reaction line (i.e. `A` and `B`). For example, in `@reaction
57-
k, F*A + 2(H*G+B) --> D`, the substrates are `(A,G,B)` with stoichiometries
58-
`(F,2*H,2)`.
55+
Note, the `@reaction` macro again assumes all symbols are parameters except the
56+
substrates or reactants (i.e. `A` and `B`). For example, in
57+
`@reaction k, F*A + 2(H*G+B) --> D`, the substrates are `(A,G,B)` with
58+
stoichiometries `(F,2*H,2)`.
5959

6060
Let's now convert `revsys` to ODEs and look at the resulting equations:
6161
```@example s1
@@ -70,7 +70,7 @@ coefficients. For this reason we must specify `m` and `n` as integers, and hence
7070
```@example s1
7171
p = (k₊ => 1.0, k₋ => 1.0, m => 2, n => 2)
7272
u₀ = [A => 1.0, B => 1.0]
73-
oprob = ODEProblem(osys, u₀, (0.0,1.0), p)
73+
oprob = ODEProblem(osys, u₀, (0.0, 1.0), p)
7474
nothing # hide
7575
```
7676
We can now solve and plot the system
@@ -97,7 +97,7 @@ Since we no longer have factorial functions appearing, our example will now run
9797
even with floating point values for `m` and `n`:
9898
```@example s1
9999
p = (k₊ => 1.0, k₋ => 1.0, m => 2.0, n => 2.0)
100-
oprob = ODEProblem(osys, u₀, (0.0,1.0), p)
100+
oprob = ODEProblem(osys, u₀, (0.0, 1.0), p)
101101
sol = solve(oprob, Tsit5())
102102
plot(sol)
103103
```

0 commit comments

Comments
 (0)