Code: Select all
proc celldef() {
topol()
subsets()
geom()
biophys()
geom_nseg()
diam_seg()
}
// I declared a new procedure called diam_seg
create soma, dend1[3], dend1_1[3], dend2[5], SDI, SIprox, SIdistal
create axon
proc topol() { local i
connect dend1(0), soma(0)
for i = 1, 2 connect dend1[i](0), dend1[i-1](1)
for i = 0, 2 connect dend1_1[i](0), soma(1)
for i = 0, 1 connect dend2[i](0), dend1(1)
for i = 2, 3 connect dend2[i](0), dend1[1](1)
connect dend2[4](0), dend1[2](1)
connect SDI(0), dend1[2](1)
connect SIprox(0), SDI(1)
connect SIdistal(0), SIprox(1)
connect axon(0), SIdistal(1)
basic_shape()
}
proc basic_shape() {
soma {pt3dclear() pt3dadd(0, 0, 0, 1) pt3dadd(15, 0, 0, 1)}
dend1 {pt3dclear() pt3dadd(0, 0, 0, 1) pt3dadd(-29, 0, 0, 1)}
dend1[1] {pt3dclear() pt3dadd(-29, 0, 0, 1) pt3dadd(-59, 0, 0, 1)}
dend1[2] {pt3dclear() pt3dadd(-59, 0, 0, 1) pt3dadd(-104, 0, 0, 1)}
dend1_1 {pt3dclear() pt3dadd(15, 0, 0, 1) pt3dadd(90, -59, 0, 1)}
dend1_1[1] {pt3dclear() pt3dadd(15, 0, 0, 1) pt3dadd(120, 0, 0, 1)}
dend1_1[2] {pt3dclear() pt3dadd(15, 0, 0, 1) pt3dadd(105, 60, 0, 1)}
dend2 {pt3dclear() pt3dadd(-29, 0, 0, 1) pt3dadd(-29, 60, 0, 1)}
dend2[1] {pt3dclear() pt3dadd(-29, 0, 0, 1) pt3dadd(-29, -59, 0, 1)}
dend2[2] {pt3dclear() pt3dadd(-59, 0, 0, 1) pt3dadd(-59, 60, 0, 1)}
dend2[3] {pt3dclear() pt3dadd(-59, 0, 0, 1) pt3dadd(-59, -59, 0, 1)}
SDI {pt3dclear() pt3dadd(-104, 0, 0, 1) pt3dadd(-119, 15, 0, 1)}
SIprox {pt3dclear() pt3dadd(-119, 15, 0, 1) pt3dadd(-134, 30, 0, 1)}
SIdistal {pt3dclear() pt3dadd(-134, 30, 0, 1) pt3dadd(-164, 60, 0, 1)}
axon {pt3dclear() pt3dadd(-164, 60, 0, 1) pt3dadd(-194, 165, 0, 1)}
dend2[4] {pt3dclear() pt3dadd(-104, 0, 0, 1) pt3dadd(-164, -44, 0, 1)}
}
objref all
proc subsets() { local i
objref all
all = new SectionList()
soma all.append()
for i=0, 2 dend1[i] all.append()
for i=0, 2 dend1_1[i] all.append()
for i=0, 4 dend2[i] all.append()
SDI all.append()
SIprox all.append()
SIdistal all.append()
axon all.append()
}
/ Here I only defined the length
proc geom() {
forsec all { }
soma.L = 25
dend1.L = 50
dend1[1].L = 50
dend1[2].L = 50
dend1_1.L = 500
dend1_1[1].L = 500
dend1_1[2].L = 500
dend2.L = 200
dend2[1].L = 200
dend2[2].L = 200
dend2[3].L = 200
SDI.L = 20
SIprox.L = 25
SIdistal.L = 25
axon.L = 800
dend2[4].L = 200
}
proc geom_nseg() {
forsec all { nseg = int((L/(0.01*lambda_f(100))+.999)/2)*2 + 1 }
}
/ Now I defined the length of the sections with tapering after having defined the nseg
proc diam_seg() {
soma.diam = 25
dend1.diam = 3
dend1[1].diam = 2.5
dend1[2].diam = 2
dend1_1.diam(0:1) = 2:0.5
dend1_1[1].diam(0:1) = 2:0.5
dend1_1[2].diam(0:1) = 2:0.5
dend2.diam(0:1) = 2:0.5
dend2[1].diam(0:1) = 2:0.5
dend2[2].diam(0:1) = 2:0.5
dend2[3].diam(0:1) = 2:0.5
SDI.diam = 1.5
SIprox.diam = 1.2
SIdistal.diam = 1
axon.diam = 0.8
dend2[4].diam(0:1) = 2:0.5
}
Now everything looks Ok. Dendrites are tapered and if I modified their length using the Gui ; running (run) the program updates everything well
Hope I may help.