Skip to main content

PyNEST implementation of the cortical microcircuit model of Potjans & Diesmann (2014).

Project description

PyNEST implementation

www.python.org NEST simulated

Installing the python package microcircuit

The PyNEST implementation of the model is provided in the form of a python package microcircuit.

We recommend installing the python package inside a python environment:

  • Create a python environment
    python -m venv venv
    
  • Activate the python environment:
    source venv/bin/activate
    
  • Update pip:
    pip install -U pip
    

The microcircuit python package can be installed by

git clone https://github.com/inm-6/microcircuit-PD14-model
pip install microcircuit-PD14-model/PyNEST

or, without cloning the entire repository, by

pip install "git+https://github.com/INM-6/microcircuit-PD14-model.git/#egg=microcircuit&subdirectory=PyNEST"

Software requirements

  • NEST (see NEST installation)

    We recommend installing NEST locally within the virtual environment:

    git clone https://github.com/nest/nest-simulator
    ## for a specific <VERSION> (e.g. <VERSION>=v3.9), use
    ## git clone --depth 1 --branch <VERSION> https://github.com/nest/nest-simulator
    cd nest-simulator
    mkdir build
    cd build
    pip install -r ../requirements_pynest.txt
    cmake ..
    make
    make install
    
  • Python 3.x

  • docopt-ng, matplotlib, numpy, psutil, ruamel.yaml, scipy (handled by python package dependencies)

Testing

Executing

pytest

runs the unit test(s) in microcircuit-PD14-model/PyNEST/tests.

Usage

After installation, the microcircuit python package can be imported in a python application using

import microcircuit

See this examples for a more detailed illustrations of how the package can be used.

Memory requirements

scaling factor (= N_scaling = K_scaling) Memory
0.1 (default) 490 MB
0.2 1200 MB
0.5 4400 MB
1 14 GB

Performance benchmarking

Recent performance benchmarking results for the microcircuit model can be found here.

Implementation details

This implementation uses the iaf_psc_exp neuron and the static_synapse synapse models provided in [NEST]. The network is connected according to the fixed_total_number connection rule in NEST. The neuron dynamics is integrated in a time-driven manner using exact integration with a simulation step size sim_resolution (Rotter & Diesmann, 1999).

The PyNEST implementation runs with NEST 3.9 (Terhorst et al., 2025).

Simulation parameters (defaults)

Name Value Description
sim_resolution 0.1 ms simulation time resolution (duration of one simulation step)
t_presim 500 ms duration of pre-simulation phase (warm-up)
t_sim 1000 ms duration of simulation phase
rec_dev spike_recorder recording device

References

Rotter & Diesmann (1999), Exact digital simulation of time-invariant linear systems with applications to neuronal modeling. Biological Cybernetics 81(5-6):381-402. doi:10.1007/s004220050570

Terhorst et al. (2025). NEST 3.9. Zenodo. doi:10.5281/zenodo.17036827

License

License: GPL v2

This project is licensed under GNU General Public License v2.0 or later. For details, see here.

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

microcircuit-0.1rc2.tar.gz (35.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

microcircuit-0.1rc2-py3-none-any.whl (39.4 kB view details)

Uploaded Python 3

File details

Details for the file microcircuit-0.1rc2.tar.gz.

File metadata

  • Download URL: microcircuit-0.1rc2.tar.gz
  • Upload date:
  • Size: 35.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for microcircuit-0.1rc2.tar.gz
Algorithm Hash digest
SHA256 f436b64d0e40033404dda62745ae58ccb3d6d81d92cf912543a700b45e1255f3
MD5 a4fac9a492b83d4954b769ffffb96245
BLAKE2b-256 dc3d186a8fddc0fc08ff1c2d496afb3ba9b29fa70898da44421996fd53d59585

See more details on using hashes here.

File details

Details for the file microcircuit-0.1rc2-py3-none-any.whl.

File metadata

  • Download URL: microcircuit-0.1rc2-py3-none-any.whl
  • Upload date:
  • Size: 39.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for microcircuit-0.1rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 1e3843a1022b896301b4e1250fe7468fc43666f14641c19f5b8fe89867a0addb
MD5 10a464369cb47ba80362828df4ef29d4
BLAKE2b-256 b9ac29d20a64a9d059027013180d13ac25b46df3340ce5faf1cfc678df45e288

See more details on using hashes here.

Supported by

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