Multi-area layer-resolved spiking network model of resting-state dynamics in macaque visual cortex

 Download zip file 
Help downloading and running models
See for any updates.
1 . Schmidt M, Bakker R, Shen K, Bezgin G, Diesmann M, van Albada SJ (2018) A multi-scale layer-resolved spiking network model of resting-state dynamics in macaque visual cortical areas. PLoS Comput Biol 14:e1006359 [PubMed]
2 . Schmidt M, Bakker R, Hilgetag CC, Diesmann M, van Albada SJ (2018) Multi-scale account of the network structure of macaque visual cortex. Brain Struct Funct 223:1409-1435 [PubMed]
3 . Schuecker J, Schmidt M, van Albada SJ, Diesmann M, Helias M (2017) Fundamental Activity Constraints Lead to Specific Interpretations of the Connectome. PLoS Comput Biol 13:e1005179 [PubMed]
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network; Connectionist Network;
Brain Region(s)/Organism: Neocortex;
Cell Type(s): Abstract integrate-and-fire leaky neuron with exponential post-synaptic current;
Gap Junctions:
Simulation Environment: NEST;
Model Concept(s): Spatio-temporal Activity Patterns; Activity Patterns; Connectivity matrix; Synchronization; Multiscale;
Implementer(s): Schmidt, Maximilian [schmidt.maximilian at]; Schuecker, Jannis ; van Albada, Sacha Jennifer [s.van.albada at];
import json
import os
import shutil

from config import base_path, data_path
from multiarea_model.default_params import nested_update, sim_params
    from multiarea_model.sumatra_helpers import register_record
    sumatra_found = True
except ImportError:
    sumatra_found = False

def start_job(label, submit_cmd, jobscript_template, sumatra=False, reason=None, tag=None):
    Start job on a compute cluster.


    label : str
        Simulation label identifying the simulation to be run.
        The function loads all necessary files from the subfolder
        identified by the label.
    submit_cmd : str
        Submit command of the queueing system used.
    jobscript_template : formatted str
        Formatted string defining the template for the job script.
        Can include the following keyword arguments:
            sim_dir : str
                Directory of the simulation
            label : str
                Simulation label
            num_processes : int
                Total number of MPI processes, defined in sim_params
            local_num_threads : int
                Number of OpenMP threads per MPI process, defined in sim_params
            base_path : str
                Base path of the library defined in

    # Copy run_simulation script to simulation folder
    shutil.copy2(os.path.join(base_path, ''),
                 os.path.join(data_path, label))

    # Load simulation parameters
    fn = os.path.join(data_path,
    with open(fn, 'r') as f:
        custom_params = json.load(f)
    nested_update(sim_params, custom_params['sim_params'])

    # Copy custom param file for each MPI process
    for i in range(sim_params['num_processes']):
        shutil.copy(fn, '_'.join((fn, str(i))))
    # Collect relevant arguments for job script
    num_vp = sim_params['num_processes'] * sim_params[
    d = {'label': label,
         'network_label': custom_params['network_label'],
         'base_path': base_path,
         'sim_dir': os.path.join(data_path, label),
         'local_num_threads': sim_params['local_num_threads'],
         'num_processes': sim_params['num_processes'],
         'num_vp': num_vp}

    # Write job script
    job_script_fn = os.path.join(data_path,
                                           '.'.join((label, 'sh')))))
    with open(job_script_fn, 'w') as f:

    # If chosen, register simulation to sumatra
    if sumatra:
        if sumatra_found:
            register_record(label, reason=reason, tag=tag)
            raise ImportWarning('Sumatra is not installed, so'
                                'cannot register simulation record.')

    # Submit job
    os.system('{submit_cmd} {job_script_fn}'.format(submit_cmd=submit_cmd,

Loading data, please wait...