-
Notifications
You must be signed in to change notification settings - Fork 3
/
kap.mod
106 lines (89 loc) · 1.81 KB
/
kap.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
94
95
96
97
98
99
100
101
102
103
104
105
106
TITLE K-A channel from Klee Ficker and Heinemann
: modified to account for Dax A Current ----------
: M.Migliore Jun 1997
: modified by Poirazi on 10/2/00 according to Hoffman_etal97
: to account for I_A proximal (<100microns)
: (n) activation, (l) inactivation
UNITS {
(mA) = (milliamp)
(mV) = (millivolt)
}
INDEPENDENT {t FROM 0 TO 1 WITH 1 (ms)}
PARAMETER {
dt (ms)
v (mV)
ek (mV) : must be explicitely def. in hoc
gkabar=.007 (mho/cm2)
vhalfn= 11 (mV)
vhalfl=-56 (mV)
a0l=0.05 (/ms)
a0n=0.05 (/ms)
}
NEURON {
SUFFIX kap
USEION k READ ek WRITE ik
RANGE gkabar,gka
GLOBAL ninf,linf,taul,taun
}
STATE {
n
l
}
ASSIGNED {
ik (mA/cm2)
ninf
linf
taul
taun
gka
}
INITIAL {
rates(v)
n=ninf
l=linf
gka = gkabar*n^4*l
ik = gka*(v-ek)
}
BREAKPOINT {
SOLVE states
gka = gkabar*n^4*l
ik = gka*(v-ek)
}
FUNCTION alpn(v(mV)) {
alpn = -0.01*(v+21.3)/(exp((v+21.3)/-35)-1)
}
FUNCTION betn(v(mV)) {
betn = 0.01*(v+21.3)/(exp((v+21.3)/35)-1)
}
FUNCTION alpl(v(mV)) {
alpl = -0.01*(v+58)/(exp((v+58)/8.2)-1)
}
FUNCTION betl(v(mV)) {
betl = 0.01*(v+58)/(exp((v+58)/-8.2)-1)
}
LOCAL facn,facl
PROCEDURE states() { : exact when v held constant; integrates over dt step
rates(v)
n = n + facn*(ninf - n)
l = l + facl*(linf - l)
VERBATIM
return 0;
ENDVERBATIM
}
PROCEDURE rates(v (mV)) { :callable from hoc
LOCAL a,b
a = alpn(v)
b = betn(v)
ninf = a/(a + b)
taun = 0.2
facn = (1 - exp(-dt/taun))
a = alpl(v)
b = betl(v)
linf = a/(a + b)
if (v > -20) {
taul = 5 + 2.6*(v+20)/10
} else {
taul = 5
}
facl = (1 - exp(-dt/taul))
}