-
Notifications
You must be signed in to change notification settings - Fork 1
/
IVnmda52A_ramp_temp.hoc
230 lines (159 loc) · 4.91 KB
/
IVnmda52A_ramp_temp.hoc
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
228
229
230
/*----------------------------------------------------------------------------
Detailed kinetic synapse mechanism
----------------------------------
Demo file to show the behavior of a synaptic currents mediated by
glutamate NMDA receptors, using a detailed kinetic model of these
receptors and a kinetic model for the release of transmitter.
Kinetic model from Clements & Westbrook, Neuron 7: 605, 1991.
See details in:
Destexhe, A., Mainen, Z.F. and Sejnowski, T.J. Kinetic models of
synaptic transmission. In: Methods in Neuronal Modeling (2nd edition;
edited by Koch, C. and Segev, I.), MIT press, Cambridge, 1996.
Written by Alain Destexhe, Laval University, 1995
----------------------------------------------------------------------------*/
//----------------------------------------------------------------------------
// load and define general graphical procedures
//----------------------------------------------------------------------------
xopen("$(NEURONHOME)/lib/hoc/stdrun.hoc")
objectvar g[20] // max 20 graphs
ngraph = 0
proc addgraph() { local ii // define subroutine to add a new graph
// addgraph("variable", minvalue, maxvalue)
ngraph = ngraph+1
ii = ngraph-1
g[ii] = new Graph()
g[ii].size(0,tstop,$2,$3)
g[ii].xaxis()
g[ii].yaxis()
g[ii].addvar($s1,1,0)
g[ii].save_name("graphList[0].")
graphList[0].append(g[ii])
}
if(ismenu==0) {
nrnmainmenu() // create main menu
// nrncontrolmenu() // create control menu
ismenu=1
}
//----------------------------------------------------------------------------
// create compartments and insert passive properties
//----------------------------------------------------------------------------
create PRE,POST
forall {
diam=10
L=10
insert pas
g_pas=1/5000
e_pas=v_init
}
//----------------------------------------------------------------------------
// insert presynaptic mechanisms
//----------------------------------------------------------------------------
access PRE // insert Hodgk-Hux. Na+ and K+ currents for spikes
insert relramp // transmitter release
//----------------------------------------------------------------------------
// insert postsynaptic mechansisms
//----------------------------------------------------------------------------
objectvar c
c = new IVNMDA5() // create synapse
POST c.loc(0.5) // assign postsynaptic compartment
setpointer c.C, PRE.T_relramp(0.5) // assign presynaptic compartment
Erev_IVNMDA5 = 0 // (mV) reversal potential (E_K)
mg_IVNMDA5 = 0 // put in zero magnesium for the demo
// parameters from Hessler Shirke & Malinow 1993
Rb_IVNMDA5 = 0.02 // (/uM /ms) : binding
Ru_IVNMDA5 = 0.1 // (/ms) : unbinding
Rd_IVNMDA5 = 0.008 // (/ms) : desensitization
Rr_IVNMDA5 = 0.004 // (/ms) : resensitization
Ro_IVNMDA5 = 0.6 // (/ms) : opening
Rc_IVNMDA5 = 0.6 // (/ms) : closing
c.gmax = 50 // (pS) maximum conductance
//----------------------------------------------------------------------------
// add graphs
//----------------------------------------------------------------------------
// addgraph("PRE.v(0.5)",-90,40)
// addgraph("PRE.T_relramp(0.5)",0,1.5)
// addgraph("c.inmda",-0.001, 0.0001)
// addgraph("POST.v(0.5)",v_init-2,v_init+4)
//----------------------------------------------------------------------------
// general parameters
//----------------------------------------------------------------------------
//iterator case() {local j
// for j = $2, numarg()-1 {
// $&1 = $j
// iterator_statement
// }
//}
double con[13]
con[0] = 0.00003
con[1] = 0.0001
con[2] = 0.0003
con[3] = 0.001
con[4] = 0.003
con[5] = 0.01
con[6] = 0.03
con[7] = 0.1
con[8] = 0.3
con[9] = 1
con[10] = 3
con[11] = 10
con[12] = 30
double duration[3]
duration[0] = 1
duration[1] = 20
duration[2] = 2000
double ramp[3]
ramp[0] = 0.2
ramp[1] = 4
ramp[2] = 4
count = 0
double x[3101/0.025]
for jj = 0,2 {
dt = 0.025
ttstop = duration[jj] + 100
tstop = ttstop
runStopAt = ttstop
steps_per_ms = 1/dt
celsius = 36
v_init = -70
for mm = 0,12 {
c.gluc = con[mm]
c.w = 0
c.timer = ttstop
c.llabel = 0.0
access PRE
cmax_relramp = con[mm]
dur_relramp = duration[jj]
rampdur_relramp = ramp[jj]
finitialize()
wopen("current.dat")
while( t < tstop) {
fadvance()
fprint("%e \n", c.inmda)
if (c.llabel == 3.0) {
wopen()
ropen("current.dat")
for (j = 0; j < t/dt; j = j +1) {
x[j] = 0.0
}
for (j=1; j<t/dt; j=j+1) {
x[j] = fscan()
temp1 = 0.1 * c.inmda
temp2 = 0.9 * c.inmda
if((x[j]*1e10 <= temp1*1e10)&&(x[j-1]*1e10 >= temp1*1e10)) {
time10 = j*dt
}
if((x[j]*1e10 <= temp2*1e10)&&(x[j-1]*1e10 > temp2*1e10)) {
time90 = j*dt
print time10, time90,x[j],temp2
break
}
}
ropen()
risetime = time90 - time10
print cmax_relramp
print risetime
break
}
}
}
}