New reaction-diffusion model on ModelDB

Extending NEURON to handle reaction-diffusion problems.

Moderators: hines, wwlytton, ramcdougal

Post Reply
Posts: 9
Joined: Sun Dec 12, 2010 1:14 pm

New reaction-diffusion model on ModelDB

Post by samnemo » Thu Dec 18, 2014 1:23 pm

A new paper, Neuronal calcium wave propagation varies with changes in endoplasmic reticulum parameters: a computer model, was recently accepted to Neural Computation.

The paper describes an electrochemical model that uses NEURON's new reaction-diffusion features, and may therefore serve as a template for other projects.

The model is avaiable here: ... del=168874

The manuscript is available here:

Questions or comments are welcome.

Posts: 21
Joined: Thu Sep 18, 2014 8:23 am

Re: New reaction-diffusion model on ModelDB

Post by tardebut » Thu Jan 08, 2015 12:34 am



Posts: 19
Joined: Tue Jul 02, 2013 5:11 am

Re: New reaction-diffusion model on ModelDB

Post by Darshan » Fri Apr 03, 2015 2:54 am


Thanks for making the model available on ModelDb. I tried using the code by following the instructions in readme file. The mod files get compiled correctly. But when I run this

Code: Select all

'run batch import *'
I get the following error:

Code: Select all

 File "", line 183, in <module>
    cyt_er_membrane = rxd.Region(h.allsec(), geometry=rxd.ScalableBorder(1))
AttributeError: 'module' object has no attribute 'ScalableBorder'
I checked the library 'rxd' and I couldn't locate the function ScalableBorder(). Where can I get this function? If I keep the parameter 'geometry = None' or 'geometry = rxd.FractionalVolume(fe)', then another error comes saying that

Code: Select all

must specify a membrane not a volume for the boundary.
The NEURON version I am using is 7.3 ansi (1078:2b0c984183df).


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

Re: New reaction-diffusion model on ModelDB

Post by ted » Fri Apr 03, 2015 11:20 am

Darshan wrote:The NEURON version I am using is 7.3 ansi (1078:2b0c984183df).
That may be the cause of the problem. There have been many bug fixes and updates since then. If you are compiling NEURON from source code, suggest you get the latest development code from its mercurial repository. If instead you are using a precompiled installer, get one of the most recent alpha versions from

If you use MSWin and want to use your own Python, get the mingw-based installer. Otherwise get the cygwin-based installer.

Posts: 19
Joined: Tue Jul 02, 2013 5:11 am

Re: New reaction-diffusion model on ModelDB

Post by Darshan » Sat Apr 04, 2015 6:14 am

Hi Ted,

Thanks for the quick reply. I compiled using the latest source code from the repository. Now, the first line on starting NEURON reads: NEURON -- VERSION 7.4 (1315:a35e721080fb) 2015-04-02.

I compiled the code with nrnivmodl and it was successful with a few warnings. A seperate folder called 'x86_64' is created with the .mod, .c and .o files. Then, I tried running the code as mentioned in my previous post. But, I still get the exact same error. On checking the rxd library, 'rxd.ScalableBorder' was not found (see below for the available funtions):

Code: Select all

In [3]: rxd.
rxd.FixedCrossSection         rxd.morphology
rxd.FixedPerimeter            rxd.multiCompartmentReaction
rxd.FractionalVolume          rxd.node
rxd.MultiCompartmentReaction  rxd.nodelist
rxd.Parameter                 rxd.options
rxd.Rate                      rxd.rate
rxd.Reaction                  rxd.re_init
rxd.Region                    rxd.reaction
rxd.Shell                     rxd.region
rxd.Species                   rxd.rxd
rxd.State                     rxd.rxdmath
rxd.generalizedReaction       rxd.rxdsection
rxd.geometry                  rxd.scipy
rxd.inside                    rxd.section1d
rxd.membrane                  rxd.species

Another question, related to compiling source files: Is it possible to update the existing compiled code on a system with the latest source code available in mercurial repository without having to uninstall and then compile the source code again?

Posts: 122
Joined: Fri Nov 28, 2008 3:38 pm
Location: Yale School of Medicine

Re: New reaction-diffusion model on ModelDB

Post by ramcdougal » Mon Apr 06, 2015 12:52 pm

Your system is somehow finding the old Python library. When you compile, after the "sudo make install" try: "cd src/nrnpython" and "sudo python install".

As far as compiling goes: if you're replacing a version built from the repository, then yes, you can safely do a "hg pull -u", "make", "sudo make install", "cd src/nrnpython", "sudo python install".

Posts: 19
Joined: Tue Jul 02, 2013 5:11 am

Re: New reaction-diffusion model on ModelDB

Post by Darshan » Tue Apr 07, 2015 3:55 pm

Thanks Robert. It was actually taking the old python library. The reason for that was incorrect PYTHONPATH.

Another error came up after this, which was because of unavailability of cython(pointed out by Robert. Thanks!). It was corrected by installing it using

Code: Select all

sudo apt-get install cython
and then compiling the code again using:

Code: Select all

./configure --with-nrnpython
sudo make install
cd src/nrnpython
sudo python install
After doing this, the model was working correctly.

Post Reply