NeuroML ][ documents ][ neuroml2

NeuroML version 2 beta2

Developments towards NeuroML version 2.0 are well under way, but please note that v1.8.1 is still the version which is most widely supported.

For details of the meetings which have taken place to date where NeuroML v2.0 has been discussed see here.

In June 2013 the first NeuroML Editorial Board was elected by the NeuroML community. This group will have responsibility for creating a stable specification for NeuroML v2.0 (and appropriate parts of LEMS). See here for more details.

NeuroML v2beta2 Schema (March 2014)

The latest version of NeuroML is v2beta2. The structure of NeuroML v2beta2 is defined by a single XML Schema file: NeuroML_v2beta2.xsd.

Most of the work listed below aims to handle XML files valid according to this schema. This should be the target structure for anyone wishing to implement NeuroML 2 support at this stage.

NeuroML v2beta2 structure

This image shows some of the elements currently defined in NeuroML v2beta2. The overall structure is similar to NeuroML version 1.x Level 3 (see figures 4-6 here). Note that there are a greater range of cell models supported (e.g. Izhikevich spiking cell, adaptive exponential integrate & fire) in addition to the multicompartmental conductance based models which were a focus of version 1.x.

Examples of NeuroML 2 files using this schema are available here:

Development of LEMS & mapping to NeuroML 2

LEMS (Low Entropy Model Specification) is a new XML based language with interpreter developed by Robert Cannon for specifying generic models of dynamical systems. ComponentType (ComponentClass was briefly used as a name for these) elements which specify Parameters, StateVariables and their Dynamics and Structure can be defined as templates for model elements (e.g. HH ion channels, abstract cells, etc.). Components are instances of these with specific values of Parameters (e.g. HH squid axon Na+ channel, I&F cell with threshold -60mV, etc.).

jLEMS is a Java package for parsing and executing LEMS models and is the reference implementation of the LEMS language. PyLEMS is a Python API for reading and writing LEMS and can also execute models in the language.

jNeuroML is a more comprehensive Java application for handling LEMS and NeuroML 2. It bundles jLEMS together with the LEMS definitions for NeuroML 2 ComponentTypes, and can simulate any LEMS model as well as many NeuroML 2 models, validate NeuroML 1/2, and export to and import from a number of other simulator formats.

A core set of ComponentTypes describing the behaviour of dynamical elements in NeuroML 2 has been defined in LEMS:

These serve as the basis for Component definitions in NeuroML 2 files, e.g. izhikevichCell, iafTauCell, ionChannelHH, etc. The behaviour of the model element (e.g. the behaviour of v in terms of threshold, reset, tau in a simple I&F cell) is specified in the ComponentType, and the user only has to supply the name of the ComponentType and give parameter values to create a Component in their NeuroML file.

ComponentTypes & Components

This image shows the usage of LEMS ComponentTypes & Components in NeuroML

Note that specifying a Component does not imply that an instance of the model is created. Instances will only be instantiated when the cells are created in a population which is present in a network.

Using LEMS to specify the core of NeuroML version 2 has the following significant advantages:

NeuroML 2 XML files can be used standalone by applications in the same way as NeuroML v1.x, without using LEMS, easing the transition for v1.x compliant applications

Any NeuroML 2 ComponentType can be extended and will be usable by any application (e.g. jLEMS) which understands LEMS

The first point above means that a parsing application does not have to natively read the LEMS type definition for, e.g. an izhikevichCell element, it just has to map the NeuroML element parameters onto its own object implementing that entity. The behaviour should be the same and should be tested against the reference LEMS implementation (jLEMS).

The second point above means that if an application does support LEMS, it can automatically parse (and generate code for) a wide range of NeuroML 2 cells, channels and synapses, including any new ComponentType derived from these, without having to natively know anything about channels, cell models, etc.

Specifications & examples

The table below summarises the current specifications for LEMS & NeuroML 2.

 Specification Documentation Examples
LEMS LEMS_v0.7.1.xsd LEMS element definitions LEMS examples
NeuroML v2beta2 NeuroML_v2beta2.xsd NeuroML 2 Core ComponentTypes
NeuroML 2 examples

Implementations & APIs in Java and Python

The table below summarises the different capabilities of the Java and Python libraries for handling LEMS & NeuroML.  

Read, validate & execute LEMS XML filesjLEMS PyLEMS
Read & write NeuroML 2 filesJava API for NeuroML 2 libNeuroML
Everything... jNeuroML
Parse & execute LEMS; validate NeuroML v1/v2; convert LEMS to graphical format, NEURON, Brian, etc.; convert SBML to LEMS...

What's missing?

A summary of the holes & areas of current work in the current specifications...

See also the issues on GitHub for NeuroML 2 and LEMS.