-
Notifications
You must be signed in to change notification settings - Fork 0
/
SS.mod
99 lines (86 loc) · 1.64 KB
/
SS.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
TITLE HH sodium channel
: Hodgkin - Huxley squid sodium channel
: The model used in Safronov et al. 2000
NEURON {
SUFFIX SS
USEION na READ ena WRITE ina
RANGE gnabar, ina
GLOBAL inf
}
UNITS {
(mA) = (milliamp)
(mV) = (millivolt)
}
INDEPENDENT {t FROM 0 TO 1 WITH 1 (ms)}
PARAMETER {
v (mV)
celsius = 37 (degC)
dt (ms)
gnabar=0 (mho/cm2) <0,1e9>
ena = 53 (mV)
}
STATE {
m h
}
ASSIGNED {
ina (mA/cm2)
inf[2]
}
LOCAL fac[2]
INITIAL {
rate(v*1(/mV))
m = inf[0]
h = inf[1]
}
BREAKPOINT {
SOLVE states
ina = gnabar*m*m*m*(v - ena)
}
PROCEDURE states() { : exact when v held constant
rate(v*1(/mV))
m = m + fac[0]*(inf[0] - m)
h = h + fac[1]*(inf[1] - h)
VERBATIM
return 0;
ENDVERBATIM
}
UNITSOFF
FUNCTION alp(v(mV),i) { LOCAL a,b,c,q10 :rest = -70 order m,h
v = v :convert to hh convention
q10 = 3^((celsius - 23)/10)
if (i==0) {
alp = q10* 1 *.182*expM1(-v - 45, 9)
}else if (i==1){
alp = q10*.024*expM1(-v - 50, 5)
}
}
FUNCTION bet(v,i) { LOCAL a,b,c,q10 :rest = -70 order m,h
v = v
q10 = 3^((celsius - 23)/10)
if (i==0) {
bet = q10* 1 *.124*expM1(v + 45, 9)
}else if (i==1){
bet = q10*.0091*expM1(v + 75, 5)
}
}
FUNCTION expM1(x,y) {
if (fabs(x/y) < 1e-6) {
expM1 = y*(1 - x/y/2)
}else{
expM1 = x/(exp(x/y) - 1)
}
}
PROCEDURE rate(v) {LOCAL a, b, tau :rest = -70
TABLE inf, fac DEPEND dt, celsius FROM -150 TO 100 WITH 200
FROM i=0 TO 1 {
a = alp(v,i) b=bet(v,i)
tau = 1/(a + b)
if (i==0) {
inf[i] = a/(a+b)
}else if (i==1) {
inf[i] = 1/(1+exp((v+75)/9))
}
fac[i] = (1 - exp(-dt/tau))
}
}
UNITSON