Figure 3.03¶
Michaelis-Menten kinetics
using Startupusing OrdinaryDiffEq
using Catalyst
using PlotsEnzyme kinetics full model
@time "Build system" rn303 = @reaction_network begin
k1, S + E --> ES
km1, ES --> S + E
k2, ES --> P + E
endBuild system: 0.059413 seconds (45.87 k allocations: 5.510 MiB, 96.20% compilation time: 80% of which was recompilation)
Loading...
up303 = Dict(:S => 5.0, :ES => 0.0, :P => 0.0, :E=>1.0, :k1 => 30.0, :km1 => 1.0, :k2 => 10.0)
tend = 1.0
@time "Build problem" prob303 = ODEProblem(rn303, up303, (0.0, tend); remove_conserved=true)Build problem: 0.552020 seconds (944.16 k allocations: 84.682 MiB, 4.05% gc time, 90.16% compilation time: 84% of which was recompilation)
ODEProblem with uType Vector{Float64} and tType Float64. In-place: true
Initialization status: FULLY_DETERMINED
Non-trivial mass matrix: false
timespan: (0.0, 1.0)
u0: 2-element Vector{Float64}:
5.0
1.0@time "Solve problem" sol303 = solve(prob303, Tsit5())
plot(sol303, idxs=[:S, :ES, :P, :E], title="Fig. 3.03 (Full model)", xlabel="Time", ylabel="Concentration")Solve problem: 1.285235 seconds (2.14 M allocations: 147.881 MiB, 1.77% gc time, 99.77% compilation time)

QSSA of the ES complex¶
@time "Build system" rn303mm = @reaction_network begin
mm(S, k2 * ET, (km1 + k2) / k1), S => P
endBuild system: 0.062925 seconds (171.73 k allocations: 12.178 MiB, 98.31% compilation time)
Loading...
up303mm = Dict(:k1 => 30.0, :km1 => 1.0, :k2 => 10.0, :ET => 1.0, :S => 5.0, :P => 0.0)
tend = 1.0
@time "Build problem" prob303mm = ODEProblem(rn303mm, up303mm, (0.0, tend); remove_conserved=true)
@time "Solve problem" sol303mm = solve(prob303mm, Tsit5())
plot(sol303mm, idxs=[:S, :P], labels=["S (QSSA)" "P (QSSA)"], title="Fig. 3.03 (QSSA vs Full)", xlabel="Time", ylabel="Concentration")
plot!(sol303, idxs=[:S, :P], labels=["S (full)" "P (full)"], linestyle=:dash, legend=:right)Build problem: 1.034913 seconds (1.89 M allocations: 136.285 MiB, 2.79% gc time, 96.87% compilation time)
Solve problem: 0.638760 seconds (1.24 M allocations: 86.978 MiB, 4.83% gc time, 99.50% compilation time)

Fig 3.13¶
Generalized mass action (GMA) vs. Michaelis-Menten rate laws
using Plots
plot([t -> 2t / (1+t), t -> t^0.4], 0, 4, labels=["MM" "GMA"], title="Fig. 3.13", xlabel="Substrate concentration (S / Km)", ylabel="Reaction rate (AU)")
This notebook was generated using Literate.jl.