Neurocal
Neural
created by
Zeng Lertmanorat

Neurocal is a simulation software designed for solving the equation that describes the activity of nerve cells. It helps visualize how nerve cells react to any source of inputs such as intracellular stimulation, extracellular stimulation, ions concentration, temperature and etc. The software runs within Matlab environment, which allows users to take advantage of built-in functions in Matlab to display and analyze the simulation result.
Neurocal solves the simulation based on a model file that describes the model configuration that can be done within 4 lines of code. The best way to learn what model file is is to check out examples in "Neurocal/model" subdirectory from exaple_1 to example_8. For more information about how to create a model file, please refer to the how to create model file section.
Once a model file has been created, start Matlab program and change the Matlab working directory to where Neurocal is located. Then, type " Neurocal" . Neurocal window will be popped up as shown below. Neurocal window is the main window of this program. The simulation starts by selecting a model file using "File:Open model" menu in Neurocal window.
Once a model file has been chosen, open one of Setting windows under Setting menu. In any Setting window, there are 3 buttons; "Ok", "Close", and "Apply". Simulation starts when "Apply" button is clicked. The difference between “Ok” and “Apply” is that “Apply” save adjusted parameters and performs a simulation, whereas “Ok” only save the adjusted parameters. “Ok” allow users to make changes on more than one parameters before running the simulation.
Once a simulation is performed, you can view the results using Graph (menu in Neurocal window). You can also view the result in the Matlab command line by running “show” function, which will allow you to access to variables in the model, such as membrane voltage, membrane current , etc.. The variables are created in Structure format. For example, “soma.vm” is the membrane voltage for a variable named “soma”. For more information about Structure, please refer to Matlab users guide.
|
|
is the main window of this software. It consists of 1) A text box that displays the name of currently-used model file, which is "Ex_03_simple_axon" in this example. 2) Menus that allows users to operate the simulation. The functions of menus are described below. |
|
|
In order to run the simulation, user must specify first which model file will be used. Within the File menu, there is a submenu Open model. Use this submenu to open a model file you want to use for the simulation. |
|
|
Within the Setting menu, there are six submenus. 1) Time: set the value of time step and time length for simulation. 2) Environment: set the value of Temperature and extra- cellular resistivity. 3) Parameters: access to the parameters of any vaiable. 4) Channel: access to the membrane kinetic parameters if you have one in your model. 5)& 6) Intracellular Stim and Extracellular Stim bring up a graphic user interface for adjusting parameters of intracellular and extracellular stimulator respectively. These parameters are first assigned within a model file. If the model file does not contain any stimulator parameter, these menus will not work. For more information, please refer to the how to create model file section. |
|
|
No need to explain what they are. |
|
|
is created from Neurocal -> Setting -> Time menu for adjusting the simulation parameters. Time(ms) : The length of simulation Time step : There are three options for time step size. 1)-Fixed step (1-20)(us): Users define the step size on the edit box. 2)-Variable (Coarse) : The step size is automatically calculated with Coarse accuracy 3)-Variable (Fine) : The step size is automatically calculated with Fine accuracy
|
|
|
is created from Neurocal -> Setting -> Environment menu for adjusting the simulation parameters. 1) R extra-cel (Ohm-Cm) : The extracellular resistivity in the model. It is used only when the extracellular stimulator is assigned in the model file. It has no effect on the model that has only intracellular stimulator. 2) Temperature : The temperature in the system |
|
|
Allow uses to change the parameters of variables in the model file. Please read it carefully.
·
The length of variable (L) can be either
"a · The Rm (membrane resistance) is normally a number. However, if the variable has any active channel, Rm will be replaced by 1/GLk (leakage current). · If there is any extracellular stimulator in the model, all segments need to have a "coordinate" so that the extracellular voltage can be calculated accordingly. The coordinates can be automatically assigned by vectors [XYZi] and [XYZc]. [XYZi] represents the vector of the variable (axon) and the [XYZc] is the coordinate of its center node. In this example, the axon is on the X axis with the center node on the origin. After a simulation is performed, you can check the coordinate at "axon.xyz". · If there is NO extracellular stimulator in the model, [XYZi] or [XYZc] won't be used. Please refer to How to create a variable section to see what each parameter means.
|
|
|
Allow uses to change the parameters of membrane kinetics of any Variable.
|
|
is created from Neurocal -> Setting -> Intracellular Stim menu for adjusting parameters of intracellular stimulator(s) first assigned within a model file. Each intracellular stimulator has 5 parameters that can be adjusted ;Variable, Position, Amplitude, Duration, and Delay. The position is a value between 0 and 1, which represent two ends of a variable. For a variable that has only 1 segment. This value has no effect. For more information, please refer to the How to create a model file section. In this example, there are 3 intracellular stimulators in the model.
|
|
|
is created from Neurocal -> Setting -> Extra cellular Stim menu for adjusting parameters of extracellular stimulator(s) first assigned within a model file. Each extracellular stimulator has 6 parameters that can be adjusted ;X, Y, Z, Amplitude, Duration, and Delay. In this example, there is one extracellular stimulators in the model. Multiple extracellular stimulators can be implemented.
|
|
|
is created from Neurocal -> Graph -> 2DViewer menu for displaying simulation result in 2 dimension mode. Clicking the Plot menu brings up a plot control window (2D-Viewer:Plot).
The display properties of the
result can be changed by clicking |
|
|
is created from 2D-Time -> Plot menu. This window allows users to select what to plot on the 2D-Time window. The first (left) column is the list of variables in the model. The second (middle) column is the list of segments associated with the variable in the first column. The third (right) column is the list of parameters associated with the variable in the first column.. There are 4 buttons. Color : specify a color for the next plot. Replace : erase old plots and plot new values. Add : keep old plots and add new values. Close : close the window
|
|
|
The time to be plotted can be chosen either by the slide bar
or the edit box. |
|
|
|
|
|
is created from Neurocal -> Graph -> 3DViewer menu for displaying simulation result in 3 dimension mode. There are 3 menus on this window.
Plot : Brings up a plot control window (3D-Viewer:Plot). Duplicate : Plot the current result on a new window. Export : Save the current result into a text file in ASCII format with tab delimiter. In the output file, the first column is Time and the rest are the current plot.
|
|
|
is created from 3D-Viewer-Plot. This window allows users to select what to plot on the 3D-Viewer window. The first (left) column is the list of variables in the model. The second (right) column is the list of parameters associated with the variable in the first column.. There are 2 buttons. Replace: plot the variable and parameter selected. Close : close the window.
|
Once a simulation has been done, you can view the result in the Matlab command line by running “show” function, which will allow you to access to variables in the model, such as membrane voltage, membrane current , etc.. The variables are created in Structure format. For example, “soma.vm” is the membrane voltage for a variable named “soma”. For more information about Structure, please refer to Matlab users guide.
Each variable represents a cylinder which can be divided into several
segments
A model file for Exstim is similar to a mod file in Neuron simulation program. Let's check the examples.
|
%Ex_01_Simple_soma 1:create('soma'); %create a variable named soma with default parameters. 2:global soma %required for all variable created 3:insert(soma,'hh') %insert HH channel into SOMA [variable model] 4:Iinstim(soma,0.5,0.1,100,100) %intracellular stimulation % [variable positon(0-1) amp(uA) pulsewidth(us) delay(us)] |
Several default values are assigned to a variable
(soma) when created.
soma.nseg =
1 %number of
segment.
soma.dia = 10
%diameter (um)
soma.L =
100 %length of the
cyclinder (um)
soma.c = 1
%membrane capacitance (uF/cm2)
soma.ra = 100
%axonal resistance (ohm-cm)
soma.rm =
3 %membrane
resistance (kohm/cm2)
soma.vini= -70 %membrane
resting voltage (mV)
These values can be changed within the model file. Let see an example below
|
%Ex_03_Simple_axon_active 1:create('axon'); %create a variable named axon with default parameters. 2:global axon %required for all variable created 3:axon.nseg=55; % change the number of segments 4:axon.L=10*axon.dia*axon.nseg; % um change the length of axon 5:insert(axon,'hh') %insert HH channel into AXON [variable model] 6:Iinstim(axon,0.5,0.1,100,0) %intracellular stimulation [variable positon(0-1) amp(uA) pw(us) delay(us)] |
The final example is a model file for a simple neuron.
|
%Ex_08_Simple_Neuron 1:create('axon'); 2:create('soma'); 3:create('dendrite',3) %create dendrite(1),dendrite(2),dendrite(3) 4:global axon soma dendrite 5:axon.L=2500; 6:axon.nseg=20; 7:dendrite 8:dendrite 9:dendrite 10:dendrite 11:dendrite 12:dendrite 13:connect(soma,0,dendrite 14:connect(soma,0,dendrite 15:connect(soma,0,dendrite 16:connect(axon,0,soma,0); %the branch position is either 0 or 1 17:insert(axon,'hh') 18:Iinstim(soma,1,0.5,200,0) %[variable positon(0-1) amp(uA) pw(us) delay(us)]
|
-Windows operating system
-Matlab version 6.
1. To name a model file, please DO NOT use any strange characters like
+, -,!,@,#,$,%,^, (,),
2. The length of filename can not exceed 31 characters...
For more information, please feel free to send me an email at