First a few suggestions:
You will find it much easier to develop and debug network models if you organize your model setup code in this sequence:
1. Create cells. This step encompasses all statements that define the properties of the cells used in the network. It may or may not include attaching synaptic mechanisms to each cell; of course, if that is not done in this step, it must be done in the second step.
2. Connect cells. This step involves creating the NetCons that attach each target (artificial spiking cell or synaptic mechanism) to its spike source(s).
Unless you are just doing a quick throwaway hack, it is better for each cell to be an instance of a class, so its sections belong to an object instance, than for each cell to consist of sections that are created outside of an object. This is essential for any code that is to be scalable and avoid name collisions.
Now specific comments about your code--
Rather than this
Code: Select all
for(i=0; i<3; i+=1){
access neuron[i]
. . . other statements . . .
}
it is better to do
Code: Select all
for(i=0; i<3; i+=1) neuron[i] {
. . . other statements . . .
}
In the Programmer's Reference documentation of the NetCon class the pseudocode examples include a couple of statements that begin with the word "section". This is meant to be read as a "placeholder" or "metasyntactic variable" that indicates the nature of the variable that will actually be used in this position in any real application of the keyword whose usage is being illustrated. In this particular case, the word "section" is supposed to be substituted with the name of a presynaptic section, specifically the name of the section that owns the presynaptic variable that the NetCon will monitor in order to detect that a spike has occurred.
If you are looking for examples of working code to guide your model network development, you might find this paper helpful:
Hines, M.L. and Carnevale, N.T.
Translating network models to parallel hardware in NEURON.
J. Neurosci. Methods 169:425-455, 2008
PDF is available from a link at
http://www.neuron.yale.edu/neuron/nrnpubs