-
Notifications
You must be signed in to change notification settings - Fork 1
/
p_current.mod
75 lines (65 loc) · 896 Bytes
/
p_current.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
TITLE Sodium current from Oozer
UNITS {
(mV) = (millivolt)
(mA) = (milliamp)
(S) = (siemens)
}
NEURON{
SUFFIX pc
USEION na READ ena WRITE ina
RANGE gp, g, i
}
PARAMETER{
gp = 0.012 (S/cm2)
}
ASSIGNED{
v (mV)
ena (mV)
ina (mA/cm2)
i (mA/cm2)
g (S/cm2)
}
STATE {
p
}
BREAKPOINT{
SOLVE states METHOD cnexp
g = gp * p^3
i = g * (v-ena)
ina = i
}
INITIAL{
p = alphap(v)/(alphap(v)+betap(v))
}
DERIVATIVE states{
p' = (1-p)*alphap(v) - p*(betap(v))
}
FUNCTION alphap(Vm (mV))
{
LOCAL x
UNITSOFF
x = (Vm+19)/10.2
if(fabs(x) < 1e-6)
{
alphap = 0.0151*10.2
}
else
{
alphap = 0.0151*(Vm+19)/(1-exp(-x))
}
UNITSON
}
FUNCTION betap(Vm (mV)){
LOCAL x
UNITSOFF
x = -(Vm+26)/10
if(fabs(x) < 1e-6)
{
betap = 0.000379*10
}
else
{
betap = 0.000379*-(Vm+26)/(1-exp(-x))
}
UNITSON
}