JavaScript is required to consult this page

Build, simulate, and analyze data-driven multiscale brain circuit models


NetPyNE provides programmatic and graphical interfaces to develop data-driven multiscale brain neural circuit models using Python and NEURON. Users can define models using a standardised JSON-compatible, rule-based, declarative format Based on these specifications, NetPyNE will generate the network in NEURON, enabling users to run parallel simulations, optimize and explore network parameters through automated batch runs, and use built-in functions for visualization and analysis (e.g.,generate connectivity matrices, voltage traces, spike raster plots, local field potentials, and information theoretic measures). NetPyNE also facilitates model sharing by exporting and importing standardized formats: NeuroML and SONATA.


Get started: Dive into modeling with NetPyNE

To get a hands-on start with NetPyNE, a graphical user interface (GUI) makes it simple to develop complex simulations without programming experience.

NetPyNE GUI
NetPyNE GUI showing the 3D representation of a small network, their connectivity matrix, voltage and current traces, spiking raster plot, local field potential (LFP) time series and spectrogram, and extracellular calcium concentration

How to use NetPyNE on EBRAINS

We provide EBRAINS specific tutorials on building simple, oscillatory and multiscale networks with reaction-difussion (RxD), importing existing cell models, analysis and plotting of network and simulation results, running batch parameter explorations.

NetPyNE Tutorial Example
NetPyNE tutorial example running on EBRAINS Jupyter Lab

We also make available example motor cortex (M1) and hippocampal CA3 network models. Tutorials can be cloned into a Collab and executed interactively via JupyterLab.

Overview of NetPyNE Components and Workflow

NetPyNE provides a programmatic and graphical interface for the creation, parallel simulation, optimisation, and analysis of data-driven, biophysically detailed multiscale network models in NEURON. This makes multiscale modeling accessible to a wider community, including students and experimentalists; and facilitates and accelerates the workflow of experienced modelers.

Overview of NetPyNE Components
Overview of NetPyNE components, workflow and interaction with other tools and standards

NetPyNE and the NetPyNE GUI are available via the EBRAINS platform and the Open Source Brain platform. NetPyNE has also been integrated or interfaced with multiple tools in the community including The Virtual Brain (TVB), the Neuroscience Gateway (NSG), Human Neocortical Neurosolver (HNN), SciUnit/SciDash, LFPy and coreNEURON.

Build, simulate, optimise, visualise and analyse models

Build, simulate and optimise

  • Define models using declarative, standardized, rule-based, high-level language (programmatic or via GUI)
  • Automatically convert high-level biological specifications to a NEURON network (preventing coding errors and inefficiencies risked with manual implementation)
  • Include multiple scales from intra- and extra-cellular molecular reaction-diffusion (RxD) to network level
  • Import existing cell models from hoc, Python, NeuroML, and SONATA
  • Specify complex connectivity and stimulation patterns at the population, cell, and dendritic level
  • Generate a network instance as a Python hierarchical structure with all required NEURON objects
  • Easily set up and run parallel simulations, including distributing cells and gathering data from computing nodes
  • Run automated parameter explorations/optimizations via grid search or evolutionary algorithms, including simulation submission and management on different environments (local MPI, HPC Slurm/Torque, Neuroscience Gateway)
NetPyNE
NetPyNE's internal network representation (top) and simulated recordings (bottom) across multiple scales

Visualise and analyse

  • Visualize and analyse your model using built-in functions: connectivity, voltage/current traces, molecular concentrations, spike raster plot, firing statistics, information theoretic analysis, etc.
  • Position virtual LFP recording electrodes at any arbitrary 3D locations and generate LFP and CSD plots
  • Realistic simulation of current dipoles and EEG signals using LFPykit tool
  • Load/save from/to common formats (JSON, Pickle, Matlab) and import/export from/to widely-used standards (NeuroML and SONATA)
  • Use the web-based GUI to build, run and analyse models, and import/export the model from/to Python scripts

Example models: See NetPyNE in action

There are 20+ example models available to explore in our GitHub repository and 90+ user-developed models. These include NetPyNE models of many different brain regions (e.g. cortex, thalamus, hippocampus, cerebellum), disease (e.g. ischemia, epilepsy, schizophrenia) and other phenomena (e.g. oscillatory coding, sensorimotor learning, memory retrieval, TMS/tDCS stimulation) [5,6].

NetPyNE Model
NetPyNE model of the somatosensory cortical and thalamic circuits. A) 3D network representation (5% of cells) with recording electrode locations, B) spike raster plot, C) neuron voltage traces, D) LFP time series E) LFP power spectral density

Below we provide further details of large-scale thalamocortical models built using NetPyNE. A list of publications making use of NetPyNE is also available.

Motor, somatosensory and auditory thalamocortical circuit models

We used NetPyNE to build and simulate large-scale and biologically realistic models of rodent motor (M1), rodent somatosensory (S1), and macaque auditory (A1) thalamocortical circuits. Each model simulates a cortical column and corresponding thalamic circuits and contains in the order of ~15k detailed neurons ~30M synapses.

NetPyNE
NetPyNE model of the motor cortex circuits. A) Approximate anatomical location of simulated region and 3D visualization of M1 network, B) neuron classes, C) M1 column dimensions, cell densities and populations, D) excitatory connectivity

The model neuronal densities, classes, morphology, biophysics, and connectivity were derived from experimental data. The rodent M1 and S1 models are being used to study neural coding and learning in corticothalamic circuits of the sensorimotor pathway. The macaque A1 model is being used to explore oscillatory mechanisms in the context of speech processing and related disorders. The models may help better understand a variety of diseases, including schizophrenia, Alzherimer’s disease, epilepsy, and motor disorders. See References.

Potjans & Diesmann cortical microcircuit model

The Potjans-Diesmann cortical microcircuit model is a widely used model originally implemented in NEST. It is a full-scale spiking network model of 1 mm² of cortex, comprising four cortical layers, each containing an excitatory and an inhibitory population, with close to 80,000 point neurons.

NetPyNE
NetPyNE implementation of the Potjans & Diesmann thalamocortical model. A) Point neuron 2D locations, B) spike raster plot, C) 3D representation of version with multicompartment neurons, d) recorded LFPs, e) LFP current source density analysis

We reimplemented the model using NetPyNE and reproduced the findings of the original publication. We also implemented a method for scaling the network size that preserves firing rates and other statistics. Our new implementation enabled the use of more detailed neuron models with multicompartmental morphologies and multiple biophysically realistic ion channels. This opens the model to new research, including the study of dendritic processing, the influence of individual channel parameters, the relation to local field potentials (LFPs), and other multiscale interactions.

Get involved in the NetPyNE community

NetPyNE was first released in 2016 and since then has enjoyed a rapidly growing community of users and developers.

NetPyNE Community
NetPyNE tutorial at the Computational for Neuroscience (CNS) meeting in Barcelona, Spain, 2019

Users and developers can interact via Github, the NetPyNE mailing list, two Q&A forums, and regular workshops and courses organised every year. The project is open-source and welcomes contributions: from bug reports and feature requests to actual code improvements (see our contributors guide for more information), and sharing of your models and success stories.

Funding

NetPyNE is funded by the National Institutes of Health (NIH), National Institutes of Biomedical Imaging and Bioengineering (NIBIB), the National Science Foundation (NSF), and by the Human Brain Project.

Related publications

[1] Dura-Bernal S, Suter B, Gleeson P, Cantarelli M, Quintana A, Rodriguez F, Kedziora DJ, Chadderdon GL, Kerr CC, Neymotin SA, McDougal R, Hines M, Shepherd GMG, Lytton WW. NetPyNE: a tool for data-driven multiscale modeling of brain circuits. eLife 2019;8:e44494, 2019.

[2] Lytton WW, Seidenstein AH, Dura-Bernal S, McDougal RA, Schurmann F, Hines ML. Simulation neurotechnologies for advancing brain research: Parallelizing large networks in NEURON. Neural Computation, 2016.

[3] Gleeson P, Cantarelli M, Quintana A, Earnsah M, Piasini E, Birgiolas J, Cannon RC, Cayco- Gajic A, Crook S, Davison AP, Dura-Bernal S, et al. Open Source Brain: a collaborative resource for visualizing, analyzing, simulating and developing standardized models of neurons and circuits. Neuron, 10.1016/j.neuron.2019.05.019. 2019.

[4] Dai K, Hernando J, Billeh JN, Gratiy SL, Planas J, Davison AP, Dura-Bernal S, Gleeson P, Devresse A, Gevaert M, King JG, Van Geit WAH, Povolotsky AV, Muller E, Courcol J-D, Arkhipov A. The SONATA Data Format for Efficient Description of Large-Scale Network Models. PLOS Computational Biology 16(2): e1007696. 2019.

[5] Metzner, C., Mäki-Marttunen, T., Karni, G. et al. The effect of alterations of schizophrenia-associated genes on gamma band oscillations. Schizophr 8, 46 (2022). https://doi.org/10.1038/s41537-022-00255-7

[6] Medlock L, Sekiguchi K, Hong S, Dura-Bernal S, Lytton WW, Prescott SA. Journal of Neuroscience, 13 April 2022, 42 (15) 3133-3149; DOI: https://doi.org/10.1523/JNEUROSCI.1199-21.2022

[7] Dura-Bernal S, Neymotin SA, Suter BA, Dacre J, Moreira JVS, Urdapilleta E, Schiemann J, Duguid I, Shepherd GMG, Lytton WW. (2023) Multiscale model of primary motor cortex circuits reproduces in vivo cell type-specific dynamics associated with behavior. Cell Reports 2023 Jun 8;42(6):112574[PDF]

[8] Dura-Bernal S, Griffith EY, Barczak A, O’Connell MN, McGinnis T, Schroeder C, Lytton WW, Lakatos P, Neymotin SA. Data-driven multiscale model of macaque auditory thalamocortical circuits reproduces in vivo dynamics. BioRxiv 2022.02.03.479036; doi: https://doi.org/10.1101/2022.02.03.479036. 2022.

[9] Borges F, Moreira J, Takarabe LM, Lytton WW, Dura-Bernal S. (2022) Large-scale biophysically detailed model of somatosensory thalamocortical circuits in NetPyNE. Frontiers in Neuroinformatics doi: 10.3389/fninf.2022.884245

[10] Sivagnanam S, Gorman W, Doherty D, Neymotin S, Hovhannisyan H, Fang S, Lytton W, Dura-Bernal S. (2020) Simulating large-scale models of brain neuronal circuits using Google Cloud Platform. Practice and Experience in Advanced Research Computing, PEARC2020.

[11] Romaro C, Najman F, WW Lytton, Roque AC, Dura-Bernal S (2021) NetPyNE implementation and rescaling of the Potjans-Diesmann cortical microcircuit model. Neural Computation, 33 (7): 1993–2032.

Other software

All software

NetPyNE GUI

The UI splits the workflows in two tabs available at the top of the screen: define your network and create network. The NetPyNE GUI is implemented on top of Geppetto, an open-source platform that provides the infrastructure for building tools for visualizing neuroscience models and data and for managing simulations in a highly accessible way. The GUI is defined using JavaScript, React and HTML5. This offers a flexible and intuitive way to create advanced layouts while still enabling each of the elements of the interface to be synchronized with the Python model. The interactive Python backend is implemented as a Jupyter Notebook extension which provides direct communication with the Python kernel. This makes it possible to synchronize the data model underlying the GUI with a custom Python-based NetPyNE model. This functionality is at the heart of the GUI and means any change made to the NetPyNE model in the Python kernel is immediately reflected in the GUI and vice versa. The tool’s GUI is available at https://github.com/Neurosim-lab/NetPyNE-UI and is under active development.

Modelling and simulationCellular level simulation

Make the most out of EBRAINS

EBRAINS is open and free. Sign up now for complete access to our tools and services.

Ready to get started?Create your account