Skip to content

Commit 974a6fa

Browse files
committed
up
1 parent dfa9ede commit 974a6fa

File tree

1 file changed

+51
-51
lines changed

1 file changed

+51
-51
lines changed

README.md

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ be found in its corresponding research paper, [Catalyst: Fast and flexible model
5151
## Features
5252

5353
#### Features of Catalyst
54-
- [The Catalyst DSL](@ref ref) provides a simple and readable format for manually specifying reaction
54+
- [The Catalyst DSL](https://docs.sciml.ai/Catalyst/dev/model_creation/dsl_basics/) provides a simple and readable format for manually specifying reaction
5555
network models using chemical reaction notation.
5656
- Catalyst `ReactionSystem`s provides a symbolic representation of reaction networks,
5757
built on [ModelingToolkit.jl](https://docs.sciml.ai/ModelingToolkit/stable/) and
@@ -61,59 +61,60 @@ be found in its corresponding research paper, [Catalyst: Fast and flexible model
6161
multiple networks together.
6262
- 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
6363
[DifferentialEquations.jl](https://docs.sciml.ai/DiffEqDocs/stable/)
64-
[ODE/SDE/jump solver](@ref ref), and can be used within `EnsembleProblem`s for carrying
65-
out [parallelized parameter sweeps and statistical sampling](@ref ref). Plot recipes
66-
are available for [visualization of all solutions](@ref ref).
67-
- Non-integer (e.g. `Float64`) stoichiometric coefficients [are supported](@ref ref) for generating
68-
ODE models, and symbolic expressions for stoichiometric coefficients [are supported](@ref ref) for
64+
[ODE/SDE/jump solver](https://docs.sciml.ai/Catalyst/dev/model_simulation/simulation_introduction/), and can be used within `EnsembleProblem`s for carrying
65+
out [parallelized parameter sweeps and statistical sampling](https://docs.sciml.ai/Catalyst/dev/model_simulation/ensemble_simulations/). Plot recipes
66+
are available for [visualization of all solutions](https://docs.sciml.ai/Catalyst/dev/model_simulation/simulation_plotting/).
67+
- Non-integer (e.g. `Float64`) stoichiometric coefficients [are supported](https://docs.sciml.ai/Catalyst/dev/model_creation/dsl_basics/#dsl_description_stoichiometries_decimal) for generating
68+
ODE models, and symbolic expressions for stoichiometric coefficients [are supported](https://docs.sciml.ai/Catalyst/dev/model_creation/parametric_stoichiometry/) for
6969
all system types.
70-
- A [network analysis suite](@ref ref) permits the computation of linkage classes, deficiencies, reversibility, and other network properties.
71-
- [Conservation laws can be detected and utilized](@ref ref) to reduce system sizes, and to generate
70+
- A [network analysis suite](https://docs.sciml.ai/Catalyst/dev/model_creation/network_analysis/) permits the computation of linkage classes, deficiencies, reversibility, and other network properties.
71+
- [Conservation laws can be detected and utilized](https://docs.sciml.ai/Catalyst/dev/model_creation/network_analysis/#network_analysis_deficiency) to reduce system sizes, and to generate
7272
non-singular Jacobians (e.g. during conversion to ODEs, SDEs, and steady state equations).
73-
- Catalyst reaction network models can be [coupled with differential and algebraic equations](@ref ref)
73+
- Catalyst reaction network models can be [coupled with differential and algebraic equations](https://docs.sciml.ai/Catalyst/dev/model_creation/constraint_equations/)
7474
(which are then incorporated during conversion to ODEs, SDEs, and steady state equations).
75-
- Models can be [coupled with events](@ref ref) that affect the system and its state during simulations.
75+
- Models can be [coupled with events](https://docs.sciml.ai/Catalyst/dev/model_creation/constraint_equations/#constraint_equations_events) that affect the system and its state during simulations.
7676
- By leveraging ModelingToolkit, users have a variety of options for generating
7777
optimized system representations to use in solvers. These include construction
78-
of [dense or sparse Jacobians](@ref ref), [multithreading or parallelization of generated
79-
derivative functions](@ref ref), [automatic classification of reactions into optimized
80-
jump types for Gillespie type simulations](@ref ref), [automatic construction of
81-
dependency graphs for jump systems](@ref ref), and more.
78+
of [dense or sparse Jacobians](https://docs.sciml.ai/Catalyst/dev/model_simulation/ode_simulation_performance/#ode_simulation_performance_sparse_jacobian), [multithreading or parallelization of generated
79+
derivative functions](https://docs.sciml.ai/Catalyst/dev/model_simulation/ode_simulation_performance/#ode_simulation_performance_parallelisation), [automatic classification of reactions into optimized
80+
jump types for Gillespie type simulations](https://docs.sciml.ai/JumpProcesses/stable/jump_types/#jump_types), [automatic construction of
81+
dependency graphs for jump systems](https://docs.sciml.ai/JumpProcesses/stable/jump_types/#Jump-Aggregators-Requiring-Dependency-Graphs), and more.
8282
- [Symbolics.jl](https://github.com/JuliaSymbolics/Symbolics.jl) symbolic
8383
expressions and Julia `Expr`s can be obtained for all rate laws and functions determining the
8484
deterministic and stochastic terms within resulting ODE, SDE or jump models.
85-
- [Steady states](@ref ref) (and their [stabilities](@ref ref)) can be computed for model ODE representations.
85+
- [Steady states](https://docs.sciml.ai/Catalyst/dev/steady_state_functionality/homotopy_continuation/) (and their [stabilities](https://docs.sciml.ai/Catalyst/dev/steady_state_functionality/steady_state_stability_computation/)) can be computed for model ODE representations.
8686

8787
#### Features of Catalyst composing with other packages
8888
- [OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl) Can be used to numerically solver generated reaction rate equation ODE models.
8989
- [StochasticDiffEq.jl](https://github.com/SciML/StochasticDiffEq.jl) can be used to numerically solve generated Chemical Langevin Equation SDE models.
9090
- [JumpProcesses.jl](https://github.com/SciML/JumpProcesses.jl) can be used to numerically sample generated Stochastic Chemical Kinetics Jump Process models.
91-
- Support for [parallelization of all simulations](@ref ref), including parallelization of
92-
[ODE simulations on GPUs](@ref ref) using
91+
- Support for [parallelization of all simulations](https://docs.sciml.ai/Catalyst/dev/model_simulation/ode_simulation_performance/#ode_simulation_performance_parallelisation), including parallelization of
92+
[ODE simulations on GPUs](https://docs.sciml.ai/Catalyst/dev/model_simulation/ode_simulation_performance/#ode_simulation_performance_parallelisation_GPU) using
9393
[DiffEqGPU.jl](https://github.com/SciML/DiffEqGPU.jl).
9494
- [Latexify](https://korsbo.github.io/Latexify.jl/stable/) can be used to [generate LaTeX
95-
expressions](@ref ref) corresponding to generated mathematical models or the
95+
expressions](https://docs.sciml.ai/Catalyst/dev/model_creation/model_visualisation/#visualisation_latex) corresponding to generated mathematical models or the
9696
underlying set of reactions.
97-
- [Graphviz](https://graphviz.org/) can be used to generate and [visualize reaction network graphs](@ref ref)
98-
(reusing the Graphviz interface created in [Catlab.jl](https://algebraicjulia.github.io/Catlab.jl/stable/).)
97+
- [Graphviz](https://graphviz.org/) can be used to generate and [visualize reaction network graphs](https://docs.sciml.ai/Catalyst/dev/model_creation/model_visualisation/#visualisation_graphs)
98+
(reusing the Graphviz interface created in [Catlab.jl](https://algebraicjulia.github.io/Catlab.jl/stable/)).
9999
- Model steady states can be computed through homotopy continuation using [HomotopyContinuation.jl](https://github.com/JuliaHomotopyContinuation/HomotopyContinuation.jl)
100100
(which can find *all* steady states of systems with multiple ones), by forward ODE simulations using
101101
[SteadyStateDiffEq.jl)](https://github.com/SciML/SteadyStateDiffEq.jl), or by numerically solving steady-state nonlinear equations using [NonlinearSolve.jl](https://github.com/SciML/NonlinearSolve.jl).
102102
- [BifurcationKit.jl](https://github.com/bifurcationkit/BifurcationKit.jl) can be used to [compute
103-
bifurcation diagrams](@ref ref) of models' steady states (including finding periodic orbits).
103+
bifurcation diagrams](https://docs.sciml.ai/Catalyst/dev/steady_state_functionality/bifurcation_diagrams/) of models' steady states (including finding periodic orbits).
104104
- [DynamicalSystems.jl](https://github.com/JuliaDynamics/DynamicalSystems.jl) can be used to compute
105-
model [basins of attraction](@ref ref) and [Lyapunov spectrums](@ref ref).
105+
model [basins of attraction](https://docs.sciml.ai/Catalyst/dev/steady_state_functionality/dynamical_systems/#dynamical_systems_basins_of_attraction) and [Lyapunov spectrums](https://docs.sciml.ai/Catalyst/dev/steady_state_functionality/dynamical_systems/#dynamical_systems_lyapunov_exponents).
106106
- [StructuralIdentifiability.jl](https://github.com/SciML/StructuralIdentifiability.jl) can be used
107-
to [perform structural identifiability analysis](@ref ref).
107+
to [perform structural identifiability analysis](https://docs.sciml.ai/Catalyst/dev/inverse_problems/structural_identifiability/).
108108
- [Optimization.jl](https://github.com/SciML/Optimization.jl), [DiffEqParamEstim.jl](https://github.com/SciML/DiffEqParamEstim.jl),
109-
and [PEtab.jl](https://github.com/sebapersson/PEtab.jl) can all be used to [fit model parameters to data](@ref ref).
109+
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/).
110110
- [GlobalSensitivity.jl](https://github.com/SciML/GlobalSensitivity.jl) can be used to perform
111-
[global sensitivity analysis](@ref ref) of model behaviors.
112-
111+
[global sensitivity analysis](https://docs.sciml.ai/Catalyst/dev/inverse_problems/global_sensitivity_analysis/) of model behaviors.
112+
- [SciMLSensitivity.jl](https://github.com/SciML/SciMLSensitivity.jl) can be used to compute local sensitivities of functions containing forward model simulations.
113+
113114
#### Features of packages built upon Catalyst
114-
- Catalyst [`ReactionSystem`](@ref)s can be [imported from SBML files](@ref ref) via
115+
- Catalyst [`ReactionSystem`](@ref)s can be [imported from SBML files](https://docs.sciml.ai/Catalyst/dev/model_creation/model_file_loading_and_export/#Loading-SBML-files-using-SBMLImporter.jl-and-SBMLToolkit.jl) via
115116
[SBMLImporter.jl](https://github.com/SciML/SBMLImporter.jl) and [SBMLToolkit.jl](https://github.com/SciML/SBMLToolkit.jl),
116-
and [from BioNetGen .net files](@ref ref) and various stoichiometric matrix network representations
117+
and [from BioNetGen .net files](https://docs.sciml.ai/Catalyst/dev/model_creation/model_file_loading_and_export/#file_loading_rni_net) and various stoichiometric matrix network representations
117118
using [ReactionNetworkImporters.jl](https://github.com/SciML/ReactionNetworkImporters.jl).
118119
- [MomentClosure.jl](https://github.com/augustinas1/MomentClosure.jl) allows generation of symbolic
119120
ModelingToolkit `ODESystem`s that represent moment closure approximations to moments of the
@@ -126,9 +127,6 @@ be found in its corresponding research paper, [Catalyst: Fast and flexible model
126127
resulting stochastic chemical kinetics with delays models.
127128
- [BondGraphs.jl](https://github.com/jedforrest/BondGraphs.jl), a package for
128129
constructing and analyzing bond graphs models, which can take Catalyst models as input.
129-
- [PEtab.jl](https://github.com/sebapersson/PEtab.jl), a package that implements the PEtab format for
130-
fitting reaction network ODEs to data. Input can be provided either as SBML files or as Catalyst
131-
`ReactionSystem`s.
132130

133131

134132
## Illustrative example
@@ -149,7 +147,7 @@ model = @reaction_network begin
149147
end
150148

151149
# Create an ODE that can be simulated.
152-
u0 = [:S => 50, :E => 10, :SE => 0, :P => 0]
150+
u0 = [:S => 50.0, :E => 10.0, :SE => 0.0, :P => 0.0]
153151
tspan = (0., 200.)
154152
ps = (:kB => 0.01, :kD => 0.1, :kP => 0.1)
155153
ode = ODEProblem(model, u0, tspan, ps)
@@ -166,7 +164,8 @@ jump simulation
166164
```julia
167165
# Create and simulate a jump process (here using Gillespie's direct algorithm).
168166
using JumpProcesses
169-
dprob = DiscreteProblem(model, u0, tspan, ps)
167+
u0_integers = [:S => 50, :E => 10, :SE => 0, :P => 0]
168+
dprob = DiscreteProblem(model, u0_integers, tspan, ps)
170169
jprob = JumpProblem(model, dprob, Direct())
171170
jump_sol = solve(jprob, SSAStepper())
172171
plot(jump_sol; lw = 2)
@@ -180,49 +179,50 @@ instead show how various Catalyst features can compose to create a much more adv
180179
model describes how the volume of a cell ($V$) is affected by a growth factor ($G$). The growth
181180
factor only promotes growth while in its phosphorylated form ($Gᴾ$). The phosphorylation of $G$
182181
($G \to Gᴾ$) is promoted by sunlight (modeled as the cyclic sinusoid $kₐ*(sin(t)+1)$), which
183-
phosphorylates the growth factor (producing $Gᴾ$). When the cell reaches a critical volume ($V$)
182+
phosphorylates the growth factor (producing $Gᴾ$). When the cell reaches a critical volume ($Vₘ$)
184183
it undergoes cell division. First, we declare our model:
185184
```julia
186185
using Catalyst
187186
cell_model = @reaction_network begin
188-
@parameters Vₘ g Ω
189-
@default_noise_scaling Ω
187+
@parameters Vₘ g
190188
@equations begin
191189
D(V) ~ g*Gᴾ
192190
end
193191
@continuous_events begin
194-
[V ~ Vₘₐₓ] => [V ~ V/2]
192+
[V ~ Vₘ] => [V ~ V/2]
195193
end
196194
kₚ*(sin(t)+1)/V, G --> Gᴾ
197195
kᵢ/V, Gᴾ --> G
198196
end
199197
```
200-
Next, we can use [Latexify.jl](https://korsbo.github.io/Latexify.jl/stable/) to show the ordinary
201-
differential equations associated with this model:
202-
```julia
203-
using Latexify
204-
latexify(cell_model; form = :ode)
205-
```
206198
In this case, we would instead like to perform stochastic simulations, so we transform our model to an SDE:
207199
```julia
208-
u0 = [:V => 0.5, :G => 1.0, :Gᴾ => 0.0]
200+
u0 = [:V => 25.0, :G => 50.0, :Gᴾ => 0.0]
209201
tspan = (0.0, 20.0)
210-
ps = [:Vₘₐₓ => 1.0, :g => 0.2, :kₚ => 5.0, :kᵢ => 2.0, => 0.1]
202+
ps = [:Vₘ => 50.0, :g => 0.2, :kₚ => 100.0, :kᵢ => 60.0]
211203
sprob = SDEProblem(cell_model, u0, tspan, ps)
212204
```
213-
Finally, we simulate it and plot the result.
205+
This produces the following equations:
206+
```math
207+
\begin{align*}
208+
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) &
209+
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) &
210+
dV(t) &= \left(g \cdot Gᴾ(t)\right) dt
211+
\end{align*}
212+
```
213+
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.
214214
```julia
215215
using StochasticDiffEq
216-
sol = solve(sprob, STrapezoid())
216+
sol = solve(sprob, EM(); dt = 0.05)
217217
plot(sol; xguide = "Time (au)", lw = 2)
218218
```
219219
![Elaborate SDE simulation](docs/src/assets/readme_elaborate_sde_plot.svg)
220220

221221
Some features we used here:
222-
- The SDE was [simulated using StochasticDiffEq.jl]. We also [scaled the SDE noise terms](@ref ref).
223-
- The cell volume was [modeled as a differential equation, which was coupled to the reaction network model](@ref ref).
224-
- The cell divisions were created by [incorporating events into the model](@ref ref).
225-
- The model equations were [displayed using Latexify.jl](@ref ref), and the simulation [plotted using Plots.jl](@ref ref).
222+
- The cell volume was [modeled as a differential equation, which was coupled to the reaction network model](https://docs.sciml.ai/Catalyst/dev/model_creation/constraint_equations/#constraint_equations_coupling_constraints).
223+
- The cell divisions were created by [incorporating events into the model](https://docs.sciml.ai/Catalyst/dev/model_creation/constraint_equations/#constraint_equations_events).
224+
- We designated a specific numeric [solver and corresponding solver options](https://docs.sciml.ai/Catalyst/dev/model_simulation/simulation_introduction/#simulation_intro_solver_options).
225+
- The model simulation was [plotted using Plots.jl](https://docs.sciml.ai/Catalyst/dev/model_simulation/simulation_plotting/).
226226

227227
## Getting help or getting involved
228228
Catalyst developers are active on the [Julia Discourse](https://discourse.julialang.org/),

0 commit comments

Comments
 (0)