Edit History

ACnet2-docs » History » Version 3

Padraig Gleeson, 30 Apr 2014 14:57

1 1 Padraig Gleeson
Documentation for the ACnet2 GENESIS model
2 1 Padraig Gleeson
------------------------------------------
3 1 Padraig Gleeson
4 2 Padraig Gleeson
I encourage you to extend and share this tutorial/documentation and simulation script package with others. The files here may be freely distributed under the terms of the [GNU Lesser General Public License version 2.1](https://github.com/OpenSourceBrain/ACnet2/blob/master/GENESIS/figures/copying.txt).
5 2 Padraig Gleeson
6 2 Padraig Gleeson
[David Beeman](/users/46)
7 1 Padraig Gleeson
University of Colorado, Boulder
8 1 Padraig Gleeson
dbeeman@colorado.edu
9 2 Padraig Gleeson
10 2 Padraig Gleeson
### Introduction
11 2 Padraig Gleeson
12 2 Padraig Gleeson
Cortical waves have been observed in many cortical areas, including the primary auditory cortex (AI). For example, see Kral et al. (2009). The **ACnet2** model was developed both as a study of the propagation of cortical waves, and as a tutorial example for the construction of cortical networks. The simulation scripts are designed to be run with GENESIS 2.3 and are extensively commented, are easily customizable and are designed for extension to more detailed models, or conversion to other simulation
13 2 Padraig Gleeson
systems. The model is slowly being implemented in GENESIS 3 (G-3) (Cornelis et al, 2012) and a conversion to neuroConstruct (http://www.neuroconstruct.org/) is planned. The scripts will be of particular interest to those GENESIS network modelers who have not taken advantage of the ten-fold speed increase available with the use of ‘hsolve’
14 1 Padraig Gleeson
for network simulations.
15 2 Padraig Gleeson
16 1 Padraig Gleeson
This package also contains both GENESIS and simulator-independent Python tools for the visualization and analysis of network activity.
17 1 Padraig Gleeson
18 2 Padraig Gleeson
More information about GENESIS can be obtained from http:genesis-sim.org and Beeman and Bower (1998).
19 1 Padraig Gleeson
20 2 Padraig Gleeson
The scientific purpose and simulation results are described in the published abstract (Beeman, 2013) and in the CNS 2013 poster presentation, which may be viewed here in two panels:
21 2 Padraig Gleeson
22 2 Padraig Gleeson
[Beeman-CNS2013-poster-top.pdf](https://github.com/OpenSourceBrain/ACnet2/raw/master/GENESIS/figures/Beeman-CNS2013-poster-top.pdf)
23 2 Padraig Gleeson
24 2 Padraig Gleeson
[Beeman-CNS2013-poster-bottom.pdf](https://github.com/OpenSourceBrain/ACnet2/raw/master/GENESIS/figures/Beeman-CNS2013-poster-bottom.pdf)
25 2 Padraig Gleeson
26 1 Padraig Gleeson
These are to be read left column first, top to bottom, then right column from top to bottom.
27 1 Padraig Gleeson
28 1 Padraig Gleeson
This document describes the model and how to use the provided simulation scripts to obtain the results shown in Beeman (2013) Fig. 1 (also at the top right of the poster). It also suggests experiments that may be tried with the many configurable options in the scripts, and ways to extend the model. It is my hope that this short tutorial and the example simulation scripts can provide a head start for a graduate student or postdoc who is beginning a cortical modeling project.
29 1 Padraig Gleeson
30 1 Padraig Gleeson
### The ACnet2 model
31 1 Padraig Gleeson
32 1 Padraig Gleeson
Biologically detailed and realistic models can hope to reproduce the relevant mechanisms that cause the system’s behavior. But, they have a very large space of poorly-defined or poorly-quantified parameters to be explored. This makes the analysis and interpretation of results very difficult. However, simplified models, such as networks of point integrate-and-fire neurons without dendritic structure, may leave out important details that affect network behavior.
33 1 Padraig Gleeson
34 1 Padraig Gleeson
The ACnet2 model attempts a compromise by restricting the model to a piece of the thalamorecipient layer (IV) of primary auditory cortex (AI). It has has only two populations of neurons, excitatory ‘Ex\_cells’ and inhibitory ‘Inh\_cells’. The default configuration of the model is for the Ex\_cell population to be a 48 x 48 grid of 9-compartment pyramidal cells, and for the Inh\_cells to be a 24 x 24 grid of two-compartment basket cells. The size of the two grids, cell spacing, and types of cells, as well as the location of synaptic connections may configured in the main script. Inputs from other cortical layers were crudely represented by Poisson-distributed random inputs to provide background levels of firing for the two populations in agreement with typical measured values.
35 1 Padraig Gleeson
36 1 Padraig Gleeson
The model omits the following important features:
37 1 Padraig Gleeson
38 3 Padraig Gleeson
-   A detailed model of connections from other layers
39 1 Padraig Gleeson
40 1 Padraig Gleeson
-   Other types of inhibitory channels (e.g.GABA\_B, NMDA) and cells (e.g. chandelier) with their particular patterns of connections
41 1 Padraig Gleeson
42 1 Padraig Gleeson
-   gap junctions betweeen inhibitory cells
43 1 Padraig Gleeson
44 1 Padraig Gleeson
-   Synaptic plasticity (e.g. facilitation, depression, STDP)
45 1 Padraig Gleeson
46 1 Padraig Gleeson
This simplification nevertheless leaves the weighted synaptic conductances for the four types of connections as poorly known adjustable parameters.
47 3 Padraig Gleeson
The scaling and balancing of these conductances depends strongly on the assumptions made on cell density and the connection probablity between cells as a function of separation. The goal of this modeling effort was to find a suitable set of the four maximal synaptic conductances (gmax). This should allow the propagation of waves of excitation with neither widespread undamped oscillations nor excessive inhibitory quenching of the response to stimuli.
48 1 Padraig Gleeson
49 1 Padraig Gleeson
The top right portion of the CNS poster describes how the default parameters (shown in the \`Runtime GUI <figures/0001C_run.png>\`*) produce propagation and constructive interference from two tone inputs to the model. Although the input model provides for a realistic spread of thalamic inputs that have typically observed spike time distributions at a given characteristic frequency, this example used single row excitations from spike trains of 220 and 440 Hz, in the absence of background input.
50 1 Padraig Gleeson
h3. The cell models
51 1 Padraig Gleeson
52 1 Padraig Gleeson
The main features of the two cell models are shown in the figure below.
53 1 Padraig Gleeson
![](https://github.com/OpenSourceBrain/ACnet2/raw/master/GENESIS/figures/AC_cells.png)
54 1 Padraig Gleeson
The morphology and passive parameters of the pyramidal cell are based on the reduced neocortical pyramidal cell models of Bush and Sejnowski . The passive symmetric compartmental model was transformed to an equivalent asymmetric model by a method that scales compartment dimensions to preserve the passive properties of each compartment. The resulting cell has the same input resistance of 47 Mohm and membrane time constant of 10 msec. The soma contains voltage and calcium activated channels, and there are dual-exponential synaptically activated channels at appropriate locations on the dendrites. The basket cell is a simple ‘ball and stick’ model with a 40 micrometer diameter soma and a 200 x 2 micrometer cylindrical dendrite. It has an input resistance of 113 Mohm and a time constant of 10 msec.
55 2 Padraig Gleeson
The active channels used in the soma are a small set of modified Traub et al. hippocampal CA3 region channels with activation and inactivation time constants scaled to give dynamics typical of neocortical cells. Parameter searches were performed manually and with the GENESIS 2 parameter search library simulated annealing method to approximately fit current clamp results by Nowak et al. for regular spiking cells in cat visual cortex, and by Hefti and Smith for rat layer V primary auditory cortex.
56 2 Padraig Gleeson
h3. The connection model
57 2 Padraig Gleeson
Some neocortical models assume all-to-all connections with a constant small probability, such as 0.02. Others use a larger fixed connection probability over a specified region, but have a synaptic weight factor that decays with separation distance. Recent studies of excitatory and inhibitory synaptic connectivity show that the connection strength is relatively independent of distance, but that the probability falls off with a Gaussian probability with distance. Thus, in accordance with experimental measurements on cat AI by Yuan et al. and rescaled results for mouse AI by Levy and Reyes , a fixed connection weight was used, and the probability for both excitatory and inhibitory connections was taken to vary with radial distance r in the layer as
58 1 Padraig Gleeson
 P (r) = P0 \* exp\^2), with the s = 10\*SEP\_X = 0.4 mm
59 1 Padraig Gleeson
 P0 = 0.15, P0 = 0.45, P0 = P0 = 0.6
60 2 Padraig Gleeson
For this model, the separation between excitatory cells SEP\_X = 40 micrometers. The maximum range for connections was 1 mm. This connection scheme may be easily modified in the main simulation script to corresond to measurements from other cortical areas.
61 2 Padraig Gleeson
Many simple cortical models ignore axonal conduction delays. Experiments with this model showed that in order to produce propagation of waves of excitation, the conduction delays should be large enough to produce a sufficient delay in the onset of inhibition after excitation. This could not be achieved by merely increasing the time constant for the inhibitory conductance. Estimates for the conduction velocity of short intralaminar unmeyelinated axons are in the range of 60-90 mm/s. . Values for longer distance axons between other cortical layers or regions are generally higher, ranging from 0.2 to 0.3 m/sec. . This simulation uses the default axonal conduction velocity of 0.08 m/sec, or a delay of 12.5 sec/m. This delay can have a significant effect in the delay of the onset of inhibition, as
62 1 Padraig Gleeson
connected cells 400 um apart can have a delay of 5 msec.
63 2 Padraig Gleeson
In addition to the interconnections between the cells, the excitatory cells receive a Poisson-distributed random activation at their basal dendrites in order to represent excitatory inputs from other layers. The default parameters and average frequency were chosen in order to give background levels of firing for the two populations in agreement with those measured by Steriade et al. .
64 2 Padraig Gleeson
h3. The runtime GUI
65 2 Padraig Gleeson
The screen capture of a typical simulation run shows the Control Panel with the simulation parameters.
66 2 Padraig Gleeson
![](https://github.com/OpenSourceBrain/ACnet2/raw/master/GENESIS/figures/0001C_run.png)
67 2 Padraig Gleeson
These parameters were used to produce the network activity shown in the ‘netview’ replay of the results.
68 2 Padraig Gleeson
![](https://github.com/OpenSourceBrain/ACnet2/raw/master/GENESIS/figures/C0003Aasc_prop-sm.png)
69 1 Padraig Gleeson
The sequence of frames at times from 0.8060 to 0.8138
70 1 Padraig Gleeson
represent the soma membrane potential of each excitatory cell on the 48 x
71 1 Padraig Gleeson
48 grid at the left. These are an indication of firing or changes in the
72 1 Padraig Gleeson
subthreshold potential. Those on the right give their post-synaptic
73 1 Padraig Gleeson
currents due to excitatory connections from other pyramidal cells.
74 1 Padraig Gleeson
These show initial responses to the two tone input produce a growing wave
75 1 Padraig Gleeson
of excitation past the initial responses of the input rows, culminating in
76 1 Padraig Gleeson
constructive interference in the middle shown in frame E.
77 1 Padraig Gleeson
The plots shown in the runtime GUI are for the middle cell in the labeled
78 1 Padraig Gleeson
row. Thus, the ‘Ex\_cell Membrane Potential’ plot shows that there are
79 1 Padraig Gleeson
pulses of firing in the middle cells of rows 12 and 36, corresponding
80 1 Padraig Gleeson
to the left netview displays. The ‘Ex\_cell synaptic currents’ plots
81 1 Padraig Gleeson
can be related to the right column EPSC display. These plots are useful
82 1 Padraig Gleeson
in tuning the synaptic conductances to achieve a good balance of
83 1 Padraig Gleeson
excitation and inhibition.
84 2 Padraig Gleeson
h3. The input model
85 2 Padraig Gleeson
86 1 Padraig Gleeson
The input model provided by the default simulation is specialized to
87 1 Padraig Gleeson
represent the tonotopic organization of inputs from the ventral division of
88 1 Padraig Gleeson
the medial geniculate body . This is the primary source of thalamic
89 1 Padraig Gleeson
inputs to the primary auditory cortex. The description of the scripts
90 1 Padraig Gleeson
further below tells how the input model may be modified to represent other
91 1 Padraig Gleeson
types of inputs, for example when using the network to model other cortical
92 1 Padraig Gleeson
areas.
93 1 Padraig Gleeson
The default parameters give a 48 x 48 network of Ex\_cells with rows
94 1 Padraig Gleeson
numbered from 0 to 47, and a 24 x 24 network of Inh\_cells with rows
95 1 Padraig Gleeson
numbered from 0 to 23. However, inputs are not provided to cells in the bottom 8 and top
96 1 Padraig Gleeson
8 rows, in order to avoid edge effects. As a result, there is an array of
97 1 Padraig Gleeson
Ex\_NY - 16 = 32 input “thalamic cells”, which are numbered from 1 to 32.
98 1 Padraig Gleeson
Each one of these sources of spike trains targets a row of Ex\_cells with a
99 1 Padraig Gleeson
row number that is offset by 7 from the input number. This accounts for
100 1 Padraig Gleeson
the entries in the ‘input\_control’ form below the Control Panel, where
101 1 Padraig Gleeson
Input 29 is to Target row 36. Initially, the inputs are assigned a
102 1 Padraig Gleeson
frequency on a logarithic scale from 220 Hz to 538.584 Hz with a default
103 1 Padraig Gleeson
set of pulse parameters, and are disconnected. By specifying an input
104 1 Padraig Gleeson
number corresponding to the row to be activated, these parameters may be
105 1 Padraig Gleeson
changed, and the Spike Train toggle set to ‘ON’, as shown above.
106 1 Padraig Gleeson
Providing the identical input to an entire row of cells produces more
107 1 Padraig Gleeson
correlation in the inputs than one would expect from thalamic connections.
108 1 Padraig Gleeson
One alternative would be to have a two-dimensional array of thalamic
109 1 Padraig Gleeson
inputs. The approach taken in this simulation is to have an ‘input\_delay’
110 1 Padraig Gleeson
for each connection from an input to the row of cells, and an
111 1 Padraig Gleeson
‘input\_jitter’ factor that provides a random ‘jitter’ in the arrival time
112 1 Padraig Gleeson
of the input to each cell in the row. This is implemented with a random
113 1 Padraig Gleeson
delay uniformly distributed between input\_delay**and
114 1 Padraig Gleeson
input\_delay**. The default values of these are 0,
115 1 Padraig Gleeson
but a reasonable amount of decorrelation can be provided with
116 1 Padraig Gleeson
input\_delay = 0.002 seconds, and input\_jitter = 0.4. These can be set
117 1 Padraig Gleeson
separately for each input via the ‘input\_control’ GUI.
118 1 Padraig Gleeson
Once set, the delays with jitter are the same at each time step. They
119 1 Padraig Gleeson
represent a decorrelation between the inputs to a row, not a true jitter in
120 1 Padraig Gleeson
spike arrival time. Yet, thalamic inputs are known to have a jitter in the
121 1 Padraig Gleeson
time at which they arrive at their targets. A typical value would be
122 1 Padraig Gleeson
0.0005, or 0.5 msec. As described below in the ‘Overview of the simulation
123 1 Padraig Gleeson
scripts’, this may be changed from the default of zero with the variable
124 1 Padraig Gleeson
‘spike\_jitter’.
125 1 Padraig Gleeson
There are yet more options for providing more realistic thalamic inputs.
126 1 Padraig Gleeson
In addition to providing other options for the type and distribution of the
127 1 Padraig Gleeson
inputs, there is a parameter ‘input\_spread’. This the number of rows below
128 1 Padraig Gleeson
and above the “target row” getting thalamic input. Typical values span
129 1 Padraig Gleeson
about one-third of an octave. The implementation in simple\_inputs.g
130 1 Padraig Gleeson
function **connect\_inputs** creates connections with an exponentially
131 1 Padraig Gleeson
decaying probablility to adjacent rows +/- input\_spread.
132 1 Padraig Gleeson
The default value used here is 0 , but a line in the main script can be changed to set it
133 2 Padraig Gleeson
to 1/6 of an octave, or any other value.
134 1 Padraig Gleeson
h3. Running the simulation
135 3 Padraig Gleeson
Of course, the first step in running the simulation is to have GENESIS 2.3 installed. If you have not used GENESIS before, it is simplest to download the entire ‘Ultimate GENESIS Tutorial Distribution’ package with all source code, installation instructions, and the complete set of tutorials from [http://genesis-sim.org/GENESIS/UGTD.html](http://genesis-sim.org/GENESIS/UGTD.html). GENESIS usually installs without problems under modern versions of Linux. Most questions related to installation have been answered in the archives of the ‘genesis-sim-users’ mailing list, which are available from the GENESIS 2 Sourceforge page at [http://sourceforge.net/projects/genesis-sim](http://sourceforge.net/projects/genesis-sim).
136 1 Padraig Gleeson
137 3 Padraig Gleeson
**ACnet2-main.g** is the main simulation script, with default values of the parameters that were used to generate the results in Beeman . It includes the files to create the GUI and contains many configurable options.
138 3 Padraig Gleeson
**ACnet2-batch.g** is a stripped down version with fewer options and no graphics. Once GENESIS 2.3 has been installed, the command:
139 3 Padraig Gleeson
 genesis ACnet2-batch.g
140 3 Padraig Gleeson
runs the simulation with the parameters used to generate the figure in Beeman . It creates the output files that can be displayed with the Python G-3 Network View tool in this package, printing messages such as
141 3 Padraig Gleeson
 Starting connection set up: Sun Aug 11 14:47:17 2013
142 1 Padraig Gleeson
 Finished connection set up: Sun Aug 11 14:49:39 2013
143 3 Padraig Gleeson
 All maxium synaptic weights set to 1
144 3 Padraig Gleeson
 Using simple pulsed spiketrain input
145 1 Padraig Gleeson
 ….
146 1 Padraig Gleeson
 time = 0.000000 ; step = 0
147 1 Padraig Gleeson
 time = 0.000000 ; step = 0
148 1 Padraig Gleeson
 time = 0.000000 ; step = 0
149 1 Padraig Gleeson
 Network of 48 by 48 excitatory cells with separations 4e-05 by 4e-05
150 1 Padraig Gleeson
 and 24 by 24 inhibitory cells with separations 8e-05 by 8e-05
151 1 Padraig Gleeson
 Random number generator seed initialized to: 1369497795
152 3 Padraig Gleeson
 Average number of Ex\_ex synapses per cell: 36
153 1 Padraig Gleeson
 Average number of Ex\_inh synapses per cell: 36
154 1 Padraig Gleeson
 Average number of Inh\_ex synapses per cell: 109
155 1 Padraig Gleeson
 Average number of Inh\_inh synapses per cell: 35
156 1 Padraig Gleeson
 time = 0.000000 ; step = 0
157 1 Padraig Gleeson
 time = 0.000000 ; step = 0
158 1 Padraig Gleeson
 dt = 1.999999949e-05 tmax = 1
159 1 Padraig Gleeson
 RUNID: B0003
160 1 Padraig Gleeson
 START: Sun Aug 11 14:49:41 2013
161 1 Padraig Gleeson
 END : Sun Aug 11 14:53:01 2013
162 3 Padraig Gleeson
 genesis \#0 \>
163 1 Padraig Gleeson
At this point, you can type ‘quit’ to the prompt.
164 1 Padraig Gleeson
Note the significant amount of time spent setting up the connections. It
165 1 Padraig Gleeson
is nearly as long as the time to run the model for 1 second. This is
166 3 Padraig Gleeson
because a GENESIS script language function **planarconnect\_probdecay**
167 1 Padraig Gleeson
was used to loop over source and destination cells. Some suggestions for
168 1 Padraig Gleeson
implementing this as a compiled GENESIS command are given in the section
169 1 Padraig Gleeson
‘Experiments to try’.
170 1 Padraig Gleeson
The ‘RUNID’ is a string that is given a default value in the simulation
171 1 Padraig Gleeson
script, and can be changed in the GUI for **ACnet2-main.g**. When
172 1 Padraig Gleeson
173 1 Padraig Gleeson
**ACnet2-batch.g** is run, it is used to produce output files with names:
174 3 Padraig Gleeson
* run\_summary\_B0003.txt - a summary of simulation parameters, read by replay\_netview10.g
175 3 Padraig Gleeson
* Ex\_netview\_B0003.txt - a file containing the membrane potential Vm for
176 3 Padraig Gleeson
 each Ex\_cell at time intervals ‘netview\_dt’, which is 0.2 msec, the
177 3 Padraig Gleeson
 slowest ‘clock’ used in this simulation.
178 1 Padraig Gleeson
179 3 Padraig Gleeson
* Inh\_netview\_B0003.txt - Vm for the Inh\_cells
180 3 Padraig Gleeson
* EPSC\_netview\_B0003.txt - for each Ex\_cell, contains the net Excitatory
181 3 Padraig Gleeson
 Post Synaptic Current due to connections from other Ex\_cells.
182 3 Padraig Gleeson
 The format is similar to the Ex\_netview file.
183 1 Padraig Gleeson
184 3 Padraig Gleeson
* EPSC\_sum\_B0003.txt - the EPSC summed over all Ex\_cells in the network at
185 3 Padraig Gleeson
 each time step ‘out\_dt’ ( = 0.0001 sec). This has been related to
186 3 Padraig Gleeson
 signals detected by MEG and the Power Spectral Density
187 3 Padraig Gleeson
 , which can be calculated with the
188 3 Padraig Gleeson
 analysis tools provided here.
189 1 Padraig Gleeson
The netview files are plain text with a header line in a format that is
190 1 Padraig Gleeson
described in comments in the main script.
191 1 Padraig Gleeson
The section below ‘Python data analysis and visualization tools’ tells how
192 1 Padraig Gleeson
to generate the \`wave propagation results <figures/C0003Aasc_prop-sm.png>\`*.
193 3 Padraig Gleeson
194 3 Padraig Gleeson
### Running ACnet2-main.g
195 3 Padraig Gleeson
196 1 Padraig Gleeson
Running the simulation from the GUI is similar, with the command::
197 3 Padraig Gleeson
198 3 Padraig Gleeson
genesis ACnet2-main.g
199 3 Padraig Gleeson
200 1 Padraig Gleeson
After the connections have been set up, with similar messages to the
201 3 Padraig Gleeson
console, a GUI similar to the \`Runtime GUI <figures/0001C_run.png>\`\_
202 1 Padraig Gleeson
will appear. The default RUNID of “0000” can be changed to another string
203 1 Padraig Gleeson
of your choice (no spaces or other unix-unfriendly characters). The output
204 1 Padraig Gleeson
files will contain this string in place of ‘B0003’. At this point, the
205 1 Padraig Gleeson
network will get a random Poisson activation at 8 Hz, and no thalamic
206 1 Padraig Gleeson
input. To get wave propagation results, set the Random Background
207 1 Padraig Gleeson
Activation Freq to 0, and use the ‘input\_control’ GUI to provide
208 1 Padraig Gleeson
the inputs::
209 1 Padraig Gleeson
210 1 Padraig Gleeson
Input 5 (Target Row 12) Input freq 220
211 1 Padraig Gleeson
 ‘Toggle to Spike Train ON’
212 1 Padraig Gleeson
213 1 Padraig Gleeson
Input 29 (Target Row 36) Input freq 440
214 1 Padraig Gleeson
 ‘Toggle to Spike Train ON’
215 1 Padraig Gleeson
216 1 Padraig Gleeson
leaving the pulse parameters as given. This will produce 50 msec tone
217 1 Padraig Gleeson
‘pips’ 150 msec apart.
218 1 Padraig Gleeson
219 1 Padraig Gleeson
**Don’t forget the GENESIS/XODUS eccentricity that you have to hit ‘Enter’
220 1 Padraig Gleeson
or click the mouse in a text field after you edit it, in order
221 1 Padraig Gleeson
for the changes to register.**
222 1 Padraig Gleeson
223 1 Padraig Gleeson
Then click RESET and RUN. After the run has completed, you may use
224 1 Padraig Gleeson
interactive GENESIS commands to inspect the model, or click on QUIT.
225 1 Padraig Gleeson
226 1 Padraig Gleeson
On examining the output files, you will notice that the ‘netview’ files
227 1 Padraig Gleeson
have the extension ‘.dat’ instead of ‘.txt’, and that the elapsed time
228 1 Padraig Gleeson
to run is about a minute shorter than with ACnet2-batch.g. That is
229 1 Padraig Gleeson
because ACnet2-main.g specifies the option ‘binary\_file = 1’, producing
230 1 Padraig Gleeson
output in the GENESIS ‘FMT1’ binary format. This is faster than
231 1 Padraig Gleeson
with text files, and the files are much smaller. It also allows
232 1 Padraig Gleeson
some spike analysis which is not yet possible with the Python tools.
233 1 Padraig Gleeson
However, when the **bzip2** compression utility is used, the text files
234 1 Padraig Gleeson
are much smaller than the binary files. The section ‘GENESIS data analysis
235 1 Padraig Gleeson
and visualization tools’ describes some of the analysis and visualization
236 1 Padraig Gleeson
that can be done using the binary files.
237 1 Padraig Gleeson
238 2 Padraig Gleeson
### Python data analysis and visualization tools
239 1 Padraig Gleeson
240 1 Padraig Gleeson
The directory **Gpython-tools** contains several Python scripts that were
241 1 Padraig Gleeson
developed for use with the analysis and visualization of results from
242 1 Padraig Gleeson
simulations carried out with both GENESIS 2.3 and G-3. They use plain text
243 1 Padraig Gleeson
data files with optional header information, and some can read text files
244 1 Padraig Gleeson
that have been compressed with the **bzip2** utility, making data storage
245 1 Padraig Gleeson
very efficient. New tools and documentation will be added to this
246 1 Padraig Gleeson
directory in future updates of the ACnet2 distribution, and will become
247 1 Padraig Gleeson
available through the \`GENESIS Documentation Homepage
248 1 Padraig Gleeson
<http://genesis-sim.org/userdocs/documentation-homepage/documentation-homepage.html>\`*.
249 1 Padraig Gleeson
The documentation for the present version of **Gpython-tools** is in the file
250 1 Padraig Gleeson
\`Gpython-tools/README.html <Gpython-tools/README.html>\`*.
251 1 Padraig Gleeson
252 1 Padraig Gleeson
These make use of the **maplotlib** and **wxpython** libraries, which must be
253 1 Padraig Gleeson
installed. When **netview-I.py** is installed in your search path, it can be
254 1 Padraig Gleeson
used to provide the animation from which the frames in the \`wave propagation
255 1 Padraig Gleeson
figure <figures/C0003Aasc_prop-sm.png>\`\_ were taken.
256 1 Padraig Gleeson
257 1 Padraig Gleeson
To reproduce the results from running the ACnet2-batch.g, bring up two
258 1 Padraig Gleeson
instances of **netview-I.py** for the Vm and EPSC data files::
259 1 Padraig Gleeson
260 1 Padraig Gleeson
\$ netview-I.py Ex\_netview\_B0003.txt &
261 1 Padraig Gleeson
 \$ netview-I.py EPSC\_netview\_B0003.txt &
262 1 Padraig Gleeson
263 1 Padraig Gleeson
You will have to click and drag the second netview window off of the first.
264 1 Padraig Gleeson
The Help menu ‘Usage and Help’ selection provides a pop-up window telling
265 1 Padraig Gleeson
you how to use the program, as with many of the tools in this collection.
266 1 Padraig Gleeson
267 1 Padraig Gleeson
In each window, click ‘New Data’. When the message ‘Data has been loaded’ appears
268 1 Padraig Gleeson
you can click ‘Play’, to replay the entire run. The frames shown in the
269 1 Padraig Gleeson
poster are at times::
270 1 Padraig Gleeson
271 1 Padraig Gleeson
A: 0.8060
272 1 Padraig Gleeson
 B: 0.8072
273 1 Padraig Gleeson
 C: 0.8082
274 1 Padraig Gleeson
 D: 0.8112
275 1 Padraig Gleeson
 E: 0.8138
276 1 Padraig Gleeson
277 1 Padraig Gleeson
To reproduce them, drag the ‘t\_min’ bar to 0.79 and the ‘t\_max’ bar to
278 1 Padraig Gleeson
0.80, then click ‘Play’. Then repeatedly click ‘Single Step’ until the
279 1 Padraig Gleeson
time display is 0.806. Continue for each of the next times, and compare to
280 2 Padraig Gleeson
the results in the [wave propagation figure](https://github.com/OpenSourceBrain/ACnet2/raw/master/GENESIS/figures/C0003Aasc_prop-sm.png)
281 2 Padraig Gleeson
282 1 Padraig Gleeson
There are also tools to calculate the PSD of the summed EPSC file.
283 1 Padraig Gleeson
284 1 Padraig Gleeson
**plotPSD.py** averages the PSD from a wildcard list of times series data
285 1 Padraig Gleeson
files, such as the ‘EPSC\_sum\_B0003.txt’ file. **plotPSD0.py** is similar, but
286 1 Padraig Gleeson
it overplots the spectra on the same graph. A typical usage would be::
287 2 Padraig Gleeson
288 2 Padraig Gleeson
\$ plotPSD.py EPSC\_sum\_M0005\*
289 1 Padraig Gleeson
 Plottting average of 4 runs from series M0005
290 1 Padraig Gleeson
 EPSC\_sum\_M0005B.txt EPSC\_sum\_M0005D.txt EPSC\_sum\_M0005E.txt EPSC\_sum\_M0005.txt
291 2 Padraig Gleeson
292 1 Padraig Gleeson
For a single file with a run time of only 1 second such as
293 2 Padraig Gleeson
EPSC\_sum\_B0003.txt (produced by running ACnet2-batch.g), they both yield the
294 1 Padraig Gleeson
same low resolution plot. The PSD plots shown in the lower right column of
295 1 Padraig Gleeson
the poster were generated from averages of four ten second runs that used
296 1 Padraig Gleeson
different random number seeds.
297 2 Padraig Gleeson
298 2 Padraig Gleeson
### GENESIS data analysis and visualization tools
299 2 Padraig Gleeson
300 1 Padraig Gleeson
The GENESIS script **replay\_netview10.g** and its included files
301 1 Padraig Gleeson
302 1 Padraig Gleeson
**analysis\_funcs5.g** and **spectra\_funcs3.g** are scripts that perform
303 1 Padraig Gleeson
visualization and spike train analyis on the binary ‘netview’ files that
304 1 Padraig Gleeson
are generated with the option ‘binary\_file = 1’. These use a fairly
305 1 Padraig Gleeson
confusing mixture of XODUS graphical objects, spike generators, and obscure
306 1 Padraig Gleeson
uses of the GENESIS **table** object in order to generate a number of useful
307 1 Padraig Gleeson
analyses and plots that are not yet available with the Python tools.
308 2 Padraig Gleeson
309 1 Padraig Gleeson
In order to set up the graphics and analysis tools, **replay\_netview10.g**
310 1 Padraig Gleeson
needs to read the default ‘run\_summary\_0000.txt’ and other files that are
311 1 Padraig Gleeson
generated from a run of **ACnet2-main.g** with the default RUNID = “0000”.
312 1 Padraig Gleeson
Once these has been done you can type::
313 2 Padraig Gleeson
314 2 Padraig Gleeson
genesis replay\_netview10.g
315 2 Padraig Gleeson
316 1 Padraig Gleeson
and use “0000” or another RUNID that has existing data.
317 2 Padraig Gleeson
318 1 Padraig Gleeson
Windows will appear for for Vm plots, Ex\_netview, Inh\_netview and
319 1 Padraig Gleeson
EPSC\_netview, as well as
320 1 Padraig Gleeson
321 1 Padraig Gleeson
**summary\_form** - Displays the run summary file in a scrolling text window
322 2 Padraig Gleeson
323 1 Padraig Gleeson
**histform** - A Firing rate distribution histogram for the Ex\_cells in the
324 1 Padraig Gleeson
network. This will typically by Gaussian, although a model with STDP
325 1 Padraig Gleeson
should show a lognormal distribution.
326 1 Padraig Gleeson
327 1 Padraig Gleeson
**freq\_form** - Displays the Average Spike Frequency for Ex\_cells and
328 1 Padraig Gleeson
Inh\_celsl with time, with a settable time bin size. This is particularly
329 1 Padraig Gleeson
useful when balancing conductances to give proper background firing rates
330 1 Padraig Gleeson
and fluctations in the rate.
331 1 Padraig Gleeson
332 1 Padraig Gleeson
**spectra\_form** - Hidden under the freq\_form, it calculates the PSD using
333 1 Padraig Gleeson
a slow Discrete Fourier Transform implemented in the GENESIS scripting
334 1 Padraig Gleeson
language. On a modern PC, the performance is not too bad, taking a little
335 1 Padraig Gleeson
over 20 seconds. However, the Python ‘plotPSD’ tools are better suited for
336 1 Padraig Gleeson
spectral analysis.
337 2 Padraig Gleeson
338 2 Padraig Gleeson
Then, click ‘RUN’ (or first enter the RUNID for another run for which you have files).
339 2 Padraig Gleeson
340 1 Padraig Gleeson
You will find that the spike frequency calculations will have produced a
341 1 Padraig Gleeson
new output file ‘spike\_freq\_0000.txt’ that did not exist before. The
342 1 Padraig Gleeson
343 1 Padraig Gleeson
**rowrateplot.py** utility in the \`Gpython-tools
344 2 Padraig Gleeson
<Gpython-tools/README.html>\`\_ directory can be used with the
345 1 Padraig Gleeson
‘spike\_freq*<RUNID>.txt’ files to create displays, similar to the \`average
346 1 Padraig Gleeson
spike frequency display <figures/freqplot_C0003A-new.png>\`* shown at the
347 1 Padraig Gleeson
left of the top poster panel. This display of the time course of the
348 1 Padraig Gleeson
average firing rate on a row can be useful in detecting propagation of
349 1 Padraig Gleeson
neuron firing from row to row. Note that replay\_netview10.g outputs
350 1 Padraig Gleeson
data for only the 32 ’target rows’ that receive inputs, so that the
351 1 Padraig Gleeson
display will normally not show all 48 rows. (This is a feature of
352 1 Padraig Gleeson
replay\_netview10.g, not of rowrateplot.py.)
353 1 Padraig Gleeson
354 2 Padraig Gleeson
### Experiments to try
355 1 Padraig Gleeson
356 1 Padraig Gleeson
Here are some suggestions of both simple and challenging things that can
357 1 Padraig Gleeson
be done to explore or extend the model.
358 1 Padraig Gleeson
359 1 Padraig Gleeson
**Changes in parameters through the GUI**
360 1 Padraig Gleeson
361 1 Padraig Gleeson
Most important model parameters can be changed through the GUI of
362 1 Padraig Gleeson
ACnet2-main.g. The ‘gmax’ values for the four types of synaptic
363 1 Padraig Gleeson
connections (which can also be scaled by the ‘Weight’ value) are a good
364 1 Padraig Gleeson
place to start.
365 1 Padraig Gleeson
366 1 Padraig Gleeson
The default values of the four synaptic conductance values shown in the
367 1 Padraig Gleeson
\`Run Time GUI <figures/0001C_run.png>\`\_ are more arbitrary than other
368 1 Padraig Gleeson
parameters. The assumption that the variable Inh\_inh\_gmax = 0.0, made also
369 1 Padraig Gleeson
in the model of Levy and Reyes (2011), produced a balance of excitation and
370 1 Padraig Gleeson
inhibition that resulted in an appropriate average background firing rate
371 1 Padraig Gleeson
for the inhibitory cells (about 22 Hz.) The GABA conductance of basket
372 1 Padraig Gleeson
cells, and their mutual connection probability are poorly known. However it
373 1 Padraig Gleeson
seems reasonable that there be some degree of mutual inhibition between
374 1 Padraig Gleeson
basket cells.
375 1 Padraig Gleeson
376 1 Padraig Gleeson
The poster mentions an alternate set of gmax values that increased the
377 1 Padraig Gleeson
basket cell AMPA conductances to 0.3 nS and provided mutual inhibition with
378 1 Padraig Gleeson
a 0.1 nS basket cell GABA conductance, These resulted in similar background
379 1 Padraig Gleeson
firing rates, but less robust wave propagation. However, this resulted in
380 1 Padraig Gleeson
a better match of the EPSC spectra to experiment. Clearly, there is a lot
381 1 Padraig Gleeson
of parameter space to explore with this small set of parameters.
382 1 Padraig Gleeson
383 1 Padraig Gleeson
Wave propagation is strongly affected by the axonal conductance delay
384 1 Padraig Gleeson
(the inverse of conduction velocity). How much less than 12.5 sec/m
385 1 Padraig Gleeson
can the network have and still support wave propagation?
386 1 Padraig Gleeson
387 1 Padraig Gleeson
The frequency and strength (gmax) of the random background activation can
388 1 Padraig Gleeson
be varied. The results shown in the poster used zero background
389 1 Padraig Gleeson
activation, because it was difficult to observe the response to
390 1 Padraig Gleeson
the input in the presence of strong backgrond activity. Studies
391 1 Padraig Gleeson
of propagation in the presence of background should be done.
392 1 Padraig Gleeson
393 1 Padraig Gleeson
Parameters for the thalamic input can be varied either by setting
394 1 Padraig Gleeson
the Ex\_cell and Inh\_cell gmax for thalamic input, or by setting
395 1 Padraig Gleeson
parameters for individual inputs. What is the effect of increasing
396 1 Padraig Gleeson
or decreasing the strength of the thalamic input?
397 1 Padraig Gleeson
398 1 Padraig Gleeson
There is much yet to be explored regarding the interaction of nearby
399 1 Padraig Gleeson
cells that receive auditory inputs. Do these parameters allow lateral
400 1 Padraig Gleeson
inhibition of closely spaced tones?
401 1 Padraig Gleeson
402 1 Padraig Gleeson
As described on the section ‘The input model’, the ‘Input delay’ and ‘Input
403 1 Padraig Gleeson
jitter’ values can produce a more realistic variation in the input received
404 1 Padraig Gleeson
by the cells within a row.
405 1 Padraig Gleeson
406 1 Padraig Gleeson
**Changes by editing the option strings in the main script**
407 1 Padraig Gleeson
408 1 Padraig Gleeson
There are many global parameters that are used for the initial setup
409 1 Padraig Gleeson
of the network, and that cannot be changed from the GUI. The section
410 1 Padraig Gleeson
‘Overview of the simulation scripts’ below describes the option strings
411 1 Padraig Gleeson
and global variables that can be changed.
412 1 Padraig Gleeson
413 1 Padraig Gleeson
Of course, any serious use of the network for auditory modeling should
414 1 Padraig Gleeson
extend the length of the network along the y-axis (the tonotopic axis)
415 1 Padraig Gleeson
to cover a wider range of octaves.
416 1 Padraig Gleeson
417 1 Padraig Gleeson
The time constants tau1 and tau2 for the synaptic conductances have a major
418 1 Padraig Gleeson
effect on the balance of excitation and inhibition, the default values are
419 1 Padraig Gleeson
based on reasonable estimates from available data, but there is some
420 1 Padraig Gleeson
uncertainty in the time constants for the rise and decay of inhibition.
421 1 Padraig Gleeson
(Because of a bug in hsolve, these cannot be changed from the GUI after
422 1 Padraig Gleeson
the network has been set up.)
423 1 Padraig Gleeson
424 1 Padraig Gleeson
How much of the results are due to the particular set of probabalistically
425 1 Padraig Gleeson
assigned connections? The random number seed is set to a fixed value in the
426 1 Padraig Gleeson
main script. This allows you to reproduce these results, but you will
427 1 Padraig Gleeson
certainly want to change it in order to compare multiple runs with
428 1 Padraig Gleeson
different connections.
429 1 Padraig Gleeson
430 1 Padraig Gleeson
**Providing more realistic auditory inputs**
431 1 Padraig Gleeson
432 1 Padraig Gleeson
The section on ‘The input model’ describes the ‘spike\_jitter’ parameter, in
433 1 Padraig Gleeson
addition to the GUI-settable ‘Input delay’ and ‘Input jitter’ values. This
434 1 Padraig Gleeson
parameter can be set in order to see if fluctuations in spike arrival time
435 1 Padraig Gleeson
affect the network behavior in a significant way.
436 1 Padraig Gleeson
437 1 Padraig Gleeson
The restriction that the thalamic inputs do not extend beyond cells on the
438 1 Padraig Gleeson
‘target row’ was made in order to simplify the analysis of wave
439 1 Padraig Gleeson
propagation. It would be more reasonable to extend the range with
440 1 Padraig Gleeson
the parameter ‘input\_spread’. This will probably require modifications
441 1 Padraig Gleeson
in the thalamic drive weight and some rebalancing of the gmax for
442 1 Padraig Gleeson
the four types of connections between cells.
443 1 Padraig Gleeson
444 1 Padraig Gleeson
The assumption that the output of thalamic cells is a uniform spike train
445 1 Padraig Gleeson
at the frequency of the sound source is probably a good one for low
446 1 Padraig Gleeson
frequency ‘click trains’, but not for tones of 220 or 440 Hz. In order to
447 1 Padraig Gleeson
provide a more realistic distribution of input spike train intervals, one
448 1 Padraig Gleeson
might develop a more detailed thalamic (MGBv) cell model for inputs to the
449 1 Padraig Gleeson
network. Some early work by Roullier et al. (1979) on unanethesized cats
450 1 Padraig Gleeson
provides histograms of spike time distributions. A simpler alternative is
451 1 Padraig Gleeson
to experiment with the alternate option string input\_type =
452 1 Padraig Gleeson
“pulsed\_randomspike”. Can you see any significant differences?
453 1 Padraig Gleeson
454 1 Padraig Gleeson
The options for ‘input\_pattern’ give an opportunity to explore other
455 1 Padraig Gleeson
non-auditory inputs. Customizing these will involve changes to some
456 1 Padraig Gleeson
parameters in the script ‘simple\_inputs.g’. For example, the “box” input
457 1 Padraig Gleeson
pattern can be used to study a spiking neurion model analgous to the model
458 1 Padraig Gleeson
of Rule et al. (2011) to simulate flicker phospenes in visual cortex.
459 1 Padraig Gleeson
460 1 Padraig Gleeson
The poster also describes experiments that can be performed on the model
461 1 Padraig Gleeson
to study the power spectra of responses to 20 - 40 Hz click trains.
462 1 Padraig Gleeson
463 1 Padraig Gleeson
**Speeding up the connection setup**
464 1 Padraig Gleeson
465 1 Padraig Gleeson
The definition of **function planarconnect\_probdecay** shows how the
466 1 Padraig Gleeson
algorithm is impelmented. It is similar to what is used in the C code for
467 1 Padraig Gleeson
planarconnect2, defined in the GENESIS source file
468 1 Padraig Gleeson
469 1 Padraig Gleeson
**genesis/src/newconn/connect.c**. The GENESIS Reference Manual in the
470 1 Padraig Gleeson
‘UGTD’ or the help files in **genesis/Doc** give detailed instructions on
471 1 Padraig Gleeson
implementing new commands and objectsi in GENESIS. This could be a fairly
472 1 Padraig Gleeson
simple project for someone with some experience in hacking other people’s C
473 1 Padraig Gleeson
code.
474 1 Padraig Gleeson
475 1 Padraig Gleeson
**Adding synaptic plasticity** (suitable for an advanced project)
476 1 Padraig Gleeson
477 1 Padraig Gleeson
The most serious feature lacking in the model is any form of synaptic
478 1 Padraig Gleeson
plasticity. Spike Timing Dependent Plasticity (STDP) and other forms of
479 1 Padraig Gleeson
plasticity are important effects in auditory and other cortical areas. It
480 1 Padraig Gleeson
would be a productive next step in the evolution of the ACnet2 model to
481 1 Padraig Gleeson
incorporate a phenomenological STDP model such as the one by Song, Miller
482 1 Padraig Gleeson
and Abbott (2000). It is perhaps better to understand the effect of these
483 1 Padraig Gleeson
mechanisms on this simple two population network before extending the
484 1 Padraig Gleeson
network model to include connections to other layers or other types of
485 1 Padraig Gleeson
neurons.
486 1 Padraig Gleeson
487 1 Padraig Gleeson
Implementing STDP will require some hacking of the GENESIS 2.3 source code
488 1 Padraig Gleeson
and/or modifications (and bug fixes) to the contributed stdpSynchan library
489 1 Padraig Gleeson
from the ‘Libraries’ collection at \`http://genesis-sim.org
490 1 Padraig Gleeson
<http://genesis-sim.org>\`*. Also see the GENESIS documentation for
491 1 Padraig Gleeson
‘Creating New Synaptic Objects’. Simpler methods of adding plasticity
492 1 Padraig Gleeson
would be to use the GENESIS ‘hebbsynchan’ or ‘facsynchan’ objects. These
493 1 Padraig Gleeson
have the restriction that they cannot be used with the ‘hsolve’ object, and
494 1 Padraig Gleeson
cannot take advantage of its efficient delivery of spike events.
495 2 Padraig Gleeson
h3. The simulation scripts
496 1 Padraig Gleeson
497 1 Padraig Gleeson
**ACnet2-main.g**, the main simulation script, directly or indirectly includes:
498 2 Padraig Gleeson
**pyr\_4\_asym.p** - The cell parameter file that describes the excitatory pyramidal cells in the network.
499 2 Padraig Gleeson
**pyr\_4\_sym.p** - This file is not used in the scripts, but is offered for those who may want to implement the pyramidal cell model with symmetric compartments instead of asymmetric compartments.
500 2 Padraig Gleeson
**bask.p** - The cell parameter file that describes the inhibitory basket cells in the network.
501 1 Padraig Gleeson
**protodefs.g** - Defines a library of components that are used to create the cells
502 1 Padraig Gleeson
**pyrchans.g** - Defines the functions that create the pyramidal cell channels.
503 1 Padraig Gleeson
**FSchans.g** - Defines the functions that create the basket cell channels.
504 2 Padraig Gleeson
**synapseinfo.g** - Inclusion of this file is optional. Comments in the file tell how to use the function **synapse\_info\* to get information about the connections in a network.
505 2 Padraig Gleeson
**graphics2-5.g\* - Defines functions to create the main GUI of control panel and graphs.
506 2 Padraig Gleeson
**input\_graphics2-5.g** - Provides an additional GUI for setting the array of inputs to the model.
507 2 Padraig Gleeson
**simple\_inputs.g** - This defines the two functions **make\_inputs** and **connect\_inputs** that are used by the main script. **make\_inputs** creates an array of “cells” that mimic the output of auditory thalamic cells . **connect\_inputs** connects the array of of inputs to the network cells.
508 2 Padraig Gleeson
The simplified **ACnet2-batch.g** script does not include the graphics files, and includes a simplified **basic\_inputs.g** script instead of **simple\_inputs.g**.
509 1 Padraig Gleeson
510 2 Padraig Gleeson
h3. Overview of the simulation scripts
511 1 Padraig Gleeson
512 1 Padraig Gleeson
Here are some notes to help you make changes to the default simulation
513 1 Padraig Gleeson
scripts, either by simple edits to the option strings and global variables,
514 1 Padraig Gleeson
or by modifications to the commands and functions that are described
515 1 Padraig Gleeson
below. If you would like to make significant changes, and are new to
516 1 Padraig Gleeson
GENESIS SLI script hacking, it would be useful to look through the \`GENESIS
517 1 Padraig Gleeson
Modeling Tutorial
518 1 Padraig Gleeson
<http://genesis-sim.org/GENESIS/UGTD/Tutorials/genprog/genprog.html>\`*
519 1 Padraig Gleeson
from the GENESIS web site. The section ‘Creating large networks with
520 1 Padraig Gleeson
GENESIS’ provides a tutorial on the construction of a simpler model
521 1 Padraig Gleeson
‘RSnet’, and explains the use of the GENESIS commands for creating networks
522 1 Padraig Gleeson
and setting synaptic weights and delays. For the complete set of tutorials
523 1 Padraig Gleeson
with source code for GENESIS 2.3 and PGENESIS, download the entire package
524 1 Padraig Gleeson
(about 50 MB) from \`http://genesis-sim.org/GENESIS/UGTD.html
525 1 Padraig Gleeson
<http://genesis-sim.org/GENESIS/UGTD.html>\`\_
526 1 Padraig Gleeson
527 1 Padraig Gleeson
The main script ACnet2-main.g is profusely commented, and contains
528 1 Padraig Gleeson
citations for the sources of most parameter values. The script
529 1 Padraig Gleeson
(and ACnet2-batch.g, with fewer options) begins with the definitions
530 1 Padraig Gleeson
of the simulation and output time steps and default run time (1 sec),
531 1 Padraig Gleeson
and a ‘RUNID" string that will be used in the names of the
532 1 Padraig Gleeson
several simulation output files that are generated.
533 1 Padraig Gleeson
then it defines some flags to control which options are used. The
534 1 Padraig Gleeson
more useful ones define the output of the simulation::
535 1 Padraig Gleeson
 int batch = 0 // if (batch) run the default simulation without graphics
536 1 Padraig Gleeson
 int graphics = 1 // display control panel, graphs, optionally net view
537 1 Padraig Gleeson
 int netview = 0 // show network activity view (slow, but pretty)
538 1 Padraig Gleeson
 int netview\_output = 1 // Record network output (soma Vm) to a file
539 1 Padraig Gleeson
 int binary\_file = 1 // if 0, use asc\_file to produce ascii output
540 1 Padraig Gleeson
 // else use disk\_out to produce binary FMT1 file
541 1 Padraig Gleeson
 int write\_asc\_header = 1 // write header information to ascii file
542 1 Padraig Gleeson
 int EPSC\_output = 1 // output Ex\_ex EPS currents to file
543 1 Padraig Gleeson
 int calc\_EPSCsum = 1 // calculate summed excitatory post-synaptic currents
544 1 Padraig Gleeson
With these defaults, the GUI implemented in graphics2-5.g and
545 1 Padraig Gleeson
input\_graphics2-5.g will be used to control the simulation and
546 1 Padraig Gleeson
display results. The network activity view will not be displayed,
547 1 Padraig Gleeson
but the data to generate the display will be output in binary format.
548 1 Padraig Gleeson
These will be the soma Vm of all the cells and the net Excitatory Post
549 1 Padraig Gleeson
Synaptic Current (EPSC) that each pyramidal cell “apical3/AMPA\_pyr”
550 1 Padraig Gleeson
channel receives from other pyramidal cells.
551 1 Padraig Gleeson
These determine the type of connection to be used::
552 1 Padraig Gleeson
 int use\_weight\_decay = 0 // Use exponential decay of weights with distance
553 1 Padraig Gleeson
 int use\_prob\_decay = 1 // Use connection probablility exp(~~r\*r/)
554 1 Padraig Gleeson
 int connect\_network = 1 // Set to 0 for testing with unconnected cells
555 1 Padraig Gleeson
Some network models use a constant connection probability over some
556 1 Padraig Gleeson
region , and then compensate by weighting more
557 1 Padraig Gleeson
distant connections with a lesser weight factor. This model
558 1 Padraig Gleeson
use the more realistic assumptions that the effectiveness
559 1 Padraig Gleeson
of synaptic connections does not appreciably decrease with
560 1 Padraig Gleeson
distance, but connection probability follows a roughly Gaussian
561 1 Padraig Gleeson
decay with distance.
562 1 Padraig Gleeson
You will likely not want to change these::
563 1 Padraig Gleeson
 int hflag = 1 // use hsolve if hflag = 1
564 1 Padraig Gleeson
 int hsolve\_chanmode = 4 // chanmode to use if hflag != 0
565 1 Padraig Gleeson
 int use\_sprng = 1 // Use SPRNG random number generator, rather than default
566 1 Padraig Gleeson
Without hsolve, the simulation will run approximately ten times slower.
567 1 Padraig Gleeson
However, you will not be able to use hsolve if your cell model contains any
568 1 Padraig Gleeson
custom objects or others that are not hsolveable. The default GENESIS 2
569 1 Padraig Gleeson
random number generator does not give an unbiased distribution, and it is
570 1 Padraig Gleeson
better to use the SPRNG random number generator.
571 1 Padraig Gleeson
The next definitions describe the inputs to the model::
572 1 Padraig Gleeson
 str input\_type = “pulsed\_spiketrain” // pulsed spike train input
573 1 Padraig Gleeson
 // str input\_type = “pulsed\_randomspike” // pulsed input from a randomspike
574 1 Padraig Gleeson
 // str input\_type = “MGBv” // input from simulated thalamic cells
575 1 Padraig Gleeson
 str input\_pattern = “row” // input goes to an entire row of cells
576 1 Padraig Gleeson
 // str input\_pattern = “line” // input to specified line of cells within row
577 1 Padraig Gleeson
 // str input\_pattern = “box” // input to a square block of cells
578 1 Padraig Gleeson
The sequence of spikes generated depends on the string ’input\_type’, which
579 1 Padraig Gleeson
can be either “pulsed\_spiketrain” or “pulsed\_randomspike”. The pattern of
580 1 Padraig Gleeson
connections from a member of the “input cell” array to the network cells is
581 1 Padraig Gleeson
determined by string ’input\_pattern’. These options and the ones further
582 1 Padraig Gleeson
below for input\_delay, input\_jitter, spike\_jitter, and input\_spread have
583 1 Padraig Gleeson
been described above in the section ’The input model’.
584 1 Padraig Gleeson
The line::
585 1 Padraig Gleeson
 int seed = 1369497795
586 1 Padraig Gleeson
guarantees that the same set of connections and inputs will be used each
587 1 Padraig Gleeson
time the simulation is run, and to produce the results shown in Beeman
588 1 Padraig Gleeson
. Change it to 0 for new random numbers each time, or to another
589 1 Padraig Gleeson
seed value to explore other configurations.
590 1 Padraig Gleeson
This is followed by some strings that specify the cell parameter files and
591 1 Padraig Gleeson
names for the Ex\_cells and Inh\_cells, and paths to the synaptic
592 1 Padraig Gleeson
conductances for the various locations for synaptic input. It is a simple
593 1 Padraig Gleeson
matter to plug a different set of cell models into this network by changing
594 1 Padraig Gleeson
these. Next come the definitions for the size and spacing of the two grids
595 1 Padraig Gleeson
of cells::
596 1 Padraig Gleeson
 int Ex\_NX = 48; int Ex\_NY = 48
597 1 Padraig Gleeson
 int Inh\_NX = 24; int Inh\_NY = 24
598 1 Padraig Gleeson
 float Ex\_SEP\_X = 40e-6
599 1 Padraig Gleeson
 float Ex\_SEP\_Y = 40e-6
600 1 Padraig Gleeson
 float Inh\_SEP\_X = 2\*Ex\_SEP\_X // There are 1/4 as many inihibitory neurons
601 1 Padraig Gleeson
 float Inh\_SEP\_Y = 2\*Ex\_SEP\_Y
602 1 Padraig Gleeson
and default values of the synaptic conductances and their time constants.
603 1 Padraig Gleeson
After definitions of many functions for setting paramwter values come the important functions
604 1 Padraig Gleeson
for setting up the network. The definition of::
605 1 Padraig Gleeson
 function planarconnect\_probdecay
606 1 Padraig Gleeson
is worth studying, as it can be modified to change the distribution and
607 1 Padraig Gleeson
probabilities of connections beteen cells. It is indirectly called by function
608 1 Padraig Gleeson
609 1 Padraig Gleeson
**connect\_cells**, which sets these arguments to **planarconnect\_probdecay**.
610 1 Padraig Gleeson
This is followed by other functions to set weights and delays.
611 1 Padraig Gleeson
The functions for file output of results are worth studying to understand
612 1 Padraig Gleeson
the format of the files, and to see how ’findsolvefield’ is used with
613 1 Padraig Gleeson
’hsolve’ to access data values.
614 1 Padraig Gleeson
The ’Main simulation section’ creates, the cell prototypes, creates the
615 1 Padraig Gleeson
unconnected network of Ex\_cells and Inh\_cells, and sets a number of
616 1 Padraig Gleeson
paramters. The statements following ’if’ are a guide to using
617 1 Padraig Gleeson
hsolve with a network simulation. Note the network is created first, a
618 1 Padraig Gleeson
solver is created for only on cell of each type, and then duplicated for
619 1 Padraig Gleeson
the other cells. There is more information on tricks with hsolve in the
620 1 Padraig Gleeson
hsolve documentation and in the advanced tutorial \`Simulations with GENESIS
621 1 Padraig Gleeson
using hsolve <http//:genesis-sim.org/GENESIS/UGTD/Tutorials/advanced-tutorials>\`\_.
622 1 Padraig Gleeson
After ’simple\_inputs.g’ is included, the functions **make\_inputs** and
623 1 Padraig Gleeson
624 1 Padraig Gleeson
**connect\_inputs** are called. Study this file if you would like to explore
625 1 Padraig Gleeson
alternate input models. Note that hsolve allows you to create connections
626 1 Padraig Gleeson
and change weights and delays **after** hsolve has been set up.
627 1 Padraig Gleeson
After some more parameter setting and optional inclusion of the graphics
628 1 Padraig Gleeson
GUIs and outputs, the program ends with::
629 1 Padraig Gleeson
 if
630 1 Padraig Gleeson
 // set up the inputs for the default simulation with two inputs:
631 1 Padraig Gleeson
 // Row 12~~ 220Hz, Row 36 - 440 Hz
632 1 Padraig Gleeson
 set\_frequency 0.0 // No background excitation
633 1 Padraig Gleeson
 setfield /MGBv[5]/spikepulse level1 1.0
634 1 Padraig Gleeson
 setfield /MGBv[5]/spikepulse/spike abs\_refract {1.0/220.0}
635 1 Padraig Gleeson
 setfield /MGBv[29]/spikepulse level1 1.0
636 1 Padraig Gleeson
 setfield /MGBv[29]/spikepulse/spike abs\_refract {1.0/440.0}
637 1 Padraig Gleeson
 reset
638 1 Padraig Gleeson
 reset
639 1 Padraig Gleeson
 step\_tmax
640 1 Padraig Gleeson
 end
641 1 Padraig Gleeson
To run the simulation in batch mode, set the options strings::
642 1 Padraig Gleeson
 int batch = 1
643 1 Padraig Gleeson
 int graphics = 0
644 1 Padraig Gleeson
You may set the ’binary\_file’ flag as you like, and edit the ‘setfield’
645 1 Padraig Gleeson
commands above to produce the desired input.
646 1 Padraig Gleeson
647 2 Padraig Gleeson
### References
648 1 Padraig Gleeson
649 2 Padraig Gleeson
Beeman D (2013) A modeling study of cortical waves in primary auditory cortex. BMC Neuroscience, 14(Suppl 1):P23 doi:10.1186/1471-2202-14-S1-P23
650 2 Padraig Gleeson
[http://www.biomedcentral.com/1471-2202/14/S1/P23](http://www.biomedcentral.com/1471-2202/14/S1/P23)
651 1 Padraig Gleeson
652 2 Padraig Gleeson
Bower JM, Beeman D (1998, 2003) The Book of GENESIS: Exploring Realistic Neural Models with the General NEural SImulation System, second edn. Springer-Verlag, New York. Free internet edition available at: http://genesis-sim.org/GENESIS/iBoG/iBoGpdf
653 1 Padraig Gleeson
654 2 Padraig Gleeson
Bush PC, Sejnowski TJ (1993) Reduced compartmental models of neocortical pyramidal cells, J Neurosci Methods 46:159-166
655 1 Padraig Gleeson
656 2 Padraig Gleeson
Cornelis H, Coop AD, Bower JM (2012) A Federated Design for a Neurobiological Simulation Engine: The CBI Federated Software Architecture. PLoS ONE 7(1): e28956. doi:10.1371/journal.pone.0028956
657 1 Padraig Gleeson
658 2 Padraig Gleeson
Hefti BJ, Smith PH (2000) Anatomy, physiology, and synaptic responses of rat layer V auditory cortical cells and effects of intracellular GABAA blockade. J Neurophysiol 83:2626-2638.
659 1 Padraig Gleeson
660 2 Padraig Gleeson
Kral A, Tillein J, Hubka P, Schiemann D, Heid S, Hartmann R, Engel AK (2009) Spatiotemporal Patterns of Cortical Activity with Bilateral Cochlear Implants in Congenital Deafness. J Neurosci 29::811-827.
661 1 Padraig Gleeson
662 2 Padraig Gleeson
Levy RB, Reyes AD (2011) Coexistence of Lateral and Co-Tuned Inhibitory Configurations in Cortical Networks. PLoS Comput Biol 7(10): e1002161. doi:10.1371/journal.pcbi.1002161
663 1 Padraig Gleeson
664 2 Padraig Gleeson
Levy RB, Reyes AD (2012) Spatial profile of excitatory and inhibitory synaptic connectivity in mouse primary auditory cortex, J Neurosci 32:5609-5619.
665 1 Padraig Gleeson
666 2 Padraig Gleeson
Nowak, LG, Azouz R, Sanchez-Vives MV, Gray CM, McCormick DA (2003) Electrophysiological classes of cat primary visual cortical neurons in vivo as revealed by quantitative analyses. J Neurophysiol 89: 1541-1566.
667 1 Padraig Gleeson
668 2 Padraig Gleeson
Roullier EM, de Ribaupierre Y, de Ribaupierre F (1979) Phase locked responses to low frequency tones in the medial geniculate body. Hearing Research 1:213-226.
669 1 Padraig Gleeson
670 2 Padraig Gleeson
Rule M, Stoffregen M, Ermentrout B (2011) A Model for the Origin and Properties of Flicker-Induced Geometric Phosphenes. PLoS Comput Biol. 7(9): e1002158. doi: 10.1371/journal.pcbi.1002158
671 1 Padraig Gleeson
672 2 Padraig Gleeson
Salin PA, Prince DA (1996) Electrophysiological mapping of GABAA receptor-mediated inhibition in adult rat somatosensory cortex. J Neurophysiol 75:1589-600.
673 1 Padraig Gleeson
674 2 Padraig Gleeson
Shlosberg D, Abu-Ghanem Y, Amitai Y (2008) Comparative properties of excitatory and inhibitory inter-laminar neocortical axons. Neuroscience 155:366-373.
675 1 Padraig Gleeson
676 2 Padraig Gleeson
Song S, Miller KD, Abbott LF (2000) Competitive Hebbian learning through spike-timing-dependent synaptic plasticity. Nat Neurosci 3: 919-926.
677 1 Padraig Gleeson
678 2 Padraig Gleeson
Steriade M, Timofeev I, Grenier F (2001) Natural Waking and Sleep States: A View From Inside Neocortical Neurons J Neurophysiol 85: 1969-1985.
679 1 Padraig Gleeson
680 2 Padraig Gleeson
Traub RD, and Robert K. S. Wong RKS, Miles R, Michelson H (1991) A Model of a CA3 Hippocampal Neuron Incorporating Voltage-Clamp Data on Intrinsic Conductances J Neurophysiol 66: 635-650.
681 1 Padraig Gleeson
682 2 Padraig Gleeson
Vanier MC, Bower JM (1999) A comparative survey of automated parameter-search methods for compartmental neural models. J Comput Neurosci 7: 149-171.
683 1 Padraig Gleeson
684 2 Padraig Gleeson
Vierling-Claassen D, Siekmeier P, Stufflebeam S, Kopell N (2008) Modeling GABA alterations in schizophrenia: a link between impaired inhibition and altered gamma and beta range auditory entrainment. J Neurophysiol 9:2656-2671. doi: 10.1152/jn.00870.2007
685 1 Padraig Gleeson
686 2 Padraig Gleeson
Yuan K, Shih JY, Schreiner CE, Winer JA (2008) GABAergic network differences between auditory cortex areas. Unpublished data from Soc Neurosci Abstr poster 67.12.