Spine Template

Managing anatomically complex model cells with the CellBuilder. Importing morphometric data with NEURON's Import3D tool or Robert Cannon's CVAPP. Where to find detailed morphometric data.

Spine Template

Postby stil » Wed May 11, 2011 12:30 pm

Hello,

I am trying to build a "Spine" model that i could instantiate multiple times...
Thus i thought using a template (shouldn't I ?) that currently has the form :
Code: Select all
begintemplate Spine

public spine, neck

create spine, neck

objref all
all = new SectionList()
neck all.append()
spine all.append()

external lambda_f

proc init() {
   // topology
   connect spine(1), neck(0)
   // geometry
   neck{
      L = 0.7 //um
      diam = 0.1 //um
   }
   spine{
      L = 0.2 //um
      diam = 0.2 //um
   }
   //nseg
   forsec all { nseg = int((L/(0.1*lambda_f(100))+.9)/2)*2 + 1  }
}

endtemplate Spine


But, when i am trying to instantiate it,
Code: Select all
load_file("Spine.hoc")
objref syn[1] // same with objectvar
syn[0] = new Spine()


i cannot get rid of this message :
Code: Select all
x86_64/bin/nrniv: nil object is not a SectionList


What haven't I understood here ? Would you mind guiding me please ?
Last edited by stil on Wed Jun 22, 2011 9:59 am, edited 1 time in total.
stil
 
Posts: 28
Joined: Thu Jul 01, 2010 8:47 am
Location: Mulhouse - France

Re: My first template : nil object is not a SectionList

Postby stil » Wed May 11, 2011 1:09 pm

ok, i've found out :

the all sectionList is not visible from the inside of init() procedure.
Hence i replaced the templte definition by the following :
Code: Select all
begintemplate Spine
   external lambda_f
   public spine, neck
   public init
   create spine, neck

   proc init() {
      // topology
      connect spine(1), neck(0)
      // geometry
      neck{
         L = 0.7 //um
         diam = 0.1 //um
         nseg = int((L/(0.1*lambda_f(100))+.9)/2)*2 + 1
         }
      spine{
         L = 0.2 //um
         diam = 0.2 //um
         nseg = int((L/(0.1*lambda_f(100))+.9)/2)*2 + 1
         }
      }

endtemplate Spine
stil
 
Posts: 28
Joined: Thu Jul 01, 2010 8:47 am
Location: Mulhouse - France

Re: My first template : nil object is not a SectionList

Postby ted » Wed May 11, 2011 6:02 pm

Interesting, but not quite something that anyone would like to steal (not yet anyway), so I moved it from "NEURON hacks" to the "Anatomically detailed models" area where it will probably get more attention.
Also probably needs a new title, now that you've fixed the "nil object is not a SectionList" problem. How about "spine template"?
ted
Site Admin
 
Posts: 3591
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine

Re: Spine Template

Postby stil » Wed Jun 22, 2011 10:08 am

Sure,

is it ok like this ?
stil
 
Posts: 28
Joined: Thu Jul 01, 2010 8:47 am
Location: Mulhouse - France


Return to Anatomically detailed models

Who is online

Users browsing this forum: No registered users and 0 guests