Moderator: wwlytton

Post Reply


Post by refriend » Mon Feb 25, 2008 4:39 pm

I am confused by the synlist call. In particular netdefs.hoc from chapter 11 of The NEURON Book.

Code: Select all

netcon = cells.object($1).connect2target(cells.object($2).synlist.object($3))
I understand cells.object($1) refers to the source neuron.
I understand 'connect2target' has been written (in previous code) to connect the calling cell as the source to the called target.
I understand that cells.object($2) is the target neuron.
... but according to ... ml#synlist
'.synlist.object($3))' does not abide but proper syntax.

What is actually occurring here? I hate to ask silly questions but I have been pounding my head and need to move on with NEURON.


Site Admin
Posts: 5567
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine

Post by ted » Tue Feb 26, 2008 9:58 am

The synlist in the statement you quoted is clearly a public member of the cell class
instances that are the elements of the cells List. Furthermore, this synlist is a List whose
elements are objrefs that point to instances of some class or other. This synlist is not in the
same namespace as, and not to be confused with, the synlist that is a method of the NetCon
class. I can't be more specific without examining the related code--which I would be glad to
do if you tell me what page of The NEURON Book you have quoted.

Put more formally, different object classes can have public members that have identical
names but altogether different meanings, because in the form objrefname.membername
(where objrefname is the name of an instance of a particular class) the meaning of
membername depends entirely on the class definition.

A minor note: when quoting an article or book, or online source, it is helpful to include a
specific reference so that others can find the context of the quote. In this case, the context
would include a definition of the cell class, which would give specific meaning to what
otherwise appears rather abstract. Besides, it would save readers time and effort.


Post by refriend » Tue Feb 26, 2008 4:49 pm

Thank you.

I apologize for not stating the source of my query more clearly. 'netdefs.hoc' was originally created as 'prototype.hoc' on p. 325 of 'The Neuron Book' and then renamed netdefs on p.328. The call to synlist was specifically referenced in 'func nc_append()'.

Code: Select all

// Artificial cells no longer need a default section.
//Network cell templates
//Artificial cells
//   IF_IntervalFire

begintemplate IF_IntervalFire
	public pp, connect2target, x, y, z, position, is_art
	objref pp
	proc init() {
	  pp = new IntervalFire()
	func is_art() { return 1 }
	obfunc connect2target() { localobj nc
	  nc = new NetCon(pp, $o1)
	  if (numarg() == 2) { $o2 = nc }
	  return nc
	proc position(){x=$1  y=$2  z=$3}
endtemplate IF_IntervalFire

//Network specification interface

objref cells, nclist, netcon
{cells = new List()  nclist = new List()}

func cell_append() {cells.append($o1)  $o1.position($2,$3,$4)
	return cells.count - 1

func nc_append() {//srcindex, tarcelindex, synindex
  if ($3 >= 0) {
    netcon = cells.object($1).connect2target(cells.object($2).synlist.object($3))
    netcon.weight = $4   netcon.delay = $5
    netcon = cells.object($1).connect2target(cells.object($2).pp)
    netcon.weight = $4   netcon.delay = $5
  return nclist.count - 1

//Network instantiation
// The following elements were created via NetBuilder. They were commented out and left as a reminder of how to execute the commands. 
  //* IF0 */  cell_append(new IF_IntervalFire(),	-140,	 43, 0)
  //* IF1 */  cell_append(new IF_IntervalFire(),	-95,	 43, 0)
  //* IF1 -> IF0    */  nc_append(1, 0, -1,  -0.1,1)
  //* IF0 -> IF1    */  nc_append(0, 1, -1,  -0.1,1)

I understand now that the synlist I referenced is part of a different cell class. I searched ... rence.html again but still did not find any classes with the synlist public member (cell, CellBuilder-Build, classes-neuron, object, List, etc.).

Which class so you suppose this synlist came from?

Thanks again!

Site Admin
Posts: 5567
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine

Post by ted » Wed Feb 27, 2008 10:22 am

Thank you for indicating the page where you found the statement in question. This is a
perfect example of why the context of a quote is important.

Listing 11.2 on pages 325-26 consists of proceedures and statements that, when executed, will
create all cell instances of the toy net, then assemble the network. The purpose of func
nc_append() is to set up a connection between a presynaptic cell and the target to which it
projects. It contains an "if" statement that executes different blocks of code, depending on
whether its third argument is < 0 or >= 0. Specifically, if $3 >= 0, the statement

Code: Select all

netcon = cells.object($1).connect2target(cells.object($2).synlist.object($3))
is executed, but if $3 < 0, the statement

Code: Select all

netcon = cells.object($1).connect2target(cells.object($2).pp)
is executed.

Now skip to the bottom of the file and note that the third argument is -1 for all invocations
of net_append(). So no statement will be executed that requires the cell class to have a
synlist member.

"Why does nc_append() written in this way?" So that it can be used with target cells that
are artificial spiiking cells, which will not have a synlist, or with target cells that are
biophysical model cells. If the target cell is a biophysical model cell, it will have a List of
objrefs to the synaptic mechanisms that are attached to it, and nc_append() has to
be told which of those synaptic mechanisms is to receive the NetCon's events.

"Why do biophysical model cells have a synlist? And what is a synlist, anyway?" When
doing anything that depends on the orchestration of many items, it is useful to have
policies for managing things that are closely related to each other. In the case of
networks that involve biophysical model cells, one must deal with cells, the
connections between them, and the synaptic mechanisms that mediate the effects of
presynaptic cells on postsynaptic cells. One reasonable policy for dealing with synaptic
mechanisms is to associate them with the (postsynaptic) cells to which they are attached.
In NEURON, this can be done by including a List in the definition of the cell class, and
then taking care to append each mechanism that is attached to a cell to the cell's synlist.
The GUI implements this policy in the NetReadyCellGUI tool (which is brought up by
clicking on NEURON Main Menu / Build / Network Cell / From Cell Builder). This tool is
used to specify the properties of "network ready cell classes," and one of the things a
user does with this tool is to select and place synaptic mechanisms on the branched
architecture of the cell. When an instance of the cell class is created, instances of each
of these mechanisms will be created, attached to the cell at the specified location, and
appended to the cell's synlist.

"Why don't artificial spiking cells have a synlist?" In NEURON, artificial spiking cells don't
have or even need a synlist because the effect of an input event on an artificial spiking
cell is an integral part of the artificial spiking cell itself, not something optional that is
attached to it, like a synaptic point process mechanism that is attached to a biophysical
model cell.

Post Reply