NESTML Server

nestml

NESTML is a domain-specific language for neuron and synapse models. These dynamical models can be used in simulations of brain activity on several platforms, in particular the NEST Simulator.

NESTML combines: - Concise yet expressive syntax inspired by Python. Easy to write and understand. Precise and unambiguous. - Direct language support for (spike) events, differential equations, convolutions, stochasticity, and arbitrary algorithms using imperative programming concepts. - Generated code approaches runtime and memory efficiency of hand-coded models.

Info

We tested nestml and nestml-server with Python 3.11.

See also

Read the full installation guide of NESTML here.

The API Server for NESTML is referred to as NESTML Server.

Note

NEST has to find custom, NESTML-compiled models. Before you start nest-server, you have to set module path for environment variable in bash:

export NESTML_MODULE_PATH=/tmp/nestmlmodules
nest-server start

Conda

  1. Activate the Conda environment nest:

    conda activate nest
    
  2. Install NESTML:

    conda install nestml
    
  3. Install NESTML Server:

    python3 -m pip install nestml-server@git+https://github.com/babsey/nestml-server@v1.0
    
  4. Start NESTML Server as backend:

    nestml-server start
    

NESTML Server is now running at http://localhost:52426.

Note

NEST has to find custom, NESTML-compiled models. Before you start nest-server, you have to set module path for environment variable in bash:

conda activate nest
conda env config vars set NESTML_MODULE_PATH=/tmp/nestmlmodules

Python

  1. Install NESTML and dependencies for the NESTML Server:

    python3 -m pip install nestml flask flask-cors gunicorn
    
  2. Install NESTML Server:

    python3 -m pip install nestml-server@git+https://github.com/babsey/nestml-server@v1.0
    
  3. Start NESTML Server as the back end:

    nestml-server start
    

NEST Server is now running at http://localhost:52426.