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
Code: Select all
load_file("Spine.hoc")
objref syn[1] // same with objectvar
syn[0] = new Spine()
Code: Select all
x86_64/bin/nrniv: nil object is not a SectionList