diff --git a/docs/src/introduction_to_catalyst/introduction_to_catalyst.md b/docs/src/introduction_to_catalyst/introduction_to_catalyst.md index d4154b7f6c..d63e85c3a3 100644 --- a/docs/src/introduction_to_catalyst/introduction_to_catalyst.md +++ b/docs/src/introduction_to_catalyst/introduction_to_catalyst.md @@ -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/) @@ -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 diff --git a/docs/src/introduction_to_catalyst/math_models_intro.md b/docs/src/introduction_to_catalyst/math_models_intro.md index 59a619a5f5..f23e25f53c 100644 --- a/docs/src/introduction_to_catalyst/math_models_intro.md +++ b/docs/src/introduction_to_catalyst/math_models_intro.md @@ -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 diff --git a/docs/src/model_creation/programmatic_CRN_construction.md b/docs/src/model_creation/programmatic_CRN_construction.md index d5d12911c8..6e621ed82b 100644 --- a/docs/src/model_creation/programmatic_CRN_construction.md +++ b/docs/src/model_creation/programmatic_CRN_construction.md @@ -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 @@ -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