Investigating the
biophysical basis of computation
& the computational basis of pain

new computercode-banner

Code for models

In the spirit of sharing our computer models, we put relevant files on this page. The page is not yet complete, i.e. not all models are included here, but we're working on it.

All of our simulations are performed in either XPPAUT (download here) or NEURON (download here). For a much larger database of models, be sure to visit ModelDB (some of our models are already included there).


XPP Code for Prescott SA, De Koninck Y, Sejnowski TJ (2008)
Biophysical Basis for Three Distinct Dynamical Mechanisms of Action Potential Initiation. PLoS Comput. Biol. 4(10): e1000198.

These models demonstrate how action potentials can be generated through different dynamical mechanisms depending on the direction and magnitude of subthreshold current. We start with a two-dimensional Morris-Lecar-type model. Varying parameter Beta_w causes this model to exhibit class 1, 2, or 3 excitability according to Hodgkin’s 1948 classification (see Figure 1 in paper). In this, the simplest model, dynamical systems analysis shows that each class is associated with a different spike initiating mechanism (see Figure 2 in paper). Try varying Beta_w to see how it affects dynamics visualized on the V-w plane. To increase the biological realism of the model, we split the recovery variable (w) into two parts (y and z) which each control slightly different currents (see Figure 4 in paper). Try varying gsub and Vsub. Noise is not included in these models but can be added by following the notes included in the code. The code contains numerous other comments that will help explain the model.

For more information about XPP, visit the XPP page on scholarpedia or Bard Ermentrout's website.

zip-filedownload zip file


XPP Code for Prescott SA, Ratté S, De Koninck Y, Sejnowski TJ (2008)
Pyramidal neurons switch from integrators in vitro to resonators under in vivo-like conditions. J. Neurophysiol. 100: 3030-3042.

The Morris-Lecar-type model included here shows how spike initiating dynamics can be influenced by external factors like the level of background synaptic input. High levels of synaptic input cause shunting (i.e. increased membrane conductance) and tonic depolarization which can cause activation/inactivation of voltage-sensitive currents. In this study, we show that shunting and/or tonic depolarization can convert a neuron exhibiting class 1 excitability (spike initiation through a saddle-node on invariant circle bifurcation) to class 2 excitability (spike initiation through a subcritical Hopf bifurcation). One importance consequence is that class 2 neurons can oscillate/resonate whereas class 1 neurons cannot.

In the first model, ML(noNainactivation).ode, there is no sodium channel inactivation. Try varying gshunt and/or gM to add/remove shunting and adaptation from the model. Be sure to include small-amplitude noise (sigma>0) in order to see noise-induced oscillations.

In the second model, ML(withNainactivation).ode, sodium channel inactivation is included. Strength of inactivation is controlled by alpha_h; set alpha_h to 1 to turn off this mechanism. In this model, other parameters have been adjusted to correspond to those described in Figure 9B of the paper.

The main idea is that shunting and/or tonic depolarization (causing inactivation of sodium channels or activation of M channels) will lead to depolarizing shift in voltage threshold. Shifting threshold influences how strongly certain currents will activate at voltages just below threshold. Increased subthreshold activation of the delayed-rectifier potassium current can lead to high-frequency oscillations. Increased subtheshold activation of the M-type potassium current can lead to theta-frequency oscillations. An important conclusion of this study is that although M-type potassium current is present in CA1 pyramidal neurons, that current may not be strongly activated at subthrehsold potentials under in vitro conditions whereas it would more strongly activated under in vivo conditions because of the shift in threshold caused by background synaptic input. The resulting shift in balance of inward and outward currents near threshold can qualitatively change the spike initiating mechanism, with important consequences for the integrative properties of the neuron. The code contains numerous comments that help explain the model.

For more information about XPP, visit the XPP page on scholarpedia or Bard Ermentrout's website.

zip-filedownload zip file


XPP Code for Ratté S and Prescott SA (2011)
ClC-2 channels regulate neuronal excitability, not intracellular chloride levels. J. Neurosci. 31: 15838-15843.

The models included here are designed to test the role of ClC-2 channels for regulation of intracellular chloride levels and excitability. There are two files, one to implement voltage-clamp simulations and the other to implement current-clamp simulations.

zip-filedownload zip file


XPP Code for Coggan JS, Ocker GK, Sejnowski TJ, Prescott SA (2011)
Explaining pathological changes in axonal excitability through dynamical analysis of conductance-based models. J. Neural. Eng. 8: 065002.

The models included here demonstrate the generation of afterdischarge, including the potential role of intracellular sodium accumulation for terminating afterdischarge.
The model provided here is an extended version of the Morris Lecar-type model used in Coggan JS, Prescott SA, Bartol JA, Sejnowski TJ. (2010) PNAS 107: 20602-20609.

Please contact Jay Coggan for NEURON code for the multicompartment models described in these two papers.

zip-filedownload zip file


XPP Code for Rho Y-A and Prescott (2012)
Identifying molecular pathologies sufficient to cause neuropathic change in primary somatosensory afferent excitability using dynamical systems theory. PLoS Comput. Biol. 2012; 8; e1002524.

The models included here demonstrate the how dorsal root ganglion (DRG) neuron excitability can become pathologically altered, as occurs in neuropathic pain. Specifically, we reproduce pathological changes in spiking pattern (from transient to repetitive spiking) and the development of membrane potential oscillations and bursting.

zip-filedownload zip file


XPP Code for Balachandar and Prescott (2018)
Origin of heterogeneous spiking patterns from continuously distributed ion channel densities: a computational study in spinal dorsal horn neurons. J. Physiol. 2018 Jan 20. doi: 10.1113/JP275240.

zip-filedownload zip file