-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathIVnmda5.mod
229 lines (180 loc) · 4.58 KB
/
IVnmda5.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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
INDEPENDENT {t FROM 0 TO 1 WITH 1 (ms)}
NEURON {
POINT_PROCESS IVNMDA5
POINTER C
RANGE C0, C1, C2, D, O, B
RANGE g, gmax, rb, gluc, w, timer, llabel
GLOBAL Erev, mg, Rb, Ru, Rd, Rr, Ro, Rc
GLOBAL vmin, vmax
NONSPECIFIC_CURRENT inmda
}
UNITS {
(nA) = (nanoamp)
(mV) = (millivolt)
(pS) = (picosiemens)
(umho) = (micromho)
(mM) = (milli/liter)
(uM) = (micro/liter)
}
PARAMETER {
Erev = 0 (mV) : reversal potential
gmax = 500 (pS) : maximal conductance
mg = 0 (mM) : external magnesium concentration
vmin = -120 (mV)
vmax = 100 (mV)
: Rates
gluc = 0.00003 (mM)
timer = 110 (ms)
llabel = 0
: Destexhe, Mainen & Sejnowski, 1996
Rb = 5e-3 (/uM /ms) : binding
Ru = 12.9e-3 (/ms) : unbinding
Rd = 8.4e-3 (/ms) : desensitization
Rr = 6.8e-3 (/ms) : resensitization
Ro = 46.5e-3 (/ms) : opening
Rc = 73.8e-3 (/ms) : closing
}
COMMENT
: Clements et al. 1992
Rb = 5e-3 (/uM /ms) : binding
Ru = 9.5e-3 (/ms) : unbinding
Rd = 16e-3 (/ms) : desensitization
Rr = 13e-3 (/ms) : resensitization
Ro = 25e-3 (/ms) : opening
Rc = 59e-3 (/ms) : closing
: Hessler Shirke & Malinow 1993
Rb = 5e-3 (/uM /ms) : binding
Ru = 9.5e-3 (/ms) : unbinding
Rd = 16e-3 (/ms) : desensitization
Rr = 13e-3 (/ms) : resensitization
Ro = 25e-3 (/ms) : opening
Rc = 59e-3 (/ms) : closing
: Clements & Westbrook 1991
Rb = 5 (uM /s) : binding
Ru = 5 (/s) : unbinding -> gives Kd = Rb/Ru = 1 uM
Rd = 4.0 (/s) : desensitization
Rr = 0.3 (/s) : resensitization
Ro = 10 (/s) : opening
Rc = 322 (/s) : closing
: Edmonds & Colquhoun 1992
Rb = 5 (uM /s) : binding
Ru = 4.7 (/s) : unbinding
Rd = 8.4 (/s) : desensitization
Rr = 1.8 (/s) : resensitization
Ro = 46.5 (/s) : opening
Rc = 91.6 (/s) : closing
: Lester & Jahr 1992
Rb = 5 (uM /s) : binding
Ru = 6.7 (/s) : unbinding
Rd = 15.2 (/s) : desensitization
Rr = 9.4 (/s) : resensitization
Ro = 83.8 (/s) : opening
Rc = 83.8 (/s) : closing
ENDCOMMENT
ASSIGNED {
v (mV) : postsynaptic voltage
inmda (nA) : current = g*(v - Erev)
g (pS) : conductance
C (mM) : pointer to glutamate concentration
rb (/ms) : binding
w
}
STATE {
: Channel states (all fractions)
C0 : unbound
C1 : single bound
C2 : double bound
D : desensitized
O : open
B : fraction free of Mg2+ block
}
INITIAL {
rates(v)
C0 = 1
llabel = 0.0
}
BREAKPOINT {
rates(v)
SOLVE kstates METHOD sparse
g = gmax * O * B
inmda = (1e-6) * g * (v - Erev)
: VERBATIM
llabel = writeIV(inmda, gluc, timer, llabel)
: return 0;
: ENDVERBATIM
}
KINETIC kstates {
rb = Rb * (1e3) * C
~ C0 <-> C1 (2*rb,Ru)
~ C1 <-> C2 (rb,2*Ru)
~ C2 <-> D (Rd,Rr)
~ C2 <-> O (Ro,Rc)
CONSERVE C0+C1+C2+D+O = 1
}
PROCEDURE rates(v(mV)) {
TABLE B
DEPEND mg
FROM vmin TO vmax WITH 200
: from Jahr & Stevens
B = 1 / (1 + exp(0.062 (/mV) * -v) * (mg / 3.57 (mM)))
}
VERBATIM
double peak = 0.0;
double writeIV(double(in),double(cc), double(timerr), double(label)) {
/*stops at peak not used now*/
FILE *fp;
/* printf("%f ", cc);*/
if (peak*1e10 >= in*1e10) {
peak = in;
/* printf("%e %e\n", peak, in);*/
if(label == 1.0) {
label = 0.0;
}
if(label == 2.0) {
label = 0.0;
}
if(label == 3.0) {
peak = 0;
}
}
if ((peak*1e10 < in*1e10) && (label != 3.0)) {
label = label + 1.0;
if(label == 1.0){
peak = peak;
} else if (label == 3.0) {
fp = fopen("IV.txt", "a");
if(fp == NULL) {
#if 0
printf("Can't open IV.txt file\n");
exit(1);
#else
hoc_execerror("Can't open IV.txt file", (char*)0);
#endif
}
printf("peak value is %e\n", peak);
fprintf(fp, "%e %e \n", cc, peak);
fclose(fp);
peak = 0.0;
}
}
if ((t+dt/2) > timerr ) {
printf("baby one");
if (label == 0.0) {
fp = fopen("IV.txt", "a");
if(fp == NULL) {
#if 0
printf("Can't open IV.txt file\n");
exit(1);
#else
hoc_execerror("Can't open IV.txt file", (char*)0);
#endif
}
fprintf(fp, "%e %e \n", cc, in);
fclose(fp);
label = 3.0;
peak = 0.0;
}
}
return(label);
}
ENDVERBATIM