2. Running Snudda - Hjorthmedh/Snudda GitHub Wiki

For install of Snudda, please see the User Installation.

There are a set of Jupyter Notebooks with examples for how to run Snudda using Python.

You can also run Snudda using the command line. Here we are assuming that you run the code from the snudda folder. The size specifies the number of neurons in the Striatal network. There are more options, which you can read about using snudda -h. The directory that you are in when you run init will set up all the relative paths, so all the other commands should be issued from the same directory.

snudda init networks/mynetwork --size 1000
snudda place networks/mynetwork
snudda detect networks/mynetwork
snudda prune networks/mynetwork

This creates a network, you then need to generate input and then run the simulation. In order to generate the network you need an input configuration file. You can find examples of them in the data/config directory. In the example below we assume that you have copied of of those into your networks/mynetwork folder, and renamed it to input.json

snudda input networks/mynetwork 
snudda simulate networks/mynetwork

To do the previous steps in parallel (see examples/runSnuddaSmall.sh), you need to do the following:

export IPYTHONDIR="`pwd`/.ipython"
export IPYTHON_PROFILE=Snudda_LOCAL

ipcluster start -n 4 --profile=$IPYTHON_PROFILE --ip=127.0.0.1&
sleep 20
simName=networks/mynetwork
snudda init $simName --size 20000 --overwrite
snudda place $simName --parallel
snudda detect $simName --parallel
snudda prune $simName --parallel

cp -a data/input_config/input-tinytest-v9-freq-vectors.json $simName/input.json
snudda input $simName --input $simName/input.json --parallel
ipcluster stop
mpiexec -n 6 snudda simulate $simName

The overwrite option tells Snudda that you do not mind overwriting an old network that is in the networks/mynetwork directory. The parallel option tells Snudda to try and run in parallel, this requires that you have started ipcluster. The input config files are continuously under development, so check to see what the latest version of the input config file is. To run the NEURON simulation in parallel you have to use mpiexec (or similar).