Skip to main content

pyNeuroML

GitHub CI PyPI PyPI - Python Version GitHub GitHub pull requests GitHub issues Documentation Status GitHub Org's stars Twitter Follow Gitter

All Contributors

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.

Installation

Dependencies

pyNeuroML relies on additional software to carry out its functions:

  • Java Runtime environment (JRE)
  • dot (from Graphviz)
  • lxml

On most Linux systems, these can be installed using the default package manager. On Ubuntu based distributions:

sudo apt-get install python-lxml graphviz openjdk-11-jdk

Pip

pyNeuroML can be installed with pip (preferably in a virtual environment):

pip install pyneuroml

A number of extra packages are also provided for convenience. You can install these to pull in other dependencies if required:

pip install pyneuroml[neuron]       # for NEURON simulation backend
pip install pyneuroml[brian]        # for Brian2 simulation backend
pip install pyneuroml[netpyne]      # for NetPyNE simulation backend
pip install pyneuroml[povray]       # for povray functions
pip install pyneuroml[hdf5]         # for HDF5 support
pip install pyneuroml[analysis]     # for analysis functions
pip install pyneuroml[tune]         # for tuning/fitting functions
pip install pyneuroml[vispy]        # for 3D interactive morphology plotting using vispy
pip install pyneuroml[plotly]       # for interactive plotting with plotly
pip install pyneuroml[nsg]          # pulls in pynsgr to use NSG
pip install pyneuroml[combine]      # includes libsbml, libsedml
pip install pyneuroml[tellurium]    # for Tellurium simulation backend
pip install pyneuroml[all]          # installs all of the above
pip install pyneuroml[dev]          # installs all of the above and other test related packages
pip install pyneuroml[doc]          # for building documentation

Please see the setup.cfg file for more details.

Fedora

The NeuroFedora community initiative provides pyNeuroML for use on the Fedora Linux Distribution. Fedora users can install pyNeuroML using the following commands:

sudo dnf copr enable @neurofedora/neurofedora-extra
sudo dnf install python3-pyneuroml

This will also pull in all the necessary dependencies (Java, lxml, graphviz). Please see the project documentation for more information.

Installation from the source

Clone the repository:

git clone https://github.com/NeuroML/pyNeuroML.git
cd pyNeuroML

It should be possible to install pyNeuroML using just:

pip install .

To develop pyNeuroML, you can use the dev extra and the development branch:

git clone https://github.com/NeuroML/pyNeuroML.git
cd pyNeuroML
git checkout development
pip install .[dev]

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

Try:

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):

pynml-channelanalysis NaConductance.channel.nml

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

  • Export morphologies (plus channels, soon). See here.

  • mod files - make best guess at initial NeuroML2 form (todo)

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?

Contributors

Padraig Gleeson
Padraig Gleeson

🐛 💻 🖋 🔣 📖 🎨 📋 🤔 🚇 🚧 🧑‍🏫 📦 📆 💬 🔬 👀 🔧 ✅ 📢 📓
Ankur Sinha
Ankur Sinha

🐛 💻 🖋 🔣 📖 🎨 📋 🤔 🧑‍🏫 📦 💬 🔬
Boris Marin
Boris Marin

🐛 💻 🖋 🔣 📖 🎨 📋 🤔 🚇 🚧 📦 💬 🔬 👀 🔧 📓
Richard C Gerkin
Richard C Gerkin

🐛 💻 🤔 🚧 📦 🔬 👀 🔧 📓
David Lung
David Lung

🐛 💻 🚧 🔧 📓
Mark Watts
Mark Watts

🐛 💻
Chaitanya Chintaluri
Chaitanya Chintaluri

🐛 💻
34383c
34383c

🐛 💻
Johannes Rieke
Johannes Rieke

🐛 💻
András Ecker
András Ecker

🐛 💻
Rokas Stanislovas
Rokas Stanislovas

🐛 💻
Robert Vickerstaff
Robert Vickerstaff

💻 ⚠️
Giannis Daras
Giannis Daras

🐛 🤔 👀 💻
Dhruvanshu-Joshi
Dhruvanshu-Joshi

🐛 🤔
AdityaBITMESRA
AdityaBITMESRA

🐛 🤔 💻 👀
Y. Budhachandra
Y. Budhachandra

💻 ⚠️
Stella
Stella

💻 🤔
Add your contributions

Metadata

Release files for pyNeuroML 1.3.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyNeuroML 1.3.9
File Size Uploaded
pyneuroml-1.3.9.tar.gz 28.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyNeuroML 1.3.9
File Interpreter ABI Platform
pyNeuroML-1.3.9-py3-none-any.whl Python 3 none any Details

Total release size: 56.1 MB

Release files / pyneuroml-1.3.9.tar.gz

Download URL pyneuroml-1.3.9.tar.gz
Size 28.8 MB
Tags Source
SHA-256 checksum
How to use checksums
2fd8e287c305720712ee80f5e49ff4ee077a8167dc0671591f82f2b96227d67f
BLAKE2b-256 checksum
How to use checksums
66e2506ef998298cdc41063680c58263c33fbc4e3ce285a6cf51222381292574
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Release files / pyNeuroML-1.3.9-py3-none-any.whl

Download URL pyNeuroML-1.3.9-py3-none-any.whl
Size 27.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
6e2012489beb5e1aa3d39cc710c8e8d87bb3e67e07f125731444645bb3f22f9c
BLAKE2b-256 checksum
How to use checksums
e97662a296128c27ddacdf095f371dc84710657bb888b248c016da2892519120
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Release history Release notifications | RSS feed

1.3.21

2 release files

1.3.18

2 release files

1.3.15

2 release files

1.3.13

2 release files

1.3.12

2 release files

1.3.11

2 release files

This release

1.3.9 This release

2 release files

1.3.8

2 release files

1.3.7

2 release files

1.3.5

2 release files

1.3.4

2 release files

1.3.3

2 release files

1.3.2

2 release files

1.3.0

2 release files

1.2.14

2 release files

1.2.13

2 release files

1.2.12

2 release files

1.2.11

2 release files

1.2.10

2 release files

1.2.9

2 release files

1.2.7

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.11

2 release files

1.1.10

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.10

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.4

1 release file

0.7.5

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.5.20

2 release files

0.5.19

2 release files

0.5.11

2 release files

0.5.9

2 release files

0.5.8

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.2

1 release file

0.3.19

1 release file

0.3.15

1 release file

0.3.13

1 release file

0.3.11

1 release file

0.3.10

1 release file

0.3.6

1 release file

0.3.4

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.11

1 release file

0.2.7

1 release file

0.2.6

1 release file

0.2.4

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.1.15

1 release file

0.1.14

1 release file

0.1.13

1 release file

0.1.7

1 release file

0.1.4

1 release file

0.0.9

1 release file

0.0.8

0.0.7

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page