Skip to content

Commit

Permalink
new units
Browse files Browse the repository at this point in the history
  • Loading branch information
sosiristseng committed Dec 6, 2024
1 parent 88005c9 commit ce7d01d
Show file tree
Hide file tree
Showing 8 changed files with 163 additions and 173 deletions.
84 changes: 42 additions & 42 deletions docs/bcl-effects.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,59 +26,59 @@ callback = build_stim_callbacks(Istim, stimend; period=1second, starttime=stimst
plot(sol, idxs=sys.vm, title="Action potential", ylabel="mV", xlabel="Time (ms)", label=false)

#---
plot(sol, idxs=sys.vm, title="Action potential", tspan=(299000, 300000), ylabel="mV", xlabel="Time (ms)", label=false)
plot(sol, idxs=sys.vm, title="Action potential", tspan=(299second, 300second), ylabel="mV", xlabel="Time (ms)", label=false)

#---
plot(sol, idxs=[sys.IK1, sys.Ito, sys.IKs, sys.IKr, sys.If], tspan=(299000, 300000), xlabel="Time (ms)")
plot(sol, idxs=[sys.IK1, sys.Ito, sys.IKs, sys.IKr, sys.If], tspan=(299second, 300second), xlabel="Time (ms)")

#---
plot(sol, idxs=[sys.Cai_sub_SR * 1E6, sys.Cai_sub_SL * 1E6, sys.Cai_mean * 1E6], tspan=(299, 300), title="Calcium transient", ylabel="nM", xlabel="Time (sec.)", label=["CaSR" "CaSL" "CaAvg"])
plot(sol, idxs=[sys.Cai_sub_SR * 1000, sys.Cai_sub_SL * 1000, sys.Cai_mean * 1000], tspan=(299second, 300second), title="Calcium transient", ylabel="nM", xlabel="Time (ms)", label=["CaSR" "CaSL" "CaAvg"])

#---
plot(sol, idxs=sys.CaMKAct * 100, title="Active CaMKII", ylabel="Active CaMKII (%)", xlabel="Time (sec.)", label=false)
plot(sol, idxs=sys.CaMKAct * 100, title="Active CaMKII", ylabel="Active CaMKII (%)", xlabel="Time (ms)", label=false)

# ## 2Hz
callback = build_stim_callbacks(Istim, stimend; period=1 / 2, starttime=stimstart)
@time sol2 = solve(prob, alg; callback, abstol=1e-6, reltol=1e-6)
callback = build_stim_callbacks(Istim, stimend; period=1 / 2 * second, starttime=stimstart)
@time sol2 = solve(prob, alg; callback)

#---
plot(sol2, idxs=sys.vm * 1000, title="Action potential", ylabel="mV", xlabel="Time (sec.)", label=false)
plot(sol2, idxs=sys.vm, title="Action potential", ylabel="mV", xlabel="Time (ms)", label=false)

#---
plot(sol2, idxs=sys.vm * 1000, title="Action potential", tspan=(299, 300), ylabel="mV", xlabel="Time (sec.)", label=false)
plot(sol2, idxs=sys.vm, title="Action potential", tspan=(299second, 300second), ylabel="mV", xlabel="Time (ms)", label=false)

#---
plot(sol2, idxs=[sys.Cai_sub_SR * 1E6, sys.Cai_sub_SL * 1E6, sys.Cai_mean * 1E6], tspan=(299, 300), title="Calcium transient", ylabel="nM", xlabel="Time (sec.)", label=["CaSR" "CaSL" "CaAvg"])
plot(sol2, idxs=[sys.Cai_sub_SR * 1000, sys.Cai_sub_SL * 1000, sys.Cai_mean * 1000], tspan=(299second, 300second), title="Calcium transient", ylabel="nM", xlabel="Time (ms)", label=["CaSR" "CaSL" "CaAvg"])

#---
plot(sol2, idxs=sys.CaMKAct * 100, title="Active CaMKII", ylabel="Active CaMKII (%)", xlabel="Time (sec.)", label=false)
plot(sol2, idxs=sys.CaMKAct * 100, title="Active CaMKII", ylabel="Active CaMKII (%)", xlabel="Time (ms)", label=false)

# ## 3Hz
# AP not stable
callback = build_stim_callbacks(Istim, stimend; period=1 / 3, starttime=stimstart)
@time sol3 = solve(prob, alg; callback, abstol=1e-6, reltol=1e-6)
callback = build_stim_callbacks(Istim, stimend; period=1 / 3 * second, starttime=stimstart)
@time sol3 = solve(prob, alg; callback)

#---
plot(sol3, idxs=sys.vm * 1000, title="Action potential", ylabel="mV", xlabel="Time (sec.)", label=false)
plot(sol3, idxs=sys.vm, title="Action potential", ylabel="mV", xlabel="Time (ms)", label=false)

#---
plot(sol3, idxs=sys.vm * 1000, title="Action potential", tspan=(298, 300), ylabel="mV", xlabel="Time (sec.)", label=false)
plot(sol3, idxs=sys.vm, title="Action potential", tspan=(299second, 300second), ylabel="mV", xlabel="Time (ms)", label=false)

#---
plot(sol3, idxs=[sys.Cai_sub_SR * 1E6, sys.Cai_sub_SL * 1E6, sys.Cai_mean * 1E6], tspan=(299, 300), title="Calcium transient", ylabel="nM", xlabel="Time (sec.)", label=["CaSR" "CaSL" "CaAvg"])
plot(sol3, idxs=[sys.Cai_sub_SR * 1000, sys.Cai_sub_SL * 1000, sys.Cai_mean * 1000], tspan=(299second, 300second), title="Calcium transient", ylabel="nM", xlabel="Time (ms)", label=["CaSR" "CaSL" "CaAvg"])

#---
plot(sol3, idxs=sys.CaMKAct * 100, title="Active CaMKII", ylabel="Active CaMKII (%)", xlabel="Time (sec.)", label=false)
plot(sol3, idxs=sys.CaMKAct * 100, title="Active CaMKII", ylabel="Active CaMKII (%)", xlabel="Time (ms)", label=false)

# ## Comparing 1-3 Hz
plot(sol, idxs=sys.vm * 1000, title="Action potential", lab="1Hz")
plot!(sol2, idxs=sys.vm * 1000, lab="2Hz")
plot!(sol3, idxs=sys.vm * 1000, lab="3Hz", tspan=(299, 300), xlabel="Time (sec.)", ylabel="Voltage (mV)")
plot(sol, idxs=sys.vm, title="Action potential", lab="1Hz")
plot!(sol2, idxs=sys.vm, lab="2Hz")
plot!(sol3, idxs=sys.vm, lab="3Hz", tspan=(299second, 300second), xlabel="Time (ms)", ylabel="Voltage (mV)")

#---
plot(sol, idxs=sys.CaMKAct * 100, title="CaMKII", lab="1Hz")
plot!(sol2, idxs=sys.CaMKAct * 100, lab="2Hz")
plot!(sol3, idxs=sys.CaMKAct * 100, lab="3Hz", xlabel="Time (sec.)", ylabel="Active fraction (%)")
plot!(sol3, idxs=sys.CaMKAct * 100, lab="3Hz", xlabel="Time (ms)", ylabel="Active fraction (%)")

# ## Data fitting
### Pacing duration and CaMKII activity
Expand All @@ -100,22 +100,22 @@ plot!(ts, ninety, yerr=ninety_error, lab="90 sec (-0.25)", color=:green, markers
plot!(title="Pacing duration", xlabel="Time (sec.)", ylabel="CaMKII activity (AU)")

# Simulation
stimstart = 30.0
callback15 = build_stim_callbacks(Istim, stimstart + 15; period=1, starttime=stimstart)
sol15 = solve(prob, alg; callback=callback15, abstol=1e-6, reltol=1e-6)
callback30 = build_stim_callbacks(Istim, stimstart + 30; period=1, starttime=stimstart)
sol30 = solve(prob, alg; callback=callback30, abstol=1e-6, reltol=1e-6)
callback60 = build_stim_callbacks(Istim, stimstart + 60; period=1, starttime=stimstart)
sol60 = solve(prob, alg; callback=callback60, abstol=1e-6, reltol=1e-6)
callback90 = build_stim_callbacks(Istim, stimstart + 90; period=1, starttime=stimstart)
sol90 = solve(prob, alg; callback=callback90, abstol=1e-6, reltol=1e-6)
stimstart = 30.0second
callback15 = build_stim_callbacks(Istim, stimstart + 15second; period=1second, starttime=stimstart)
sol15 = solve(prob, alg; callback=callback15)
callback30 = build_stim_callbacks(Istim, stimstart + 30second; period=1second, starttime=stimstart)
sol30 = solve(prob, alg; callback=callback30)
callback60 = build_stim_callbacks(Istim, stimstart + 60second; period=1second, starttime=stimstart)
sol60 = solve(prob, alg; callback=callback60)
callback90 = build_stim_callbacks(Istim, stimstart + 90second; period=1second, starttime=stimstart)
sol90 = solve(prob, alg; callback=callback90)
idx = sys.CaMKAct * 100

plot(sol15, idxs=idx, tspan=(0, 205), lab="15 sec", color=:blue)
plot!(sol30, idxs=idx, tspan=(0, 205), lab="30 sec", color=:red)
plot!(sol60, idxs=idx, tspan=(0, 205), lab="60 sec", color=:orange)
plot!(sol90, idxs=idx, tspan=(0, 205), lab="90 sec", color=:green)
plot!(title="Pacing duration", xlabel="Time (sec.)", ylabel="CaMKII activity (%)")
plot(sol15, idxs=idx, tspan=(0second, 205second), lab="15 sec", color=:blue)
plot!(sol30, idxs=idx, tspan=(0second, 205second), lab="30 sec", color=:red)
plot!(sol60, idxs=idx, tspan=(0second, 205second), lab="60 sec", color=:orange)
plot!(sol90, idxs=idx, tspan=(0second, 205second), lab="90 sec", color=:green)
plot!(title="Pacing duration", xlabel="Time (ms)", ylabel="CaMKII activity (%)")

# ### Pacing frequency and CaMKII activity
freqdf = CSV.read(joinpath(@__DIR__, "data/CaMKAR-freq.csv"), DataFrame)
Expand All @@ -130,17 +130,17 @@ plot!(ts, twohz, yerr=twohz_error, lab="2 Hz", color=:red, markerstrokecolor=:re
plot!(title="Pacing frequency", xlabel="Time (sec.)", ylabel="CaMKII activity (AU)")

#---
tend = 205.0
tend = 205.0second
prob = ODEProblem(sys, [], tend)
stimstart = 30.0
stimend = 120.0
callback = build_stim_callbacks(Istim, stimend; period=1, starttime=stimstart)
sol1 = solve(prob, alg; callback, abstol=1e-6, reltol=1e-6)
stimstart = 30.0second
stimend = 120.0second
callback = build_stim_callbacks(Istim, stimend; period=1second, starttime=stimstart)
sol1 = solve(prob, alg; callback)

callback2 = build_stim_callbacks(Istim, stimend; period=0.5, starttime=stimstart)
sol2 = solve(prob, alg; callback=callback2, abstol=1e-6, reltol=1e-6)
callback2 = build_stim_callbacks(Istim, stimend; period=0.5second, starttime=stimstart)
sol2 = solve(prob, alg; callback=callback2)
idx = sys.CaMKAct * 100

plot(sol1, idxs=idx, lab="1 Hz", color=:blue)
plot!(sol2, idxs=idx, lab="2 Hz", color=:red)
plot!(title="Pacing frequency", xlabel="Time (sec.)", ylabel="CaMKII activity (%)", ylims=(5, 70))
plot!(title="Pacing frequency", xlabel="Time (ms)", ylabel="CaMKII activity (%)", ylims=(5, 70))
43 changes: 21 additions & 22 deletions docs/caffeine-effects.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,53 @@ using OrdinaryDiffEq
using DiffEqCallbacks
using Plots
using CaMKIIModel
using CaMKIIModel: second
Plots.default(lw=1.5)

#---
sys = build_neonatal_ecc_sys(simplify=true, reduce_iso=true)
tend = 500.0
tend = 500.0second
prob = ODEProblem(sys, [], tend)
stimstart = 100.0
stimend = 300.0
stimstart = 100.0second
stimend = 300.0second
alg = TRBDF2()
function add_coffee_affect!(integrator)
integrator.ps[sys.RyRsensitivity] = 10
end

@unpack Istim = sys
callback = build_stim_callbacks(Istim, stimend; period=1, starttime=stimstart)
# Add caffeine at t = 200
callback_caf = CallbackSet(build_stim_callbacks(Istim, stimend; period=1, starttime=stimstart), PresetTimeCallback(200.0, add_coffee_affect!))
callback = build_stim_callbacks(Istim, stimend; period=1second, starttime=stimstart)
# Add caffeine at t = 200 econd
callback_caf = CallbackSet(build_stim_callbacks(Istim, stimend; period=1second, starttime=stimstart), PresetTimeCallback(200.0second, add_coffee_affect!))

#---
sol = solve(prob, alg; callback, abstol=1e-6, reltol=1e-6)
sol_caf = solve(prob, alg; callback=callback_caf, abstol=1e-6, reltol=1e-6)
sol = solve(prob, alg; callback)
sol_caf = solve(prob, alg; callback=callback_caf)

#---
plot(sol, idxs=sys.vm * 1000, title="Action potential", lab="Ctl")
plot!(sol_caf, idxs=sys.vm * 1000, lab="Caf", tspan=(195, 210), ylabel="Voltage (mV)")
plot(sol, idxs=sys.vm, title="Action potential", lab="Ctl")
plot!(sol_caf, idxs=sys.vm, lab="Caf", tspan=(198second, 205second), ylabel="Voltage (mV)")

#---
plot(sol, idxs=sys.Cai_sub_SR * 1E6, title="Calcium transient (During caffeine addition)", lab="Ctl")
plot!(sol_caf, idxs=sys.Cai_sub_SR * 1E6, tspan=(195, 210), lab="Caf", ylabel="Subspace calcium (nM)")
plot(sol, idxs=sys.Cai_sub_SR * 1000, title="Calcium transient (During caffeine addition)", lab="Ctl")
plot!(sol_caf, idxs=sys.Cai_sub_SR * 1000, tspan=(198second, 205second), lab="Caf", ylabel="Subspace calcium (nM)")

#---
plot(sol, idxs=sys.PO1RyR, title="RyR open (During caffeine addition)", lab="Ctl")
plot!(sol_caf, idxs=sys.PO1RyR, tspan=(195, 210), lab="Caf", ylabel="Open probability", ylims=(0, 1))
plot!(sol_caf, idxs=sys.PO1RyR, tspan=(198second, 205second), lab="Caf", ylabel="Open probability", ylims=(0, 1), xlabel="Time (ms)")

#---
plot(sol, idxs=sys.Cai_sub_SR * 1E6, title="Calcium transient (After caffeine addition)", lab="Ctl", ylabel="Subspace calcium (nM)")
plot!(sol_caf, idxs=sys.Cai_sub_SR * 1E6, tspan=(295, 300), lab="Caf")
plot(sol, idxs=sys.Cai_sub_SR * 1000, title="Calcium transient (After caffeine addition)", lab="Ctl", ylabel="Subspace calcium (nM)")
plot!(sol_caf, idxs=sys.Cai_sub_SR * 1000, tspan=(198second, 205second), lab="Caf", xlabel="Time (ms)")

#---
plot(sol, idxs=sys.CaJSR * 1E3, title="SR Calcium (During caffeine addition)", lab="Ctl", ylabel="SR calcium (μM)")
plot!(sol_caf, idxs=sys.CaJSR * 1E3, tspan=(195, 210), lab="Caf", ylims=(0, 850))
plot(sol, idxs=sys.CaJSR, title="SR Calcium (During caffeine addition)", lab="Ctl", ylabel="SR calcium (μM)")
plot!(sol_caf, idxs=sys.CaJSR, tspan=(198second, 205second), lab="Caf", ylims=(0, 850), xlabel="Time (ms)")

#---
plot(sol, idxs=sys.Jrel, title="Ca flux", lab="Ctl (Jrel)")
plot!(sol_caf, idxs=sys.Jrel, lab="Caf (Jrel)", ylabel="μM/ms")
plot!(sol, idxs=sys.Jup, lab="Ctl (Jup)")
plot!(sol_caf, idxs=sys.Jup, lab="Caf (Jup)", tspan=(195, 210), ylabel="μM/ms")
plot!(sol_caf, idxs=sys.Jrel, lab="Caf (Jrel)", tspan=(198second, 205second), ylabel="μM/ms", xlabel="Time (ms)")

#---
plot(sol, idxs=sys.CaMKAct, title="Active CaMKII", lab="Ctl")
plot!(sol_caf, idxs=sys.CaMKAct, lab="Caf")
plot(sol, idxs=sys.CaMKAct*100, title="Active CaMKII", lab="Ctl")
plot!(sol_caf, idxs=sys.CaMKAct*100, lab="Caf", ylabel="CaMKII activity (%)", xlabel="Time (ms)")
34 changes: 17 additions & 17 deletions docs/camk-sens.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,27 @@ extract(sim, k) = map(s -> s[k], sim)
rmse(fit) = sqrt(sum(abs2, fit.resid) / length(fit.resid))

# Components
xopts = (xlabel="Ca (μM)", xscale=:log10, minorgrid=true, xlims=(ca[1] * 1000, ca[end]*1000))
plot(ca .* 1000, extract(sim, sys.CaM0), lab="CaM0", ylabel="Conc. (mM)"; xopts...)
plot!(ca .* 1000, extract(sim, sys.Ca2CaM_C), lab="Ca2CaM_C")
plot!(ca .* 1000, extract(sim, sys.Ca2CaM_N), lab="Ca2CaM_N")
plot!(ca .* 1000, extract(sim, sys.Ca4CaM), lab="Ca4CaM")
plot!(ca .* 1000, extract(sim, sys.CaMK), lab="CaMK")
plot!(ca .* 1000, extract(sim, sys.CaM0_CaMK), lab="CaM0_CaMK")
plot!(ca .* 1000, extract(sim, sys.Ca2CaM_C_CaMK), lab="Ca2CaM_C_CaMK")
plot!(ca .* 1000, extract(sim, sys.Ca2CaM_N_CaMK), lab="Ca2CaM_N_CaMK")
plot!(ca .* 1000, extract(sim, sys.Ca4CaM_CaMK), lab="Ca4CaM_CaMK", legend=:topleft, size=(600, 600))
xopts = (xlabel="Ca (μM)", xscale=:log10, minorgrid=true, xlims=(ca[1], ca[end]))
plot(ca, extract(sim, sys.CaM0), lab="CaM0", ylabel="Conc. (μM)"; xopts...)
plot!(ca, extract(sim, sys.Ca2CaM_C), lab="Ca2CaM_C")
plot!(ca, extract(sim, sys.Ca2CaM_N), lab="Ca2CaM_N")
plot!(ca, extract(sim, sys.Ca4CaM), lab="Ca4CaM")
plot!(ca, extract(sim, sys.CaMK), lab="CaMK")
plot!(ca, extract(sim, sys.CaM0_CaMK), lab="CaM0_CaMK")
plot!(ca, extract(sim, sys.Ca2CaM_C_CaMK), lab="Ca2CaM_C_CaMK")
plot!(ca, extract(sim, sys.Ca2CaM_N_CaMK), lab="Ca2CaM_N_CaMK")
plot!(ca, extract(sim, sys.Ca4CaM_CaMK), lab="Ca4CaM_CaMK", legend=:topleft, size=(600, 600))

#---
println("Basal activity without ca is ", sol0[sys.CaMKAct][end])
plot(ca .* 1000, extract(sim, sys.CaMKAct), label=false, title="Active CaMKII", ylims=(0, 0.5); xopts...)
plot(ca, extract(sim, sys.CaMKAct), label=false, title="Active CaMKII", ylims=(0, 0.5); xopts...)

# ## Least-square fitting of steady state CaMKII activity
@. model_camk(x, p) = p[1] * hil(x, p[2], p[4]) + p[3]
xdata = ca
ydata = extract(sim, sys.CaMKAct)
p0 = [0.2, 1e-3, 0.01, 2.2]
lb = [0.0, 1e-9, 0.0, 1.0]
p0 = [0.2, 1μM, 0.02, 2.2]
lb = [0.0, 1E-6μM, 0.0, 1.0]
fit = curve_fit(model_camk, xdata, ydata, inv.(ydata), p0; lower=lb, autodiff=:forwarddiff)

# Parameters
Expand All @@ -65,8 +65,8 @@ rmse(fit)
# Fit result
yestim = model_camk.(xdata, Ref(pestim))

p1 = plot(xdata .* 1000, [ydata yestim], lab=["Full model" "Fitted"], line=[:dash :dot], title="CaMKII activity", legend=:topleft; xopts...)
p2 = plot(xdata .* 1000, (yestim .- ydata) ./ ydata .* 100, title="Relative error (%)", xlabel="Ca (μM)", lab=false; xopts...)
p1 = plot(xdata, [ydata yestim], lab=["Full model" "Fitted"], line=[:dash :dot], title="CaMKII activity", legend=:topleft; xopts...)
p2 = plot(xdata, (yestim .- ydata) ./ ydata .* 100, title="Relative error (%)", xlabel="Ca (μM)", lab=false; xopts...)
plot(p1, p2, layout=(2, 1), size=(600, 600))

# ## Least-square fitting of kinetic CaMKII activity
Expand Down Expand Up @@ -103,6 +103,6 @@ rmse(fit)

# Fit result
yestim = model.(xdata, Ref(pestim))
p1 = plot(xdata .* 1000, [ydata yestim], lab=["Full model" "Fitted"], line=[:dash :dot], title="CaMKII activity"; xopts...)
p2 = plot(xdata .* 1000, (yestim .- ydata) ./ ydata .* 100, xlabel="Ca (μM)", title="Relative error (%)", lab=false; xopts...)
p1 = plot(xdata, [ydata yestim], lab=["Full model" "Fitted"], line=[:dash :dot], title="CaMKII activity"; xopts...)
p2 = plot(xdata, (yestim .- ydata) ./ ydata .* 100, xlabel="Ca (μM)", title="Relative error (%)", lab=false; xopts...)
plot(p1, p2, layout=(2, 1), size=(600, 600))
37 changes: 13 additions & 24 deletions docs/camk-simp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ using DiffEqCallbacks
using Plots
using LsqFit
using CaMKIIModel
using CaMKIIModel: μM, hil, Hz
using CaMKIIModel: μM, hil, Hz, second
Plots.default(lw=1.5)

#---
Expand All @@ -18,39 +18,28 @@ println("# of state variable in the original model: ", length(unknowns(sys)))
println("# of state variable in the simplified model: ", length(unknowns(sys_simp)))

#---
tend = 500.0
stimstart = 100.0
stimend = 300.0
tend = 500.0second
stimstart = 100.0second
stimend = 300.0second
alg = FBDF()
@unpack Istim = sys
callback = build_stim_callbacks(Istim, stimend; period=1, starttime=stimstart)
callback = build_stim_callbacks(Istim, stimend; period=1second, starttime=stimstart)
prob = ODEProblem(sys, [], tend)
prob_simp = ODEProblem(sys_simp, [], tend)

#---
@time sol = solve(prob, alg; callback, abstol=1e-6, reltol=1e-6)
@time sol_simp = solve(prob_simp, alg; callback, abstol=1e-6, reltol=1e-6)
@time sol = solve(prob, alg; callback)
@time sol_simp = solve(prob_simp, alg; callback)

#---
plot(sol, idxs=sys.vm*1000, tspan=(295, 300), label= "Full", title="Action potential")
plot!(sol_simp, idxs=sys.vm*1000, tspan=(295, 300), label= "Simplified", line=:dash)
plot(sol, idxs=sys.vm, label= "Full", title="Action potential")
plot!(sol_simp, idxs=sys.vm, tspan=(295second, 300second), label= "Simplified", line=:dash, xlabel="Time (ms)")

# Something is wrong
plot(sol, idxs=sys.CaMKAct, label= "Full model", title="Active CaMKII")
plot!(sol_simp, idxs=sys_simp.CaMKAct, label= "Simplified model", line=:dash)
plot!(sol_simp, idxs=sys_simp.CaMKAct, label= "Simplified model", line=:dash, xlabel="Time (ms)")

# PCaM too high
@unpack CaM, KCaM, PCaM, CaMK = sys_simp
# Phosphorylated CaMKII too high
@unpack CaM, KCaM, PCaM, CaMKP = sys_simp
@unpack CaM0, CaM2C, CaM2N, CaM4, CaM0_CaMK, CaM2C_CaMK, CaM2N_CaMK, CaM4_CaMK, CaM0_CaMKP, CaM2C_CaMKP, CaM2N_CaMKP, CaM4_CaMKP = sys_simp
plot(sol_simp, idxs=[CaM, KCaM, PCaM, CaMK], tspan=(100, 105))

@unpack CaM0, Ca2CaM_C, Ca2CaM_N, Ca4CaM = sys
plot(sol, idxs=[CaM0, Ca2CaM_C, Ca2CaM_N, Ca4CaM], tspan=(100, 105))

#---
@parameters Ca = 0 ROS=0
ksys = CaMKIIModel.get_camkii_fast_ca_binding_sys(Ca; ROS)

for eq in equations(ksys)
println(eq)
end
plot(sol_simp, idxs=[CaMKP, KCaM, PCaM, CaMK], tspan=(100second, 105second))
Loading

0 comments on commit ce7d01d

Please sign in to comment.