Skip to main content

A common JSON/YAML based format for compact network specification, closely tied to NeuroML v2

Project description

NeuroMLlite: a common framework for reading/writing/generating network specifications based on NeuroML

Continuous builds PyPI PyPI - Python Version GitHub GitHub pull requests GitHub issues GitHub Org's stars Twitter Follow

NeuroMLlite is in active development. This will evolve into a framework for more portable, concise network specifications which will form an important part of NeuroML v3.

For some more background to this package see here: https://github.com/NeuroML/NetworkShorthand.

Architecture

Examples

The best way to see the currently proposed structure is to look at the examples

Ex. 1: Simple network, 2 populations & projection

Ex1

JSON | Python script

Can be exported to:

  • NeuroML 2 (XML or HDF5 format)
  • Graph (see above)

Ex. 2: Simple network, 2 populations, projection & inputs

Ex2

JSON | Python script | Generated NeuroML2

Can be exported to:

  • NeuroML 2 (XML or HDF5 format)
  • Graph (see above)

Ex. 3: As above, with simulation specification

JSON for network | JSON for simulation | Python script | Generated NeuroML2 | Generated LEMS

Can be exported to:

  • NeuroML 2 (XML or HDF5 format)
  • Graph (see Ex2)

Can be simulated using:

  • NetPyNE
  • jNeuroML
  • NEURON generated from jNeuroML
  • NetPyNE generated from jNeuroML

Ex. 4: A network with PyNN cells & inputs

Ex4

JSON | Python script | Generated NeuroML2

Can be exported to:

  • NeuroML 2 (XML or HDF5 format)
  • Graph (see above)

Can be simulated using:

  • NEST via PyNN
  • NEURON via PyNN
  • Brian via PyNN
  • jNeuroML
  • NEURON generated from jNeuroML
  • NetPyNE generated from jNeuroML

Ex. 5: A network with the Blue Brain Project connectivity data

Ex5

Ex5_1 Ex5_2 Ex5_3

JSON | Python script

Can be exported to:

  • NeuroML 2 (XML or HDF5 format)
  • Graph (see above)
  • Matrix (see above)

Can be simulated using:

  • NetPyNE

Ex. 6: A network based on Potjans and Diesmann 2014 (work in progress)

Ex6d Ex6f Ex6c Ex6matrix

JSON | Python script | Generated NeuroML2

Can be exported to:

  • NeuroML 2 (XML or HDF5 format)
  • Graph (see above)
  • Matrix (see above)

Ex. 7: A network based on Brunel 2000 (work in progress)

Ex7

JSON | Python script | Generated NeuroML2

Can be exported to:

  • NeuroML 2 (XML or HDF5 format)
  • Graph (see above)

Can be simulated using:

  • jNeuroML

Installation & usage

Installation of the basic framework should be fairly straightforward:

git clone https://github.com/NeuroML/NeuroMLlite.git
cd NeuroMLlite
sudo python setup.py install

Then simple examples can be run:

cd examples
python Example1.py  #  Generates the JSON representation of the network (console & save to file)

To generate the NeuroML 2 version of the network, first install pyNeuroML, then use the -nml flag:

sudo pip install pyNeuroML
python Example2.py -nml       # Saves the network structure to a *net.nml XML file

Other options (which will require Neuron, NetPyNE, PyNN, NEST, Brain etc. to be installed) include:

python Example4.py -jnml       # Generate NeuroML2 & LEMS simulation & run using jNeuroML
python Example4.py -jnmlnrn    # Generate NeuroML2 & LEMS simulation, use jNeuroML to generate Neuron code (py/hoc/mod), then run in Neuron
python Example4.py -jnmlnrn    # Generate NeuroML2 & LEMS simulation, use jNeuroML to generate NetPyNE code (py/hoc/mod), then run in NetPyNE
python Example4.py -netpyne    # Generate network in NetPyNE directly & run simulation
python Example4.py -pynnnrn    # Generate network in PyNN, run using simulator Neuron
python Example4.py -pynnnest   # Generate network in PyNN, run using simulator NEST
python Example4.py -pynnbrian  # Generate network in PyNN, run using simulator Brian

Graphs of the network structure can be generated at many levels of detail (1-6) and laid out using GraphViz engines (d - dot (default); c - circo; n - neato; f - fdp). See above images for generated examples.

python Example6.py -graph3d
python Example6.py -graph2f
python Example6.py -graph1n

Other examples

NeuroMLlite is being tested/used in the following repositories on OSB:

See also:

Project details


Download files

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

Source Distribution

neuromllite-0.5.9.tar.gz (88.9 kB view details)

Uploaded Source

Built Distribution

neuromllite-0.5.9-py3-none-any.whl (98.5 kB view details)

Uploaded Python 3

File details

Details for the file neuromllite-0.5.9.tar.gz.

File metadata

  • Download URL: neuromllite-0.5.9.tar.gz
  • Upload date:
  • Size: 88.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for neuromllite-0.5.9.tar.gz
Algorithm Hash digest
SHA256 c60679324661cc4b9eaad14b00cccbaf0208eede1b94096e2664f875820d0dc7
MD5 2eb472f9eb9c90b76d59e1dfe2e5ee2c
BLAKE2b-256 0dc6db260e7757046dc25e1865db1f168666a515634880dca16aeec6b20d1218

See more details on using hashes here.

File details

Details for the file neuromllite-0.5.9-py3-none-any.whl.

File metadata

  • Download URL: neuromllite-0.5.9-py3-none-any.whl
  • Upload date:
  • Size: 98.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for neuromllite-0.5.9-py3-none-any.whl
Algorithm Hash digest
SHA256 8136e18b5ba419b6b8728f4e4366acc962b1d8c2a71baba52abe977df2f7bb6a
MD5 9dca9d820edacb7072234fa1ee736d8f
BLAKE2b-256 49c9159af76ebf7dc698bd98b46f96268e666f0234827f50d1a5fe75db4da547

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page