-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcalL.mod
137 lines (116 loc) · 3.88 KB
/
calL.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
TITLE L-type calcium channel with low threshold for activation
:------------------------------------------------------------------------------
COMMENT
******************* UNITS ISSUES ******************
Used in somatic and proximal dendritic regions, this file calculates I_Ca using
channel permeability instead of conductance
Need to write cai in the file
Here cai is set in PARAMETER block; should be INITIAL?
ENDCOMMENT
:------------------------------------------------------------------------------
NEURON {
SUFFIX calL
USEION ca READ cai,cao WRITE ica
RANGE gcalbar, gcal, minf, taum
}
:------------------------------------------------------------------------------
UNITS {
(mA) = (milliamp)
(mV) = (millivolt)
(mM) = (milliliter)
FARADAY = 96520 (coul)
R = 8.3134 (joule/degC)
KTOMV = 0.0853 (mV/degC)
}
:------------------------------------------------------------------------------
INDEPENDENT {t FROM 0 TO 1 WITH 1 (ms)}
PARAMETER { :parameters that can be entered when function is called in cell-setup
dt (ms)
v (mV)
celsius = 36 (degC)
gcalbar = 0 (mho/cm2) : initialized conductance
ki = 0.001 (mM)
cai = 0.0001 (mM) : initial internal Ca++ concentration
cao = 1.5 (mM) : initial external Ca++ concentration
tfa = 5 : time constant scaling factor
eca = 140 (mV) : Ca++ reversal potential
}
:------------------------------------------------------------------------------
ASSIGNED { : parameters needed to solve DE
ica (mA/cm2)
gcal (mho/cm2)
minf
taum
}
:------------------------------------------------------------------------------
STATE { m } : unknown parameter to be solved in the DEs
:------------------------------------------------------------------------------
INITIAL { : initialize the following parameter using rates()
rates(v)
m = minf
gcal = gcalbar*m*h2(cai)
}
:------------------------------------------------------------------------------
BREAKPOINT {
SOLVE states
gcal = gcalbar*m*h2(cai) : maximum channel permeability
ica = gcal*ghk(v,cai,cao): calcium current induced by this channel
}
:------------------------------------------------------------------------------
FUNCTION h2(cai(mM)) {
h2 = ki/(ki+cai)
}
:---------
UNITSOFF
FUNCTION KTF(celsius(degC)) { : temperature-dependent adjustment factor
KTF = ((celsius + 273.15)*(25.0/293.15))
}
:---------
FUNCTION ghk(v(mV), ci(mM), co(mM)) (mV) {
LOCAL nu,f
f = KTF(celsius)/2
nu = v/f
ghk = -f*(1.0 - (ci/co)*exp(nu))*efun(nu)
}
:---------
FUNCTION efun(z) {
if (fabs(z) < 1e-4) {
efun = 1 - z/2
}
else {
efun = z/(exp(z) - 1)
}
}
:---------
FUNCTION alpm(v) {
TABLE FROM -150 TO 150 WITH 200
alpm = 0.055*(-27.01 - v)/(exp((-27.01-v)/(3.8)) - 1)
}
:---------
FUNCTION betm(v) {
TABLE FROM -150 TO 150 WITH 200
betm = 0.94*exp((-63.01-v)/(17.0))
}
UNITSON
:------------------------------------------------------------------------------
LOCAL facm
:if state_cagk is called from hoc, garbage or segmentation violation will
:result because range variables won't have correct pointer. This is because
:only BREAKPOINT sets up the correct pointers to range variables.
PROCEDURE states() { : exact when v held constant; integrates over dt step
rates(v)
m = m + facm*(minf - m)
VERBATIM
return 0;
ENDVERBATIM
}
:---------
UNITSOFF
PROCEDURE rates(v(mV)) { :callable from hoc
LOCAL a
a = alpm(v)
taum = 1/(tfa*(a+betm(v))) : estimation of activation tau
minf = a/(a+betm(v)) : estimation of activation steady state value
facm = (1 - exp(-dt/taum))
}
UNITSON