CNrun
-----

1. Overview
2. Usage
3. Repeatability, rng-dependent behaviour


1. Overview

This is a library (libcn) and a CLI (cnrun) tool to simulate neuronal
networks, similar to NEURON and GENESIS except that neurons are
non-compartmentalised, and there is no scripting language.  It is
written by Andrei Zavada <johnhommer@gmail.com> building on the
original work by Thomas Nowotny <tnowotny@sussex.ac.uk>.

CNrun reads network topology description from a NeuroML file (as, for
example, generated by neuroConstruct), where the `cell_type' attribute
determines the unit class.

The following neuron and synapse classes are provided by libcn:

  - HH         : Hodgkin-Huxley by Traub and Miles (1991)
  - HHRate     : Rate-based model of the Hodgkin-Huxley neuron
  - HH2        : Hodgkin-Huxley by Traub & Miles w/ K leakage
  - DotPoisson : Duration-less spike Poisson oscillator
  - Poisson    : Poisson oscillator
  - DotPulse   : Dot Pulse generator
  - NMap       : Map neuron
  - LV         : Lotka-Volterra oscillator
  - Colpitts   : Colpitts oscillator
  - VdPol      : Van der Pol oscillator

  - AB         : Alpha-Beta synapse (Destexhe, Mainen, Sejnowsky, 1994)
  - ABMinus    : Alpha-Beta synapse w/out (1-S) term
  - Rall       : Rall synapse (Rall, 1967)
  - Map        : Map synapse

Scripting support in CNrun includes commands for creating and
populating a model, setting parameters for single units or groups
selected based on regex matching.  Variables (‘a = 1; b = a + 2’) and
arithmetic expressions (‘-’, ‘+’, ‘*’, ‘/’, ‘<’, ‘<=’, ‘>’, ‘>=’,
‘==’, ‘()’) are supported as in C.


2. Installation and prerequisites

As a reasonably complex C++ piece of code, CNRun has many a loop with
iterators.  Since gcc 4.4.4, the keyword auto has come as a great
relief in this regard; versions of gcc prior to 4.4.4, therefore, will
not compile CNRun.

Cnrun depends on libreadline, libgsl, libxml2, boost, whichever
version is current at the time of release.


3. Repeatability, rng-based behaviour

Using rng facilities of the GNU Scientific Library, cnrun has the
ability to specify the gsl rng type and set the seed via the
environment variables GSL_RNG_TYPE and GSL_RNG_SEED, in which case
reproducibility of CNrun results is guaranteed (as per gsl's statement
that the generated series will).

If you don't bother setting those env vars, seeding will be done with
the current time (specifically, field .tv_usec of a struct timeval
after a call to gettimeofday()).



If you are interested in using libcn for your own projects, look at
doc/example.cc, and perhaps at src/hh-latency-estimator.cc
(all the code is there, and it's yours :).

