Two Dimensional Arrays

NMODL and the Channel Builder.
Post Reply
Posts: 29
Joined: Mon Sep 14, 2009 6:33 am

Two Dimensional Arrays

Post by auatai »

Hi ,
I am new to Neuron. I am working on extracellular calcium diffusion and i need to use two dimensional arrays in my mod file on calcium diffusion. Is it possible ? If yes then how do I do it, if No, then is there a way around by using pointers or structures ?

Site Admin
Posts: 5810
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine

Re: Two Dimensional Arrays

Post by ted »

The most "natural" or "idiomatic" way to represent diffusional geometry in NEURON is to take advantage of the fact that NEURON's basic structural elements are cylinders ("sections"). A section may taper, or follow a tortuous path, but locally it has radial symmetry (to a first approximation, deviations from circular cross-section can be handled by factors that adjust surface/volume ratio, but I digress). Radial diffusion is most easily represented as exchange of solute between concentric shells. This can be expressed with one or more ODEs, depending on the number of compartments, but it is easier to use a family of kinetic schemes. Longitudinal diffusion is added with a LONGITUDINAL_DIFFUSION statement, without having to explicitly resort to doubly indexed variables. Compartments may be intra- and/or extracellular. In chapter 9 of The NEURON Book you will find an example of radial diffusion specified with an ODE in
9.7 Example 9.6: Extracellular potassium accumulation
and an example of radial plus longitudinal diffusion (the radial part expressed as a kinetic scheme) in
9.10 Example 9.8: Calcium diffusion with buffering
If you don't have a copy of the book, here is a preprint of chapter 9 ... xedref.pdf

Other diffusional geometries may require different approaches, so get back to me if the stuff described above doesn't seem to fit your needs.
Post Reply