Skip to content

Latest commit

 

History

History
71 lines (58 loc) · 4.57 KB

HOWTO.md

File metadata and controls

71 lines (58 loc) · 4.57 KB

How to Create and Simulate a Model

Introduction

This USER GUIDE will help you to understand the concept of this project and finally give you step-by-step instructions how to create, run model and analyse results, using this project.

Model description file

The model are totally defined in model description file, which has standard configuration format with Python expansion. The basic syntax of model description file allows you define set on stimuli for model activation, population of neurons, connections between populations, simulation parameters and results analyze.

Main stages of modeling process

There are three stages of each simulation which are

  • Preprocessing aka preset
  • Simulation
  • Indexing and Analyze aka postset https://storage.r-a-r.org/index.php/apps/files_sharing/publicpreview/kLkn4WWL6X9ABWb?x=1920&y=629&a=true&file=three-steps-procedure.jpg&scalingup=0

Let look at each stage separately.

Preprocessing (preset)

Fro preprocessing script may be run both under Python or NEURON environment. To lunch script with python you should run following command to prepare the model to Run Locally

$python (path to mainmodel.py) --no-run

or fallowing command to prepare model to Run through NSG portal

$python (path to mainmodel.py) --preset-only

Same commands with NEURON environment:

$nrngui -nogui -python -isatty (path to mainmodel.py) --no-run 
# OR to prepare for NSG portal:
$nrngui -nogui -python -isatty (path to mainmodel.py) --preset-only

In this stage:

  1. The script creates stimuli to activate model based on STIMULI section of model description file. The project uses Python wrapper for Zilany, M. S. A. and Carney, L.H. 2010 auditory nerve model to generate spike trains of auditory nerve fibers. The result files for each stimulus has simple format which may be read by check-pkl script;
  2. Then it reads POPULATIONS, SYNAPSES, CONNECTIONS and RECORD sections and creates network file. The name of network file is defined by networkfilename option in GENERAL section of model description file.
  3. Finally, it copies NEURON mod files into root directory and if it runs Locally call nrnivmodl (or any other compiler which may be defined by --mod-compiler= command line key) to compile them.

Simulation

In this stage script should be run ONLY under NEURON environment.

$[mpyrun -hosts=... -n=...] nrngui -nogui -python -isatty [-mpi] (path to mainmodel.py)

The NEURON may be run in parallel environment, i.e. MPI, and each thread or each MPI instance performs next actions:

  1. Reads network file and creates cell which should be hosted at this particular node.
  2. Creates synapses and connects these synapses to the source with global ID
  3. Sets up recorders
  4. > Loads stimulus and activates input elements
  5. > Runs the simulation
  6. > Saves result of simulation into a file
  7. Repeats steps 4, 5 and 6 for all stimuli

Analyze

This stage may be done under both Python and NEURON environment. To get a graphs and statistic launch the script with three extra keys.

$python (path to mainmodel.py) --no-run --graphs --stat

In this stage:

  1. The script collects and indexes all files for all stimuli. It may be process separately if script is lunched with '--no-run --collect' command line keys only.
  2. If it is launched with '--graphs' key, it reads GRAPHS section and shows graphs in screen or/and save into a file(s).
  3. If it is launched with '--stat' key, it reads STAT section and prints the results of statistic analyses to the standard output console as well as to csv file

Stages and key diagrame

https://storage.r-a-r.org/index.php/apps/files_sharing/publicpreview/4JAbgw2fY3BS99b?x=1920&y=629&a=true&file=stages-and-keys.jpg&scalingup=0

< Previous Home NEXT> Model configuration file