Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/src/introduction_to_catalyst/introduction_to_catalyst.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,6 @@ nothing # hide
`oprob` and `oprob2` are functionally equivalent, each representing the same
underlying problem.

!!! note
Above we have used `odesys = complete(odesys)` to mark the `ODESystem` as *complete*, indicating to Catalyst and ModelingToolkit that these models are finalized. This must be done before any system is given as input to a `convert` call or some problem type. `ReactionSystem` models created through the `@reaction_network` DSL, like `rn` above, are always marked as complete when generated. Hence `complete` does not need to be called on them. Symbolically generated `ReactionSystem`s, `ReactionSystem`s generated via the `@network_component` macro, and any ModelingToolkit system generated by `convert` always needs to be manually marked as `complete` as we do for `odesys` above. An expanded description on *completeness* can be found [here](@ref completeness_note).

At this point we are all set to solve the ODEs. We can now use any ODE solver
from within the
[OrdinaryDiffEq.jl](https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve/)
Expand All @@ -182,6 +179,9 @@ We see the well-known oscillatory behavior of the repressilator! For more on the
choices of ODE solvers, see the [OrdinaryDiffEq.jl
documentation](https://docs.sciml.ai/DiffEqDocs/stable/solvers/ode_solve/).

!!! note
In the above example we used `odesys = complete(odesys)` to mark the `ODESystem` as *complete*, indicating to Catalyst and ModelingToolkit that these models are finalized. This must be done before any system is given as input to a `convert` call or some problem type. `ReactionSystem` models created through the `@reaction_network` DSL, like `rn` above, are always marked as complete when generated. Hence `complete` does not need to be called on them. Symbolically generated `ReactionSystem`s, `ReactionSystem`s generated via the `@network_component` macro, and any ModelingToolkit system generated by `convert` always needs to be manually marked as `complete` as we do for `odesys` above. An expanded description on *completeness* can be found [here](@ref completeness_note).

---

## Stochastic simulation algorithms (SSAs) for stochastic chemical kinetics
Expand Down
10 changes: 10 additions & 0 deletions docs/src/introduction_to_catalyst/math_models_intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ while the jump process propensity function is
```math
a(\mathbf{X}(t)) = k A (A-1) B.
```
One can also specify during system construction that by default combinatoric
scalings should be disabled, i.e.
```@example math_examples
using Catalyst
rn = @reaction_network begin
@combinatoric_ratelaws false
k, 3A + 2B --> A + 3D
end
osys = convert(ODESystem, rn)
```

## [Reaction Rate Equation (RRE) ODE Models](@id math_models_in_catalyst_rre_odes)
The RRE ODE models Catalyst creates for a general system correspond to the coupled system of ODEs given by
Expand Down
3 changes: 2 additions & 1 deletion docs/src/model_creation/programmatic_CRN_construction.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Here we use `nothing` where the DSL used ``\varnothing``. Finally, we are ready
to construct our [`ReactionSystem`](@ref) as
```@example ex
@named repressilator = ReactionSystem(rxs, t)
repressilator = complete(repressilator)
nothing # hide
```
Notice, the model is named `repressilator`. A name must always be specified when
Expand All @@ -62,7 +63,7 @@ Alternatively, one can use the `name = :repressilator` keyword argument to the
`ReactionSystem` constructor.

!!! warning
All `ReactionSystem`s created via the symbolic interface (i.e. by calling `ReactionSystem` with some input, rather than using `@reaction_network`) are not marked as complete. To simulate them, they must first be marked as *complete*, indicating to Catalyst and ModelingToolkit that they represent finalized models. This can be done using the `complete` function, i.e. by calling `repressilator = complete(repressilator)`. An expanded description on *completeness* can be found [here](@ref completeness_note).
All `ReactionSystem`s created via the symbolic interface (i.e. by calling `ReactionSystem` with some input, rather than using `@reaction_network`) are not marked as complete. To simulate them, they must first be marked as *complete*, indicating to Catalyst and ModelingToolkit that they represent finalized models. This can be done using the `complete` function, as above. An expanded description on *completeness* can be found [here](@ref completeness_note).

We can check that this is the same model as the one we defined via the DSL as
follows (this requires that we use the same names for rates, species and the
Expand Down