I've run the latest version of NEURON with Anaconda3 with a Jupyter notebook and believe your issue is due to fmc3_1 requiring that
stdrun.hoc already be loaded when celldef() is executed. If stdrun.hoc is not already loaded, then celldef() will raise an error at the beginning of
geom_nseg() becasu lambda_f is not declared and all segment counts for each section will stay at their devault value of sec.nseg=1.
Morphology and AP generation
-
- Site Admin
- Posts: 6384
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
Re: Morphology and AP generation
Ah, yes--I generally import both h and gui
from neuron import h, gui
Importing gui causes stdrun.hoc to be loaded, so lambda_f is declared and geom_nseg() succeeds. But it also loads several other files and brings up the NEURON Main Menu toolbar. If you don't want that to happen, but you do want your model's geom_nseg() procedure to succeed, either do this
from neuron import h
h.load_file("noload.hoc")
which loads NEURON's standard run system AND its gui library but doesn't launch the NEURON Main Menu toolbar, or this
from neuron import h
h.load_file("stdrun.hoc")
from neuron import h, gui
Importing gui causes stdrun.hoc to be loaded, so lambda_f is declared and geom_nseg() succeeds. But it also loads several other files and brings up the NEURON Main Menu toolbar. If you don't want that to happen, but you do want your model's geom_nseg() procedure to succeed, either do this
from neuron import h
h.load_file("noload.hoc")
which loads NEURON's standard run system AND its gui library but doesn't launch the NEURON Main Menu toolbar, or this
from neuron import h
h.load_file("stdrun.hoc")
Re: Morphology and AP generation
Had not tried before. However, upon checking, it works fine with just python.Do you see a problem with iteration over segments when you just use Python from NEURON, without Jupyter?
In both cases, i.e Loading with or without GUI doesn't affect it and works fine. Jupyter seems to create some trouble.
Thanks. I also figured out a menial way to load all segments in jupyter.believe your issue is due to fmc3_1 requiring that
stdrun.hoc already be loaded when celldef() is executed
-Load the file. ( If there's a problem)
-Load a file which doesn't exist. (Repeat step if needed)
-Load the correct file again, it works!
(Some type of interruption in the process makes it work correctly)
Thanks for your time and help!
:)