Location: Simon-Chica et al. (2021) Novel insights into the electrophysiology of murine cardiac macrophages @ 0a4446ee09f9 / myokit / type1.mmt

Author:
Eike Moritz Wuelfers <eike@wuelfers.com>
Date:
2021-03-02 19:30:51+01:00
Desc:
Add cell types with aprameters from paper (and original myokit files)
Permanent Source URI:
https://staging.physiomeproject.org/workspace/638/rawfile/0a4446ee09f9562cab165caf97ada7a8dab5902f/myokit/type1.mmt

[[model]]
name: Simon-Chica-2021
desc: """
Murine resident cardiac maacrophage model [1].

** Type 1 **


[1] Simon-Chica et al. (2021) Circ Res
"""


# Initial values
ishk.C0 = 1
ishk.C1 = 0
ishk.C2 = 0
ishk.C3 = 0
ishk.C4 = 0
ishk.O = 0
ishk.I = 0

cell.V = -39.55 [mV]


[mac]
Cm = 18.32e-6 in [uF]

[Environment]
time = 0 bind time
pace = 0 bind pace


#MACROPHAGE MODEL
# Background current
[ib]
use cell.V as V 
use mac.Cm as Cm
gb = 3.5e-7 in [mS] #mS
Eb = 8 in [mV]
Ib = (gb/Cm * (V - Eb)) in [pA/pF] # Background current


[ik1]
use cell.V as V
F = 96487 [C/mol]
R = 8314 [mJ/K/mol]
T = 275+22 [K]
K_e = 5.4 # is actually mM but should be dimensionless here because of the sqrt below
GKir = 1.3e-6 [mS]
aKir = 0.72 #0.94
bKir = 0.96 #1.26 
EK = -79.362 [mV]
IK1=((GKir/mac.Cm * sqrt(K_e) * (V - (EK))) / (aKir + exp((bKir * (V - (EK)) * F)/(R * T)))) in [pA/pF]


  
[ishk]
use cell.V  as V
nchannels= 74 #number of channels  
gshaker= 15e-9 [mS] 
EK = -79.362 [mV]

a = 3.96 [1/ms]
b = 0.1 [1/ms]
c = 0.0029 [1/ms]
d = 0.0008 [1/ms]
A = 127.7 [1/ms]
B = 16.5 [1/ms]
m = 11.1 [mV]
n = 26 [mV]
p = 1205.3 [mV]
q = 3377.2 [mV]

alpha = a * exp(V/m)
beta = b * exp(-V/n)
mu = c * exp(V/p)
phi = d * exp(-V/q)

dot(C0) = -4*alpha*C0 + beta*C1
dot(C1) = 4*alpha*C0 - (3*alpha + beta)*C1 + 2*beta*C2
dot(C2) = 3*alpha*C1 - (2*alpha + 2*beta)*C2 + 3*beta*C3
dot(C3) = 2*alpha*C2 - (alpha + 3*beta)*C3 + 4*beta*C4
dot(C4) = alpha*C3 - (A + 4*beta)*C4 + B*O
dot(O) = A*C4 - (mu + B)*O + phi*I
dot(I) = mu*O - phi*I

Ishk = gshaker/mac.Cm * nchannels * O * (V - EK) in [pA/pF]


[cell]
i_diff = 0 bind diffusion_current
     
dot(V) = -(ishk.Ishk + ib.Ib + ik1.IK1 + (i_diff)/mac.Cm) in [mV] label membrane_potential

[[protocol]]
# Level  Start    Length   Period   Multiplier
1.0      0.0      2        1000.0   10

[[script]]
import matplotlib.pyplot as plt
import myokit
import numpy as np
from mpl_toolkits.mplot3d import axes3d
import math
from scipy.signal import find_peaks, peak_prominences
from scipy import signal


numstim = 0 #5 #50 #for prestimulation 
bcl = 200

# Get model and protocol, create simulation
   
dt = 0.005
sim_time = bcl*5
n_stim = 1
#g_vec= [(0,1,2,8)]

n_end = 1
n_mid = 1
n_epi = 0
n = n_end + n_mid + n_epi
m = get_model()
m.resolve_interdependent_components()
p = myokit.Protocol()
p.schedule(level = 1, start = 0, duration = 2, period=bcl, multiplier=10)
s = myokit.SimulationOpenCL(m, p, ncells=n)
s.set_step_size(dt)
s.set_paced_cells(n_stim)
s.pre(numstim*bcl)
    
#CONNECTIONS
g= 167e-6 #mS/uF
g_NM = 0 #5e-6 #mS/uF
#connections = [(i, i+1, g_NM if n_end-1<= i <=n_end+n_mid-1 else g) for i in range(n-1)]
connections = [(0, i+1, g_NM) for i in range(n-1)]
s.set_connections(connections)
  
#DEFINE CABLE
types = [0] * n_end + [2] * n_mid + [1] * n_epi
s.set_field('cell2.type', types)
    
d = s.run(sim_time, log_interval=0.01, log=['Environment.time', 'remaining.V','ecc.na_m','ecc.na_h','ecc.na_j'],report_nan=False) #maybe sim_time can be smaller for checking amp?
#d.save_csv('mouse_type0_NOinward_5Cm_5nS_1Macs_5g.txt')

numts=(d['remaining.V',0])
vm=np.zeros((len(numts),n))
t = d['Environment.time']   
#voltage vector         
for j in range(0, n):
    vm[:,j]=d['remaining.V', j]

plt.figure()
plt.plot(t,vm[:,-1])
plt.title(' sim_time={}, t={}'.format(sim_time, t[-1]))
plt.plot(t,vm[:,0],'r')