NEURON Simulation @ PaynesNotebook.net


Others

Topology

Keyword Definition Example Explanation
create section_name Creates a section. create soma Creates a section named soma.
nseg Sets the number of segments nseg = 100 Sets the number of segments to 100.
topology() Prints topology.    

Currently Accessed Section

Keyword Definition Example Explanation
access section_name   access soma  
forall      

Geometry

Keyword Definition Example Explanation
diam Sets the diameter. diam = 10  
L Sets the length. L = 10  
area(0.5) Displays area.    

Keyword

Keyword Definition Example Explanation
insert   insert hh Inserts Hodgkin-Huxley model, including Na, K, and leak.
print Prints something. dend print nseg Prints the number of segments in the dend section.
for      
strdef      
object   objref o1, o2 Declares o1 and o2 are object references.

Mechanisms

Keyword Definition Example Explanation
hh      
pas      

Syntex

Keyword Definition Example Explanation
// Comments Indicates comments.    
/* Comments */ Indicates comments.    

Functions

Keyword Definition Example Explanation
section_name psection() Prints section information.    
ismembrane("hh")   ismembrane("hh") Returns whether "hh" is inserted to the current section.
secname()      

IO

Keyword Definition Example Explanation
printf() Prints a formated string.    
xopen()      

Math

Keyword Definition Example Explanation
sin(x)      
cos(x)      
log(x) Natural logarithm.    
1og10(x) Logarithm with base 10.    
exp(x) Natural exponential.    

Run Control

Keyword Definition Example Explanation
tstop      
run()      
dt   dt=0.025 Sets time step to 0.025 ms.

Predeclared Variables

Data Type/Built-in Values Notes Example Explanation
PI     3.1415927
E Exponential   2.7182818
FARADAY     96485.309
R     8.31441

Operators

Operators Description
= Assignment
+ Addition
- Subtraction
*  
/  
%  
+=  
-=  
*=  
/=  
   
== Comparison
&& Logical AND
\\ Logical OR
! Logical NOT
{ ... } Block of codes

Conditionals

Conditional Examples
if(x==10){print "Ten"}
if(x>10){print "Larg"}else{print "Small"}
while(x<10){print x x+=1}
for x=1,10 print x
for(x=1; x<=10; x+=1){print x}

Procedures and Functions

Examples of Procedures and Functions Notes
proc printDone(){print "Done!"} A procedure does not return a number.
func printValue(){print "7" return 7} A function returns a number.
func add(){return $1+$2} Numerical arguments
proc printSomething(){print $1,$s2,$o3} The first argument is a number. The second is a string. The third is an object.