Effects of isoproterenol#
using ModelingToolkit
using OrdinaryDiffEq
using Plots
using CaMKIIModel
using CaMKIIModel: second, μM
Plots.default(lw=1.5)
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
alg = TRBDF2()
TRBDF2(; linsolve = nothing, nlsolve = OrdinaryDiffEqNonlinearSolve.NLNewton{Rational{Int64}, Rational{Int64}, Rational{Int64}, Rational{Int64}}(1//100, 10, 1//5, 1//5, false, true, 0//1), precs = DEFAULT_PRECS, smooth_est = true, extrapolant = linear, controller = PI, step_limiter! = trivial_limiter!, autodiff = ADTypes.AutoForwardDiff(),)
Without isoproterenol#
@unpack Istim = sys
callback = build_stim_callbacks(Istim, stimend; period=1second, starttime=stimstart)
@time sol = solve(prob, alg; callback)
9.982731 seconds (21.47 M allocations: 1.005 GiB, 3.48% gc time, 74.00% compilation time)
retcode: Success
Interpolation: 3rd order Hermite
t: 22357-element Vector{Float64}:
0.0
0.00037376965588217846
0.004111466214703963
0.03981907054375368
0.06090491262855715
0.1655435225566852
0.2409336011179059
0.5227875405036884
1.0858597487365014
2.388889121726196
⋮
480346.9749024962
482699.7883395445
485052.6017765928
487499.69929415866
490270.4874344493
493041.27557473996
495812.0637150306
498582.85185532126
500000.0
u: 22357-element Vector{Vector{Float64}}:
[0.0026, 830.0, 830.0, 0.00702, 0.966, 0.22156, 0.09243, 0.00188, 0.00977, 0.26081 … 0.12113, 0.12113, 0.12113, 0.12113, 0.12113, 0.12113, 0.12113, -68.79268, 13838.37602, 150952.75035000002]
[0.0025999722040421203, 829.9999902796054, 829.9999993331091, 0.007020004989170199, 0.9660000353355825, 0.22156007721482085, 0.09242995488968388, 0.0018799969383422777, 0.009769997724445615, 0.2608099143344817 … 0.12113, 0.12113, 0.12113, 0.12113, 0.12113000000000289, 0.12113000000167641, 0.12113000088893845, -68.79276368828553, 13838.376014261732, 150952.7503511151]
[0.002599694403132185, 829.9998930912919, 829.9999926601315, 0.007020052852203506, 0.9660003886880141, 0.2215608493616932, 0.09242950378712296, 0.001879965695351556, 0.00976997499090465, 0.2608090581211949 … 0.12113, 0.12113000000000013, 0.12113000000000858, 0.12113000000055028, 0.12113000003391475, 0.12113000196534932, 0.12113010213116475, -68.79361851040093, 13838.375956226279, 150952.75036226763]
[0.0025970540837836013, 829.9989660442994, 829.9999284703065, 0.007020317408788777, 0.9660037640747009, 0.2215682258389346, 0.09242519428713569, 0.0018796068140212517, 0.009769759976889867, 0.2608009220796936 … 0.12113000002884419, 0.12113000024542142, 0.12113000204735136, 0.12113001662717256, 0.1211301299299577, 0.12113095641447905, 0.12113634992793865, -68.8025264544508, 13838.375374805612, 150952.75046898014]
[0.0025955058666166115, 829.9984198218226, 829.9998901444599, 0.00702030935044612, 0.966005757011449, 0.22157258164004917, 0.0924226495075652, 0.0018793435797837084, 0.009769634913190547, 0.2607961562482531 … 0.12113000016866177, 0.12113000131087216, 0.12113000976147185, 0.12113006862041213, 0.12113044540549034, 0.12113257965026794, 0.12114263371357109, -68.80807075533095, 13838.375021123176, 150952.75053214436]
[0.0025879285397901147, 829.9957223730446, 829.9996943632078, 0.007018630287275856, 0.9660156439130673, 0.22159419607659525, 0.09241002145284741, 0.001877559117288867, 0.00976903523890109, 0.2607729421504298 … 0.12113004935055226, 0.12113018010628349, 0.12113063273968475, 0.12113211161381009, 0.12113657158715925, 0.12114860583327054, 0.12117652595466133, -68.83575072020419, 13838.373259639946, 150952.7508472945]
[0.002582571145852477, 829.9937923939375, 829.9995471212803, 0.00701592369079187, 0.9660227641003213, 0.2216097675784518, 0.09240092362867286, 0.0018758714847454457, 0.009768624210181659, 0.2607566648960162 … 0.12113024326075361, 0.1211307502406234, 0.12113218550388928, 0.12113594251344088, 0.12114488158032216, 0.12116387111038732, 0.12119939012901638, -68.85564804966069, 13838.37199181475, 150952.75107611093]
[0.002563220542096413, 829.9866743979147, 829.9989475390704, 0.006998097330745275, 0.9660493610162236, 0.22166797415611358, 0.09236691378604592, 0.0018679384237350956, 0.009767233651450798, 0.26069906023032124 … 0.1211345511685702, 0.12113905570282098, 0.1211473005088212, 0.121161551591973, 0.1211846631341102, 0.12121970697706758, 0.12126943143386476, -68.92937968582093, 13838.367272493979, 150952.75194459775]
[0.0025274511385383024, 829.9728942569965, 829.9975152384703, 0.006942930386866817, 0.9661023923982736, 0.2217842153930329, 0.09229898719097207, 0.0018493158699612237, 0.009765106917158232, 0.2605987293089182 … 0.12116011855975432, 0.12117558659040728, 0.1211971892146648, 0.12122634301778801, 0.12126437969981868, 0.12131243130810888, 0.12137132990552897, -69.07404146936263, 13838.357924241376, 150952.75374091472]
[0.0024571024140966876, 829.9430246600219, 829.9930651563966, 0.006793945627676893, 0.966224644350509, 0.2220530369627137, 0.09214188544158235, 0.0018064864243286108, 0.009763330551452168, 0.26043481866136947 … 0.12124849189953911, 0.1212797972795032, 0.12131692953907361, 0.1213603007104879, 0.12141021796295101, 0.12146686381610994, 0.1215302791809503, -69.3955791347726, 13838.336695544232, 150952.75820448835]
⋮
[0.0014709804198590186, 774.7650675867864, 775.0217740672203, 0.0068867565348266, 0.9996628652933981, 0.999664691129107, 0.0018321262118003107, 0.0026810287599548246, 0.0017320362490638327, 0.001373502691340799 … 0.1298142989850554, 0.12981410566902007, 0.12981391353028116, 0.1298137225060062, 0.1298135325358517, 0.12981334356184115, 0.12981315552824987, -69.08758434854313, 12970.385308271756, 151823.38329663526]
[0.0014648189097247889, 774.6170559243054, 774.8726437882356, 0.0068947105683523835, 0.999661628688092, 0.9996634491673804, 0.001836586549528715, 0.0026844112444428018, 0.0017342228539008093, 0.0013771250181795016 … 0.12973444984589175, 0.12973425863933177, 0.12973406860754158, 0.12973387968820324, 0.12973369182146835, 0.1297335049498369, 0.12973331901804327, -69.0705993378472, 12962.745391068665, 151831.0452907024]
[0.0014587511227684797, 774.4703423855777, 774.7248288641308, 0.006902610989027944, 0.9996603974726762, 0.9996622134084227, 0.0018410230405745422, 0.0026877712752229393, 0.0017363933963003393, 0.0013806950995212419 … 0.1296556941433948, 0.12965550490492134, 0.12965531683607898, 0.1296551298750175, 0.1296549439623366, 0.12965475904096588, 0.12965457505605177, -69.05374856554144, 12955.184755575949, 151838.62776714246]
[0.0014525423773591528, 774.3192459281329, 774.572605723504, 0.006910753906528506, 0.9996591227075694, 0.999660923539198, 0.0018456027806582425, 0.0026912333746366454, 0.0017386281717721905, 0.001384491426566734 … 0.12957497769961027, 0.12957479042905515, 0.12957460432237328, 0.12957441931826466, 0.12957423535785842, 0.1295740523845938, 0.12957387034410778, -69.03639725793703, 12947.412996594318, 151846.421983316]
[0.0014456377255248189, 774.1499026547785, 774.4020098574933, 0.006919915786545255, 0.9996576891417706, 0.9996594759758902, 0.00185075754296341, 0.002695131750395027, 0.0017411531077457076, 0.0013886830381263477 … 0.12948502806823053, 0.1294848432321049, 0.12948465955567637, 0.1294844769782004, 0.12948429544133916, 0.12948411488904318, 0.12948393526744076, -69.01690651398874, 12938.71764457568, 151855.14245239654]
[0.001438859040966184, 773.9823494076686, 774.2332273637102, 0.00692900094911331, 0.9996562620710581, 0.999658051125026, 0.0018558817379663794, 0.0026989972898749056, 0.0017436471723614147, 0.0013926934966191306 … 0.12939653322893527, 0.12939635079991557, 0.129396169524763, 0.12939598934334406, 0.1293958101979074, 0.12939563203296714, 0.1293954547951924, -68.99759903897377, 12930.126078524248, 151863.7588113575]
[0.001432200027651031, 773.8166079299616, 774.0662783583399, 0.006938009231740235, 0.9996548421286506, 0.9996566254682218, 0.0018609663644587366, 0.0027028299162121868, 0.0017461249481828536, 0.001396860007799993 … 0.12930942123424286, 0.1293092410514431, 0.12930906201606965, 0.12930888406857588, 0.12930870715177434, 0.1293085312107211, 0.12930835619260697, -68.97848134434899, 12921.640174334389, 151872.26919744286]
[0.00142566114324551, 773.6526647996978, 773.9011497497481, 0.0069469415998226775, 0.9996534305435041, 0.9996552073851689, 0.0018660168543641468, 0.002706630708170315, 0.0017485801794974768, 0.0014009349981301525 … 0.1292237159602217, 0.1292235380827127, 0.129223361346907, 0.12922318569384073, 0.12922301106688566, 0.12922283741163484, 0.12922266467579485, -68.95954769566795, 12913.259706468512, 151880.6738318993]
[0.0014223617324013904, 773.5695406700812, 773.817427547519, 0.0069514730602374, 0.9996527110949105, 0.9996544787825764, 0.001868582411515314, 0.002708557992550861, 0.0017498228347863512, 0.0014030695345423495 … 0.12918042386558215, 0.12918024697216687, 0.1291800712149358, 0.12917989653523246, 0.1291797228767244, 0.12917955018528898, 0.12917937840890625, -68.94995030605708, 12909.016149021774, 151884.92962826125]
i = (sys.t/1000, sys.vm)
plot(sol, idxs=i, tspan=(295second, 300second), title="Action potential", xlabel="Time (s)")
plot(sol, idxs=(sys.t/1000, [sys.Cai_sub_SR, sys.Cai_sub_SL, sys.Cai_mean]), tspan=(299second, 300second), title="Calcium transcient", xlabel="Time (s)", ylabel="Conc. (μM)", label=["Ca (SR)" "Ca (SL)" "Ca (avg)"])
plot(sol, idxs=(sys.t/1000, sys.CaMKAct*100), title="Active CaMKII", label=false, ylabel="Active fraction (%)" , xlabel="Time (s)")
0.1uM isoproterenol#
prob2 = remake(prob, p=[sys.ISO => 0.1μM])
sol2 = solve(prob2, alg; callback)
retcode: Success
Interpolation: 3rd order Hermite
t: 24672-element Vector{Float64}:
0.0
0.0003737343848581722
0.004111078233439894
0.039816339706127295
0.060900752777357826
0.16553476226263736
0.24091875673065616
0.5229648546728856
1.0863777736793474
2.413405322158768
⋮
480066.1248874634
481361.1827093272
482835.17229020357
485399.71347236686
488504.4036737538
490428.8143975678
494101.0270270934
497730.1337078878
500000.0
u: 24672-element Vector{Vector{Float64}}:
[0.0026, 830.0, 830.0, 0.00702, 0.966, 0.22156, 0.09243, 0.00188, 0.00977, 0.26081 … 0.12113, 0.12113, 0.12113, 0.12113, 0.12113, 0.12113, 0.12113, -68.79268, 13838.37602, 150952.75035000002]
[0.002599972204967437, 829.9999902808163, 830.000028847142, 0.007020004990365181, 0.9660000353322494, 0.22156007720753526, 0.09242995489394132, 0.0018799969394408657, 0.00976999772463838, 0.2608099143421562 … 0.12113, 0.12113, 0.12113, 0.12113, 0.12113000000000103, 0.12113000000070047, 0.12113000044028827, -68.79275508473894, 13838.376015095262, 150952.75035107418]
[0.002599694229847671, 829.999893136903, 830.0003172589927, 0.007020053048152445, 0.966000388651486, 0.22156084928164438, 0.09242950383401903, 0.001879965796039852, 0.009769974990609935, 0.2608090581605472 … 0.12113, 0.12113000000000003, 0.12113000000000221, 0.12113000000016681, 0.12113000001214218, 0.12113000083096385, 0.12113005098590943, -68.7935238722754, 13838.375965395373, 150952.75036181728]
[0.0025970376226231453, 829.9989694431397, 830.0030674206553, 0.007020335687036496, 0.9660037638305827, 0.22156822528428116, 0.09242519462333619, 0.0018796155374899333, 0.009769759747312673, 0.2608009180635891 … 0.1211300000065677, 0.12113000006431482, 0.1211300006174338, 0.12113000576962539, 0.1211300518620876, 0.12113043888794968, 0.12113334505673458, -68.80161027798937, 13838.375463622226, 150952.7504646066]
[0.0025954690291373904, 829.9984277112459, 830.0046871563005, 0.007020351619383262, 0.9660057566509538, 0.2215725808028441, 0.09242265002508764, 0.0018793635506307096, 0.009769634365279325, 0.26079614634753734 … 0.12113000003905867, 0.12113000034996506, 0.12113000300419939, 0.12113002433937682, 0.12113018194557564, 0.12113121136119684, 0.12113678729398654, -68.80666956829693, 13838.375157001996, 150952.75052544172]
[0.002587708229180496, 829.9957798900073, 830.0126823971135, 0.007018920205499651, 0.9660156433220334, 0.22159419442775846, 0.09241002262411216, 0.0018776892819155025, 0.009769031170591936, 0.2607728642596719 … 0.12113001462791176, 0.12113005976812845, 0.12113023508429838, 0.12113087792962562, 0.12113305243549755, 0.12113961499156414, 0.12115650383956808, -68.83194423491582, 13838.373629414229, 150952.7508289059]
[0.0025821517214160493, 829.9939138515754, 830.0184004426578, 0.00701650964962173, 0.9660227631930368, 0.22160976484908512, 0.09240092566119758, 0.001876126805407179, 0.00976861570119076, 0.26075649938353557 … 0.121130076980151, 0.12113026579926174, 0.12113086530352403, 0.12113262104092494, 0.12113727259827295, 0.12114817855649768, 0.12117035538628367, -68.85010886378463, 13838.372530561204, 150952.75104915493]
[0.0025617159350002396, 829.98723502702, 830.0395041562099, 0.00700038666343718, 0.9660493799418629, 0.22166801228449182, 0.09236689351993872, 0.0018688435208371555, 0.00976719424960163, 0.26069823770712364 … 0.12113181773575979, 0.12113391737669069, 0.12113808380413554, 0.12114585553013174, 0.1211593566171211, 0.12118105557857207, 0.12121327199332486, -68.91742211370034, 13838.368442987685, 150952.75188520903]
[0.0025227783991371507, 829.9752739391972, 830.080384388217, 0.00695018262609473, 0.9661024495942896, 0.22178432825544486, 0.09229892950217908, 0.00185185572918669, 0.009764947385504352, 0.26059530517064433 … 0.1211441760913726, 0.12115261177143394, 0.12116498735014097, 0.12118242438563957, 0.12120600909325233, 0.12123666908347577, 0.12127506643600117, -69.04930105349948, 13838.360372077686, 150952.75361168725]
[0.0024411782583043553, 829.9537655919601, 830.1706867478745, 0.006812098401770463, 0.966226968873977, 0.22205811539521444, 0.09213895370317787, 0.001812233049710932, 0.009762594152187212, 0.2604167699419273 … 0.12119259266684365, 0.12121121831416223, 0.12123374788503787, 0.12126047719480071, 0.12129160198638335, 0.12132719792541359, 0.12136720253253831, -69.34664781731206, 13838.341851204259, 150952.75796777732]
⋮
[0.005809258494175379, 923.4310659231647, 924.6454627654211, 0.006860409086370674, 0.999666991167979, 0.9996693265499363, 0.0018169906792450201, 0.002669828589643833, 0.0017247763972749997, 0.0013611124665358321 … 0.11904656872140087, 0.1190464720178443, 0.11904637306087429, 0.11904627187572255, 0.11904616848662447, 0.11904606291686815, 0.11904595518884029, -69.14398391247744, 13176.064635051824, 151605.8252011623]
[0.005798951700756382, 923.4381071541542, 924.6503612301942, 0.006866119720880736, 0.9996661104688777, 0.999668442091658, 0.0018201794909954163, 0.0026722553730011084, 0.0017263420234885645, 0.0013637056155200147 … 0.11899099892444644, 0.11899090248013058, 0.1189908038054352, 0.11899070292510917, 0.118990599862924, 0.11899049464172153, 0.11899038728345934, -69.13174019023174, 13170.760997803985, 151611.13641080284]
[0.005787302856487913, 923.4457910617724, 924.6556186012929, 0.006872601779308927, 0.9996651096502809, 0.9996674363992233, 0.0018238003968796752, 0.0026750109633365397, 0.0017281240188691373, 0.0013666791725400133 … 0.11892826440232547, 0.11892816867090902, 0.1189280707299671, 0.11892797060395427, 0.11892786831635867, 0.11892776388974945, 0.11892765734582135, -69.11785568540822, 13164.760697079066, 151617.14527638987]
[0.005767319712371968, 923.4587190861164, 924.6643824520858, 0.006883822020049964, 0.999663372443432, 0.9996656914114378, 0.0018300780298360778, 0.0026797815831884992, 0.0017312070070706325, 0.0013717732445939197 … 0.11882052556255836, 0.11882043109294645, 0.11882033445484734, 0.11882023567217614, 0.11882013476790325, 0.11882003176410062, 0.11881992668198554, -69.09385287691249, 13154.418986051687, 151627.50172787445]
[0.005743572333224127, 923.4735705931561, 924.6742838535378, 0.006897324476534978, 0.9996612740854697, 0.999663585304905, 0.0018376449860658171, 0.0026855234434519405, 0.0017349171243682328, 0.001377902683490218 … 0.11869231908159746, 0.11869222608673441, 0.1186921309749277, 0.11869203376936838, 0.11869193449233148, 0.1186918331652211, 0.11869172980861259, -69.06501911991934, 13142.048290081042, 151639.89002302237]
[0.005729115688636965, 923.4822554983314, 924.6799549758315, 0.006905637858277505, 0.9996599771524922, 0.9996622835187406, 0.0018423139516549308, 0.0026890591344633803, 0.0017372018436868464, 0.0013816864770471377 … 0.11861420752251509, 0.11861411534779287, 0.11861402108508094, 0.11861392475715603, 0.11861382638589502, 0.11861372599231906, 0.11861362359663516, -69.04729441284292, 13134.47314666589, 151647.47592739473]
[0.005702045470588575, 923.497830210579, 924.689885347638, 0.0069213857720900164, 0.999657511590779, 0.9996598077387568, 0.0018511731843121966, 0.00269575772743837, 0.0017415303151434825, 0.0013888691292035277 … 0.11846780087192706, 0.11846771031489882, 0.11846761772554275, 0.11846752312585955, 0.11846742653698074, 0.11846732797921145, 0.11846722747207046, -69.0137766590543, 13120.205588309898, 151661.7637296896]
[0.0056759401827787565, 923.5120042610863, 924.6986149625337, 0.006936807444601013, 0.9996550853261155, 0.9996573715954428, 0.0018598688325022828, 0.002702318796293575, 0.0017457698875930476, 0.001395922239639727 … 0.11832643138804004, 0.11832634243272859, 0.11832625149963494, 0.11832615861000148, 0.11832606378423154, 0.11832596704193057, 0.11832586840194499, -68.98102643758686, 13106.338150055893, 151675.6508073154]
[0.005659933592529468, 923.5202679462639, 924.7035398230626, 0.00694638216622596, 0.9996535729537314, 0.9996558531099955, 0.0018652782199450868, 0.002706392926629499, 0.001748402491504242, 0.0014003115950622016 … 0.11823966507242743, 0.11823957709410846, 0.11823948717098028, 0.11823939532382692, 0.1182393015726114, 0.11823920593651596, 0.1182391084339801, -68.9607295128334, 13097.780517104387, 151684.22054028572]
plot(sol2, idxs=(sys.t/1000, sys.vm), tspan=(295second, 300second), title="Action potential", xlabel="Time (s)")
plot(sol2, idxs=(sys.t/1000, [sys.Cai_sub_SR, sys.Cai_sub_SL, sys.Cai_mean]), tspan=(299second, 300second), title="Calcium transcient", xlabel="Time (s)", ylabel="Conc. (μM)", label=["Ca (SR)" "Ca (SL)" "Ca (avg)"])
plot(sol2, idxs=(sys.t/1000, sys.CaMKAct*100), title="Active CaMKII", label=false, ylabel="Active fraction (%)" , xlabel="Time (s)")
Comparison#
i = (sys.t/1000, sys.Cai_mean * 1000)
tspan = (299second, 300second)
plot(sol, idxs=i, title="Calcium transcient", lab="ISO (0uM)"; tspan)
plot!(sol2, idxs=i, lab="ISO (0.1uM)", xlabel="Time (s)", ylabel="Conc. (μM)"; tspan)
i = (sys.t/1000, sys.CaMKAct*100)
plot(sol, idxs=i, title="Active CaMKII", lab="ISO (0uM)")
plot!(sol2, idxs=i, lab="ISO (0.1uM)", ylabel="Active fraction (%)" , xlabel="Time (s)")
i = (sys.t/1000, sys.vm)
plot(sol, idxs=i, tspan=(297second, 300second), title="Action potential", lab="ISO (0uM)")
plot!(sol2, idxs=i, tspan=(297second, 300second), lab="ISO (1uM)", xlabel="Time (ms)", ylabel="Voltage (mV)")
This notebook was generated using Literate.jl.