Do you know what I am doing incorrectly?
Yes, but wouldn't you rather read how to do things correctly? Here's a list that will help you get going in the right direction.
1. Apply the principle of incremental revision and testing. Failure to do this is a very common mistake. It is not a good idea to try to use a specialized feature of a programming language for the first time in a complicated setting, e.g. using a NetCon in a model that is far too complex. Start out by making a network model whose cells are single compartments, then use a NetCon to connect them. When it comes time to make a network of cells that are more complex, first make sure that you have properly evaluated and revised the model cells before trying to use them in a network. The values used for nseg in the dendrite and axon are way off from what they should be for reasonable spatial accuracy, given the values of cm and Ra. You would have discovered this if you created your model cell with the CellBuilder, and used its d_lambda rule to discretize it.
2. Read relevant documentation in the Programmer's Reference. For example, don't use ion channel models without understanding them. Why combine hh and pas? hh includes three channel models--sodium, potassium, and a leak channel. gl_hh is huge, so if you really must have a separate pas channel, you'll probably want to set gl_hh to 0. Better would be to omit the pas channel.
3. Read relevant articles for their tutorial value. Chapter 10 of the NEURON Book, and any of the articles here
that discuss modeling networks with NEURON (but especially the article mentioned below), contain lots of useful information about modeling networks with NEURON. Do you have to read them all, or be an expert on everything, before you can do anything useful? No, but you would have soon discovered that the strategy for constructing a network model is
--specify the cell classes that will be used in the network
--use the cell classes to create the cell instances that will be in the network
--connect the cell instances
4. Take advantage of the GUI to avoid writing code as much as possible. If you create your model cell with the CellBuilder, you can use its Management / Cell Type feature to generate a file that contains working hoc code that defines a cell class. Also, reading the contents of such a file is a great way to learn more about programming with NEURON and effective ways for specifying the properties of model cells.
5. Look at exercises from previous NEURON courses. A link at
will take you to a list of hands-on exercises that include two that are relevant to network models.
6. It often helps to examine published working code produced by others who have more experience. For example, there are certain common practices used to specify the topology (branched architecture) of a cell. One is to attach the 0 end of a child section to its parent, and I see that you have done that. Another is to attach the axon to the 0 end of the soma, and if there is only one dendrite to attach the dendrite to the 1 end of the soma. You might find this particular article useful
Hines, M.L. and Carnevale, N.T.
Translating network models to parallel hardware in NEURON.
J. Neurosci. Methods 169:425-455, 2008
(available from http://www.neuron.yale.edu/neuron/nrnpubs
because it provides examples of working code for network models that you're clearly ready to read. And all the source code is available from ModelDB https://senselab.med.yale.edu/modeldb/