PyNEST implementation
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 one of the following methods:
-
Install the package directly from PyPI:
pip install microcircuit
Optionally, you may want to install additional dependencies by using extra flags:
Option Flag runtime testing testdevelopment tools devdocumentation build tools docExample:
pip install microcircuit[dev,doc]
-
Clone the repository and install the python package from the local sources:
git clone https://github.com/inm-6/microcircuit-PD14-model pip install microcircuit-PD14-model/PyNEST
-
Install the package from the repository without cloning the entire repository:
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
To enable testing, make sure that the microcircuit package is installed with testing dependencies:
pip install microcircuit[test]
Executing
pytest
in the root directory of the repository microcircuit-PD14-model runs the 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 example 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
Terhorst et al. (2025). NEST 3.9. Zenodo. doi:10.5281/zenodo.17036827
License
This project is licensed under GNU General Public License v2.0 or later. For details, see here.
Metadata
Release files for microcircuit 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| microcircuit-1.0.tar.gz | 36.0 kB | Without provenance | Details for microcircuit-1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| microcircuit-1.0-py3-none-any.whl | Python 3 | none | any | Details for microcircuit-1.0-py3-none-any.whl |
Total release size: 75.6 kB
Release files / microcircuit-1.0.tar.gz
| Download URL | microcircuit-1.0.tar.gz |
|---|---|
| Size | 36.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6383d2bfde149dceeaf7886a96656bfc7e2a3a848ba39a0744427010b32561fa
|
|
BLAKE2b-256 checksum How to use checksums |
642ad23f05d9d1b34ab7b0cea2a72d8e1e1f273c56b2e31b2e6d987ff49aa52f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / microcircuit-1.0-py3-none-any.whl
| Download URL | microcircuit-1.0-py3-none-any.whl |
|---|---|
| Size | 39.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b823b12e2dfcbbf4510db79bb12ef4ab04f62062f773e9dded5925cb192cf16
|
|
BLAKE2b-256 checksum How to use checksums |
42d78b00038ae7b99fa024faa3b4d9e255ea403e8e33c7e3f6661f5ab79b06be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for microcircuit 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.