Instantiate cell from Destexhe et al 1996 Thalamocortical and Thalamic Reticular Network

The basics of how to develop, test, and use models.
Post Reply
polina
Posts: 1
Joined: Wed Jun 17, 2020 11:58 am

Instantiate cell from Destexhe et al 1996 Thalamocortical and Thalamic Reticular Network

Post by polina »

I am quite new to Neuron and am trying to instantiate a reticular cell as in Fspin.oc from the below ModelDB link: Thalamocortical and Thalamic Reticular Network - https://senselab.med.yale.edu/ModelDB/S ... 343#tabs-2

I am trying to run this in jupyter notebook and I am running into trouble from the start :

Code: Select all

import neuron
neuron.h.load_file("/Code/modeldb/Destexhe-et-al-1996/RE.tem")
RE_cell = neuron.h.sRE()
The kernel dies and I get an error message saying:
NEURON: hh2 is not a MECHANISM
in RE.tem near line 69
insert hh2 // Hodgin-Huxley INa and IK
^
xopen("RE.tem")
execute1("{xopen("RE...")
load_file("/Users/lit...")

I would appreciate any help on how to properly set this up. Many thanks!
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Instantiate cell from Destexhe et al 1996 Thalamocortical and Thalamic Reticular Network

Post by ted »

Welcome, new NEURON user! Make it easy for yourself. Start by eliminating complexity.

1. Forget about Jupyter until you can use the model cell from plain old python. If you can't do that, you'll never get it going in a Jupyter notebook.

2. If you
import neuron
then every time you want to use some feature "foo" of NEURON you're going to have to type
neuron.h.foo
Make life easier--at the very least do this
from neuron import h
Then you only have to type
h.foo
e.g.
re = h.sRE()
Your code will also be more readable.

3. While you're at it, you should probably also
h.load_file("stdgui.hoc")
which will (among other things) load NEURON's very useful standard run library.

4. Don't work with "files at a distance." cd right into the directory where the template file is located. Start python there. Then your python code will look like

from neuron import h
h.load_file("stdgui.hoc")
h.load_file("RE.tem")
re = h.sRE()

and if RE.tem depends on any other files, those files will be right there, in the current working directory where your program can find them.

5. Some of those "other files" might be .hoc, .ses, or data files. One will definitely be a binary file (a loadable library) generated by compiling the .mod files that specify the properties of biophysical mechanisms (ion channels, synaptic mechanisms, ? pumps maybe) that RE.tem needs. Read the README file or usage instructions for the particular ModelDB entry that you're trying to reuse, and see if it says anything about that.

6. After you succeed in using the sRE class "in situ" as it were, copy RE.tem to a new empty directory where you can start your own project. Discover which additional files you need to put there by doing this

Code: Select all

use python to execute a file that contains the above four lines
REPEAT
  if there was an error message, fix the error
  execute the four line file again
UNTIL there is no error message
A message of the form

Code: Select all

foo is not a MECHANISM
in RE.tem near line 69
insert foo
means you need to figure out which .mod file defines foo, put a copy of that mod file in your new working directory, and run nrnivmodl again (to generate a new loadable library).
Post Reply