At the hoc interpreter's oc> prompt, type
topology()
If sections exist,
you will see a crude but informative on-screen printout
that shows how they are interconnected.
Now see what happens when you type the command
forall psection()
This prints a brief text summary of the properties of each existing section.
But there aren't any sections yet, so these commands print out nothing.
It might help to think of the CellBuilder as being roughly analogous to one of those on-line airline ticket sellers. You can tinker with origin and destination, dates of departure and return, connecting flights, etc., as much as you like, but you don't get a ticket until you click on the "Submit order" button.
The most convenient way to work with the CellBuilder, at least during model development, is to use the Continuous Create checkbox.
Turning Continuous Create ON . . .
. . .
makes the CellBuilder send hoc code straight to NEURON's interpreter
without bothering to write a hoc file.
Presto!
Suddenly, your model cell exists (test this with
topology()
and
forall psection()
).
Any changes made to the model while Continuous Create is ON will automatically be echoed to NEURON's interpreter. This lets you immediately test the model you just created or revised.
Automatic updates may bog things down if you are dealing with a large model on a slow machine. If this happens, just turn Continuous Create OFF.
Then make whatever changes you want, and when you're done just toggle Continuous Create ON and then OFF again.
A very practical way to work with a configured CellBuilder, at least for single cell modeling, is to save it to a session file with Continuous Create ON. Then reading this file will automatically recreate the model cell.
Here's a concrete example of how to do this.
load_file("nrngui.hoc") load_file("mycell.ses")
nrngui init.hoc
load_file("nrngui.hoc") load_file("mycell.ses") load_file("iclamprig.ses")
The CellBuilder was hidden for this illustration, in order to save screen space.
stylizedcode.zip contains the files (init.hoc, mycell.ses, and iclamprig.ses that were used to generate this figure.
For instance, you could set up an interface that uses an SEClamp to do voltage clamp experiments, and save it to a file called something imaginative like vclamprig.ses. In that case, it would make sense to have two init files with different contents and descriptive names, like this :
- initiclamp.hoc
load_file("nrngui.hoc") load_file("mycell.ses") load_file("iclamprig.ses")- initvclamp.hoc
load_file("nrngui.hoc") load_file("mycell.ses") load_file("vclamprig.ses")
Also note that iclamprig.ses and vclamprig.ses are reusable with any model that happens to have a default section called soma.
This is an example of the benefits of "modular programming" (i.e. keeping the model specification (CellBuilder) separate from the specification of the instrumentation (RunControl + IClamp + graph)) and "reusable code."
The Export button is for saving a hoc file that contains the basic specification of the model cell. This is OK if you intend to work on a single cell model.
If your aim is to define a new cell class for use in a network model, you'll want to click on the Cell Type radio button.
"But wait," someone asks, "can't the CellBuilder import a model cell?"
Not entirely. At present the CellBuilder can import topology and pt3d information, which is very useful, as we will see in the next tutorial. However, it can't import subsets, geometry (L, diam, and nseg), or biophysical properties. So throwing away a CellBuilder is "breaking the mold"--you lose all the time and effort you invested setting it up.
Copyright © 1999-2008 by N.T. Carnevale and M.L. Hines, All Rights Reserved.