Chapter 5. Organization & Operation of NEURON

5.1 Interpreter & Compiled Routines

One of the major goals in developing NEURON was to provide convenience for the user without sacrificing speed in simulations. User convenience is provided by the slow intrepreter while speedy simulations carried out by compiled components.

The interpreter makes it easy for the user to write and interact with an application program describing a particular neuron (or component of or network of). The interpreter built into NEURON (called "hoc" for a high order calculator) also provides for assigning the location and strength of synapses, placement and strength of current injection electrodes or voltage clamps. NEURON includes several standard channel types e.g.:

Additional standard mechanisms included are:
The hoc interpreter also offers a convenient method for plotting the voltage & current responses or the values of other parameters at any location. An editor, built into NEURON, allows on-line changes in parameters, variables plotted, etc. When the user completes the editing of a program and switches back to running the interpreter, syntax errors are trapped and allows return to the editor at the point where a correction is needed. This make for fast and convenient development of error free simulation programs.

The compiled routines of all the membrane and intracellular processes are called by the interpreter to carry out calculations of membrane channel currents and a variety of other mechanisms. These routines have been carefully written and optimized for the fastest and most accurate numerical integtration methods. An extraordinary increase in the speed of simulations over conventional methods results from inclusion of an algorithm invented by Mike Hines to obtain the solution of the matrix required to find the currents and voltages in multi compartmental models for nerves. He was able to convert the normal slow solution for a matrix having a computation time proportional to N^2 (the square of the number of elements in the matrix) to a tri-diagonal form whose solution time was linearly proportional to N. The effect of this "turbo" algorithm becomes more and more apparent as the number of compartments is increased.

Rudimentary menus for control of simulations are available in the DOS compatible versions of NEURON in the form of menu boxes across the top of the screen. Menu items can be written to change parameters, change the variable to be plotted, change the integration time step and total time, start a run, clear the screen, etc. In turn menu items can call sub-menus.


NEURON, written in the "C" language, is portable to many types of machines and operating systems because compilers are so generally available. Thus we have used NEURON on both Unix workstations and IBM compatible PCs for our general use but, on occasion, ran it on a CRAY supercomputer for batch processes such as parameter searches.

I began to appreciate the problem of conceptual control of the simulation when I began to write programs to simulate the only modestly complex problem propagation of impulses into the presynaptic terminal of a neuromuscular junction, with the associated entry, exit, binding and diffusion of intracellular calcium. In order to match the experimental data on the ion fluxes, the ion channel densities had to be changed dramatically over a distance of a few microns. Because of the multiple program loops in assigning changing diameters and channel densities, I always checked to see that the assigmnents I desired were indeed actually carried out by the program.

I pointed out to Mike that, if it were necessary for conceptual control, to generate a table morphological and channel density assignments the error prone process of program assigmnents could be avoided by entry into a spreadsheet instead. Sometime later, at a small users group meeting, there was such unanimous pleading for such a facility in NEURON that Mike decided to build a true graphical users interface (lovingly called "GUI").

Back to Top of Interpreter
Forward to: 5.2InterViews Version of NEURON
Forward to:5.3 Operating NEURON
Forward to:5.4 NEURON'S Main Menu