Complex presynaptic cell

Particularly useful chunks of hoc and/or NMODL code. May be pedestrian or stunningly brilliant, may make you gasp or bring tears to your eyes, but always makes you think "I wish I had written that; I'm sure going to steal it."
Post Reply
OronKotler
Posts: 13
Joined: Wed Oct 31, 2018 2:03 pm

Complex presynaptic cell

Post by OronKotler »

Hi all,
I am trying to simulate a synapse in such a way that the presynaptic cell has a complex geometry and the postsynaptic is a single compartment. all examples I see are when the postsynaptic is complex. https://neuron.yale.edu/neuron/static/d ... /main.html.

Is there a way for neurons to choose the location of the synapse in the presynaptic neuron?
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Complex presynaptic cell

Post by ted »

Absolutely, but it requires executing user-written code. The Network Builder is a great tool for creating small prototype models that involve only a few cells. Several simplifying assumptions are built into it. One is that, if the presynaptic cell is a biophysical model cell (that is, has sections), the presynaptic location that is monitored for "spikes" is the 1 end of the presynaptic cell's root section.

To see this for yourself, use the Network Builder tools to make a toy network that involves at least one biophysical model cell, and set up a connection from that model cell to some other target cell. Then export the hoc code for your model network by clicking on the NetGUI's "Hoc File" button. Examine that file and find the class definition (template) for the presynaptic cell. Look for something called obfunc connect2target(), and you'll see this:

Code: Select all

obfunc connect2target() { localobj nc //$o1 target point process, optional $o2 returned NetCon
  soma nc = new NetCon(&v(1), $o1)
  nc.threshold = 10
  if (numarg() == 2) { $o2 = nc } // for backward compatibility
  return nc
}
The statement

Code: Select all

  soma nc = new NetCon(&v(1), $o1)
means that soma.v(1) (membrane potential at the 1 end of soma) will be monitored for spikes.

You can change that line to specify any other location in the presynaptic cell. For example, if you wanted the presynaptic location to be the middle of dend[3], change the statement to

Code: Select all

//  soma nc = new NetCon(&v(1), $o1)
  dend[3] nc = new NetCon(&v(0.5), $o1)
Of course, this means you would have to work with the exported hoc file, which implies that you won't be using the Network Builder's SpikePlot.

If using the SpikePlot is important to you, you could just write your own hoc or Python statements to set up whatever NetCons you like. You'll have to discover the names of the cells (after clicking on the Network Builder's Create button, click on its Net Variables button to bring up a panel that shows the cell and synapse names as displayed in the NetGUI tools, and the hoc names of the corresponding object instances). Your program would then be organized like this:

Code: Select all

load_file("foo.ses") // or h.load_file("foo.ses") if you're using Python
// where foo.ses is the session file that recreates the Network Cell GUIs
// and the NetGUI used in your network
// at this point all of the cell instances exist,
// and maybe also all NetCons that monitor artificial spiking neurons
// as well as all NetCons that monitor the 1 end of the presynaptic cell's root section
. . . next come the hoc or Python statements to set up the NetCons . . .
. . . that monitor other presynaptic locations . . .
The nice thing about this is that, since you're using the NetGUI tool, the SpikePlot is available to you.
OronKotler
Posts: 13
Joined: Wed Oct 31, 2018 2:03 pm

Re: Complex presynaptic cell

Post by OronKotler »

Thanks for your help.
I got this message:

NEURON: SubsetDomainIterator is not a template
in net2.hoc near line 182
axonal_x = new SubsetDomainIterator(axonal, 0, 1, 1)

what should I do?

Thanks again
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Complex presynaptic cell

Post by ted »

Does this pertain to the hoc code used in your other post "added a synapse with python"
Post Reply