Network Building

Anything that doesn't fit elsewhere.
Post Reply
Posts: 3
Joined: Thu Jul 16, 2009 1:54 am

Network Building

Post by tripti » Fri Jul 17, 2009 4:07 pm

Im in the process of building a large neural network that has over 100 neurons.
Building each of them is tedious, but quite possible. However, in the network builder window, when I go to connect them, I can only view 70 of them. They are listed in a vertical line and the window can accommodate so many. Does anyone have any suggestions?

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

Re: Network Building

Post by ted » Sat Jul 18, 2009 5:26 pm

Tedious with 70? The Network Builder seems tedious to me with a toy net containing as few as half a dozen cells. The tool isn't really meant to be used to construct big nets. It's intended to be used to create small nets with just a few cells and synapses, that are then used to export hoc code to a file. One then extracts reusable pieces from that file code--templates that define cell classes, and example code for creating instances of cell classes and setting up connection between them. Then one uses that code to create large numbers of cells and connections algorithmically (for an example, see chapter 11 of The NEURON Book).

With regard to controlling the appearance of shape plots by specifying the "location" of a cell in space, cell instances created by using the classes defined with the Network Builder have a method called position() that enables specification of the xyz coordinates of the origin (0 end) of the cell's root section. Example: suppose you have a cell class called Stellate.

Code: Select all

objref sc
sc = new Stellate()
sc.position(10,20,30) // place origin at (10, 20, 30)

Bill Connelly
Posts: 86
Joined: Thu May 22, 2008 11:54 pm
Location: Australian National University

Re: Network Building

Post by Bill Connelly » Tue Aug 11, 2009 6:33 pm

I'm with Ted. I made a network with 2 cells, then looked at the hoc code, and used it to make a ~200 cell model. It really is a lot simpler. This way you define template(s) for your cell types, then make a simple iterative function that links the cells up. Mine goes something like this

Code: Select all

begintemplate cell
  public soma, dend, esynlist, isynlist, connect2target, synapses, syn_
  objref esynlist, isynlist
  create soma, dend[x] //make the soma and however many dendrites
  proc init() { //things to be done when a new cell is created
  esynlist = new List() //a list of excitatory synapses
  isynlist = new List() //a list of inhibitory synapses
  synapses() //make the synapses
  soma connect dend[0](0), //hook up sections
  soma.L = 30 //define section geometry
  dend[0].L = 50
  soma.diam = 30
  dend[0].diam = 2.5
  forall { nseg = 1 cm = 1 Ra = 100 } //define section biophysics
  soma {
    insert pas    g_pas = 0.00038 
    for i = 0, X {
      dend[i] { insert pas g_pas = 7e-5 nseg = 3 }
  obfunc connect2target() { localobj nc //$o1 target point process, optional $o2 returned NetCon //a function for hooking up networks
    soma nc = new NetCon(&v(1), $o1)
    nc.threshold = 0
    if (numarg() == 2) { $o2 = nc } // for backward compatibility
    return nc
  objref syn_
  proc synapses() { //a function for making synapses
    /* E0 */
    for n=0, 5 {
    dend[n] syn_ = new ExpSyn(0.5)
    syn_.tau = 2
endtemplate cell
Then this is all I need to make my cells

Code: Select all

ncells = 200
objref cl
cl = new List()

for i = 0, ncells-1 {
  cl.append(new cell())
Here is the template for the cell to cell inhibitory synapse

Code: Select all

begintemplate latinhib
  public latsyn
  objref tempsyn, latsyn

  proc init() {
    objref latsyn
    $o1.soma latsyn = new depsyn3(0.5)
    latsyn.e = -75
    latsyn.tau1 = 3
    latsyn.tau2 = 16
endtemplate latinhib
and function links the cells together

Code: Select all

objref inhibsyn, inhibcon
inhibsyn = new List()
inhibcon = new List()

//  r is a uniform random number between 0 and 1, defined above

inhibDiverg = 80 //how many cells does each interneuron target
isyncond = 0.001

proc MakeInhib() { localobj tempcon, isyn
  for n = 0, ncells-1 {
    isyn = new latinhib(cl.o(n))

  for n = 0, ncells-1 {
    for i = int(-inhibDiverg/2), int(inhibDiverg/2) {
      if(r.repick()<0.6 && i!=0) { //random number to decide which cells are connection
        tempcon = cl.o(n).connect2target(inhibsyn.o((n+i)%ncells))
        tempcon.weight = isyncond*rl.repick()   tempcon.delay = 2

Posts: 3
Joined: Thu Jul 16, 2009 1:54 am

Re: Network Building

Post by tripti » Thu Oct 08, 2009 7:15 pm

Thanks to both!! :)

Post Reply