-
Notifications
You must be signed in to change notification settings - Fork 3
/
hh3k.mod
62 lines (53 loc) · 1.09 KB
/
hh3k.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
TITLE HH K channel
: Mel-modified Hodgkin - Huxley conductances (after Ojvind et al.)
: Updated by K. Archie:
: removed leak current
: changed to derivatives rather than explicit step calculation to
: support NEURON's spiffy, smarter integration
: BFB Cleaned (2007)
: Aaron Milstein modified 2015
NEURON {
SUFFIX hh3k
USEION k READ ek WRITE ik
RANGE gbar, gbar2
GLOBAL vmin, vmax
GLOBAL taun, pown, taun2
}
UNITS {
(mA) = (milliamp)
(mV) = (millivolt)
}
PARAMETER {
gbar = .12 (mho/cm2)
gbar2 = .12 (mho/cm2)
vmin = -120 (mV)
vmax = 100 (mV)
taun = 1 (ms)
taun2 = 10 (ms)
pown = 2
}
STATE {
n <1e-1>
n2 <1e-1>
}
ASSIGNED {
v (mV)
ek (mV)
ik (mA/cm2)
}
INITIAL {
n = ssn(v)
n2 = ssn(v)
}
BREAKPOINT {
SOLVE states METHOD cnexp
ik = gbar*(v - ek)*n^pown + gbar2*(v - ek)*n2^pown
}
DERIVATIVE states {
n' = (ssn(v) - n)/taun
n2' = (ssn(v) - n2)/taun2
}
FUNCTION ssn(v(mV)) { : K activation steady state
TABLE FROM vmin TO vmax WITH 200
ssn = 1/(1 + exp((v + 40 (mV))/(-3 (mV))))
}