I am facing some weird problem which I am not able to figure out. Could you please help me?

When I was using stylized geometry, I was able to get coordinates for every segments of the section I built. For example if the number of segments in axon is 10 , I got 12 sets of coordinates. Since stylized method didn't meet my needs, I switched to point3D method to define my own coordinates. However when I define 3D coordinates on my own (using pt3Dclear and pt3Dadd) , I only get coordinates for the 0-end and 1-end of each section i.e I only get two sets of coordinates as if I had just 1 segment. Although the number of segments in axon is 10, I just get 2 sets of coordinates irrespective of my number of segments. Could you kindly give an insight to me about this problem?

I also noticed in the template obtained from cell builder that all sections had same diameter of 1 micrometers although I defined different diameters. For example, my soma has a diameter of 80 micrometers but however I saw that my soma is defined to be of 1 micrometers. eg.

We can see that diameter in (x,y,z,diam) is 1 in this code. I am also not able to relate this part of the code. Could you please help me understand this? I have attached the complete code I obtained from cell builder along with this message. You will notice that I added few lines of code below the template code to generate the coordinates.

I would appreciate your guidance and support.

Code: Select all

```
//execute1("celltypes.element(\"pyramidalneuron\")")
begintemplate pyramidalneuron
public init, topol, basic_shape, subsets, geom, biophys, geom_nseg, biophys_inhomo
public synlist, x, y, z, position, connect2target
public soma, apicaldend, dend, axon
public all, apicaldendrite, dendrite, axons
objref synlist
proc init() {
topol()
subsets()
geom()
biophys()
geom_nseg()
synlist = new List()
synapses()
x = y = z = 0 // only change via position
}
create soma, apicaldend, dend[10], axon
proc topol() { local i
connect apicaldend(0), soma(1)
for i = 0, 9 connect dend[i](0), soma(1)
connect axon(0), soma(0)
basic_shape()
}
proc basic_shape() {
soma {pt3dclear() pt3dadd(0, 0, 0, 1) pt3dadd(0, 15, 0, 1)}
apicaldend {pt3dclear() pt3dadd(0, 15, 0, 1) pt3dadd(0, 165, 0, 1)}
dend {pt3dclear() pt3dadd(0, 15, 0, 1) pt3dadd(135, 30, 0, 1)}
dend[1] {pt3dclear() pt3dadd(0, 15, 0, 1) pt3dadd(135, -29, 0, 1)}
dend[2] {pt3dclear() pt3dadd(0, 15, 0, 1) pt3dadd(45, 120, 0, 1)}
dend[3] {pt3dclear() pt3dadd(0, 15, 0, 1) pt3dadd(60, 105, 0, 1)}
dend[4] {pt3dclear() pt3dadd(0, 15, 0, 1) pt3dadd(-44, 120, 0, 1)}
dend[5] {pt3dclear() pt3dadd(0, 15, 0, 1) pt3dadd(-59, 105, 0, 1)}
dend[6] {pt3dclear() pt3dadd(0, 15, 0, 1) pt3dadd(-74, 90, 0, 1)}
dend[7] {pt3dclear() pt3dadd(0, 15, 0, 1) pt3dadd(75, 90, 0, 1)}
dend[8] {pt3dclear() pt3dadd(0, 15, 0, 1) pt3dadd(90, 75, 0, 1)}
dend[9] {pt3dclear() pt3dadd(0, 15, 0, 1) pt3dadd(-89, 75, 0, 1)}
axon {pt3dclear() pt3dadd(0, 0, 0, 1) pt3dadd(0, -194, 0, 1)}
}
objref all, apicaldendrite, dendrite, axons
proc subsets() { local i
objref all, apicaldendrite, dendrite, axons
all = new SectionList()
soma all.append()
apicaldend all.append()
for i=0, 9 dend[i] all.append()
axon all.append()
apicaldendrite = new SectionList()
apicaldend apicaldendrite.append()
dendrite = new SectionList()
for i=0, 9 dend[i] dendrite.append()
axons = new SectionList()
axon axons.append()
}
proc geom() {
forsec all { }
soma.L = 80
apicaldend.L = 2000
dend.L = 100
dend[1].L = 100
dend[2].L = 100
dend[3].L = 100
dend[4].L = 100
dend[5].L = 100
dend[6].L = 100
dend[7].L = 100
dend[8].L = 100
dend[9].L = 100
axon.L = 6500
soma.diam = 80
apicaldend.diam = 2
dend.diam = 1
dend[1].diam = 1
dend[2].diam = 1
dend[3].diam = 1
dend[4].diam = 1
dend[5].diam = 1
dend[6].diam = 1
dend[7].diam = 1
dend[8].diam = 1
dend[9].diam = 1
axon.diam = 15
forsec apicaldendrite { }
forsec dendrite { }
forsec axons { }
soma { }
}
external lambda_f
proc geom_nseg() {
forsec apicaldendrite { nseg = 20 }
forsec dendrite { nseg = 2 }
forsec axons { nseg = 65 }
soma { nseg = 2 }
}
proc biophys() {
forsec all {
Ra = 123
cm = 1
}
forsec apicaldendrite {
insert pas
g_pas = 0.001666
e_pas = -60
}
forsec dendrite {
insert pas
g_pas = 0.001666
e_pas = -60
}
forsec axons {
insert hh
gnabar_hh = 0.52
gkbar_hh = 0.036
gl_hh = 0.0001666
el_hh = -60
}
soma {
insert hh
gnabar_hh = 0.25
gkbar_hh = 0.036
gl_hh = 0.0001666
el_hh = -60
}
}
proc biophys_inhomo(){}
proc position() { local i
soma for i = 0, n3d()-1 {
pt3dchange(i, $1-x+x3d(i), $2-y+y3d(i), $3-z+z3d(i), diam3d(i))
}
x = $1 y = $2 z = $3
}
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
}
proc synapses() {}
endtemplate pyramidalneuron
//codes that I added to the template obtained from cell builder
nNeurons = 100 //for 10X10 neuron matrix
objectvar Neurons[nNeurons]
for i = 0, nNeurons-1 {
Neurons[i] = new pyramidalneuron()
}
//calling procedure position for repositioning the neurons at different coordinates
a = 0
for x=0, 9 {
for y=0, 9 {
b = x*2000
c = y*2000
Neurons[a].position(b,0,c) //distance between neurons equals 2000 micrometers
a = a+1
}
}
for i = 0, nNeurons-1 {
Neurons[i].soma psection()
}
// this generates coordinates
objref s
s = new Shape()
s.show(0)
topology()
finitialize()
forall {
print secname()
for i=0,n3d()-1 print i, x3d(i), y3d(i), z3d(i), diam3d(i)
}
```