-
Notifications
You must be signed in to change notification settings - Fork 1
/
kmtwt.mod
107 lines (75 loc) · 1.38 KB
/
kmtwt.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 CA1 KM channel from M. Taglialatela
: M. Migliore Oct 2008
UNITS {
(mA) = (milliamp)
(mV) = (millivolt)
}
PARAMETER {
v (mV)
ek
celsius (degC)
gbar=.0001 (mho/cm2)
vhalfl=-32.4 (mV)
kl=-12.2
vhalft=-60 (mV)
a0a=0.006 (/ms)
zetat=3 (1)
gmt=.62 (1)
vhalfb=-49 (mV)
a0b=0.0039 (/ms)
zetab=4.5 (1)
gmb=.4 (1)
q10=3.8
b0=40
b0b=25
}
NEURON {
SUFFIX kmtwt
USEION k READ ek WRITE ik
RANGE gbar,ik
GLOBAL inf, tau, taua, taub
}
STATE {
m
}
ASSIGNED {
ik (mA/cm2)
inf
tau
taua
taub
}
INITIAL {
rate(v)
m=inf
}
BREAKPOINT {
SOLVE state METHOD cnexp
ik = gbar*m*(v-ek)
}
FUNCTION alpa(v(mV)) {
alpa = exp(0.0378*zetat*(v-vhalft))
}
FUNCTION alpb(v(mV)) {
alpb = exp(0.0378*zetab*(v-vhalfb))
}
FUNCTION beta(v(mV)) {
beta = exp(0.0378*zetat*gmt*(v-vhalft))
}
FUNCTION betb(v(mV)) {
betb = exp(0.0378*zetab*gmb*(v-vhalfb))
}
DERIVATIVE state {
rate(v)
if (m<inf) {tau=taua} else {tau=taub}
m' = (inf - m)/tau
}
PROCEDURE rate(v (mV)) { :callable from hoc
LOCAL a,qt, ab
qt=q10^((celsius-22)/10)
inf = (1/(1 + exp((v-vhalfl)/kl)))
a = alpa(v)
ab = alpb(v)
taua = (b0 + beta(v)/(a0a*(1+a)))/qt
taub = (b0b + betb(v)/(a0b*(1+ab)))/qt
}