Skip to content

Commit 2e57c24

Browse files
committed
up
1 parent 839c480 commit 2e57c24

File tree

2 files changed

+61
-68
lines changed

2 files changed

+61
-68
lines changed

docs/src/home.md

Lines changed: 60 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
Catalyst.jl is a symbolic modeling package for analysis and high-performance
44
simulation of chemical reaction networks. Catalyst defines symbolic
5-
[`ReactionSystem`](https://docs.sciml.ai/Catalyst/stable/catalyst_functionality/programmatic_CRN_construction/)s,
5+
[`ReactionSystem`](@ref)s,
66
which can be created programmatically or easily
77
specified using Catalyst's domain-specific language (DSL). Leveraging
88
[ModelingToolkit.jl](https://github.com/SciML/ModelingToolkit.jl) and
99
[Symbolics.jl](https://github.com/JuliaSymbolics/Symbolics.jl), Catalyst enables
1010
large-scale simulations through auto-vectorization and parallelism. Symbolic
1111
`ReactionSystem`s can be used to generate ModelingToolkit-based models, allowing
12-
the easy simulation and parameter estimation of mass action ODE models, chemical
12+
the easy simulation and parameter estimation of mass action ODE models, Chemical
1313
Langevin SDE models, stochastic chemical kinetics jump process models, and more.
1414
Generated models can be used with solvers throughout the broader
1515
[SciML](https://sciml.ai) ecosystem, including higher-level SciML packages (e.g.
@@ -19,74 +19,70 @@ etc).
1919
## [Features](@id doc_home_features)
2020

2121
#### [Features of Catalyst](@id doc_home_features_catalyst)
22-
- [The Catalyst DSL](@ref ref) provides a simple and readable format for manually specifying reaction
22+
- [The Catalyst DSL](@ref dsl_description) provides a simple and readable format for manually specifying reaction
2323
network models using chemical reaction notation.
2424
- Catalyst `ReactionSystem`s provides a symbolic representation of reaction networks,
2525
built on [ModelingToolkit.jl](https://docs.sciml.ai/ModelingToolkit/stable/) and
2626
[Symbolics.jl](https://docs.sciml.ai/Symbolics/stable/).
27-
- The [Catalyst.jl API](http://docs.sciml.ai/Catalyst/stable/api/catalyst_api) provides functionality
27+
- The [Catalyst.jl API](@ref api) provides functionality
2828
for extending networks, building networks programmatically, and for composing
2929
multiple networks together.
30-
- Generated models can be simulated using any
30+
- Leveraging ModelingToolkit, generated models can be converted to symbolic reaction rate equation ODE models, symbolic Chemical Langevin Equation models, and symbolic stochastic chemical kinetics (jump process) models. These can be simulated using any
3131
[DifferentialEquations.jl](https://docs.sciml.ai/DiffEqDocs/stable/)
32-
[ODE/SDE/jump solver](@ref ref), and can be used within `EnsembleProblem`s for carrying
33-
out [parallelized parameter sweeps and statistical sampling](@ref ref). Plot recipes
34-
are available for [visualization of all solutions](@ref ref).
35-
- Non-integer (e.g. `Float64`) stoichiometric coefficients [are supported](@ref ref) for generating
36-
ODE models, and symbolic expressions for stoichiometric coefficients [are supported](@ref ref) for
32+
[ODE/SDE/jump solver](@ref simulation_intro), and can be used within `EnsembleProblem`s for carrying
33+
out [parallelized parameter sweeps and statistical sampling](@ref ensemble_simulations). Plot recipes
34+
are available for [visualization of all solutions](@ref simulation_plotting).
35+
- Non-integer (e.g. `Float64`) stoichiometric coefficients [are supported](@ref dsl_description_stoichiometries_decimal) for generating
36+
ODE models, and symbolic expressions for stoichiometric coefficients [are supported](@ref parametric_stoichiometry) for
3737
all system types.
38-
- A [network analysis suite](@ref ref) permits the computation of linkage classes, deficiencies, and
39-
reversibilities.
40-
- [Conservation laws can be detected and utilized](@ref ref) to reduce system sizes, and to generate
38+
- A [network analysis suite](@ref network_analysis) permits the computation of linkage classes, deficiencies, reversibility, and other network properties.
39+
- [Conservation laws can be detected and utilized](@ref network_analysis_deficiency) to reduce system sizes, and to generate
4140
non-singular Jacobians (e.g. during conversion to ODEs, SDEs, and steady state equations).
42-
- Catalyst reaction network models can be [coupled with differential and algebraic equations](@ref ref)
41+
- Catalyst reaction network models can be [coupled with differential and algebraic equations](@ref constraint_equations_coupling_constraints)
4342
(which are then incorporated during conversion to ODEs, SDEs, and steady state equations).
44-
- Models can be [coupled with events](@ref ref) that affect the system and its state during simulations.
43+
- Models can be [coupled with events](@ref constraint_equations_events) that affect the system and its state during simulations.
4544
- By leveraging ModelingToolkit, users have a variety of options for generating
4645
optimized system representations to use in solvers. These include construction
47-
of [dense or sparse Jacobians](@ref ref), [multithreading or parallelization of generated
48-
derivative functions](@ref ref), [automatic classification of reactions into optimized
49-
jump types for Gillespie type simulations](@ref ref), [automatic construction of
50-
dependency graphs for jump systems](@ref ref), and more.
46+
of [dense or sparse Jacobians](@ref ode_simulation_performance_sparse_jacobian), [multithreading or parallelization of generated
47+
derivative functions](@ref ode_simulation_performance_parallelisation), [automatic classification of reactions into optimized
48+
jump types for Gillespie type simulations](https://docs.sciml.ai/JumpProcesses/stable/jump_types/#jump_types), [automatic construction of
49+
dependency graphs for jump systems](https://docs.sciml.ai/JumpProcesses/stable/jump_types/#Jump-Aggregators-Requiring-Dependency-Graphs), and more.
5150
- [Symbolics.jl](https://github.com/JuliaSymbolics/Symbolics.jl) symbolic
5251
expressions and Julia `Expr`s can be obtained for all rate laws and functions determining the
5352
deterministic and stochastic terms within resulting ODE, SDE or jump models.
54-
- [Steady states](@ref ref) (and their [stabilities](@ref ref)) can be computed for model ODE representations.
53+
- [Steady states](@ref homotopy_continuation) (and their [stabilities](@ref steady_state_stability)) can be computed for model ODE representations.
5554

5655
#### [Features of Catalyst composing with other packages](@id doc_home_features_composed)
57-
- [OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl) Can be used to [perform model ODE
58-
simulations](@ref ref).
59-
- [StochasticDiffEq.jl](https://github.com/SciML/StochasticDiffEq.jl) Can be used to [perform model
60-
SDE simulations](@ref ref).
61-
- [JumpProcesses.jl](https://github.com/SciML/JumpProcesses.jl) Can be used to [model jump
62-
simulations](@ref ref).
63-
- Support for [parallelization of all simulations](@ref ref), including parallelization of
64-
[ODE simulations on GPUs](@ref ref) using
56+
- [OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl) Can be used to numerically solver generated reaction rate equation ODE models.
57+
- [StochasticDiffEq.jl](https://github.com/SciML/StochasticDiffEq.jl) can be used to numerically solve generated Chemical Langevin Equation SDE models.
58+
- [JumpProcesses.jl](https://github.com/SciML/JumpProcesses.jl) can be used to numerically sample generated Stochastic Chemical Kinetics Jump Process models.
59+
- Support for [parallelization of all simulations](@ref ode_simulation_performance_parallelisation), including parallelization of
60+
[ODE simulations on GPUs](@ref ode_simulation_performance_parallelisation_GPU) using
6561
[DiffEqGPU.jl](https://github.com/SciML/DiffEqGPU.jl).
6662
- [Latexify](https://korsbo.github.io/Latexify.jl/stable/) can be used to [generate LaTeX
67-
expressions](@ref ref) corresponding to generated mathematical models or the
63+
expressions](@ref visualisation_latex) corresponding to generated mathematical models or the
6864
underlying set of reactions.
69-
- [Graphviz](https://graphviz.org/) can be used to generate and [visualize reaction network graphs](@ref ref)
70-
(reusing the Graphviz interface created in [Catlab.jl](https://algebraicjulia.github.io/Catlab.jl/stable/).)
71-
- Model steady states can be computed through homotopy continuation using [HomotopyContinuation.jl](https://github.com/JuliaHomotopyContinuation/HomotopyContinuation.jl)
72-
(which can find *all* steady states of systems with multiple ones), by forward ODE simulations using
73-
[SteadyStateDiffEq.jl)](https://github.com/SciML/SteadyStateDiffEq.jl), or by nonlinear systems
74-
solving using [NonlinearSolve.jl](https://github.com/SciML/NonlinearSolve.jl).
65+
- [Graphviz](https://graphviz.org/) can be used to generate and [visualize reaction network graphs](@ref visualisation_graphs)
66+
(reusing the Graphviz interface created in [Catlab.jl](https://algebraicjulia.github.io/Catlab.jl/stable/)).
67+
- Model steady states can be [computed through homotopy continuation](@ref homotopy_continuation) using [HomotopyContinuation.jl](https://github.com/JuliaHomotopyContinuation/HomotopyContinuation.jl)
68+
(which can find *all* steady states of systems with multiple ones), by [forward ODE simulations](@ref steady_state_solving_simulation) using
69+
[SteadyStateDiffEq.jl)](https://github.com/SciML/SteadyStateDiffEq.jl), or by [numerically solving steady-state nonlinear equations](@ref steady_state_solving_nonlinear) using [NonlinearSolve.jl](https://github.com/SciML/NonlinearSolve.jl).
7570
- [BifurcationKit.jl](https://github.com/bifurcationkit/BifurcationKit.jl) can be used to [compute
76-
bifurcation diagrams](@ref ref) of models' steady states (including finding periodic orbits).
71+
bifurcation diagrams](@ref bifurcation_diagrams) of models' steady states (including finding periodic orbits).
7772
- [DynamicalSystems.jl](https://github.com/JuliaDynamics/DynamicalSystems.jl) can be used to compute
78-
model [basins of attraction](@ref ref) and [Lyapunov spectrums](@ref ref).
73+
model [basins of attraction](@ref dynamical_systems_basins_of_attraction) and [Lyapunov spectrums](@ref dynamical_systems_lyapunov_exponents).
7974
- [StructuralIdentifiability.jl](https://github.com/SciML/StructuralIdentifiability.jl) can be used
80-
to [perform structural identifiability analysis](@ref ref).
75+
to [perform structural identifiability analysis](@ref structural_identifiability).
8176
- [Optimization.jl](https://github.com/SciML/Optimization.jl), [DiffEqParamEstim.jl](https://github.com/SciML/DiffEqParamEstim.jl),
82-
and [PEtab.jl](https://github.com/sebapersson/PEtab.jl) can all be used to [fit model parameters to data](@ref ref).
77+
and [PEtab.jl](https://github.com/sebapersson/PEtab.jl) can all be used to [fit model parameters to data](https://sebapersson.github.io/PEtab.jl/stable/Define_in_julia/).
8378
- [GlobalSensitivity.jl](https://github.com/SciML/GlobalSensitivity.jl) can be used to perform
84-
[global sensitivity analysis](@ref ref) of model behaviors.
79+
[global sensitivity analysis](@ref global_sensitivity_analysis) of model behaviors.
80+
- [SciMLSensitivity.jl](https://github.com/SciML/SciMLSensitivity.jl) can be used to compute local sensitivities of functions containing forward model simulations.
8581

8682
#### [Features of packages built upon Catalyst](@id doc_home_features_other_packages)
87-
- Catalyst [`ReactionSystem`](@ref)s can be [imported from SBML files](@ref ref) via
83+
- Catalyst [`ReactionSystem`](@ref)s can be [imported from SBML files](https://docs.sciml.ai/Catalyst/stable/model_creation/model_file_loading_and_export/#Loading-SBML-files-using-SBMLImporter.jl-and-SBMLToolkit.jl) via
8884
[SBMLImporter.jl](https://github.com/SciML/SBMLImporter.jl) and [SBMLToolkit.jl](https://github.com/SciML/SBMLToolkit.jl),
89-
and [from BioNetGen .net files](@ref ref) and various stoichiometric matrix network representations
85+
and [from BioNetGen .net files](https://docs.sciml.ai/Catalyst/stable/model_creation/model_file_loading_and_export/#file_loading_rni_net) and various stoichiometric matrix network representations
9086
using [ReactionNetworkImporters.jl](https://github.com/SciML/ReactionNetworkImporters.jl).
9187
- [MomentClosure.jl](https://github.com/augustinas1/MomentClosure.jl) allows generation of symbolic
9288
ModelingToolkit `ODESystem`s that represent moment closure approximations to moments of the
@@ -99,14 +95,11 @@ etc).
9995
resulting stochastic chemical kinetics with delays models.
10096
- [BondGraphs.jl](https://github.com/jedforrest/BondGraphs.jl), a package for
10197
constructing and analyzing bond graphs models, which can take Catalyst models as input.
102-
- [PEtab.jl](https://github.com/sebapersson/PEtab.jl), a package that implements the PEtab format for
103-
fitting reaction network ODEs to data. Input can be provided either as SBML files or as Catalyst
104-
`ReactionSystem`s.
10598

10699
## [How to read this documentation](@id doc_home_documentation)
107100
The Catalyst documentation is separated into sections describing Catalyst's various features. Where appropriate, some sections will also give advice on best practices for various modeling workflows, and provide links with further reading. Each section also contains a set of relevant example workflows. Finally, the [API](@ref api) section contains a list of all functions exported by Catalyst (as well as descriptions of them and their inputs and outputs).
108101

109-
New users are recommended to start with either the [Introduction to Catalyst and Julia for New Julia users](@ref catalyst_for_new_julia_users) or [Introduction to Catalyst](@ref introduction_to_catalyst) sections (depending on whether they are familiar with Julia programming or not). This should be enough to carry out many basic Catalyst workflows. Next, [The Catalyst DSL](@ref ref) section gives a more throughout introduction to model creation, while the [Introduction to model simulation](@ref ref) section more through describes how simulations are carried out. Once you have gotten started using Catalyst, you can read whichever sections are relevant to your work (they should all be clearly labelled).
102+
New users are recommended to start with either the [Introduction to Catalyst and Julia for New Julia users](@ref catalyst_for_new_julia_users) or [Introduction to Catalyst](@ref introduction_to_catalyst) sections (depending on whether they are familiar with Julia programming or not). This should be enough to carry out many basic Catalyst workflows.
110103

111104
This documentation contains code which is dynamically run whenever it is built. If you copy the code and run it in your Julia environment it should work. The exact Julia environment that is used in this documentation can be found [here](@ref doc_home_reproducibility).
112105

@@ -167,7 +160,7 @@ model = @reaction_network begin
167160
end
168161
169162
# Create an ODE that can be simulated.
170-
u0 = [:S => 50, :E => 10, :SE => 0, :P => 0]
163+
u0 = [:S => 50.0, :E => 10.0, :SE => 0.0, :P => 0.0]
171164
tspan = (0., 200.)
172165
ps = (:kB => 0.01, :kD => 0.1, :kP => 0.1)
173166
ode = ODEProblem(model, u0, tspan, ps)
@@ -182,8 +175,10 @@ The same model can be used as input to other types of simulations. E.g. here we
182175
jump simulation
183176
```@example home_simple_example
184177
# Create and simulate a jump process (here using Gillespie's direct algorithm).
178+
# Note that integer (not decimal) initial conditions are used.
185179
using JumpProcesses
186-
dprob = DiscreteProblem(model, u0, tspan, ps)
180+
u0_integers = [:S => 50, :E => 10, :SE => 0, :P => 0]
181+
dprob = DiscreteProblem(model, u0_integers, tspan, ps)
187182
jprob = JumpProblem(model, dprob, Direct())
188183
jump_sol = solve(jprob, SSAStepper())
189184
jump_sol = solve(jprob, SSAStepper(); seed = 1234) # hide
@@ -196,40 +191,42 @@ instead show how various Catalyst features can compose to create a much more adv
196191
model describes how the volume of a cell ($V$) is affected by a growth factor ($G$). The growth
197192
factor only promotes growth while in its phosphorylated form ($Gᴾ$). The phosphorylation of $G$
198193
($G \to Gᴾ$) is promoted by sunlight (modeled as the cyclic sinusoid $kₐ*(sin(t)+1)$), which
199-
phosphorylates the growth factor (producing $Gᴾ$). When the cell reaches a critical volume ($V$)
200-
it undergoes through cell division. First, we declare our model:
194+
phosphorylates the growth factor (producing $Gᴾ$). When the cell reaches a critical volume ($Vₘ$)
195+
it undergoes cell division. First, we declare our model:
201196
```@example home_elaborate_example
202197
using Catalyst
203198
cell_model = @reaction_network begin
204-
@parameters Vₘₐₓ g Ω
205-
@default_noise_scaling Ω
199+
@parameters Vₘ g
206200
@equations begin
207201
D(V) ~ g*Gᴾ
208202
end
209203
@continuous_events begin
210-
[V ~ Vₘₐₓ] => [V ~ V/2]
204+
[V ~ Vₘ] => [V ~ V/2]
211205
end
212206
kₚ*(sin(t)+1)/V, G --> Gᴾ
213207
kᵢ/V, Gᴾ --> G
214208
end
215209
```
216-
Next, we can use [Latexify.jl](https://korsbo.github.io/Latexify.jl/stable/) to show the ordinary differential equations associated with this model:
217-
```@example home_elaborate_example
218-
using Latexify
219-
latexify(cell_model; form = :ode)
220-
```
221210
In this case, we would instead like to perform stochastic simulations, so we transform our model to an SDE:
222211
```@example home_elaborate_example
223-
u0 = [:V => 0.5, :G => 1.0, :Gᴾ => 0.0]
212+
u0 = [:V => 25.0, :G => 50.0, :Gᴾ => 0.0]
224213
tspan = (0.0, 20.0)
225-
ps = [:Vₘₐₓ => 1.0, :g => 0.2, :kₚ => 5.0, :kᵢ => 2.0, :Ω => 0.1]
214+
ps = [:Vₘ => 50.0, :g => 0.2, :kₚ => 100.0, :kᵢ => 60.0]
226215
sprob = SDEProblem(cell_model, u0, tspan, ps)
227216
```
228-
Finally, we simulate it and plot the result.
217+
This produces the following equations:
218+
```math
219+
\begin{align*}
220+
dG(t) &= - \left( \frac{kₚ*(sin(t)+1)}{V(t)} G(t) + \frac{kᵢ}{V(t)} Gᴾ(t) \right) dt - \sqrt{\frac{kₚ*(sin(t)+1)}{V(t)} G(t)} dW_1(t) + \sqrt{\frac{kᵢ}{V(t)} Gᴾ(t)} dW_2(t) &
221+
dGᴾ(t) &= \left( \frac{kₚ*(sin(t)+1)}{V(t)} G(t) - \frac{kᵢ}{V(t)} Gᴾ(t) \right) dt + \sqrt{\frac{kₚ*(sin(t)+1)}{V(t)} G(t)} dW_1(t) - \sqrt{\frac{kᵢ}{V(t)} Gᴾ(t)} dW_2(t) &
222+
dV(t) &= \left(g \cdot Gᴾ(t)\right) dt
223+
\end{align*}
224+
```
225+
where the $dW_1(t)$ and $dW_2(t)$ terms described the noise added through the Chemical Langevin Equations. Finally, we can simulate and plot the results.
229226
```@example home_elaborate_example
230227
using StochasticDiffEq
231-
sol = solve(sprob, STrapezoid())
232-
sol = solve(sprob, STrapezoid(); seed = 1234) # hide
228+
sol = solve(sprob, EM(); dt = 0.05)
229+
sol = solve(sprob, EM(); dt = 0.05, seed = 1234) # hide
233230
plot(sol; xguide = "Time (au)", lw = 2)
234231
```
235232

@@ -260,10 +257,6 @@ could cite our work:
260257
}
261258
```
262259

263-
We also maintain a user survey, asking basic questions about how users utilise the package. The survey
264-
is available [here](ref), and only takes about 5 minutes to fill out. We are grateful to those who
265-
fill out the survey, as this helps us further develop the package.
266-
267260
## [Reproducibility](@id doc_home_reproducibility)
268261
```@raw html
269262
<details><summary>The documentation of this SciML package was built using these direct dependencies,</summary>

docs/src/steady_state_functionality/steady_state_stability_computation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Steady state stability computation
1+
# [Steady state stability computation](@id steady_state_stability)
22
After system steady states have been found using [HomotopyContinuation.jl](@ref homotopy_continuation), [NonlinearSolve.jl](@ref nonlinear_solve), or other means, their stability can be computed using Catalyst's `steady_state_stability` function. Systems with conservation laws will automatically have these removed, permitting stability computation on systems with singular Jacobian.
33

44
!!! warn

0 commit comments

Comments
 (0)