Skip to main content

Python utilities for NeuroML

Project description

A single package in Python unifying scripts and modules for reading, writing, simulating and analysing NeuroML2/LEMS models.

Builds on: [libNeuroML]( & [PyLEMS]( and wraps functionality from [jNeuroML](


### Pip

pyNeuroML can be installed with pip:

sudo pip install pyneuroml

You may need to install lxml on Linux with:

sudo apt-get install python-lxml

### Installation from source

Clone the repository:

git clone cd pyNeuroML

It should be possible to install pyNeuroML using just:

sudo pip install . -r requirements.txt

You may have to install lxml and the development version of [libNeuroML]( manually:

apt-get install python-lxml cd .. git clone cd libNeuroML git checkout development sudo python install

Current/planned features

1) Single Python package for NeuroML2/LEMS

One Python package which can be installed using pip & a user has everything they need to work with NeuroML2/LEMS files:

  • libNeuroML
  • PyLEMS
  • A bundled version of jNeuroML which can be used to run simulations

2) Run models using jNeuroML or PyLEMS

Ability to run NeuroML2/LEMS models using jLEMS/jNeuroML (with [bundled jar]( or PyLEMS (todo…)

Uses similar command line interface to jNeuroML, i.e. based on jnml


pynml -h

to list current options.

3) Access to export & import options of jNeuroML

All export & import options of jNeuroML available through easy command line interface (see [here]( for progress) & through Python methods.

Example of export of NeuroML2/LEMS to NEURON and execution of generated code using single method is [here](

4) Helper Python scripts

Lots of helper scripts for commonly used functions, e.g. [generating a firing frequency vs injected current plot](, [generating a LEMS file for use with a NeuroML2 file](,

5) Analysis of ion channels

Generation of plots of activation rates for ion channels from NeuroML2 channel file ([example](


Generation of plots of activation rates for ion channels from NEURON mod file ([example](

pynml-modchananalysis NaConductance -modFile NaConductance.mod

See [here]( for more.

6) Home for existing functionality distributed in various places

Incorporate ChannelML2NeuroML2beta.xsl for updating ChannelML (coming soon…)

7) NEURON to NeuroML2

Scripts for converting NEURON to NeuroML2

8) Export of images/movies from cell/networks

Files can be generated for [POV-Ray]( which can be used to generate high resolution images and even sequences of images for creating movies. try:

pynml-povray -h

9) Tuning cell models in NeuroML 2

Builds on [Neurotune]( and [pyelectro]( See [here]( for example.

9) Planned functionality

Built in viewer of cells in 3D? Mayavi? More closely tied to PyNN?

[![Build Status](](

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyNeuroML, version 0.3.19
Filename, size File type Python version Upload date Hashes
Filename, size pyNeuroML-0.3.19-py2.7.egg (27.2 MB) File type Egg Python version 2.7 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page