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