We'll be analyzing a couple of models in order to answer these questions:
Moore JW, Stockbridge N, Westerfield M (1983)
On the site of impulse initiation in a neurone.
J. Physiol. 336:301-11
This one doesn't have any mod files, but there's plenty to keep us busy.
The model archive moore83.zip has already been downloaded and unzipped. You'll find its contents in exercises/modeldb_and_modelview/moore83
Go to exercises/modeldb_and_modelview/moore83 and read the README file. Does it provide any more clues?
from neuron import h, gui h.load_file('mosinit.hoc')
The PointProcessManager shows a shape plot of the cell.
Using Python to Examine What's in the Model
This model was written in HOC, but we can still use Python to explore it. To see what sections exist and how they are connected, type
h.topology()and
from pprint import pprint # optional; could use print for sec in h.allsec(): pprint(sec.psection())at the >>> prompt.
At this point, you might think you'd have to start reading source code in order to get any more information about what's in the model. But the Model View tool can save you a lot of time and effort, and it has the advantage of telling you exactly what the model specification is. This is a big advantage, since some programs use complex specification and initialization routines that change model structure and parameters "on the fly."
Using Model View to Discover What's in a Model
Start a Model View tool
NEURON Main Menu / Tools / Model View
This shows a browsable outline of the model's properties.
Asterisks mark the items that are "expandable."
Expand the outline by clicking on "1 real cells".
Then peer inside the model by clicking on each of its expandable subitems.
Notice what happens when you get down to
1 real cells / root soma / 6 inserted mechanisms / hh / 2 gnabar_hh
In the ModelView Range Graph, click on the "SpacePlot" button,
then click and drag in that tool's shape plot to bring up a space plot of gnabar_hh.
Do the same for gkbar_hh and gl_hh.
A shortcut for discovering the distributions of spatially inhomogeneous parameters:
Density Mechanisms / Heterogeneous parameters
reveals all that are spatially nonuniform. Click on any one to make the
ModelView Range Graph reveal its values over the model.
Analyzing the Underlying Code
Was this model specified by user-written hoc code, or was a CellBuilder used?
Exit the simulation and search the hoc files for create statements.
In the terminal execute
grep create *hoc(MSWin users: first open a bash shell, then cd to the exercises/modeldb_and_modelview/moore83 directory)
Alternatively you could try Windows Explorer's semi-useful Search function, or open each hoc file with a text editor and search for create.
If no hoc file contains the create keyword, maybe the CellBuilder was used.
Run mosinit.hoc again and look for a CellBuilder.
If you don't see one, maybe a Window Group Manager is hiding it.
Click on NEURON Main Menu/Window and look for one or more window names that are
missing a red check mark. If you see one, scroll down to it and release the mouse button.
If a CellBuilder pops up, examine its Topology, Subsets, Geometry, and Biophysics pages.
Do they agree with the output of forall psection() and/or what you discovered with the
Model View tool?
"Extra Credit" Question
Now you know what's in the model cell, and how it was implemented. Suppose you wanted to get a copy of it that you could use in a program of your own. Would you do this by saving a CellBuilder to a new session file, or by using a text editor to copy create, connect, insert etc. statements from one of the hoc files?
Hints: look for an xpanel statement in one of the hoc files.Find the procedures that implement the actions that are caused by clicking on a button.
Read about xpanel, xbutton, and xvarlabel in the help files.
The remaining statements do one or more of the following:
change model parameters (e.g. spatial distribution of HH in the dendrite)
change stimulus parameters (e.g. stimulus location and duration)
change simulation parameters
Why does the space plot automatically save traces every 0.1 ms?
Hint: analyze the procedure that actually executes a simulation
Which hoc file contains this procedure?
What procedure actually changes the stimulus location, duration, and amplitude? Read about PointProcessManager in the help files.
Mainen ZF, Sejnowski TJ (1996)
Influence of dendritic structure on firing pattern in model neocortical neurons.
Nature 382:363-6
This one has interesting anatomy and several mod files.
The model archive patdemo.zip has already been downloaded and unzipped. Its contents are in exercises/modeldb_and_modelview/patdemo
Read the README.txt file in exercises/modeldb_and_modelview/mainen96 . Any more clues here?
Four different cell morphologies are available. Select one of them, then click on the Init button to make sure that all model specification and initialization code has been executed. Use Model View to browse the model, and examine the heterogeneous parameters.
Now it's time to discover how this model was created. Where are the files that contain the pt3d statements of these cells?
This program grafts a stylized myelinated axon onto 3d specifications of detailed morphometry.
Where is the hoc code that accomplishes this grafting?
If you load mosinit.hoc and then try to import one of the cell
morphologies into the CellBuilder, do you also get the axon?
Length and diameter are scaled in order to compensate for the effect of
spines on dendritic surface area. Find the procedure that does this.
What is an alternative way to represent the effect of spines?
nseg is adjusted in each section so that no segment is longer than 50 um. What procedure does this?
Five active currents and one pump mechanism are included.
Examine these mod files.
Do they appear to be compatible with CVODE?
Check them with modlunit.
Did you find any inconsistencies?
Do any of these seem likely to affect simulation results?
Are there any other warning messages?
Is there anything that would cause numerical errors?
How might you fix the problems that you found?
Restart nrngui and load the CellBuilder's session file.
Assign a plausible set and spatial distribution of biophysical properties
and save to a session file.
Instrument your new model and run a simulation.
Save the model, with instrumentation, to a session file.