-
Notifications
You must be signed in to change notification settings - Fork 2
/
localize_currents_M.oc
197 lines (154 loc) · 3.78 KB
/
localize_currents_M.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
//------------------------------------------------------------------------
//
// Procedures to localize mechanisms in dendritic compartments
//
// Simple version with minimal set of currents:
// - potassium currents: IKd Traub, IM Zach
// - INa current: Traub
// - IKd in dendrites
//
// Procedures to localize currents as a function of distance
// (use the path distance function of NEURON)
//
//------------------------------------------------------------------------
strdef sect
soma distance(0,0.5) // initialize path distances to center of soma
//
// Procedures to insert mechanisms
//
proc insert_ina() { // sodium channels
insert inaT
ena = 50
vtraub_inaT = -63 // threshold of -55
gnabar_inaT = 3 // zach init segment
gnabar_inaT = 20e-4 // zach dendrites & soma
}
proc insert_ikd() { // delayed-rectifier
insert ikdT
ek = -90
vtraub_ikdT = -63 // threshold of IKd
gkbar_ikdT = 2000e-4 // zach init segment
gkbar_ikdT = 200e-4 // zach soma
}
proc insert_im() { // ca-dependent K+ current
insert imZ
ek = -90
gkbar_imZ = 3e-4 // zach dendrites & soma
}
//
// Procedure to insert currents in soma, dendrites and axon
//
proc insert_currents() {
forsec "dend" { // dendrites
insert_ina() // sodium channels
insert_im() // M-channels
insert_ikd() // delayed rectifier
}
soma { // soma
insert_ina() // sodium channels
insert_im() // M-channels
insert_ikd() // delayed rectifier
}
axon { // axon
insert_ina() // sodium channels
insert_ikd() // delayed rectifier
}
}
//
// Procedure to set conductances in the soma
// arguments: 1=gNa, 2=gKd, 3=gM
//
proc set_soma() {
print " "
print "Set somatic currents:"
print " "
print " Sodium cnannels: ",$1
print " IKd channels: ",$2
print " IM channels: ",$3
print " "
soma {
gnabar_inaT = $1 // sodium channels
gkbar_imZ = $3 // M-channels
gkbar_ikdT = $2 // delayed rectifier
if(DEBUG) {
sectionname(sect)
print "INa, IKd, IM inserted in ",sect
}
}
}
//
// Procedure to set conductances in the axon
// arguments: 1=gNa, 2=gKd
//
proc set_axon() {
print " "
print "Set axonal currents:"
print " "
print " Sodium cnannels: ",$1
print " IKd channels: ",$2
print " "
axon {
gnabar_inaT = $1 // sodium channels
gkbar_ikdT = $2 // delayed rectifier
if(DEBUG) {
sectionname(sect)
print "INa, IKd inserted in ",sect
}
}
}
//
// Procedure to set conductances in the dendrites
// arguments: 1=gNa, 2=gKd, 3=gM
//
proc set_dendrites() {
print " "
print "Set dendritic currents:"
print " "
print " Sodium cnannels: ",$1
print " IKd channels: ",$2
print " IM channels: ",$3
print " "
forsec "dend" {
gnabar_inaT = $1 // sodium channels
gkbar_imZ = $3 // M-channels
gkbar_ikdT = $2 // delayed rectifier
if(DEBUG) {
sectionname(sect)
print "INa, IKd, IM inserted in ",sect
}
}
forsec "myelin" {
gnabar_inaT = $1 // sodium channels in myelin are idem dendrites
if(DEBUG) {
sectionname(sect)
print "INa inserted in ",sect
}
}
}
//
// Procedure to localize conductances in the dendrites
// arguments: 1=gNa, 2=gKd, 3=gM, 4=min distance, 5=max distance
//
proc localize_dendrites() { local i
print " "
print "Localize dendritic currents:"
print " "
print " Sodium cnannels: ",$1
print " IKd channels: ",$2
print " IM channels: ",$3
print " distance range: ",$4," to ",$5
print " "
i=0
forsec "dend" {
if( (distance(0.5) >= $4) && (distance(0.5) <= $5) ) {
gnabar_inaT = $1 // sodium channels
gkbar_imZ = $3 // M-channels
gkbar_ikdT = $2 // delayed rectifier
if(DEBUG) {
sectionname(sect)
print "INa, IKd, IM inserted in ",sect
}
}
i=i+1
}
}