Page 1 of 1

New reaction-diffusion model on ModelDB

Posted: Thu Dec 18, 2014 1:23 pm
by samnemo
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.

Re: New reaction-diffusion model on ModelDB

Posted: Thu Jan 08, 2015 12:34 am
by tardebut


Re: New reaction-diffusion model on ModelDB

Posted: Fri Apr 03, 2015 2:54 am
by Darshan

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).


Re: New reaction-diffusion model on ModelDB

Posted: Fri Apr 03, 2015 11:20 am
by ted
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.

Re: New reaction-diffusion model on ModelDB

Posted: Sat Apr 04, 2015 6:14 am
by Darshan
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?

Re: New reaction-diffusion model on ModelDB

Posted: Mon Apr 06, 2015 12:52 pm
by ramcdougal
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".

Re: New reaction-diffusion model on ModelDB

Posted: Tue Apr 07, 2015 3:55 pm
by Darshan
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.