This repo contains implementations of the Morris-Lecar model of cellular excitability on a 2D lattice.
The code is available in Python and Julia.
Ref.: Morris, C., Lecar, H., Voltage oscillations in the barnacle giant muscle fiber. Biophys J 35:193-213, 1981.
Rendered page: https://frederic-vw.github.io/morris-lecar-2d/
Python Requirements:
pip install package-name
)
Julia Requirements:
julia > using Pkg; Pkg.add("Package Name")
)
The Morris-Lecar model uses two variables to model membrane potential dynamics in response to current injections, as modelled form experiments in the barnacle giant muscle fiber. The two variables represent voltage ($V$), and the fraction of open K+ channels. Spatial coupling is introduced via diffusion of the voltage variable ($D \Delta V$):
and the steady-state functions
Noise is added via stochastic integration of the variable $V$:
The main function call running the simulation is: ml2d(N, T, t0, dt, s, D, gL, VL, gCa, VCa, gK, VK, C, I, V0, V1, V2, V3, V4, phi, stim, blocks)
:
N
: lattice size (N,N)
T
: number of simulation time stepst0
: number of ‘warm-up’ iterationsdt
: integration time steps
: noise intensity (σ)D
: diffusion constantgL,VL,gCa,VCa,gK,VK,C,V1,V2,V3,V4,phi
: Morris-Lecar model parameters, I
: stimulation current amplitudeV0
: initial membrane voltagestim
: stimulation current parameters, array of time-, x-, and y-interval bordersblocks
: conduction blocks, array of x- and y-interval bordersOutputs: (T,N,N)
array as NumPy .npy format and as .mp4 movie.
In example 1, use
stim = [ [[50,250], [0,5], [0,5]], [[6200,6700], [25,30], [0,15]] ]
blocks = [ [[0,15], [5,10]] ]
(works in Python, in Julia change 0 to 1)Stimulation in the lower left corner generates a travelling wave along a narrow channel formed by the left boundary and the conduction block defined by blocks
, an early after-depolarization within the partially refractory region generates a spiral wave.
Parameters:
N = 128, T = 10000, t0 = 1000, dt = 0.01, s = 2.0, D = 0.8, gL = 2.0, VL = -60.0, gCa = 5.0, VCa = 120.0, gK = 6.0, VK = -84, C = 5.0, V0 = -60.0, V1 = -1.2, V2 = 18.0, V3 = 12.0, V4 = 17.4, phi=1/15, I=90.0
The Morris-Lecar lattice model can produce spiral waves and other travelling waves.