Customized Mechanisms

Using Customized Mechanisms when importing NEURON as a module in python

Importing NEURON as a module in python makes it easy to integrate NEURON into the rich environment and tools available in python, to plan and implement complex simulations, to manage, organize and visualize simulation results.

When importing NEURON as a module of python, one would also like to see the customized mechanisms loaded and working. The following is a hack that trys to do it:

1. Applying the attached patch and consult Install for compiling and installation of hoc.so as a python module.

2. Remember to recompile customized mechanisms with nrnivmodl. Change directory in your favorite python shell to where i686 directory located

  In [1]: cd mod
/mnt/disks/hostd1/usrname/mod

do a

  In [2]: import neuron

NEURON -- VERSION 6.0.pygetsetcall.23 (35) 2007-05-23 (36M)
by John W. Moore, Michael Hines, and Ted Carnevale
Duke and Yale University -- Copyright 1984-2007

loading membrane mechanisms from ./i686/.libs/libnrnmech.so
Additional mechanisms from files
 HH2.mod IM.mod IT.mod IT2.mod ITGHK.mod

  In [3]:

The path ./i686/.libs/libnrnmech.so is hard coded in the source file, which is why it is necessary to have i686 directory under current working directory when doing import neuron. If directory i686 is not found, only default mechanisms in NEURON will be available.

Changes need to be made so this works with multiple architectures.

Attachments