-
Notifications
You must be signed in to change notification settings - Fork 1
/
CaBK.mod
94 lines (77 loc) · 1.52 KB
/
CaBK.mod
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
TITLE CaGk
: Calcium activated K channel.
: Modified from Moczydlowski and Latorre (1983) J. Gen. Physiol. 82
UNITS {
(molar) = (1/liter)
}
UNITS {
(mV) = (millivolt)
(mA) = (milliamp)
(mM) = (millimolar)
}
NEURON {
SUFFIX cagk
USEION nca READ ncai VALENCE 2
USEION lca READ lcai VALENCE 2
USEION tca READ tcai VALENCE 2
USEION k READ ek WRITE ik
RANGE gkbar,gkca, ik
GLOBAL oinf, otau
}
UNITS {
FARADAY = (faraday) (kilocoulombs)
R = 8.313424 (joule/degC)
}
PARAMETER {
celsius (degC)
v (mV)
gkbar=.01 (mho/cm2) : Maximum Permeability
cai = 5.e-5 (mM)
ek (mV)
d1 = .84
d2 = 1.
k1 = .48e-3 (mM)
k2 = .13e-6 (mM)
abar = .28 (/ms)
bbar = .48 (/ms)
st=1 (1)
lcai (mV)
ncai (mV)
tcai (mV)
}
ASSIGNED {
ik (mA/cm2)
oinf
otau (ms)
gkca (mho/cm2)
}
INITIAL {
cai= ncai + lcai + tcai
rate(v,cai)
o=oinf
}
STATE { o } : fraction of open channels
BREAKPOINT {
SOLVE state METHOD cnexp
gkca = gkbar*o^st
ik = gkca*(v - ek)
}
DERIVATIVE state { : exact when v held constant; integrates over dt step
rate(v, cai)
o' = (oinf - o)/otau
}
FUNCTION alp(v (mV), c (mM)) (1/ms) { :callable from hoc
alp = c*abar/(c + exp1(k1,d1,v))
}
FUNCTION bet(v (mV), c (mM)) (1/ms) { :callable from hoc
bet = bbar/(1 + c/exp1(k2,d2,v))
}
FUNCTION exp1(k (mM), d, v (mV)) (mM) { :callable from hoc
exp1 = k*exp(-2*d*FARADAY*v/R/(273.15 + celsius))
}
PROCEDURE rate(v (mV), c (mM)) { :callable from hoc
LOCAL a
a = alp(v,c)
otau = 1/(a + bet(v, c))
oinf = a*otau
}