Image of neuroscience students in a classroom

Tutorials & E-Library

Would you like to learn how to use the tools and services available on EBRAINS? Here, you can find a list of EBRAINS offerings and links to their tutorials.

User Documentation
Level: Advanced

How to use NMODL to extend Arbor’s repertoire of Ion Channels

NMODL is Arbor’s way of expressing ion channel dynamics, which in turn can be added to cable cells via the Cable cell decoration interface. This tutorial will guide you through to create such an ion channel from scratch. Note that there are already large selections of channels built into Arbor in addition to online databases of ready-to-use models. Please check there first and only if you find nothing to use or adapt, try to build your own. If you want to learn how to use ion channels, consider other tutorials first, such as A simple single-cell recipe and the dynamic catalogue example.
User Documentation
Level: Advanced

Randomness in NEURON models– Source code that demonstrates the problem

Save the following to a file called initn.hoc, then use NEURON to execute it. Note the organization of the program, in particular the extensive use of procedures, and how it performs the following tasks in sequence:

• declares important constants (model parameters and simulation parameters)
• loads files that other stuff will depend on
• creates the model itself (just a collection of cells that spike at random times)
• specifies instrumentation (in this case, recording of spike times)
• specifies simulation control
• executes one or more simulations with various model parameters
User Documentation
Level: Advanced

Randomness in NEURON models– The solution

The solution to these problems is to give each NetStim its own random number generator.

"How?" you might very well ask.

By creating an instance of the Random class for every instance of the NetStim class, and using the NetStim class's noiseFromRandom to associate the two. You can probably figure out how to do this on your own if I just point you to a good example, like NEURON/common/netstim.hoc in the source code for entry 83319 from ModelDB http://modeldb.yale.edu/

But for the impatient, here's a quick example.
User Documentation
Level: Advanced

Randomness in NEURON models - How to generate independent random spike streams

There are several ways to generate random spike streams. One is to use a NetStim with its random parameter set to a value in the range 0 < random <= 1 (be sure to read the programmer's reference documentation of the NetStim class to find out what this does).

But what if you need more than one spike stream? Can you just add another NetStim and grind out spike times?

Not if you want your NetStims' streams to be independent of each other. Read on to find out why, and what to do about it.
User Documentation
Level: Advanced

Randomness in NEURON models

There are many potential applications of randomness in modeling. These fall into two broad categories:

Randomization of the model specification
Purpose: to emulate natural biological variation of parameters such as number of cells, connectivity between cells, anatomical and/or biophysical properties of cells and their connections.

Randomization of simulation execution
Purpose: to emulate stochastic phenomena such as single channel gating, transmitter release, afferent spike trains, variation of natural stimuli, extrinsic noise sources.
User Documentation
Level: Advanced

Extracellular signals (LFPykit)

This example takes elements from other tutorials to create a geometrically detailed single cell model from an SWC morphology file, and adds predictions of extracellular potentials using the LFPykit Python library. LFPykit provides a few different classes facilitating calculations of extracellular potentials and related electroencephalography (EEG) and magnetoencephalography (MEG) signals from geometrically detailed neuron models under various assumptions. These are signals that mainly stem from transmembrane currents.

Create an account

EBRAINS is open and free. Sign up now for complete access to our tools and services.