neuronline.github.io

NEURON NMODL (.mod) Files

Home > Computational Neuroscience > Neuron > NMODL Files


General Information

Variable Declaration Blocks

PARAMETER

STATE

If a model involves differential equations, families of algebraic equations or kinetic reaction schemes, their dependent variables or unknowns are listed in the STATE block.

ASSIGNED

Can be used to declare two kinds of variables:

The second group omits variables that are unknons in simmultaneous linear or nonlinear algebraic equations, or that are dependent variables in differential equations, or kinetic reaction schemes

Equation Definition Blocks

NEURON

The NEURON blockdefines what the model of the mechanism looks like from the outside.

INITIAL

Code in the INITIAL block is executed when the run system’s finitialize() method is called.

BREAKPOINT

The BREAKPOINT block is the main computation block in NMODL.

DERIVATIVE

Used to assign values to the derivatives of those STATES that are described by differential equations.

The cnexp method combines second order accuracy with computational efficiency is a good choice for most programs

KINETIC

FUNCTION

Functions defined by the FUNCTION block are vailable at the hoc level and other mechanisms by adding the suffix to the mechanism that they’re defined in.

NET_RECEIVE

Artificial cell models don’t have BREAKPOINT, KINETTIC or DERIVITIVE. They only act when a new event arrives, these calculations are carried out in the NET_RECIEVE block.

Keywords

SUFFIX

Two purposes of SUFFIX:

.mod file

: comment here
NEURON {
  SUFFIX leak
  RANGE i
}

NEURON file

cable{
  nseg = 1 //Number of segments per this section
  insert leak 
}
print cable.i_leak(0.5)

POINT_PROCESS

Identifies the mechanism be be a point process, so it will be managed in hoc using an object oriented syntax (synapses).

NONSPECIFIC_CURRENT

The NONSPECIFIC_CURRENT has two purposes:

RANGE

GLOBAL

Other

Comments

Special Variables

v,celsius,t,diam,area,dt

Examples

LEAK Current

: A passive leak current
NEURON {  : Visible from the NEURON programming environment
  SUFFIX leak  : How the mechanism will be refered to by NEURON code (insert leak) 
  NONSPECIFIC_CURRENT i  : will be reckonded in charge balance equations
  RANGE i, e, g : Values here will need to appear in PARAMETER or ASSIGNED, will be different for each segment/section
}
PARAMETER {  : Variables specified here are assigned by user or changed by hoc 
  g = 0.001  (siemens/cm2)  < 0, 1e9 >  : variable = value (units) <min, max (in hoc/gui)>
  e = -65    (millivolt)
}
ASSIGNED {  : values that will appear on the lefthand side of an assignment statement, or are driving values
  i  (milliamp/cm2)  
  v  (millivolt)
}
BREAKPOINT { 
  i = g*(v - e) 
}

References


This page is part of a collection of pages on various topics of computational neuroscience. Please direct questions and suggestions to the author Tyler Banks [website][github] at tyler@tylerbanks.net.