Skip to content

Commit bcf361f

Browse files
authored
Merge pull request #483 from isaacsas/update_docs_for_float_stoich
Update docs for float stoich
2 parents b11755d + d572eda commit bcf361f

File tree

4 files changed

+29
-1
lines changed

4 files changed

+29
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "Catalyst"
22
uuid = "479239e8-5488-4da2-87a7-35f2df7eef83"
3-
version = "10.5.1"
3+
version = "10.6"
44

55
[deps]
66
AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ the current master branch.
5050
- Catalyst `ReactionSystem`s provide a symbolic representation of reaction networks,
5151
built on [ModelingToolkit.jl](https://github.com/SciML/ModelingToolkit.jl) and
5252
[Symbolics.jl](https://github.com/JuliaSymbolics/Symbolics.jl).
53+
- Non-integer (e.g. `Float64`) stoichiometric coefficients are supported for generating ODE
54+
models.
5355
- The [Catalyst.jl API](http://catalyst.sciml.ai/dev/api/catalyst_api) provides
5456
functionality for extending networks, building networks programmatically,
5557
network analysis, and for composing multiple networks together.

docs/src/faqs.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,30 @@ osys = convert(ODESystem, rn; combinatoric_ratelaws=false)
1313
Disabling these rescalings should work for all conversions of `ReactionSystem`s
1414
to other `ModelingToolkit.AbstractSystem`s.
1515

16+
## How to use non-integer stoichiometric coefficients?
17+
```julia
18+
rn = @reaction_network begin
19+
k, 2.5*A --> 3*B
20+
end k
21+
```
22+
or directly via
23+
```julia
24+
@parameters k b
25+
@variables t A(t) B(t) C(t) D(t)
26+
rx1 = Reaction(k,[B,C],[B,D], [2.5,1],[3.5, 2.5])
27+
rx2 = Reaction(2*k, [B], [D], [1], [2.5])
28+
rx3 = Reaction(2*k, [B], [D], [2.5], [2])
29+
@named mixedsys = ReactionSystem([rx1,rx2,rx3],t,[A,B,C,D],[k,b])
30+
osys = convert(ODESystem, mixedsys; combinatoric_ratelaws=false)
31+
```
32+
Note, when using `convert(ODESystem, mixedsys; combinatoric_ratelaws=false)` the
33+
`combinatoric_ratelaws=false` parameter must be passed. This is also true when
34+
calling `ODEProblem(mixedsys,...; combinatoric_ratelaws=false)`. As described
35+
above, this disables Catalyst's standard rescaling of reaction rates when
36+
generating reaction rate laws, see also the [Reaction rate laws used in
37+
simulations](@ref) section. Leaving this keyword out for systems with floating
38+
point stoichiometry will give an error message.
39+
1640
## How to set default values for initial conditions and parameters?
1741
When directly constructing a `ReactionSystem` these can be passed to the
1842
constructor, and allow solving the system without needing initial condition or

docs/src/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ etc).
2121
- Catalyst `ReactionSystem`s provide a symbolic representation of reaction networks,
2222
built on [ModelingToolkit.jl](https://github.com/SciML/ModelingToolkit.jl) and
2323
[Symbolics.jl](https://github.com/JuliaSymbolics/Symbolics.jl).
24+
- Non-integer (e.g. `Float64`) stoichiometric coefficients are supported for generating ODE
25+
models.
2426
- The [Catalyst.jl API](@ref) provides functionality for extending networks,
2527
building networks programmatically, network analysis, and for composing multiple
2628
networks together.

0 commit comments

Comments
 (0)