-
Notifications
You must be signed in to change notification settings - Fork 2
/
demo_gfluct.oc
214 lines (144 loc) · 4.61 KB
/
demo_gfluct.oc
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
/*----------------------------------------------------------------------------
Neuron demo file to simulate fluctuating conductances
-----------------------------------------------------
- single-compartment with "Gfluct" point-process
- addition of Na/K currents for action potentials
- spontaneous firing
- Gfluct2 process
- fluctuations comparable to layer6 model with correl=0.7
Reference:
Destexhe, A., Rudolph, M., Fellous, J-M. and Sejnowski, T.J.
Fluctuating synaptic conductances recreate in-vivo--like activity in
neocortical neurons. Neuroscience 107: 13-24 (2001).
(electronic copy available at http://cns.iaf.cnrs-gif.fr)
Written by A. Destexhe, 1999
----------------------------------------------------------------------------*/
//----------------------------------------------------------------------------
// load and define general graphical procedures
//----------------------------------------------------------------------------
load_file("nrngui.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])
}
proc makegraph() { local ii // define subroutine to add a new graph
// makeraph("variable", xmin,xmax,ymin,ymax)
ngraph = ngraph+1
ii = ngraph-1
g[ii] = new Graph()
g[ii].size($2,$3,$4,$5)
g[ii].xaxis()
g[ii].yaxis()
g[ii].addvar($s1,1,0)
g[ii].save_name("graphList[0].")
graphList[0].append(g[ii])
}
nrnmainmenu() // create main menu
nrncontrolmenu() // crate control menu
//----------------------------------------------------------------------------
// general parameters
//----------------------------------------------------------------------------
dt=0.5
npoints = 2000
tstop = npoints * dt
runStopAt = tstop
steps_per_ms = 1/dt
celsius = 36
v_init = -70
objectvar Exp , Pow, Theor // create vectors of data points
Exp = new Vector(npoints)
Theor = new Vector(npoints)
Pow = new Vector(npoints/2)
//----------------------------------------------------------------------------
// create a compartment and insert passive properties
//----------------------------------------------------------------------------
create soma
soma {
L = 105 // size to get similar Rin as Layer VI cell
diam = 105
}
leak_cond = 4.52e-5
leak_rev = -80 // D & P 1999
capacit = 1
axial_res = 250
forall { // insert passive currents
insert pas
g_pas = leak_cond
e_pas = leak_rev
cm = capacit
Ra = axial_res
L = L
}
//----------------------------------------------------------------------------
// insert active properties
//----------------------------------------------------------------------------
DEBUG=0
soma { // insert voltage-dependent currents INa, IKd, IM
insert inaT
ena = 50
vtraub_inaT = -63 // threshold of -55
gnabar_inaT = 20e-4 // density for soma
insert ikdT
ek = -90
vtraub_ikdT = -63 // threshold of IKd
gkbar_ikdT = 200e-4 // density for soma
insert imZ
ek = -90
gkbar_imZ = 3e-4 // density for soma
}
//
// set the values of voltage-dependent conductances:
// - Na channels like Magee-Johnston
// - IM set to repetitive firing at the right frequency
//
corrJ = 4.3 // Johnston correction factor for Na conductance
soma {
gnabar_inaT = corrJ*120e-4 // sodium channels
gkbar_ikdT = 100e-4 // delayed rectifier
gkbar_imZ = 5e-4 // M-channels
}
forall {
shift_inaT = -10 // inactivation around -52 mV
vtraub_inaT = -63 // was -50 mV before
vtraub_ikdT = -63
}
//----------------------------------------------------------------------------
// insert Gfluct process
//----------------------------------------------------------------------------
access soma
objref fl
fl = new Gfluct2(0.5)
fl.std_e = 0.012 // 4 times larger
fl.std_i = 0.0264
proc make_Fpanel() { // make panel
xpanel("Fluctuating Conductance model")
xpvalue("E_e",&fl.E_e)
xpvalue("E_i",&fl.E_i)
xpvalue("g_e0",&fl.g_e0)
xpvalue("g_i0",&fl.g_i0)
xpvalue("std_e",&fl.std_e)
xpvalue("std_i",&fl.std_i)
xpvalue("tau_e",&fl.tau_e)
xpvalue("tau_i",&fl.tau_i)
xbutton("Run","run()")
xpanel()
}
make_Fpanel()
//----------------------------------------------------------------------------
// create graphs
//----------------------------------------------------------------------------
addgraph("soma.v(0.5)",-80,40)
ymin = 0 // min-max values
ymax = 0.15
addgraph("fl.g_e",ymin,ymax)
addgraph("fl.g_i",ymin,ymax)