CONICAL Demo 1:
Cylinder & Injector
Introduction
This program demonstrates the use of the Cylinder and Injector classes. A single cylindrical compartment is created with dimensions
similar to a neuron body, and with only passive membrane properties. Into
this cell a steady current is injected. The membrane voltage over time is
sent to the output stream.
This demo reproduces the behavior of the GENESIS script
"tutorial2.g", as included in the distribution and described in The
Book of Genesis. This allows us to check the accuracy of CONICAL's
integration, as well as compare various attributes of the two
modeling systems.
Code Overview
The complete code for the program is contained in main.cpp. As you can see, the code is very short,
and can be summarized as follows:
- Create a cylindrical compartment (setting attributes from
global variables)
- Create a current injector
- For each time step,
- print out values of interest
- call
gStepmaster->StepAll(dt)
The last step -- "toggle gCurrent" -- is a command which must always be
included in a CONICAL simulation loop. (In the future, we plan to have a
Simulation object which keeps a list of Steppers, and automatically updates both them and
the gCurrent variable.)
Program Output
The actual output of this program is here, and has
been graphed (by importing the data to
ClarisWorks)
below. As a steady
current is injected into the compartment, its membrane potential "charges
up" with a time constant of about 5 ms.
Building the Program
If you have the full set of CONICAL source code, you should be able to
simply copy main.cpp into your project and build
it. Of course, this will contain quite a few files you don't need. A
minimal project would contain just the following files: