NeuronC:
                                
                 A neural circuit simulation language
                                
                                
                                
                                
                                
                                
                                
                      User's Manual Version 4.1 
                                
                           February, 1998
                                
                                
                          Robert G. Smith












                         Copyright (C) 1994
                                
                          Robert G. Smith

                     Department of Neuroscience
                     Univ. of PA Medical School
                      Phila., PA   19104-6058
                               USA
                                
                        All Rights Reserved








          Table of Contents

1) How to use this manual  ............................... 1-1


2) Hardware and software needed  ......................... 2-1


3) NeuronC basis in analogy 
     Numerical modeling .................................. 3-1
     Timestep and compartment size ....................... 3-5
     Stability, Euler, implicit method ................... 3-6
     Crank-Nicolson method ............................... 3-8


4) NeuronC statements and syntax 
     Construction mode ................................... 4-1
     Run mode ............................................ 4-2
     Nodes, neural elements .............................. 4-3
     Syntax for node connections ......................... 4-4
     Errors, how to find them ............................ 4-6
     Cable statement ..................................... 4-7
     Sphere, Synapse statements .......................... 4-11
     Gap junction statement .............................. 4-20
     Photoreceptor statement ............................. 4-21
     Vbuf statement ...................................... 4-24
     Channel statements .................................. 4-25
       Recording from channel internal variables ......... 4-29
       Setting new rate constants ........................ 4-30
     Load, series, cap, batt statements .................. 4-31
     Stimulus statement .................................. 4-32
     Plot statement ...................................... 4-36
     Record, Graph statement ............................. 4-39
     Display neural circuit .............................. 4-42
     Ename, Modify statements ............................ 4-46
       Modifying synaptic statements during a run ........ 4-47
     Run, step statements ................................ 4-48
     NeuronC programming statments ....................... 4-48
     Advanced nc statements .............................. 4-50
     Foreach statement ................................... 4-51
     Print statement ..................................... 4-53
     Variables ........................................... 4-54
     Keywords ............................................ 4-58
     File read, write statements ......................... 4-59
     Built-in functions .................................. 4-60
     Gausnn, FFT statements .............................. 4-61
     Graphics statement .................................. 4-62

5) Constructing neural circuits 
     Logging in .......................................... 5-1
     Design Philosophy ................................... 5-2
     Static modeling ..................................... 5-3
     Developmental rules, Overcoming the edge effect ..... 5-4

6) Adding new channel types 
     Basic steps ......................................... 6-1
     HH types ............................................ 6-2
     Sequential-state types .............................. 6-5


7) Running nc, stim, and plotmod commands 
     nc .................................................. 7-1
     stim ................................................ 7-5
     plotmod ............................................. 7-7
     vid ................................................. 7-9
     ibmflt (hpflt) ...................................... 7-10
     running the plotter ................................. 7-11
     posit ............................................... 7-14
     graph ............................................... 7-15
     labels .............................................. 7-17

8) Predefined variables .................................. 8-1


9) References ............................................ 9-1


10) Programming examples ................................. 10-1 


11) NeuronC syntax listing ............................... 11-1

How to use this manual


1)  How to use Manual               (you're here: continue!)

   Tells how to use the manual to model neurons, and 
where to start if you don't have much expertise with 
computer.


2)  Hardware and software needed    (Read if you are transporting NeuronC)

   Describes type of computer equipment and software 
support is necessary to run NeuronC.  This information 
will allow you to get NeuronC running on many types of 
personal computers and workstations.


3)  NeuronC basis in analogy        (Read if you're a beginner)

   Explains what kind of neural behavior NeuronC 
models, and how it simulates the voltages and currents 
in neural circuits.  This is important if you're 
starting out in modeling and need a basic understanding 
of numerical simulation.

   For a more complete summary of how NeuronC works, 
refer to the modeling paper: Smith, R.G. (1990) "NeuronC: A 
language based on C for dynamically simulating neural networks of 
the visual system."  


4)  NeuronC statements and syntax    (Carefully read; refer to later)

   This section describes every NeuronC language 
statement, its meaning and function in a typical 
NeuronC modeling program.

5) How to construct a neural circuit.

   This section describes how to go about designing a neural circuit.

6) How to add new channel types.     (Skim, refer to later)

   This section describes how to modify existing Hodgkin-Huxley channels 
   and also new sequential-state types.  If you need to modify the rate
   constant function you can look up "channels" in Section 4.

7) How to run nc                     (Refer when running models)

   This section describes how to use the "nc", "stim", 
"plotmod", and "vid" commands. It explains the command 
line switches which allow you to run nc remotely on a 
workstation and allow you to display the data on a 
video screen.