Pacing response#
using ModelingToolkit
using OrdinaryDiffEq, SteadyStateDiffEq, DiffEqCallbacks
using Plots
using CSV
using DataFrames
using CaMKIIModel
using CaMKIIModel: second
Plots.default(lw=1.5)
Setup the ODE system#
Electrical stimulation starts at t=100 seconds and ends at t=300 seconds.
sys = build_neonatal_ecc_sys(simplify=true, reduce_iso=true, reduce_camk=true)
tend = 500.0second
prob = ODEProblem(sys, [], tend)
stimstart = 100.0second
stimend = 300.0second
@unpack Istim = sys
alg = KenCarp47()
KenCarp47(; linsolve = nothing, nlsolve = OrdinaryDiffEqNonlinearSolve.NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}, Nothing}(1//100, 10, 1//5, 1//5, false, true, nothing), precs = DEFAULT_PRECS, smooth_est = true, extrapolant = linear, controller = PI, autodiff = ADTypes.AutoForwardDiff(),)
Single pulse#
callback = build_stim_callbacks(Istim, stimstart + 1second; period=10second, starttime=stimstart)
@time sol = solve(prob, alg; callback)
8.815714 seconds (17.86 M allocations: 862.100 MiB, 2.28% gc time, 99.78% compilation time)
retcode: Success
Interpolation: 3rd order Hermite
t: 132-element Vector{Float64}:
0.0
0.019333123284849308
0.09098129546757994
0.20735582943983855
0.45611910276862533
1.0472562928406122
2.0342667657223696
3.451776641148454
6.733792423912806
12.450117081023194
⋮
230382.09109389439
250334.14198318147
276732.97650269174
305589.70760321256
343648.3643015185
381707.0209998244
426137.3087613709
478963.4999558724
500000.0
u: 132-element Vector{Vector{Float64}}:
[150952.75035000002, 13838.37602, -68.79268, 0.12113, 0.12113, 0.12113, 0.12113, 0.12113, 0.12113, 0.12113 … 0.26081, 0.00977, 0.00188, 0.09243, 0.22156, 0.966, 0.00702, 830.0, 830.0, 0.0026]
[150952.7504077194, 13838.375711519551, -68.79732946186226, 0.1211319185255175, 0.1211301421535992, 0.12113000811850358, 0.12113000037367234, 0.12113000001389383, 0.12113000000038378, 0.12113000000000405 … 0.2608055799112056, 0.009769882842069916, 0.001879826176081169, 0.09242766669618695, 0.2215639938807744, 0.9660018276402699, 0.007020208561323646, 829.9999654017583, 829.9994975880693, 0.0025985659590295374]
[150952.75062244057, 13838.374513299192, -68.81607005265552, 0.12115248970210647, 0.12113624253259858, 0.12113143375871602, 0.12113027926811751, 0.12113004704056851, 0.12113000693481112, 0.12113000089551408 … 0.26078941009382306, 0.009769459049732313, 0.0018789042446514422, 0.09241901973901424, 0.2215787945110049, 0.9660085993318799, 0.00702008986027517, 829.9998348635061, 829.9976422525165, 0.002593310524681686]
[150952.7509740238, 13838.372555328333, -68.84681913285226, 0.12118951551963696, 0.12115723910142134, 0.12114109135582982, 0.12113403405679991, 0.12113131833063846, 0.12113038966346883, 0.12113010483012127 … 0.2607638707001999, 0.009768805322556195, 0.0018766436937193197, 0.09240497563401104, 0.22160283236040595, 0.9660195931792828, 0.007017234889558555, 829.9996133960318, 829.9946506157202, 0.0025849478335103777]
[150952.7517373371, 13838.368384399068, -68.91207316777846, 0.12125418995384041, 0.12120713813483534, 0.12117519662647316, 0.12115494411090462, 0.12114295934422187, 0.12113633873395535, 0.12113292110288301 … 0.2607122383588733, 0.00976754294689657, 0.0018699196262940568, 0.0923749578279845, 0.2216542075240971, 0.9660430731013478, 0.0070030143052343926, 829.9990964774663, 829.9883445519497, 0.00256770780104998]
[150952.75361533565, 13838.358559292059, -69.06429960994137, 0.12136450208851983, 0.1213063255235844, 0.12125925929399752, 0.12122229800810434, 0.12119414515426227, 0.1211733598588045, 0.12115849269665879 … 0.26060507831375035, 0.009765228548607825, 0.001850533769446942, 0.09230364339951613, 0.22177624785138977, 0.9660987611411453, 0.006946470397388757, 829.9976227528975, 829.9738229154025, 0.0025298083713907005]
[150952.75694915713, 13838.34240329337, -69.31024285744343, 0.1214919651325424, 0.12142927821043338, 0.12137426379919636, 0.12132672249013034, 0.12128628091507473, 0.12125242557826561, 0.12122454121844703 … 0.26047114911179464, 0.009763403076884485, 0.0018178174419014683, 0.09218462776986637, 0.2219798989175973, 0.9661914345949096, 0.0068337541728754475, 829.9944193668179, 829.9509077855928, 0.0024748079782158957]
[150952.76215620188, 13838.319723120678, -69.64637448767432, 0.12162015426876954, 0.12155743299711902, 0.12149988983034497, 0.1214475947100359, 0.12140052118634262, 0.12135855488207907, 0.12132150441596071 … 0.2603648729749554, 0.009765046552800477, 0.001773815690753224, 0.09201383579531924, 0.22227216398019892, 0.9663239343003682, 0.006675512062656749, 829.9883533251192, 829.9205247545176, 0.0024106893964811324]
[150952.77598869594, 13838.2694938995, -70.35063788657428, 0.12180447948880577, 0.12174768443532356, 0.12169340184085964, 0.12164180995533558, 0.12159304920072024, 0.12154722283384184, 0.12150439833798556 … 0.26041507667541997, 0.009786689200123853, 0.0016855899094922325, 0.09161908329520764, 0.22294828828976576, 0.9666286957812559, 0.006355039713677859, 829.9689941817725, 829.8589858006806, 0.002310655727734339]
[150952.80529264064, 13838.18882346682, -71.35304509818071, 0.12196378364408163, 0.12191937753328325, 0.12187579038290339, 0.12183318573340735, 0.12179171693004404, 0.12175152667167365, 0.12171274673876366 … 0.26104417804603025, 0.009873892913308327, 0.0015688568862426045, 0.09093422465365385, 0.22412560303273427, 0.9671554512230358, 0.005926150085676071, 829.923524981244, 829.7704141396295, 0.002228995040224517]
⋮
[151980.49028624358, 12814.832483028786, -68.8510081898723, 0.12767384217999192, 0.12767400229163586, 0.12767416337364373, 0.1276743254768547, 0.1276744886541628, 0.12767465296062228, 0.1276748184535584 … 0.0014250423698417307, 0.0017627342551001263, 0.0027285193466379857, 0.0018953685983712743, 0.9996467051114666, 0.9996452040904568, 0.006998368967307403, 770.8455838105873, 770.6180200821676, 0.0013110578409444096]
[152030.00904324933, 12765.466299737536, -68.74145129891821, 0.12716704343379642, 0.12716718990608736, 0.12716733730341176, 0.12716748567302816, 0.1271676350641057, 0.12716778552782096, 0.12716793711746166 … 0.0014494172971028874, 0.0017771284525137537, 0.00275079299905766, 0.001925309417411859, 0.99963814969328, 0.9996367239653945, 0.007050663069083179, 769.7602825951005, 769.5393862233443, 0.0012741359225048982]
[152089.09351602537, 12706.563769357761, -68.60864036676476, 0.12657564628675144, 0.12657577629648595, 0.12657590716495323, 0.12657603893485658, 0.1265761716506254, 0.1265763053585032, 0.12657644010664124 … 0.00147952623690927, 0.0017947339538125864, 0.0027780351401894402, 0.001962225371177269, 0.9996274986506902, 0.9996261715070294, 0.007114578212720022, 768.4520253448595, 768.2387850222187, 0.0012316604624895827]
[152146.18722126825, 12649.64550353961, -68.47806851254431, 0.1260182455745026, 0.12601835953319368, 0.12601847427534338, 0.12601858983900124, 0.12601870626375442, 0.12601882359080702, 0.12601894186306242 … 0.001509749868844328, 0.0018122096013343692, 0.002805076428836871, 0.0019991921283680977, 0.9996167186969124, 0.9996154981674225, 0.00717797542947114, 767.1768024704755, 766.9706534814293, 0.001192239135049755]
[152211.07758200285, 12584.953714975181, -68.32688636249098, 0.1254019854490565, 0.12540208108524392, 0.1254021774064811, 0.12540227444525254, 0.12540237223535577, 0.1254024708119683, 0.12540257021171855 … 0.001545500213137469, 0.0018326544738340763, 0.002836711082669216, 0.002042844250320985, 0.9996038445572937, 0.9996027585851551, 0.007252082159980444, 765.7180442035267, 765.5195919842757, 0.001149359781460577]
[152265.84267081294, 12530.355196409802, -68.1969035159152, 0.12489655731094274, 0.1248966374672623, 0.1248967182168287, 0.12489679958725196, 0.12489688160725805, 0.12489696430674578, 0.12489704771684712 … 0.0015769134291114398, 0.0018504139188606798, 0.0028641903678845873, 0.0020811178060236445, 0.9995924291825087, 0.9995914683641097, 0.0073164040906048946, 764.4825347894079, 764.2902808013542, 0.0011147549954797018]
[152319.07148988053, 12477.28708745804, -68.06838974081748, 0.12441853484476045, 0.124418600053695, 0.12441866575959952, 0.12441873198522492, 0.12441879875424149, 0.12441886609128594, 0.12441893402201108 … 0.0016086224104961521, 0.0018681388858953257, 0.002891616037660132, 0.0021196466010569783, 0.9995808150571193, 0.9995799902501966, 0.00738055509269968, 763.2808338694929, 763.0943453502068, 0.0010825029284842538]
[152370.08271027615, 12426.42848265943, -67.94314084069937, 0.12397299845207949, 0.12397304948638957, 0.1239731009195843, 0.1239731527696685, 0.12397320505537465, 0.12397325779620004, 0.12397331101244624 … 0.0016401507825884569, 0.001885574542725226, 0.0029185933326556796, 0.002157865318073676, 0.9995691729412434, 0.9995684938718332, 0.007443612494414279, 762.1313928797528, 761.9501924910616, 0.0010528658059629516]
[152387.28737047128, 12409.274925451318, -67.9004151033502, 0.12382562805770414, 0.12382567444052299, 0.12382572118613162, 0.1238257683108938, 0.12382581583183513, 0.12382586376667669, 0.12382591213387083 … 0.0016509231014995903, 0.001891556079585798, 0.002927853454704239, 0.0021710606852824318, 0.9995651368715931, 0.9995644996548957, 0.007465246014074194, 761.7447831969279, 761.565313601655, 0.0010431528709598562]
plot(sol, idxs=(sys.t / 1000 - 100, sys.vm), title="Action potential (single pulse)", ylabel="mV", xlabel="Time (s)", label=false, tspan=(100second, 103second))
plot(sol, idxs=(sys.t / 1000 - 100, sys.Cai_mean), tspan=(100second, 103second), title="Calcium transient", ylabel="Conc. (μM)", xlabel="Time (s)", label="Avg Ca (Model)")
savefig("single-cat.pdf")
"/home/runner/work/camkii-cardiomyocyte-model/camkii-cardiomyocyte-model/docs/single-cat.pdf"
1Hz#
callback = build_stim_callbacks(Istim, stimend; period=1second, starttime=stimstart)
@time sol = solve(prob, alg; callback)
2.179247 seconds (123.36 k allocations: 444.196 MiB, 22.69% gc time)
retcode: Success
Interpolation: 3rd order Hermite
t: 8777-element Vector{Float64}:
0.0
0.019333123284849308
0.09098129546757994
0.20735582943983855
0.45611910276862533
1.0472562928406122
2.0342667657223696
3.451776641148454
6.733792423912806
12.450117081023194
⋮
397424.7042189424
407501.545569217
419312.44428011804
431123.3429910191
444442.86097506154
459554.07799577154
475060.9447134036
494261.2568299187
500000.0
u: 8777-element Vector{Vector{Float64}}:
[150952.75035000002, 13838.37602, -68.79268, 0.12113, 0.12113, 0.12113, 0.12113, 0.12113, 0.12113, 0.12113 … 0.26081, 0.00977, 0.00188, 0.09243, 0.22156, 0.966, 0.00702, 830.0, 830.0, 0.0026]
[150952.7504077194, 13838.375711519551, -68.79732946186226, 0.1211319185255175, 0.1211301421535992, 0.12113000811850358, 0.12113000037367234, 0.12113000001389383, 0.12113000000038378, 0.12113000000000405 … 0.2608055799112056, 0.009769882842069916, 0.001879826176081169, 0.09242766669618695, 0.2215639938807744, 0.9660018276402699, 0.007020208561323646, 829.9999654017583, 829.9994975880693, 0.0025985659590295374]
[150952.75062244057, 13838.374513299192, -68.81607005265552, 0.12115248970210647, 0.12113624253259858, 0.12113143375871602, 0.12113027926811751, 0.12113004704056851, 0.12113000693481112, 0.12113000089551408 … 0.26078941009382306, 0.009769459049732313, 0.0018789042446514422, 0.09241901973901424, 0.2215787945110049, 0.9660085993318799, 0.00702008986027517, 829.9998348635061, 829.9976422525165, 0.002593310524681686]
[150952.7509740238, 13838.372555328333, -68.84681913285226, 0.12118951551963696, 0.12115723910142134, 0.12114109135582982, 0.12113403405679991, 0.12113131833063846, 0.12113038966346883, 0.12113010483012127 … 0.2607638707001999, 0.009768805322556195, 0.0018766436937193197, 0.09240497563401104, 0.22160283236040595, 0.9660195931792828, 0.007017234889558555, 829.9996133960318, 829.9946506157202, 0.0025849478335103777]
[150952.7517373371, 13838.368384399068, -68.91207316777846, 0.12125418995384041, 0.12120713813483534, 0.12117519662647316, 0.12115494411090462, 0.12114295934422187, 0.12113633873395535, 0.12113292110288301 … 0.2607122383588733, 0.00976754294689657, 0.0018699196262940568, 0.0923749578279845, 0.2216542075240971, 0.9660430731013478, 0.0070030143052343926, 829.9990964774663, 829.9883445519497, 0.00256770780104998]
[150952.75361533565, 13838.358559292059, -69.06429960994137, 0.12136450208851983, 0.1213063255235844, 0.12125925929399752, 0.12122229800810434, 0.12119414515426227, 0.1211733598588045, 0.12115849269665879 … 0.26060507831375035, 0.009765228548607825, 0.001850533769446942, 0.09230364339951613, 0.22177624785138977, 0.9660987611411453, 0.006946470397388757, 829.9976227528975, 829.9738229154025, 0.0025298083713907005]
[150952.75694915713, 13838.34240329337, -69.31024285744343, 0.1214919651325424, 0.12142927821043338, 0.12137426379919636, 0.12132672249013034, 0.12128628091507473, 0.12125242557826561, 0.12122454121844703 … 0.26047114911179464, 0.009763403076884485, 0.0018178174419014683, 0.09218462776986637, 0.2219798989175973, 0.9661914345949096, 0.0068337541728754475, 829.9944193668179, 829.9509077855928, 0.0024748079782158957]
[150952.76215620188, 13838.319723120678, -69.64637448767432, 0.12162015426876954, 0.12155743299711902, 0.12149988983034497, 0.1214475947100359, 0.12140052118634262, 0.12135855488207907, 0.12132150441596071 … 0.2603648729749554, 0.009765046552800477, 0.001773815690753224, 0.09201383579531924, 0.22227216398019892, 0.9663239343003682, 0.006675512062656749, 829.9883533251192, 829.9205247545176, 0.0024106893964811324]
[150952.77598869594, 13838.2694938995, -70.35063788657428, 0.12180447948880577, 0.12174768443532356, 0.12169340184085964, 0.12164180995533558, 0.12159304920072024, 0.12154722283384184, 0.12150439833798556 … 0.26041507667541997, 0.009786689200123853, 0.0016855899094922325, 0.09161908329520764, 0.22294828828976576, 0.9666286957812559, 0.006355039713677859, 829.9689941817725, 829.8589858006806, 0.002310655727734339]
[150952.80529264064, 13838.18882346682, -71.35304509818071, 0.12196378364408163, 0.12191937753328325, 0.12187579038290339, 0.12183318573340735, 0.12179171693004404, 0.12175152667167365, 0.12171274673876366 … 0.26104417804603025, 0.009873892913308327, 0.0015688568862426045, 0.09093422465365385, 0.22412560303273427, 0.9671554512230358, 0.005926150085676071, 829.923524981244, 829.7704141396295, 0.002228995040224517]
⋮
[151516.28206527093, 13277.629153741002, -69.80858940493282, 0.13288555843841782, 0.13288583486458141, 0.1328861121929038, 0.13288639049562848, 0.13288666984792047, 0.13288695032801517, 0.1328872320173767 … 0.0012287232976705307, 0.0016417244488511772, 0.0025412580284798984, 0.0016523176147936413, 0.9997133212139253, 0.9997113833585525, 0.006557382727385322, 780.2728981837001, 779.9714520225343, 0.0017170796983399829]
[151562.38261258267, 13231.66546305158, -69.71862289060863, 0.13233264394586258, 0.13233290996644934, 0.1323331769386168, 0.13233344493356536, 0.1323337140253747, 0.13233398429115, 0.13233425581117883 … 0.0012459491034613613, 0.0016527351408755818, 0.0025582976714194137, 0.0016737895502031335, 0.9997076421721236, 0.9997057309630236, 0.006597611718488925, 779.4102480266212, 779.1170738589566, 0.0016718408496399799]
[151613.81669215864, 13180.385081381855, -69.61700594755747, 0.1317246273425471, 0.13172488145553002, 0.13172513656340612, 0.13172539273591546, 0.13172565004561726, 0.1317259085680339, 0.13172616838180345 … 0.0012656993009170345, 0.0016652581806363418, 0.002577677547278206, 0.0016983702902375305, 0.9997010892525385, 0.9996992145085017, 0.006643338869342505, 778.4265356265522, 778.142344403794, 0.0016226637963923174]
[151662.5880656294, 13131.76038698689, -69.51939463433736, 0.1311568061235867, 0.1311570485874773, 0.1311572920764443, 0.13115753665855664, 0.1311577824046353, 0.13115802938839333, 0.1311582776865851 … 0.0012849636622100425, 0.0016773781374410444, 0.0025964335396343532, 0.0017223153784428037, 0.9996946583539947, 0.999692816885975, 0.006687570269143486, 777.4735282718756, 777.1976165679929, 0.001577284927604014]
[151714.5866033732, 13079.919128003627, -69.41395638289586, 0.13056093631260757, 0.13056116603605072, 0.13056139680511886, 0.13056162868578333, 0.13056186174668327, 0.13056209605926172, 0.1305623316979102 … 0.0013061060254890551, 0.0016905667142834175, 0.0026168429455936497, 0.0017485507116610532, 0.9996875526294893, 0.9996857544810507, 0.006735672818734858, 776.4368544928474, 776.1695154738783, 0.0015302434274815843]
[151769.91104435982, 13024.762906025326, -69.30016806028712, 0.12993794101754713, 0.12993815685098561, 0.12993837373925737, 0.12993859174581032, 0.12993881093665735, 0.1299390313805073, 0.12993925314890373 … 0.0013293131098274578, 0.0017049146687788089, 0.0026390462170076405, 0.0017773021197576404, 0.9996796990245773, 0.9996779499156601, 0.0067879689781844945, 775.3117457729004, 775.0532400415294, 0.0014817073105379303]
[151822.91408962966, 12971.921765796867, -69.18956823697846, 0.12935187582785487, 0.12935207806684781, 0.1293522813566404, 0.12935248575793454, 0.12935269133388627, 0.12935289815023074, 0.12935310627541532 … 0.0013522660648887976, 0.0017189737540017124, 0.002660802156271941, 0.0018056880253657143, 0.9996718726751624, 0.9996701800677339, 0.006839175867749168, 774.2135606553588, 773.9632410382385, 0.001436661086954111]
[151883.63078448834, 12911.391246833193, -69.06086872334757, 0.12869374069404158, 0.12869392697686519, 0.128694114291341, 0.12869430269466675, 0.12869449224635213, 0.12869468300833695, 0.12869487504511615 … 0.0013794740791832412, 0.0017354819895985063, 0.0026863485029487238, 0.0018392789475577805, 0.9996625256149487, 0.9996608998085698, 0.0068992686693249115, 772.9329324564051, 772.6916602797361, 0.0013867944020388389]
[151900.78675163604, 12894.28799884975, -69.02411194413492, 0.12851037782026695, 0.12851055951668208, 0.12851074223668996, 0.12851092603643197, 0.12851111097431853, 0.12851129711114528, 0.12851148451021546 … 0.0013873483917044183, 0.0017402250309129662, 0.0026936878079721746, 0.0018489869713452449, 0.9996598077201561, 0.9996582008343116, 0.006916523846357574, 772.5669899581674, 772.3282106351365, 0.0013730384450186801]
plot(sol, idxs=(sys.t / 1000, sys.vm), title="Action potential", ylabel="mV", xlabel="Time (s)", label=false)
plot(sol, idxs=(sys.t / 1000 - 299, sys.vm), title="Action potential", tspan=(299second, 300second), ylabel="mV", xlabel="Time (s)", label=false)
plot(sol, idxs=(sys.t / 1000 - 299, [sys.IK1, sys.Ito, sys.IKs, sys.IKr, sys.If]), tspan=(299second, 300second), ylabel="μA/μF", xlabel="Time (s)", label=["IK1" "Ito" "IKs" "IKr" "If"])
plot(sol, idxs=(sys.t / 1000 - 299, [sys.ICaL, sys.INaCa, sys.ICaT, sys.ICab]), tspan=(299second, 300second), ylabel="μA/μF", xlabel="Time (s)", label=["ICaL" "INaCa" "ICaT" "ICab"])
plot(sol, idxs=(sys.t / 1000 - 299, [sys.Cai_sub_SR, sys.Cai_sub_SL, sys.Cai_mean]), tspan=(299second, 300second), title="Calcium transient", ylabel="μM", xlabel="Time (s)", label=["CaSSR" "CaSL" "CaAvg"])
plot(sol, idxs=(sys.t / 1000, sys.CaMKAct * 100), title="Active CaMKII", ylabel="Active CaMKII (%)", xlabel="Time (s)", label=false)
3D surface plot#
xx = 1:44
yy = range(299second, 300second, length=100)
zz = [sol(t, idxs=sys.Cai[u]) for t in yy, u in xx]
surface(xx, yy ./ 1000, zz, colorbar=:none, yguide="sec.", zguide="Conc. (μM)", xticks=false, size=(600, 600))
annotate!(3, 299, 0.65, "SL")
annotate!(41, 299.25, 0.58, "SR")
savefig("3d-surface.pdf")
"/home/runner/work/camkii-cardiomyocyte-model/camkii-cardiomyocyte-model/docs/3d-surface.pdf"
2Hz#
callback = build_stim_callbacks(Istim, stimend; period=1 / 2 * second, starttime=stimstart)
@time sol2 = solve(prob, alg; callback)
2.787338 seconds (199.32 k allocations: 725.623 MiB, 3.11% gc time)
retcode: Success
Interpolation: 3rd order Hermite
t: 14156-element Vector{Float64}:
0.0
0.019333123284849308
0.09098129546757994
0.20735582943983855
0.45611910276862533
1.0472562928406122
2.0342667657223696
3.451776641148454
6.733792423912806
12.450117081023194
⋮
395927.70780771674
405613.0804609899
417481.2406113328
429349.40076167573
442244.02411750116
456809.9075399475
474103.3852925388
491396.8630451301
500000.0
u: 14156-element Vector{Vector{Float64}}:
[150952.75035000002, 13838.37602, -68.79268, 0.12113, 0.12113, 0.12113, 0.12113, 0.12113, 0.12113, 0.12113 … 0.26081, 0.00977, 0.00188, 0.09243, 0.22156, 0.966, 0.00702, 830.0, 830.0, 0.0026]
[150952.7504077194, 13838.375711519551, -68.79732946186226, 0.1211319185255175, 0.1211301421535992, 0.12113000811850358, 0.12113000037367234, 0.12113000001389383, 0.12113000000038378, 0.12113000000000405 … 0.2608055799112056, 0.009769882842069916, 0.001879826176081169, 0.09242766669618695, 0.2215639938807744, 0.9660018276402699, 0.007020208561323646, 829.9999654017583, 829.9994975880693, 0.0025985659590295374]
[150952.75062244057, 13838.374513299192, -68.81607005265552, 0.12115248970210647, 0.12113624253259858, 0.12113143375871602, 0.12113027926811751, 0.12113004704056851, 0.12113000693481112, 0.12113000089551408 … 0.26078941009382306, 0.009769459049732313, 0.0018789042446514422, 0.09241901973901424, 0.2215787945110049, 0.9660085993318799, 0.00702008986027517, 829.9998348635061, 829.9976422525165, 0.002593310524681686]
[150952.7509740238, 13838.372555328333, -68.84681913285226, 0.12118951551963696, 0.12115723910142134, 0.12114109135582982, 0.12113403405679991, 0.12113131833063846, 0.12113038966346883, 0.12113010483012127 … 0.2607638707001999, 0.009768805322556195, 0.0018766436937193197, 0.09240497563401104, 0.22160283236040595, 0.9660195931792828, 0.007017234889558555, 829.9996133960318, 829.9946506157202, 0.0025849478335103777]
[150952.7517373371, 13838.368384399068, -68.91207316777846, 0.12125418995384041, 0.12120713813483534, 0.12117519662647316, 0.12115494411090462, 0.12114295934422187, 0.12113633873395535, 0.12113292110288301 … 0.2607122383588733, 0.00976754294689657, 0.0018699196262940568, 0.0923749578279845, 0.2216542075240971, 0.9660430731013478, 0.0070030143052343926, 829.9990964774663, 829.9883445519497, 0.00256770780104998]
[150952.75361533565, 13838.358559292059, -69.06429960994137, 0.12136450208851983, 0.1213063255235844, 0.12125925929399752, 0.12122229800810434, 0.12119414515426227, 0.1211733598588045, 0.12115849269665879 … 0.26060507831375035, 0.009765228548607825, 0.001850533769446942, 0.09230364339951613, 0.22177624785138977, 0.9660987611411453, 0.006946470397388757, 829.9976227528975, 829.9738229154025, 0.0025298083713907005]
[150952.75694915713, 13838.34240329337, -69.31024285744343, 0.1214919651325424, 0.12142927821043338, 0.12137426379919636, 0.12132672249013034, 0.12128628091507473, 0.12125242557826561, 0.12122454121844703 … 0.26047114911179464, 0.009763403076884485, 0.0018178174419014683, 0.09218462776986637, 0.2219798989175973, 0.9661914345949096, 0.0068337541728754475, 829.9944193668179, 829.9509077855928, 0.0024748079782158957]
[150952.76215620188, 13838.319723120678, -69.64637448767432, 0.12162015426876954, 0.12155743299711902, 0.12149988983034497, 0.1214475947100359, 0.12140052118634262, 0.12135855488207907, 0.12132150441596071 … 0.2603648729749554, 0.009765046552800477, 0.001773815690753224, 0.09201383579531924, 0.22227216398019892, 0.9663239343003682, 0.006675512062656749, 829.9883533251192, 829.9205247545176, 0.0024106893964811324]
[150952.77598869594, 13838.2694938995, -70.35063788657428, 0.12180447948880577, 0.12174768443532356, 0.12169340184085964, 0.12164180995533558, 0.12159304920072024, 0.12154722283384184, 0.12150439833798556 … 0.26041507667541997, 0.009786689200123853, 0.0016855899094922325, 0.09161908329520764, 0.22294828828976576, 0.9666286957812559, 0.006355039713677859, 829.9689941817725, 829.8589858006806, 0.002310655727734339]
[150952.80529264064, 13838.18882346682, -71.35304509818071, 0.12196378364408163, 0.12191937753328325, 0.12187579038290339, 0.12183318573340735, 0.12179171693004404, 0.12175152667167365, 0.12171274673876366 … 0.26104417804603025, 0.009873892913308327, 0.0015688568862426045, 0.09093422465365385, 0.22412560303273427, 0.9671554512230358, 0.005926150085676071, 829.923524981244, 829.7704141396295, 0.002228995040224517]
⋮
[151288.62104416252, 13504.638084823266, -70.23823367042901, 0.13572313904374958, 0.13572346284519088, 0.13572378717152034, 0.13572411209669358, 0.13572443769765705, 0.13572476405450057, 0.13572509125061927 … 0.0011496906111966108, 0.0015901343307785944, 0.002461418026949501, 0.0015534313010535494, 0.999738949582253, 0.9997369142782588, 0.006368602803587818, 784.2539488165664, 783.9085695227246, 0.0019567703653946148]
[151342.70484164663, 13450.70917321433, -70.13829757647902, 0.13503325081396358, 0.13503356399116814, 0.13503387780349804, 0.13503419232504232, 0.13503450763288607, 0.1350348238072632, 0.13503514093171867 … 0.0011676063228475797, 0.0016019893515117267, 0.0024797648942171137, 0.0015759026497013274, 0.9997332022698832, 0.9997311850729015, 0.006412025812574947, 783.3517205172916, 783.0172437015814, 0.001897366817110614]
[151405.827638631, 13387.769003731959, -70.02001387851048, 0.13424041646089924, 0.13424071674905969, 0.1342410177848714, 0.1342413196421599, 0.1342416223977358, 0.13424192613154695, 0.1342422309268404 … 0.0011891734198473908, 0.0016161337477274041, 0.002501654613414652, 0.00160291061379739, 0.9997262348697127, 0.9997242425479562, 0.006463800412864826, 782.2640065439898, 781.9418862078577, 0.0018299841446479555]
[151465.6586601588, 13328.11285332586, -69.90621448874894, 0.13350138071230827, 0.13350166829261878, 0.13350195671121204, 0.1335022460412447, 0.13350253635883133, 0.13350282774319525, 0.13350312027682879 … 0.0012102996822077074, 0.001629858328048206, 0.0025228944396656285, 0.0016293214729304613, 0.9997193586119162, 0.9997173940466885, 0.00651400339470668, 781.1992099129675, 780.8884369427706, 0.001768043140750643]
[151527.1409305431, 13266.811981849527, -69.78751901572373, 0.1327547594047916, 0.13275503345034953, 0.13275530841035577, 0.1327555843568372, 0.13275586136473363, 0.1327561395120456, 0.1327564188799925 … 0.0012327352774691926, 0.0016442953884571012, 0.002545236612865952, 0.0016573207883584715, 0.9997120004261576, 0.9997100702714233, 0.006566775588703003, 780.0716046979941, 779.7721240663362, 0.001706334813897857]
[151592.43307442244, 13201.71423171712, -69.65943614166102, 0.1319763542289685, 0.131976613317364, 0.13197687338380568, 0.13197713449866427, 0.13197739673515602, 0.13197766016948806, 0.13197792488101226 … 0.0012574125167129039, 0.001660018008967092, 0.002569568324065401, 0.0016880629077770759, 0.9997038433964127, 0.9997019528297642, 0.006624208354699315, 778.8382669012175, 778.5503711878576, 0.0016429494984125232]
[151664.5796285165, 13129.784354458818, -69.5154119408403, 0.13113391542773856, 0.13113415739959092, 0.13113440039724789, 0.13113464448869488, 0.13113488974466592, 0.13113513623878365, 0.13113538404770847 … 0.0012857564073788933, 0.001677871985981514, 0.0025971974575972685, 0.0017232983966570799, 0.9996943910561735, 0.9996925541726791, 0.006689366577849863, 777.4344026251536, 777.1588227002211, 0.0015754658479000788]
[151731.32743017454, 13063.238598283158, -69.37972253619283, 0.1303713402954197, 0.13037156589422524, 0.130371792542281, 0.13037202030484288, 0.13037224924980448, 0.1303724794478318, 0.13037271097250613 … 0.0013130444821923561, 0.0016948701326678895, 0.0026235026794192654, 0.0017571515370220863, 0.9996852088495349, 0.9996834273128744, 0.006751359955192665, 776.0990037351437, 775.8343670413743, 0.0015154026427376876]
[151762.6501143366, 13032.011194868908, -69.31522485433182, 0.13001916088538748, 0.13001937856721368, 0.13001959730329868, 0.13001981715744887, 0.13002003819604982, 0.13002026048819804, 0.1300204841058404 … 0.001326223810108203, 0.0017030075441869337, 0.0026360946142381892, 0.0017734741382689988, 0.9996807481101286, 0.999678993850576, 0.0067810143190537835, 775.4608628072365, 775.2012130626065, 0.0014879970177747448]
plot(sol2, idxs=(sys.t / 1000, sys.vm), title="Action potential", ylabel="mV", xlabel="Time (s)", label=false)
plot(sol2, idxs=(sys.t / 1000 - 299, sys.vm), title="Action potential", tspan=(299second, 300second), ylabel="mV", xlabel="Time (s)", label=false)
plot(sol2, idxs=(sys.t / 1000 - 299, [sys.Cai_sub_SR, sys.Cai_sub_SL, sys.Cai_mean]), tspan=(299second, 300second), title="Calcium transient", ylabel="Concentration (μM)", xlabel="Time (s)", label=["CaSSR" "CaSL" "CaAvg"])
plot(sol2, idxs=(sys.t / 1000, sys.CaMKAct * 100), title="Active CaMKII", ylabel="Active CaMKII (%)", xlabel="Time (s)", label=false)
Comparing 1 and 2 Hz pacing#
idxs = (sys.t / 1000 - 299, sys.vm)
plot(sol, idxs=idxs, title="Action potential", lab="1Hz", tspan=(299second, 300second))
plot!(sol2, idxs=idxs, lab="2Hz", tspan=(299second, 300second), xlabel="Time (s)", ylabel="Voltage (mV)")
savefig("bcl-ap.pdf")
"/home/runner/work/camkii-cardiomyocyte-model/camkii-cardiomyocyte-model/docs/bcl-ap.pdf"
idxs = (sys.t / 1000 - 299, sys.Cai_mean)
plot(sol, idxs=idxs, title="Calcium transient", lab="1Hz", tspan=(299second, 300second))
plot!(sol2, idxs=idxs, lab="2Hz", tspan=(299second, 300second), xlabel="Time (s)", ylabel="Concentration (μM)")
savefig("bcl-cat.pdf")
"/home/runner/work/camkii-cardiomyocyte-model/camkii-cardiomyocyte-model/docs/bcl-cat.pdf"
idxs = (sys.t / 1000, sys.CaMKAct * 100)
plot(sol, idxs=idxs, title="CaMKII", lab="1Hz")
plot!(sol2, idxs=idxs, lab="2Hz", xlabel="Time (s)", ylabel="Active fraction (%)")
savefig("bcl-camkact.pdf")
"/home/runner/work/camkii-cardiomyocyte-model/camkii-cardiomyocyte-model/docs/bcl-camkact.pdf"
This notebook was generated using Literate.jl.