Skip to content

Commit

Permalink
Update to tomek
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelClerx committed Aug 20, 2024
1 parent 5349c7e commit b03a7fa
Showing 1 changed file with 30 additions and 8 deletions.
38 changes: 30 additions & 8 deletions c/tomek-2020.mmt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[[model]]
name: ToRORd_dyn_chloride
name: tomek-2020
mmt_authors: Michael Clerx
version: 20240816
version: 20240819
desc: """
The Tomek et al. "ToRORd-dynCL" model of the human ventricular action
potential [1], based on the earlier model without dynamic chloride [2],
Expand All @@ -15,6 +15,9 @@ desc: """
matlab code: it matched to within machine precision. After verification,
the fixes to INaK desribed in [6] were applied.

The stimulus was set to 1Hz pacing for 0.5ms, at approximately two times
the minimum amplitude needed to elicit an AP.

References:

[1] Tomek, J., Bueno-Orovio, A., & Rodriguez, B. (2020) ToR-ORd-dynCl: an
Expand Down Expand Up @@ -140,7 +143,7 @@ i_ion = (
[stimulus]
i_stim = engine.pace * amplitude
in [A/F]
amplitude = -53 [A/F]
amplitude = 2 * -53 [A/F]
in [A/F]

#
Expand Down Expand Up @@ -1137,11 +1140,30 @@ m = get_model()
p = get_protocol()
s = myokit.Simulation(m, p)

# Run simulation
d = s.run(1000)
# Run for all three modes
modes = {
0: 'Endocardial',
1: 'Epicardial',
2: 'Midmyocardial'
}

fig = plt.figure()
ax0 = fig.add_subplot(2, 1, 1)
ax0.set_ylabel('V (mV)')
ax1 = fig.add_subplot(2, 1, 2)
ax1.set_ylabel('[Ca]i (mM)')
ax1.set_xlabel('Time (ms)')

for mode, label in modes.items():
s.set_constant('cell.mode', mode)
s.reset()
s.pre(100 * 1000)
d = s.run(1000, log=['engine.time', 'membrane.V', 'calcium.Ca_i'])

ax0.plot(d.time(), d['membrane.V'], label=label)
ax1.plot(d.time(), d['calcium.Ca_i'])

ax0.legend(loc='upper right')

# Display the results
plt.figure()
plt.plot(d.time(), d['membrane.V'])
plt.show()

0 comments on commit b03a7fa

Please sign in to comment.