Latest news

NEURON 9.0 is now available

NEURON 9.0

 

NEURON 9.0 marks a major milestone with significant under-the-hood updates. This release features a redesign of internal data structures using the Structure-Of-Arrays (SoA) memory layout, replacement of pointers by DataHandles that are automatically updated when internal memory layout changes, migration of the codebase and translation of MOD files to C++, and the introduction of random number generator construct natively in the NMODL (and legacy but still default nocmodl) language. Additionally, many legacy NMODL constructs have been removed, and legacy code and libraries have been replaced with modern alternatives like Eigen, ensuring improved performance and maintainability.

What follows are a selection of the ~1500 pull request squash/merge commits to the master branch since the start of the 9.0a tag on 17-07-2023

 

What's New

  • Use of SoA memory layout for internal data structures (#2027, #2381, #2712)
    This is a prerequisite for adopting CoreNEURON GPU functionality natively into NEURON.
  • Replace pointers with DataHandles. DataHandles pointing to RANGE variables always point to the correct value when memory is permuted or reallocated.
  • Support for random number generator language construct (RANDOM) in NMODL (#2627)
  • Replace pthread-based threading implementation with std::thread (#1859)
  • Introduce meaningful Python types: HOC classes associated with Python types (#1858)
  • Formalization of C API for NEURON (first version) (#2357, #3557)
  • Introduce nanobind to gradually replace C Python API usage (#2545)
  • Requires C++17 compiler and flex >= 2.6 (#1893)
  • CoreNEURON repository is merged into NEURON (#2055)
  • CoreNEURON report extensions (#3507, #3542)
  • Modern implementation of NMODL (eventually to replace the nocmodl MOD file translator) is merged into NEURON (#3333)
  • Support for numpy>=2 added (#3040)
  • Replace legacy Meschach source copy with Eigen library (#2470)

 

Breaking Changes

  • MOD files are compiled as C++ instead of C (see migration guide for VERBATIM blocks)
  • API changes in the functions related to random numbers, see #2618
  • Restored usage of TABLE statement in hh.mod, results are now same as 8.0.2 (see #1764)
  • NMODL: Disallow use of ion variable in the CONSTANT block (#1955)
  • NMODL: Disallow declaring variables and functions with the same name (#1992)
  • Usage of Eigen library could introduce floating point differences, but they are very small, validated and can be ignored

 

Removal / Deprecation

  • Removed HOC function parent_node (Issue 3571) (#3576)
  • Removed usage of legacy OS X carbon libraries (#1869)
  • Removed legacy LINDA code and Java bindings (#1919, #1937)
  • Removed unused NMODL methods: adamsheunclsodaseidelsimplexgear (#2032)
  • Removed support for Python 3.7 and 3.8 (#2194, #3108)
  • Removed support for legacy units and dynamic units selection (#2539)
  • Removed unused NEMO simulator compatibility (#3035)
  • Removed checkpoint feature (h.checkpoint()), superseded by SaveState (#3092)
  • Removed legacy Random.MLCG and Random.ACG random number generators (#3189, #3190)
  • Removed support for mod2c transpiler for CoreNEURON (#2247)
  • Removed unused NMODL constructs: PUTQGETQRESETMATCHTERMINALSECTION,
    IFERRORMODEL_LEVELPLOTSENS, etc (#1956, #1974, #1975, #2001, #2004, #2005)
  • Removed __MWERKS__ (CodeWarrior compiler) related code (#2655)
  • Removed obsolete uxnrnbbs code (#2203)
  • Removed old tqueue implementations (#2225, #2740)
  • Removed unused RxD code_matrix_to_rxd_sparse (#3547)
  • Py_NoSiteFlag is deprecated for site_import (#3286)

 

Bug Fixes

  • Fix segfault from unref hoc_obj, see #1857 (#1917)
  • Fix bug in rxd reactions involving rxd parameters (#1933)
  • Fix CoreNEURON bug when checkpointing VecPlay instances (#2148)
  • Fix nocmodl bug with unused STATE + COMPARTMENT variable in KINETIC block (#2210)
  • Fix for dynamic ECS diffusion characteristics (#2229)
  • Various fixes for compatibility with newer NVHPC compiler releases (#2239, #2591)
  • Fix Windows and Mac crash on multiline HOC statements input from terminal (#2258)
  • Fix for Vector.max_ind (#2251)
  • Fix for detecting ION channel type in LoadBalance (#2310)
  • Fix for RangeVarPlot adding extra point at section ends when using plotly (#2410)
  • Fixed mod file array variable assignment (seg.mech.array[i] = x) (#2504)
  • Various fixes in RxD features (#2593, #2588)
  • Fix CoreNEURON bug causing in-memory model copy with file mode (#2767)
  • Fix CoreNEURON bug when using array variables in MOD files (#2779)
  • Fix lexer for ONTOLOGY parsing (#3091)
  • Fix issue while using Anaconda Python on MacOS (#3088)
  • Fix ParallelContext bbs memory leaks (#3563)
  • Fix RxD indexing bug (#3337)
  • Fix handling of hh.mod when using CoreNEURON (#3301)
  • On h.quit(), terminal settings are same as when neuron.hoc was imported (#3259)
  • int replaced by floor to accept negative coordinates (#3264)
  • Fix sanitizer leak involving neuron import h, gui (#3243)
  • Fix leaks in get_endian_character (#3257)
  • Fix leak in pysec_children and pysec_subtree (#3255)
  • Python 3.13.1 broke [s for s in sl] where sl is a SectionList (#3276)

Other Improvements and Changes

 

  • Allow segment.mechanism.func(args) to call a FUNCTION or PROCEDURE (#2475)
  • Simplify INDEPENDENT statement as only t variable is accepted (#2013)
  • Fix various memory leaks and related improvements (#3255, #3257, #3243, #2456)
  • Support for reading reporting related information with in-memory mode (#2555)
  • NMODL language documentation update (#2152, #2771, #2885)
  • Documentation improvements including transfer from https://neuron.yale.edu to https://nrn.readthedocs.io (#1901, #2922, #2971, #3106, #3187)
  • Various test, CI, and build infrastructure improvements (#1991, #2260, #2474)
  • Migrate many C code parts to C++ (#2083, #2305)
  • Support online LFP calculation in CoreNEURON (via SONATA reports for BBP use cases) (#2118, #2360)
  • Adopt CoreNEURON cell permute functionality into NEURON (#2598)
  • Allow legacy a.b(i) syntax for 1d arrays (extend to PointProcess.var[i] and ob.dblarray[i]) (#2256)
  • Add an ability to run NEURON ModelDB CI using label (#2108)
  • Remove unused code parts under various preprocessor variables (#2007)
  • Return error/exit codes properly in nrniv -c and nrnivmodl (#1871)
  • No limit on number of ion mechanisms that can be used (#3089)
  • Added Jupyter support for ModelView (#1907)
  • Make notebooks work with bokeh>=3 (#3061)
  • Added new method ParallelContext.get_partition() (#2351)
  • Unified docs: one file for all languages (#3466)
  • Improve rxd memory usage with __slots__ (#3572)
  • nrn_function_call now works with non-double returns (#3559)
  • Replaced % string formatting with f-strings (#3552)
  • SectionList.size() and len(sectionlist) skip deleted sections (#3524)
  • Add .size() to the SectionList object, returns the number of sections in the list (#3520)
  • CVode no_cap uses direct backing store instead of Node* (#3314)
  • Documentation updated to use from neuron import n (#3459)
  • Default node order is cell contiguous (except for thread rootnodes) (#3300)
  • Support multicompartment reactions with source & destination in the ecs (#3296)
  • Update rxd.MultipleGeometry to support 3D and hybrid models (#3389)
  • Add NMODL warning if a FUNCTION does not have a return statement (#3404)
  • Update species on region exception message (#3351)
  • Updated rxd reactions to allow pure backward reactions (#3273)
  • Vector.apply for Python functions (#3362)
  • Allow python callbacks for xstatebutton and xcheckbox (#3355)

NEURON 8.2.7 released

Release Date : May 22, 2025

What's New

  • This release allows use of Python 3.13.

  • Pins numpy to >=2.

  • Includes backports for several fixes.

To install

  • For Linux and macOS: pip install neuron
  • For Windows: download the installer from here
  • For more information, see instructions on nrn.readthedocs.io for your operating system

For change history relative to 8.2.6

2025 NEURON Spring course - apply by Feb 28

The 2025 NEURON Spring course is March 9 - 14 in Tempe, AZ.

Apply and pay by 5pm on February 28, 2025 to join us.

Click here for more details, or to apply, go here.

Two upcoming NEURON courses

There are two in-person NEURON tutorials in the near future:

June 11-16, 2023: NEURON summer course in Dayton, Ohio. See details and registration here.

July 15, 2023: Building mechanistic multiscale models with NEURON, NetPyNE, and TREES in Leipzig, Germany as part of CNS 2023. See details here. Register for CNS (be sure to register for the tutorials) at cnsorg.org.

Remember, if you're looking for an extensive introduction to NEURON and can't join us in Dayton, you can always watch 2021's two month long summer webinar series: https://nrn.readthedocs.io/en/latest/videos/neuron-course-2021.html

NEURON 8.2 released

Release Date : July 1, 2022

What's New

  • Allow multiple BEFORE/AFTER blocks of same type in a MOD file. #1722
  • Several documentation updates, including randomness in NEURON models #1727,
    NEURON course exercise sets from 2018 #1735 and publications using NEURON #1819.
  • CMake: improved documentation targets. (#1725)

Breaking Changes

  • Support for Python 3.6 was dropped, as it has reached end-of-life (#1733).
  • In this release, more declarations of NEURON methods (typically nrn_ and
    hoc_ functions) are implicitly included in translated MOD files. This can
    cause compilation errors with MOD files that include incorrect declarations
    of these methods in VERBATIM blocks. (#1755#1811#1825).
  • Declaring STATE variables as GLOBAL is now disallowed. (#1723)

Deprecations & future changes

  • NEURON is in the process of being fully migrated to a C++ codebase.
    Starting with next major release 9.0.0MOD files will be converted to C++ instead of C.
    This will break compatibility with some legacy MOD files containing VERBATIM blocks and code may have to be updated
    given that some valid C code is not valid C++.
    A migration guide
    is being compiled in the latest online documentation (note that it may change post release).
  • Random123 will be the default random number generator in NEURON and most of the random number distributions implementations will be
    replaced by those in the C++ standard library, while a few will be discontinued. See #1330 for follow-up and questions.

Bug Fixes

  • Fix for #335: Return proper exit code in hoc execution #1633
  • Build on Ubuntu21.10 WSL: escape special characters (#1862)

Improvements / Other Changes

  • Support for using mallinfo2() (#1805)
  • HOC domain for Sphinx 5.0.1

Upgrade Steps

  • If your MOD files contain VERBATIM blocks you may need to refer to the aforementioned
    C++ migration guide
    and make minor changes to prepare for the upcoming 9.0.0 release.
    Remaining compatible with 8.2.0 and older versions is typically straightforward.

For the complete list of features and bug fixes, see the list in GitHub Issue #1879

Two upcoming NEURON one-day courses

There are two NEURON one-day tutorials in the near future:

June 28: GUI/theory/scripting overview -- free and online; register at https://framaforms.org/incfocns-software-wg-cns2022-satellite-tutorials-registration-1654593600

July 16: using NEURON and NetPyNE through the cloud; in person event at CNS 2022 in Melbourne, Australia https://cnsorg.org/cns-2022

 

Remember, if you're looking for a more extensive introduction to NEURON, you can always watch last year's two month long summer webinar series: https://nrn.readthedocs.io/en/latest/videos/neuron-course-2021.html

2021 NEURON Webinar Series

What: An interactive online course about the NEURON Simulation Environment

When: Starts Thursday, June 3, 2021, and meets on Tuesdays and Thursdays thereafter until Tuesday August 3.

Faculty: Ted Carnevale and Robert McDougal

Application deadline: Monday, May 31, 2021

Registration fee: None.

This course maps the first half of the NEURON Summer Course into a series of interactive online workshops about building and working with models of single neurons. It is designed for those who are planning to use NEURON in neuroscience research or teaching, or already have active projects that involve NEURON, and is suitable for users at all levels of expertise.

  • Beginners with little or no modeling experience will learn the philosophical basis, scientific rationale, and technical aspects of modeling. 

  • Intermediate users will learn the best approaches to common tasks, and how to use special features of NEURON in their own work. 

  • Experienced users will benefit from an update on new features and a review of important topics that may have escaped their attention when they first started using NEURON.

  • Although this course focuses on modeling individual cells, the topics it covers are the foundation for modeling networks with NEURON.

 

This course is not an introduction to cellular neurophysiology or Python programming. It presumes you already have a basic understanding of the anatomical and biophysical properties of neurons, and are familiar with Python. If Python is new to you, be sure to work through the Python introduction before the course starts. You might also find the Scripting NEURON basics tutorial to be helpful. If you don't know anything about biological neurons, read chapters 1, 3, 4, and 5 of Cellular and Molecular Neurophysiology (ed. C. Hammond, Academic Press, 2008) or something equivalent before the course starts. 

Space is limited, and applications will be considered in the order received. The application deadline is Monday, May 31, 2021. No applications will be accepted after that date. 

How to apply

Submit the online application form.

Applicants will be notified of acceptance shortly after Monday, May 31.

Preliminary Course Schedule

The workshops will start at 1 pm New York time and run for 1 to 2 hours, depending on the topic at hand. Each Thursday workshop will start with a brief question and answer session, followed by introduction of new material, and ending with an assignment that participants are expected to do on their own. In each Tuesday workshop, participants will have the opportunity to present their results, discuss problems that they encountered, and show how they solved them.

Thursday 6/3 and Tuesday 6/8 (Carnevale)

Introduction to mechanistic modeling in neuroscience. 
Concepts: Hypotheses and models; the importance of conceptual control; neurites, cables, sections. 
Activity: Building and using a simple model cell with the CellBuilder. 
Homework: Build and use a model axon. Use it to measure conduction velocity and study anode break excitation.

Thursday 6/10 and Tuesday 6/15 (Carnevale)

Branched model neurons. 
Concepts: Range, range variables, spatial discretization, nodes, nseg. 
Activity: Build a model pyramidal cell. Current clamp the soma and find spike threshold. 
Homework: Change the current clamp to an excitatory synapse and examine how synaptic location affects response at the soma. Build a model interneuron and determine how synaptic location affects synaptic efficacy.

Thursday 6/17 and Tuesday 6/22 (Carnevale)

Adding new ion channels to NEURON with NMODL and the Channel Builder. 
Homework: Given a set of channel mod files, do current and voltage clamp experiments on a virtual oocyte.

Thursday 6/24 and Tuesday 6/29 (McDougal)

Python + NEURON. 
Concepts: Programmatic specification of topology, channel distribution, and virtual experiments. Best practices. 
Homework: TBA.

Thursday 7/1 and Tuesday 7/6 (McDougal)

Building and using a model cell with Python. 
Concepts: Incremental revision and testing. 
Activity: Producing model cells that work with the GUI and are suitable for use in network models running on parallel hardware. 
Homework: TBA.

Thursday 7/8 and Tuesday 7/13 (McDougal)

Working with morphometric data. 
Concepts: Data file formats. Detecting common problems with morphometric data. 
Activity: Importing and evaluating morphologies. Strategies for managing anatomically detailed models. 
Homework: TBA.

Thursday 7/15 and Tuesday 7/20 (McDougal)

Reproducibility in computational modeling. 
Concepts: Model sharing, discovering what's in a model (model introspection and analysis). 
Activity: Using ModelDB and ModelView. 
Homework: TBA.

Thursday 7/22 and Tuesday 7/27 (Carnevale)

Numerical methods in NEURON. 
Concepts: Fixed time step and adaptive integration, parameter discontinuities. 
Activity: Compare fixed time step and adaptive integration simulation results. Force a parameter change at a particular time. 
Homework: TBA.

Thursday 7/29 and Tuesday 8/3 (McDougal and Carnevale)

The hoc programming language. 
Concepts and activity: Understanding hoc code; making minor changes when necessary. 
Homework: Load HOC model from ModelDB. Work with it from Python.

 

NEURON 8.0 released

What's New

  • Dynamic selection of legacy vs modern units using HOC/Python API (default : modern)
  • Faster reaction-diffusion support
  • Initial GPU support using integration of CoreNEURON
  • Binary installer for new Apple M1 platform
  • Binary wheel distribution for Python 3.9 and Python 2.7
  • Release of NMODL version 0.3 (available as python wheel)
  • Versioned documentation available via nrn.readthedocs.io
  • CMake as a primary build system for NEURON and Interviews

Breaking Changes

  • h.Section now interprets positional arguments as namecell. Previously positional arguments were interpreted in the other order. (Calling it with keyword arguments is unchanged.)
  • For 3d reaction-diffusion simulations, the voxelization and segment mapping algorithms have been adjusted, especially around the soma. Voxel indices and sometimes counts will change from previous versions.

Deprecations

  • Five functions in the neuron module: neuron.initneuron.runneuron.psectionneuron.xopen, and neuron.quit.
  • Autotools build is deprecated and will be removed in the next release. Use CMake instead.
  • Python 2 and Python 3.5 support is deprecated and will be removed in the next release. Use Python >= 3.6

Bug Fixes

For the complete list of bug fixes, see the list on the GitHub here.

Improvements / Other Changes

  • Allow for two point (single section) SWC somas
  • GitHub Actions and Azure as primary CI systems. Travis CI removed.
  • GitHub Releases provides full source tarballs, binary installers and python wheels.
  • Improved testing and CI infrastructure including GPUs
  • nrn-build-ci repository test nightly builds for Ubuntu 18.04, Ubuntu 20.04, Fedora 32, Fedora 33, CentOS7, CentOS8, Debian Buster (10) and macOS 10.15 platforms.
  • Improved integration of CoreNEURON
  • Support for recent numpy version
  • Various build improvements on Linux, MacOS and HPC platforms
  • Documentation from various repositories is consolidated under nrn repository
  • New releases via Spack and Easybuild package managers
  • Fix deadlock when compiling NEURON with AVX-512
  • Add backward-cpp for better backtraces
  • NEURON_MODULE_OPTIONS environment variable to pass in nrniv options before neuron import

Upgrade Steps

Existing models should work without any changes. In order to upgrade NEURON version you can:

  • Use python wheels provided for Linux or Mac OS platform
  • Use binary installer provided for windows
  • Install from source, preferably using CMake build system
  • For new version, it's always a good idea to start over from scratch with nrnivmodl (deleting existing directory like x86_64)

See Installation section under nrn.readthedocs.io/. In the very rare case that numerical differences exist, check selection of legacy vs modern units.

Contributors

See the list of contributors on respective GitHub projects:

Feedback / Help

NEURON 7.8.2 released

NEURON 7.8.2 adds support for Python 3.9 and is otherwise a bug-fix release. Bug-fixes in this release include:

  • User-created pointers are now checked to be non-null before dereferencing.
  • Rare RangeVarPlot point-duplication prevented.
  • Test script enhancements.
  • Bugfix on determining which reversal potentials need to be recalculated when using an explicit h.ion_style
  • Windows cmake gui event loop fix when running via nrniv -python instead of directly from python.
  • Support for running on systems with placeholder python files that prompt installation of Python.
  • Reaction-diffusion support is more robust to model changes after creation (Sections no longer kept alive, detects changes to nseg in variable step even if cvode.re_init is not called).
  • Bugfix to reaction-diffusion extracellular multicompartment reaction fluxes with MPI.
  • Test script enhancements.
  • modlunit support for NMODL "REPRESENTS" keyword.
  • Fix for rare library name extension issues (libpython2 vs libpython2.7)

NEURON 7.8.1 released

What’s new in NEURON 7.8

  • Easier installation on macOS and Linux; just use: “pip3 install neuron”

  • More reaction-diffusion integration: PlotShape.plot support, h.distance, node in sec

  • Increased support for Python graphics packages

    • PlotShape.plot and RangeVarPlot.plot both gained support for plotly; RangeVarPlot.plot also gained support for plotnine

  • New, optional mechanism syntax and introspection; mechanism descriptions now displayed in ModelView

    • h.hh.insert(h.allsec()) and soma.insert(h.hh)

    • h.hh.code, h.hh.file, help(h.hh)

    • If the nmodl module is installed: h.hh.ontology_ids, h.hh.ast, h.hh.ions

  • Cleaner mod-file pointer setting syntax

  • Gui redirect support for routing legacy graphics to an interviews alternative

  • Support for cmake compilation in addition to autotools

  • Compilation flag for using 2019 SI unit values (off by default)

  • Miscellaneous bug fixes and optimizations

 

Possibly breaking change (but very rare in practice):

  • SectionList iteration does not change the currently accessed section; use section methods or sec= instead