# Using ModelDB

http://senselab.med.yale.edu/senselab/modeldb/ is the the home page of ModelDB, but for most of this exercise we'll just use a local copy of some files from it.

We'll be analyzing a couple of models in order to answer these questions:

1. What physical system is being represented, and for what purpose?
2. What is the representation of the physical system, and how was it implemented?
3. What is the user interface, how was it implemented, and how do you use it?

## Example: Moore et al. 1983

> 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 course/modeldb/moore83

### 1. What physical system is being represented, and for what purpose?

ModelDB provides a link to PubMed for the abstract ( here's a local copy of the abstract ). At some point we should also read the paper.

Go to course/modeldb/moore83 and read the README file. Does it provide any more clues?

### 2. What is the representation of the physical system, and how was it implemented?

Run mosinit.hoc in course/modeldb/moore83

The PointProcessManager shows a shape plot of the cell.
To see what sections exist and how they are connected, type

    	topology()

and

    	forall psection()

at the oc> prompt.

Was this model specified by hoc code, or was a CellBuilder used?
Exit the simulation and search the hoc files for create statements.
Under UNIX type

    	grep create *hoc

Under MSWin you can open a Command Prompt window, cd to the course/modeldb/moore83 directory, and then type

    	c:\nrn54\bin\grep create *hoc

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()?

Now you know how the model cell 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?

### 3. What is the user interface, how was it implemented, and how do you use it?

What is that panel with all the buttons?
What happens if you click on one of them?
Click on a different one and see what happens to the string at the top of the panel.
Click on some more and see what happens to the blue dot in the PointProcessManager's shape plot.
Is this one of the standard GUI tools you can bring up with the NEURON Main Menu?
How does it work?

> Hints: look for an xpanel statement in one of the hoc files.
> Read about xpanel, xbutton, and xvarlabel in the help files.

Find the procedures that implement the actions that are caused by clicking on a button.
The last statement in each of these procedures launches a simulation.
What does the very first statement do?
What does the second statement do?

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

## Another example: Mainen and Sejnowski 1996

> 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 course/modeldb/patdemo

### 1. What physical system is being represented, and for what purpose?

This is ModelDB's link to PubMed for the abstract, and here's a local copy of the abstract. Another paper to read.

Read the README.txt file in course/modeldb/mainen96 . Any more clues here?

### 2. What is the representation of the physical system, and how was it implemented?

Four different cell morphologies are available.
Where are the files that contain the pt3d statements?

This program grafts a stylized myelinated axon onto 3d specifications of detailed morphometry.
Where is the hoc code that accomplishes this grafting?
If you run 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 errors?
How might you fix the errors that you found?

### 3. What is the user interface, how was it implemented, and how do you use it?

mosinit.hoc brings up a minimal GUI for selecting cells and running simulations.
How did they do that?

### 4. Reuse one of their cells in a model of your own design

Import its morphology into a CellBuilder, then save the CellBuilder to a session file and exit the simulation.

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.

NEURON hands-on course
Copyright © 1998-2003 by N.T. Carnevale and M.L. Hines, all rights reserved.