A way to implement non-linear densities in multi-nodal sections?

The basics of how to develop, test, and use models.
Post Reply
was2be
Posts: 12
Joined: Wed Sep 26, 2018 3:34 pm

A way to implement non-linear densities in multi-nodal sections?

Post by was2be »

Is there a way to insert non-linear distributions of distributed mechanisms into a multi-nodal section? I know this is possible for linear distributions (e.g., g_pas(0:1) = 0.001:.00001), but can one insert a more complicated function with distance, or must that segment be broken down into smaller segments to generate such a density distribution? Thanks.
ted
Site Admin
Posts: 6286
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: A way to implement non-linear densities in multi-nodal sections?

Post by ted »

This syntax
g_pas(0:1) = (0.001:.00001)
works, but nobody has used it in new code for a long time for two reasons: it's rather opaque, it can only produce linear gradients along the length of any section, and there's no good way to use it to set up even a linear gradient over a set of sections.

Far better is to implement parameterized variation of your density parameter, that is, something like

Code: Select all

forsec subset for (x,0) { rangevar_suffix(x) = f(p(x)) }
where subset is a SectionList (essentially a set of sections),
p is some measure of the position of the midpoint of the current segment in space, such as path distance from the 0 end of the soma, radial distance from the 0 end of the soma, or elevation above or below a plane (e.g. cell body layer, middle of some cortical layer, cortical surface . . .)
and f is a function that tells how rangevar_suffix should vary with position in space.

Of course, if you then change nseg, you should again execute

Code: Select all

forsec subset for (x,0) { rangevar_suffix(x) = f(p(x)) }
to ensure that the inhomogeneous range variable samples f at the proper locations in space.

In recent versions of NEURON, the CellBuilder can take care of setting up nonuniform biophysical properties very efficiently and flexibly--and it even automatically re-executes

Code: Select all

forsec subset for (x,0) { rangevar_suffix(x) = f(p(x)) }
if you do anything in the CellBuilder that changes nseg. See the CellBuilder tutorial https://neuron.yale.edu/neuron/static/d ... /main.html, in particular the part about Specifying parameterized variation of biophysical properties.

"I already have a model cell specified with hoc code. Do I have to use the CellBuilder to create a duplicate implementation of it?"

Not at all. Use the CellBuilder to create a toy model that has only three sections, and insert just one biophysical mechanism into it. Set up parameterized variation of that mechanism's channel density, and verify that the spatial variation is what you want. Then export the toy model to a hoc file, and mine that hoc file for code that you can reuse with your own model.
Post Reply