I'm a new user to neuron and I'm currently trying to implement extracellular stimulation using files from the extracellular_stim_and_rec method written bij Ted (only the files needed for stimulation, not recording). I'm implementing this mechanism in a double cable model that I adapted form McIntyre et al (Modeling the Excitability of Mammalian Nerve Fibers: Influence of Afterpotentials on the Recovery Cycle, https://senselab.med.yale.edu/modeldb/s ... model=3810), where the internode is divided into different segments (mysa, flut and stin).

In a later stage, I would like to add a branching architecture to the model, but now I am first trying to make a straight cable using the pt3dadd() mechanism.

Here is part of the hoc code that I am using to construct the neuron (axon_myelinated.hoc):

create node[nr_nodes], MYSA[nr_mysa], FLUT[nr_flut], STIN[nr_stin]

proc initialize(){

for i=0,nr_nodes-1 {

node

*{*

nseg = 1

diam = node_diameter // um

L = node_length // um

Ra = rho_a // ohm*cm

pt3dclear()

pt3dadd(0,0,0,diam)

pt3dadd(L,0,0,diam)

cm = c_node // uF/cm2

insert axnode

insert extracellular

xraxial=rax_ex_node xg=1e10 xc=0 // S/cm2 (conductance), uF/cm2 (capacitance)

xraxial[1]=1e+09 xg[1]=1e+09 xc[1]=0 e_extracellular=0

insert xtra

}

}

for i=0, nr_mysa-1 {

MYSA

nseg = 1

diam = node_diameter // um

L = node_length // um

Ra = rho_a // ohm*cm

pt3dclear()

pt3dadd(0,0,0,diam)

pt3dadd(L,0,0,diam)

cm = c_node // uF/cm2

insert axnode

insert extracellular

xraxial=rax_ex_node xg=1e10 xc=0 // S/cm2 (conductance), uF/cm2 (capacitance)

xraxial[1]=1e+09 xg[1]=1e+09 xc[1]=0 e_extracellular=0

insert xtra

}

}

for i=0, nr_mysa-1 {

MYSA

*{*

nseg = 1

diam = fiber_diameter // um

L = mysa_length // um

Ra = rho_a*(1/(mysa_diameter/fiber_diameter)^2) // ohm*cm

pt3dclear()

pt3dadd(0,0,0,diam)

pt3dadd(L,0,0,diam)

cm = c_internode*mysa_diameter/fiber_diameter // uF/cm2

insert pas

g_pas = g_mysa*mysa_diameter/fiber_diameter // S/cm2

e_pas = -80 // mV

insert extracellular

xraxial=rax_myelin_mysa xg=g_myelin/(myelin_lemella*2)

xc=c_myelin/(myelin_lemella*2) // waarom 2?

xraxial[1]=1e+09 xg[1]=1e+09 xc[1]=0 e_extracellular=0

insert xtra

}

}

for i=0, nr_flut-1 {

FLUTnseg = 1

diam = fiber_diameter // um

L = mysa_length // um

Ra = rho_a*(1/(mysa_diameter/fiber_diameter)^2) // ohm*cm

pt3dclear()

pt3dadd(0,0,0,diam)

pt3dadd(L,0,0,diam)

cm = c_internode*mysa_diameter/fiber_diameter // uF/cm2

insert pas

g_pas = g_mysa*mysa_diameter/fiber_diameter // S/cm2

e_pas = -80 // mV

insert extracellular

xraxial=rax_myelin_mysa xg=g_myelin/(myelin_lemella*2)

xc=c_myelin/(myelin_lemella*2) // waarom 2?

xraxial[1]=1e+09 xg[1]=1e+09 xc[1]=0 e_extracellular=0

insert xtra

}

}

for i=0, nr_flut-1 {

FLUT

*{*

nseg = 1

diam = fiber_diameter // um

L = flut_length // um

Ra = rho_a*(1/(flut_diameter/fiber_diameter)^2) // ohm*cm

pt3dclear()

pt3dadd(0,0,0,diam)

pt3dadd(L,0,0,diam)

cm = c_internode*flut_diameter/fiber_diameter // uF/cm2

insert pas

g_pas = g_flut*flut_diameter/fiber_diameter // S/cm2

e_pas = -80 // mV

insert extracellular

xraxial=rax_myelin_flut xg=g_myelin/(myelin_lemella*2)

xc=c_myelin/(myelin_lemella*2)

xraxial[1]=1e+09 xg[1]=1e+09 xc[1]=0 e_extracellular=0

insert xtra

}

}

for i=0, nr_stin-1 {

STINnseg = 1

diam = fiber_diameter // um

L = flut_length // um

Ra = rho_a*(1/(flut_diameter/fiber_diameter)^2) // ohm*cm

pt3dclear()

pt3dadd(0,0,0,diam)

pt3dadd(L,0,0,diam)

cm = c_internode*flut_diameter/fiber_diameter // uF/cm2

insert pas

g_pas = g_flut*flut_diameter/fiber_diameter // S/cm2

e_pas = -80 // mV

insert extracellular

xraxial=rax_myelin_flut xg=g_myelin/(myelin_lemella*2)

xc=c_myelin/(myelin_lemella*2)

xraxial[1]=1e+09 xg[1]=1e+09 xc[1]=0 e_extracellular=0

insert xtra

}

}

for i=0, nr_stin-1 {

STIN

*{*

nseg = 1

diam = fiber_diameter // um

L = stin_length // um

Ra = rho_a*(1/(stin_diameter/fiber_diameter)^2) // ohm*cm

pt3dclear()

pt3dadd(0,0,0,diam)

pt3dadd(L,0,0,diam)

cm = c_internode*stin_diameter/fiber_diameter // uF/cm2

insert pas

g_pas = g_stin*stin_diameter/fiber_diameter // S/cm2

e_pas = -80 // mV

insert extracellular

xraxial=rax_myelin_stin xg=g_myelin/(myelin_lemella*2)

xc=c_myelin/(myelin_lemella*2)

xraxial[1]=1e+09 xg[1]=1e+09 xc[1]=0 e_extracellular=0

insert xtra

}

}

for i=0, nr_nodes-2 {

connect MYSA[2*i](0), nodenseg = 1

diam = fiber_diameter // um

L = stin_length // um

Ra = rho_a*(1/(stin_diameter/fiber_diameter)^2) // ohm*cm

pt3dclear()

pt3dadd(0,0,0,diam)

pt3dadd(L,0,0,diam)

cm = c_internode*stin_diameter/fiber_diameter // uF/cm2

insert pas

g_pas = g_stin*stin_diameter/fiber_diameter // S/cm2

e_pas = -80 // mV

insert extracellular

xraxial=rax_myelin_stin xg=g_myelin/(myelin_lemella*2)

xc=c_myelin/(myelin_lemella*2)

xraxial[1]=1e+09 xg[1]=1e+09 xc[1]=0 e_extracellular=0

insert xtra

}

}

for i=0, nr_nodes-2 {

connect MYSA[2*i](0), node

*(1)*

connect FLUT[2*i](0), MYSA[2*i](1)

connect STINconnect FLUT[2*i](0), MYSA[2*i](1)

connect STIN

*(0), FLUT[2*i](1)*

connect FLUT[2*i+1](0), STINconnect FLUT[2*i+1](0), STIN

*(1)*

connect MYSA[2*i+1](0), FLUT[2*i+1](1)

connect node[i+1](0), MYSA[2*i+1](1)

}

finitialize(v_init)

fcurrent()

}

initialize()

Furthermore, I added

load_file("axon_myelinated.hoc")

define_shape()

to initxstim.hoc.

I have two questions:

1. Did I correctly define xraxial... and xraxial[1]... etc. for the myelin sheeth and the extracellular space?

2. I am having some trouble defining the topology. I tried to place every segment at (0,0,0) to (L, 0, 0) and then connect them later, such that each end would be added to the previous segment. However, a segmentation violation showed up and the geometry does not look as it should (it seems as if all single elements start at zero, looking at the shape plot, but I'm not sure). Setpointers is called after constructing the neuron (in initxstim). Any ideas what could cause the error?

Many thanks in advance for any help!connect MYSA[2*i+1](0), FLUT[2*i+1](1)

connect node[i+1](0), MYSA[2*i+1](1)

}

finitialize(v_init)

fcurrent()

}

initialize()

Furthermore, I added

load_file("axon_myelinated.hoc")

define_shape()

to initxstim.hoc.

I have two questions:

1. Did I correctly define xraxial... and xraxial[1]... etc. for the myelin sheeth and the extracellular space?

2. I am having some trouble defining the topology. I tried to place every segment at (0,0,0) to (L, 0, 0) and then connect them later, such that each end would be added to the previous segment. However, a segmentation violation showed up and the geometry does not look as it should (it seems as if all single elements start at zero, looking at the shape plot, but I'm not sure). Setpointers is called after constructing the neuron (in initxstim). Any ideas what could cause the error?

Many thanks in advance for any help!