New neuron model for NRP


Dear NRP users,

I’ve created a new nest-simulator model in C++ and I would like to use this model
in the NRP. Unfortunately, I can’t find any documentation at all how to include a new
neuron model into the NRP. Is there any manual how to do that or could you guide me
through this process? I would also be willing to write the model in python if that’s the only way.
I’ve already created a robot and all the transfer functions needed.
I only need to include the neuron model to finish this project!

Thanks a lot and best regards,
Thorben Schoepe

Neuromorphic Behaving Systems group
Bielefeld University, Germany


Dear Thorben,

Assuming that you have already integrated the model into nest, then you would have to extend the PyNN API to get access to that model. You can find the PyNN documentation here . After you have that you should be able to access the model in nest through PyNN, and the next step would be to extend the Closed-Loop Engine of the NRP to be able to access the model in transfer functions. I think that maybe @ualbanes could give some more insight on the necessary steps.



Dear Thorben,

in order to have your NEST model the NRP, you should first make it accessible from PyNN.
Have a look at the PyNN documentation, what has to be done is to extend the pyNN.standardmodels.StandardCellType class like so:

from pyNN.standardmodels import StandardCellType

class CustomModel(StandardCellType):
    Leaky integrate and fire model with fixed threshold and alpha-function-
    shaped post-synaptic current.

    default_parameters = {
	'v_rest':   -65.0,  # Resting membrane potential in mV.
	'cm':         1.0,  # Capacity of the membrane in nF
	'tau_m':     20.0,  # Membrane time constant in ms.
	'tau_refrac': 0.1,  # Duration of refractory period in ms.
	'tau_syn_E':  0.5,  # Rise time of the excitatory synaptic alpha function in ms.
	'tau_syn_I':  0.5,  # Rise time of the inhibitory synaptic alpha function in ms.
	'i_offset':   0.0,  # Offset current in nA
	'v_reset':  -65.0,  # Reset potential after a spike in mV.
	'v_thresh': -50.0,  # Spike threshold in mV.
    recordable = ['spikes', 'v']
    conductance_based = False
    default_initial_values = {
	'v': -65.0,  # 'v_rest',
	'isyn_exc': 0.0,
	'isyn_inh': 0.0,
    units = {
	'v': 'mV',
	'isyn_exc': 'nA',
	'isyn_inh': 'nA',
	'v_rest': 'mV',
	'cm': 'nF',
	'tau_m': 'ms',
	'tau_refrac': 'ms',
	'tau_syn_E': 'ms',
	'tau_syn_I': 'ms',
	'i_offset': 'nA',
	'v_reset': 'mV',
	'v_thresh': 'mV',

    translations = build_translations(
	('v_rest',     'E_L'),
	('v_reset',    'V_reset'),
	('cm',         'C_m',      1000.0),  # C_m is in pF, cm in nF
	('tau_m',      'tau_m'),
	('tau_refrac', 't_ref'),
	('tau_syn_E',  'tau_syn_ex'),
	('tau_syn_I',  'tau_syn_in'),
	('v_thresh',   'V_th'),
	('i_offset',   'I_e',      1000.0),  # I_e is in pA, i_offset in nA
        # iaf_psc_alpha is the custom NEST Model
    nest_name = {"on_grid": "iaf_psc_alpha", 
                               "off_grid": "iaf_psc_alpha"}
    standard_receptor_type = True

If you need your model only in a PyNN script (as it seems, since you already have your TFs ready), extending StandardCellType it’s enough.

In the case you need to access the model from the TFs or using a new kind of device, you will have to extend the NRP; as suggested by Manos.


Dear Ugo and Manos,

Your suggestions were allready very helpful, thank you both.
Until now I can only use the new model called iaf_psc_exp_semd
by running “(mymodule) Install” in nest. To achieve that, I followed
this manual:

But I don’t know how to permanently link the module into nest.
I tried to find the nest build directory as suggested in the part “Linking MyModule into NEST”
in the manual but I can’t find it for the neurorobotics install. It seems like some files to rebuild nest
are missing. Where should the nest build directory usually be in the NRP?

Thanks a lot for your help and best regards,
Thorben Schoepe


The NRP Nest directory in the $HBP/nest-simulator.

The cmake install prefix is $HOME/.local

To build it run:

cmake_args="-DCMAKE_INSTALL_PREFIX:PATH=${HOME}/.local -Dwith-gsl=ON -Dwith-mpi=ON"
mkdir $HBP/nest-simulator/build && cd $HBP/nest-simulator/build
cmake $cmake_args …
make install


Dear Ugo,

In the nest from source install I use there is already a build directory at $HBP/nest-simulator.
So, I tried to run cmake $cmake_args in there but it complained that there is no CMakeLists.txt
file in the directory. Because of that I moved the CMakeLists.txt file from $HBP into that directory.
BUt I am not sure if that is the correct file. Now I receive the following error when running

Should I do a complete reinstall of the NRP because something is mixed up over here or should
it work quite easily?

Best regards and thank you,

– Host triple: x86_64-pc-linux
– Target triple: x86_64-pc-linux
CMake Error at cmake/ProcessOptions.cmake:375 (message):
Your Cython version is too old. Please install newer version (0.19.2+)
Call Stack (most recent call first):
CMakeLists.txt:148 (nest_process_with_python)

– Configuring incomplete, errors occurred!
See also “/home/neurorobotics/Documents/projects/collision_avoidance/NRP/nest-simulator/build/CMakeFiles/CMakeOutput.log”.
See also “/home/neurorobotics/Documents/projects/collision_avoidance/NRP/nest-simulator/build/CMakeFiles/CMakeError.log”.
Makefile:482: recipe for target ‘cmake_check_build_system’ failed
make: *** [cmake_check_build_system] Error 1


CMakeLists.txt should be in $HBP/nest-simulator so the cmake command is (notice the two dots, indicating the parent directory, as the last parameter):

cmake -DCMAKE_INSTALL_PREFIX:PATH=${HOME}/.local -Dwith-gsl=ON -Dwith-mpi=ON …

Please give a try.


Hi, keep in mind that the cmake command should be invoked from $HBP/nest-simulator/build folder.




Thanks for your great help.
I wil try this out mid of August when I’m back from my holidays.

Best regards,