Skip to content

Commit d744ffa

Browse files
committed
init
1 parent 8f8290c commit d744ffa

File tree

6 files changed

+10
-318
lines changed

6 files changed

+10
-318
lines changed

docs/src/assets/long_ploting_times/model_creation/mm_kinetics.svg

Lines changed: 0 additions & 128 deletions
This file was deleted.

docs/src/assets/long_ploting_times/model_creation/sir_outbreaks.svg

Lines changed: 0 additions & 128 deletions
This file was deleted.

docs/src/assets/long_ploting_times/model_simulation/incomplete_brusselator_simulation.svg

Lines changed: 0 additions & 54 deletions
This file was deleted.

docs/src/introduction_to_catalyst/introduction_to_catalyst.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ jprob = JumpProblem(repressilator, dprob, Direct(), save_positions=(false,false)
196196
# now, let's solve and plot the jump process:
197197
sol = solve(jprob, SSAStepper(), saveat=10.)
198198
plot(sol)
199+
plot(sol, plotdensity = 1000, fmt =:png) # hide
199200
```
200201

201202
We see that oscillations remain, but become much noisier. Note, in constructing

docs/src/model_creation/examples/basic_CRN_library.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ oplt = plot(osol; title = "Reaction rate equation (ODE)")
116116
splt = plot(ssol; title = "Chemical Langevin equation (SDE)")
117117
jplt = plot(jsol; title = "Stochastic chemical kinetics (Jump)")
118118
plot(oplt, splt, jplt; lw = 2, size=(800,800), layout = (3,1))
119-
plot!(bottom_margin = 3Plots.Measures.mm) # hide
120-
nothing # hide
119+
plot(plot(osol; title = "Reaction rate equation (ODE)", plotdensity = 1000, fmt =:png),
120+
plot(ssol; title = "Chemical Langevin equation (SDE)", plotdensity = 1000, fmt =:png),
121+
plot(jsol; title = "Stochastic chemical kinetics (Jump)", plotdensity = 1000, fmt =:png);
122+
lw = 2, size=(800,800), layout = (3,1), bottom_margin = 3Plots.Measures.mm) # hide
121123
```
122-
![MM Kinetics](../../assets/long_ploting_times/model_creation/mm_kinetics.svg)
123-
Note that, due to the large amounts of the species involved, the stochastic trajectories are very similar to the deterministic one.
124124

125125
## [SIR infection model](@id basic_CRN_library_sir)
126126
The [SIR model](https://en.wikipedia.org/wiki/Compartmental_models_in_epidemiology#The_SIR_model) is the simplest model of the spread of an infectious disease. While the real system is very different from the chemical and cellular processes typically modelled with CRNs, it (and several other epidemiological systems) can be modelled using the same CRN formalism. The SIR model consists of three species: susceptible ($S$), infected ($I$), and removed ($R$) individuals, and two reaction events: infection and recovery.
@@ -160,9 +160,11 @@ jplt1 = plot(jsol1; title = "Outbreak")
160160
jplt2 = plot(jsol2; title = "Outbreak")
161161
jplt3 = plot(jsol3; title = "No outbreak")
162162
plot(jplt1, jplt2, jplt3; lw = 3, size=(800,700), layout = (3,1))
163-
nothing # hide
163+
plot(plot(jsol1; title = "Outbreak", plotdensity = 1000, fmt =:png),
164+
plot(jsol2; title = "Outbreak", plotdensity = 1000, fmt =:png),
165+
plot(jsol3; title = "No outbreak", plotdensity = 1000, fmt =:png);
166+
lw = 3, size=(800,700), layout = (3,1)) # hide
164167
```
165-
![SIR Outbreak](../../assets/long_ploting_times/model_creation/sir_outbreaks.svg)
166168

167169
## [Chemical cross-coupling](@id basic_CRN_library_cc)
168170
In chemistry, [cross-coupling](https://en.wikipedia.org/wiki/Cross-coupling_reaction) is when a catalyst combines two substrates to form a product. In this example, the catalyst ($C$) first binds one substrate ($S₁$) to form an intermediary complex ($S₁C$). Next, the complex binds the second substrate ($S₂$) to form another complex ($CP$). Finally, the catalyst releases the now-formed product ($P$). This system is an extended version of the [Michaelis-Menten system presented earlier](@ref basic_CRN_library_mm).

docs/src/model_simulation/ode_simulation_performance.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@ oprob = ODEProblem(brusselator, u0, tspan, ps)
3131
3232
sol1 = solve(oprob, Tsit5())
3333
plot(sol1)
34-
nothing # hide
34+
plot(sol1, plotdensity = 1000, fmt =:png) # hide
3535
```
36-
![Incomplete Brusselator Simulation](../assets/long_ploting_times/model_simulation/incomplete_brusselator_simulation.svg)
3736

3837
We get a warning, indicating that the simulation was terminated. Furthermore, the resulting plot ends at $t ≈ 12$, meaning that the simulation was not completed (as the simulation's endpoint is $t = 20$). Indeed, we can confirm this by checking the *return code* of the solution object:
3938
```@example ode_simulation_performance_1

0 commit comments

Comments
 (0)