Simple Examples

How to run these examples

Single-compartment multiscale model


This example builds a simple multiscale model involving electrical and chemical signaling, but without spatial dimensions. The electrical cell model is in a single compartment and has voltage-gated channels, including a voltage-gated Ca channel for Ca influx, and a K_A channel which is regulated by the chemical pathways.

The chemical model has calcium activating Calmodulin which activates CaM-Kinase II. The kinase phosphorylates the K_A channel to inactivate it.

The net effect of the multiscale activity is a positive feedback loop where activity increases Ca, which activates the kinase, which reduces K_A, leading to increased excitability of the cell.

In this example this results in a bistable neuron. In the resting state the cell does not fire, but if it is activated by a current pulse the cell will continue to fire even after the current is turned off. Application of an inhibitory current restores the cell to its silent state.

Both the electrical and chemical models are loaded in from model description files, and these files could be replaced if one wished to define different models. However, there are model-specific Adaptor objects needed to map activity between the models of the two kinds. The Adaptors connect specific model entities between the two models. Here one Adaptor connects the electrical Ca_conc object to the chemical Ca pool. The other Adaptor connects the chemical pool representing the K_A channel to its conductance term in the electrical model.

Multi compartment Single Neuron Model

multiComptSigNeur.createSpine(parentCompt, parentObj, index, frac, length, dia, theta)[source]

Create spine of specified dimensions and index


Create a single compartment squid model.


A toy compartmental neuronal + chemical model. The neuronal model is in a dendrite and five dendritic spines. The chemical model is in three compartments: one for the dendrite, one for the spine head, and one for the postsynaptic density.

However, the spatial geometry of the neuronal model is ignored and the chemical model just has three cubic volumes for each compartment. So there is a functional mapping but spatial considerations are lost. The electrical model contributes the incoming calcium flux to the chemical model. This comes from the synaptic channels.

The signalling here does two things to the electrical model. - First, the amount of receptor in the chemical model controls the amount of glutamate receptor in the PSD. - Second, there is a small kinase reaction that phosphorylates and inactivates the dendritic potassium channel.

Modeling chemical reactions in neurons


This example illustrates how to define a kinetic model embedded in the branching pseudo-1-dimensional geometry of a neuron. The model oscillates in space and time due to a Turing-like reaction-diffusion mechanism present in all compartments. For the sake of this demo, the initial conditions are set up slightly different on the PSD compartments, so as to break the symmetry and initiate oscillations in the spines. This example uses an external electrical model file with basal dendrite and three branches on the apical dendrite. One of those branches has a dozen or so spines. In this example we build an identical model in each compartment, using the makeChemModel function. One could readily define a system with distinct reactions in each compartment. The model is set up to run using the Ksolve for integration and the Dsolve for handling diffusion. The display has four parts:

  1. animated line plot of concentration against main compartment#.
  2. animated line plot of concentration against spine compartment#.
  3. animated line plot of concentration against psd compartment#.
  4. time-series plot that appears after the simulation has ended. The plot is for the last (rightmost) compartment.

This function setus up a simple oscillatory chemical system within the script. The reaction system is:

s ---a---> a  // s goes to a, catalyzed by a.
s ---a---> b  // s goes to b, catalyzed by a.
a ---b---> s  // a goes to s, catalyzed by b.
b -------> s  // b is degraded irreversibly to s.

in sum, a has a positive feedback onto itself and also forms b. b has a negative feedback onto a. Finally, the diffusion constant for a is 1/10 that of b.