-
Notifications
You must be signed in to change notification settings - Fork 0
/
netParams.py
299 lines (250 loc) · 13.5 KB
/
netParams.py
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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
'''
This is the netParams.py file for the Touch-Motor Model by L Medlock (2023)
Adapted from the motor network model of Moraud et al. 2016 and Formento et al. 2018
'''
from netpyne import specs, sim
from neuron import h, gui
import cells
import numpy as np
import json
try:
from __main__ import cfg
except:
from cfg import cfg
# Network parameters
netParams = specs.NetParams() # object of class NetParams to store the network parameters
###############################################################################
# CELL PARAMETERS
###############################################################################
cells.INcellRule['conds'] = {'cellType': 'IN' , 'cellModel': '_IN' }
cells.INcellRule['secs']['dend']['mechs'] = {'B_DR': {},
'KDR' : {'gkbar': 0.0},
'KDRI' : {'gkbar' : 0.034},
'SS' : {'gnabar': 0.0},
'pas' : {'g': 1.1e-05, 'e': -70.0}}
cells.INcellRule['secs']['hillock']['mechs'] = {'B_A' : {},
'B_DR': {},
'B_Na': {'gnabar': 3.45, 'alpha_shift': 0.0, 'beta_shift': 0.0},
'KDR' : {'gkbar': 0.0},
'KDRI': {'gkbar': 0.076},
'pas' : {'g': 1.1e-05, 'e': -70.0}}
cells.INcellRule['secs']['soma']['mechs'] = {'B_A': {},
'B_DR': {},
'B_Na': {'gnabar': 0.008, 'alpha_shift': 0.0, 'beta_shift': 0.0},
'KDR': {'gkbar': 0.0},
'KDRI': {'gkbar': 0.0043},
'pas': {'g': 1.1e-05, 'e': -70.0}}
cells.INcellRule['secs']['soma']['threshold'] = -10
netParams.cellParams['INRule'] = cells.INcellRule
###############################################################################
# POPULATION PARAMETERS
###############################################################################
##---------------------- POPULATIONS FOR EXTENSOR (GM) ------------------------- ##
###### Proprioceptors #######
#Ia
with open('spkt_Ia_GM.json', 'rb') as spkt_Ia_GM: spkt_Ia_GM = json.load(spkt_Ia_GM)
netParams.popParams['Vec_Ia_GM'] = {'cellModel': 'VecStim', 'numCells': 60, 'spkTimes': spkt_Ia_GM}
netParams.popParams['Iaf_GM'] = {'cellModel': 'IntFire1', 'numCells': 60, 'm':0, 'tau':10, 'refrac':1}
# II
with open('spkt_II_GM.json', 'rb') as spkt_II_GM: spkt_II_GM = json.load(spkt_II_GM)
netParams.popParams['Vec_II_GM'] = {'cellModel': 'VecStim', 'numCells': 60, 'spkTimes': spkt_II_GM}
netParams.popParams['IIf_GM'] = {'cellModel': 'IntFire1', 'numCells': 60, 'm':0, 'tau':10, 'refrac':1}
# # ###### Motor Interneurons ######
netParams.popParams['IaInt_GM'] = {'cellModel': 'IntFire4', 'numCells': 196, 'taue':0.5, 'taui1':5, 'taui2':10, 'taum':30}
netParams.popParams['IIExInt_GM'] = {'cellModel': 'IntFire4', 'numCells': 196, 'taue':0.5, 'taui1':5, 'taui2':10, 'taum':30}
# ###### Motor Neurons ######
netParams.importCellParams(
label='IntFireMn',
conds={'cellType': 'Mn', 'cellModel': 'IntFireMn'},
fileName='IntFireMn.py',
cellName='IntFireMn',
importSynMechs=True)
netParams.popParams['Mn_GM'] = {'cellModel': 'IntFireMn', 'numCells': 169} # Motorneurons for GM (Extensor)
#---------------------- POPULATIONS FOR FLEXOR (TA) ------------------------- ##
###### Proprioceptors ######
# Ia
with open('spkt_Ia_TA.json', 'rb') as spkt_Ia_TA: spkt_Ia_TA = json.load(spkt_Ia_TA)
netParams.popParams['Vec_Ia_TA'] = {'cellModel': 'VecStim', 'numCells': 60, 'spkTimes': spkt_Ia_TA}
netParams.popParams['Iaf_TA'] = {'cellModel': 'IntFire1', 'numCells': 60, 'm':0, 'tau':10, 'refrac':1}
# II
with open('spkt_II_TA.json', 'rb') as spkt_II_TA: spkt_II_TA = json.load(spkt_II_TA)
netParams.popParams['Vec_II_TA'] = {'cellModel': 'VecStim', 'numCells': 60, 'spkTimes': spkt_II_TA}
netParams.popParams['IIf_TA'] = {'cellModel': 'IntFire1', 'numCells': 60, 'm':0, 'tau':10, 'refrac':1}
###### Motor Interneurons ######
netParams.popParams['IaInt_TA'] = {'cellModel': 'IntFire4', 'numCells': 196, 'taue':0.5, 'taui1':5, 'taui2':10, 'taum':30}
netParams.popParams['IIExInt_TA'] = {'cellModel': 'IntFire4', 'numCells': 196, 'taue':0.5, 'taui1':5, 'taui2':10, 'taum':30}
###### Motor Neurons ######
netParams.popParams['Mn_TA'] = {'cellModel': 'IntFireMn', 'numCells': 169} # Motorneurons for TA (Flexor)
## -------------------------- dPV Neuron --------------------------##
netParams.popParams['dPV'] = {'cellType': 'IN', 'numCells': 1, 'cellModel': '_IN'} # GID = 0
###############################################################################
# SYNAPTIC PARAMETERS
###############################################################################
# netParams.synMechParams['exc'] = {'mod': 'ExpSyn', 'tau': 5.0, 'e': 0}
# netParams.synMechParams['inh'] = {'mod': 'ExpSyn', 'tau': 10.0, 'e': -70}
###############################################################################
# CONNECTIVITY PARAMETERS
###############################################################################
# # Proproprioceptor Connectivity List (connect cells 0-59 from each pop)
netParams.Prop_IDs = np.arange(60) # 60 cells per prop population
netParams.Prop_Conn_List = []
netParams.Prop_Conn_List = list(zip(netParams.Prop_IDs, netParams.Prop_IDs))
# ##----------------- CONNECTIVITY FOR EXTENSOR (GM) --------------------##
netParams.connParams['Vec_Ia_GM->Ia_GM'] = { # Ia_GM Population
'preConds': {'pop': 'Vec_Ia_GM'},
'postConds': {'pop': 'Iaf_GM'},
'connList':netParams.Prop_Conn_List,
'synPerConn':1,
#'probability': 1, # probability of connection
'weight': 5, # synaptic weight
'delay': 0 # transmission delay (ms)
}
netParams.connParams['Vec_II_GM->II_GM'] = { # II_GM Population
'preConds': {'pop': 'Vec_II_GM'},
'postConds': {'pop': 'IIf_GM'},
'connList':netParams.Prop_Conn_List,
'synPerConn':1,
#'probability': 1, # probability of connection
'weight': 5, # synaptic weight
'delay': 0 # transmission delay (ms)
}
netParams.connParams['Iaf_GM->Mn_GM'] = { # Iaf_GM --> Mn_GM (all-to-all connectivity)
'preConds': {'pop': 'Iaf_GM'},
'postConds': {'pop': 'Mn_GM'},
'weight': 0.018, # synaptic weight
'delay': 2 # transmission delay (ms)
}
netParams.connParams['Iaf_GM->IaInt_GM'] = { # Iaf_GM --> IaInt_GM
'preConds': {'pop': 'Iaf_GM'},
'postConds': {'pop': 'IaInt_GM'},
'convergence': 62, # convergence (# of pre-synaptic cells connected to each post-synaptic cell)
'weight': 0.011, # synaptic weight
'delay': 2 # transmission delay (ms)
}
netParams.connParams['IIf_GM->IIExInt_GM'] = { # Iaf_GM --> IIExInt_GM
'preConds': {'pop': 'IIf_GM'},
'postConds': {'pop': 'IIExInt_GM'},
'convergence': 62, # convergence (# of pre-synaptic cells connected to each post-synaptic cell)
'weight': 0.011, # synaptic weight
'delay': 2 # transmission delay (ms)
}
netParams.connParams['IIf_GM->IaInt_GM'] = { # IIf_GM --> IaInt_GM
'preConds': {'pop': 'IIf_GM'},
'postConds': {'pop': 'IaInt_GM'},
'convergence': 62, # convergence (# of pre-synaptic cells connected to each post-synaptic cell)
'weight': 0.011, # synaptic weight
'delay': 2 # transmission delay (ms)
}
netParams.connParams['IIExInt_GM->Mn_GM'] = { # IIExInt_GM --> Mn_GM
'preConds': {'pop': 'IIExInt_GM'},
'postConds': {'pop': 'Mn_GM'},
'convergence': 116, # convergence (# of pre-synaptic cells connected to each post-synaptic cell)
'weight': 0.007, # synaptic weight
'delay': 1 # transmission delay (ms)
}
netParams.connParams['IaInt_GM->IaInt_TA'] = { # IaInt_GM ---> IaInt_TA (cross muscle inhibition)
'preConds': {'pop': 'IaInt_GM'},
'postConds': {'pop': 'IaInt_TA'},
'convergence': 100, # convergence (# of pre-synaptic cells connected to each post-synaptic cell)
'weight': -0.0076, # synaptic weight
'delay': 1 # transmission delay (ms)
}
netParams.connParams['IaInt_GM->Mn_TA'] = { # IaInt_GM ---> Mn_TA (cross muscle inhibition)
'preConds': {'pop': 'IaInt_GM'},
'postConds': {'pop': 'Mn_TA'},
'convergence': 232, # convergence (# of pre-synaptic cells connected to each post-synaptic cell)
'synsPerConn': 2,
'weight': -0.002, # synaptic weight
'delay': 1 # transmission delay (ms)
}
##----------------- CONNECTIVITY FOR FLEXOR (GM) --------------------##
# PROPRIOCEPTOR INPUT
netParams.connParams['Vec_Ia_TA->Iaf_TA'] = { # Ia_TA Population
'preConds': {'pop': 'Vec_Ia_TA'},
'postConds': {'pop': 'Iaf_TA'},
'connList':netParams.Prop_Conn_List,
'synPerConn':1,
#'probability': 1, # probability of connection
'weight': 5, # synaptic weight
'delay': 0 # transmission delay (ms)
}
netParams.connParams['Vec_II_TA->IIf_TA'] = { # II_TA Population
'preConds': {'pop': 'Vec_II_TA'},
'postConds': {'pop': 'IIf_TA'},
'connList':netParams.Prop_Conn_List,
'synPerConn':1,
#'probability': 1, # probability of connection
'weight': 5, # synaptic weight
'delay': 0 # transmission delay (ms)
}
netParams.connParams['Iaf_TA->Mn_TA'] = { # Iaf_TA --> Mn_TA (all-to-all connectivity)
'preConds': {'pop': 'Iaf_TA'},
'postConds': {'pop': 'Mn_TA'},
'weight': 0.018, # synaptic weight
'delay': 2 # transmission delay (ms)
}
netParams.connParams['Iaf_TA->IaInt_TA'] = { # Iaf_TA --> IaInt_TA
'preConds': {'pop': 'Iaf_TA'},
'postConds': {'pop': 'IaInt_TA'},
'convergence': 62, # convergence (# of pre-synaptic cells connected to each post-synaptic cell)
'weight': 0.011, # synaptic weight
'delay': 2 # transmission delay (ms)
}
netParams.connParams['IIf_TA->IIExInt_TA'] = { # Iaf_TA --> IIExInt_TA
'preConds': {'pop': 'IIf_TA'},
'postConds': {'pop': 'IIExInt_TA'},
'convergence': 62, # convergence (# of pre-synaptic cells connected to each post-synaptic cell)
'weight': 0.011, # synaptic weight
'delay': 2 # transmission delay (ms)
}
netParams.connParams['IIf_TA->IaInt_TA'] = { # IIf_TA --> IaInt_TA
'preConds': {'pop': 'IIf_TA'},
'postConds': {'pop': 'IaInt_TA'},
'convergence': 62, # convergence (# of pre-synaptic cells connected to each post-synaptic cell)
'weight': 0.011, # synaptic weight
'delay': 2 # transmission delay (ms)
}
netParams.connParams['IIExInt_TA->Mn_TA'] = { # IIExInt_TA --> Mn_TA
'preConds': {'pop': 'IIExInt_TA'},
'postConds': {'pop': 'Mn_TA'},
'convergence': 116, # convergence (# of pre-synaptic cells connected to each post-synaptic cell)
'weight': 0.007, # synaptic weight
'delay': 1 # transmission delay (ms)
}
netParams.connParams['IaInt_TA->IaInt_GM'] = { # IaInt_TA ---> IaInt_GM (cross muscle inhibition)
'preConds': {'pop': 'IaInt_TA'},
'postConds': {'pop': 'IaInt_GM'},
'convergence': 100, # convergence (# of pre-synaptic cells connected to each post-synaptic cell)
'weight': -0.0076, # synaptic weight
'delay': 1 # transmission delay (ms)
}
netParams.connParams['IaInt_TA->Mn_GM'] = { # IaInt_TA ---> Mn_GM (cross muscle inhibition)
'preConds': {'pop': 'IaInt_TA'},
'postConds': {'pop': 'Mn_GM'},
'convergence': 232, # convergence (# of pre-synaptic cells connected to each post-synaptic cell)
'synsPerConn': 2,
'weight': -0.002, # synaptic weight
'delay': 1 # transmission delay (ms)
}
##----------------- CONNECTIVITY FOR TOUCH --------------------##
netParams.connParams['dPV->Mn_GM'] = {
'preConds': {'pop': 'dPV'},
'postConds': {'pop': 'Mn_GM'},
'probability': 1, # probability of connection
'weight': 0, # synaptic weight (0 is dPV ablation, -1 is normal)
'delay': 1 # transmission delay (ms)
#'synMech':'inh'
}
netParams.connParams['dPV->Mn_TA'] = {
'preConds': {'pop': 'dPV'},
'postConds': {'pop': 'Mn_TA'},
'probability': 1, # probability of connection
'weight': 0, # synaptic weight (0 is dPV ablation, -1 is normal)
'delay': 1, # transmission delay (ms)
#'synMech':'inh'
}
# # ###############################################################################
# # # STIMULATION PARAMETERS
# # ###############################################################################
netParams.stimSourceParams['Stim'] = {'type': 'IClamp', 'delay': 1000, 'dur': 788, 'amp': 0.02}
netParams.stimTargetParams['Stim'] = {'source': 'Stim', 'conds': {'pop': 'dPV'},'sec': 'soma', 'loc': 0.5}