NEURON 6.2 now available

News about new releases of NEURON, bug fixes, development threads, courses/conferences/workshops, meetings of the NEURON Users' Group etc.
Post Reply
Site Admin
Posts: 5727
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine

NEURON 6.2 now available

Post by ted » Tue Aug 12, 2008 3:35 pm

The newest standard distribution of NEURON is version 6.2, which is available from This is principally a "bug fix" release, but there have also been some improvements of features and functionality. Of the latter, the most
noteworthy have to do with Python.

Changes that affect Python

All communication with hoc from Python is now accomplished uniformly via the neuron.h object. In other words, do this first

Code: Select all

import neuron
h = neuron.h
Then, for example,
h.Section() returns new section
h.cas() returns currently accessed section
h.allsec() is an iterator over all sections

Python allows use of a nrn.Segment object as the argument to a PointProcess constructor or loc function. That is,
is an alternative to
IClamp(x, sec = section).
Also, section(0.5).sec is the section, and section(0.5).x is the arc location value 0.5.

The following new Vector functions are much (> 50 times !) faster than a Python loop over the elements:
  • Vector.from_python(source) fills the Vector with doubles from a Python list or NumPy 1-d array. The Vector is resized and returned.
  • Vector.to_python() returns a Python list of doubles.
  • Vector.to_python(target) fills the target with doubles from the hoc Vector and returns the target object. Note that if the target is a NumPy 1-d array it must already be sized the same as the Vector.
Other changes that deserve mention

CellBuild.cexport() is public and can be used from hoc with an argument of 1 (or 0) to force (or prevent) writing the cell info to the simulation instance. in continuous mode uses linear extrapolation of the last two time points when a value is requested outside the time domain of the Vector. This allows more efficient variable time step approach to a discontinuity, as it keeps the first derivative continuous when cvode asks for a value past the next discontinuity (the discontinuity event will cause a retreat to the proper time).

Site Admin
Posts: 5727
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine

6.2.3 now available

Post by ted » Thu Aug 28, 2008 10:40 pm

Release 6.2.3 (2203) 2008-08-28 is now the standard distribution of NEURON. This version contains several important fixes for Python bugs, and also fixes a bug that may rarely affect simulations that use the multisplit method for distributed computation.

The Python bug fixes are:
-- HocObject.Vector can appear in a generator
-- HocObject.Vector.from_python accepts a generator as an argument
-- Hoc NULLObject and Python None are cast to each other without wrapping when exchanging between interpretes.
-- POINT_PROCESS._ref_var is fixed
-- h.dict for the TopLevelHocIterpreter returns all names from the top level and built-in symbol tables.
-- a memory leak when dealing with segments in Python has been fixed
-- bool(HocObject) works properly

Finally, an important usage change has been implemented:
In Python
for seg in sec
now iterates only over the non-zero area nodes, as in the hoc iterator
for (x, 0) { . . . }
To get the equivalent of for (x) or for (x, 1) in Python, use
for seg in sec.allseg()

Post Reply