Modigliani  2.0
A stochastic simulator for axons, neurons, and networks
Public Member Functions | Static Public Attributes | List of all members
modigliani_core::Ion_channels Class Reference

Base class for all ion channels. More...

+ Inheritance diagram for modigliani_core::Ion_channels:

Public Member Functions

 Ion_channels (modigliani_base::Size numNewChannels, modigliani_base::Size numNewStates, Transition_rate_matrix *probMatrix, modigliani_base::Real newTimeStep)
 Constructor. More...
 
modigliani_base::Size num_channels () const
 Returns number of channels. More...
 
modigliani_base::Size num_states () const
 Returns number of states. More...
 
modigliani_base::ReturnEnum GillespieStep (modigliani_base::Real voltage)
 Runs one step of the gillespie algorithm at the given membrane potential. More...
 
void SetAsOpenState (modigliani_base::Size stateId)
 Defines the given state as "open". More...
 
modigliani_base::ReturnEnum BinomialStep (modigliani_base::Real voltage)
 Runs one step of the binomial algorithm at the given membrane potential. More...
 
modigliani_base::ReturnEnum DeterministicStep (const modigliani_base::Real voltage)
 Runs one step of the deterministic algorithm at the given membrane potential. More...
 
modigliani_base::ReturnEnum SingleChannelStep (modigliani_base::Real voltage)
 Runs one step of the single channel algorithm at the given membrane potential. More...
 
modigliani_base::Size NumOpen () const
 Returns number of channels in open states. More...
 
modigliani_base::Size NumChannelsInState (modigliani_base::Size state) const
 Returns number of channels in a given state. More...
 
modigliani_base::Size NumClosed () const
 Returns number of channels in closed states. More...
 
virtual modigliani_base::ReturnEnum SteadyStateDistribution (modigliani_base::Real voltage)
 Distributes channels in different states according to the steady-state distribution at the given membrane potential. More...
 
virtual modigliani_base::Real ComputeChannelStateTimeConstant (modigliani_base::Real voltage) const
 Returns sum of escape rates from current state. More...
 
- Public Member Functions inherited from modigliani_core::Object
modigliani_base::Real timestep () const
 Returns simulation timestep. More...
 
void set_timestep (modigliani_base::Real newTimeStep)
 Sets simulation timestep. More...
 

Static Public Attributes

static bool seed_set_ = 0
 Is the seed for the RNG set?
 

Detailed Description

Base class for all ion channels.

Constructor & Destructor Documentation

modigliani_core::Ion_channels::Ion_channels ( modigliani_base::Size  numNewChannels,
modigliani_base::Size  numNewStates,
Transition_rate_matrix probMatrix,
modigliani_base::Real  newTimeStep 
)

Constructor.

Parameters
numNewChannelsNumber of channels
numNewStatesNumber of possible states for the channel
probMatrixThe transition probability matrix
newTimeStepSimulation timestep in [ $\si{\milli\second}$]

Member Function Documentation

modigliani_base::ReturnEnum modigliani_core::Ion_channels::BinomialStep ( modigliani_base::Real  voltage)

Runs one step of the binomial algorithm at the given membrane potential.

Parameters
voltageMembrane potential in [ $\si{\milli\volt}$]
Returns
Success or failure
modigliani_base::Real modigliani_core::Ion_channels::ComputeChannelStateTimeConstant ( modigliani_base::Real  voltage) const
virtual

Returns sum of escape rates from current state.

This is useful for the Gillespie algorithm.

Parameters
voltageMembrane potential
Returns
Escape rate in [ $\si{\per\second}$]
modigliani_base::ReturnEnum modigliani_core::Ion_channels::DeterministicStep ( const modigliani_base::Real  voltage)

Runs one step of the deterministic algorithm at the given membrane potential.

This function basically assumes that the number of channels undergoing a transition is equal to the number of channels in the departing state times the transition probability. This is in general not useful, especially for a small number of channels.

Parameters
voltageMembrane potential in [ $\si{\milli\volt}$]
Returns
Success or failure
Warning
This is rarely useful.
modigliani_base::ReturnEnum modigliani_core::Ion_channels::GillespieStep ( modigliani_base::Real  voltage)

Runs one step of the gillespie algorithm at the given membrane potential.

Parameters
voltageMembrane potential in [ $\si{\milli\volt}$]
Returns
Success or failure
modigliani_base::Size modigliani_core::Ion_channels::num_channels ( ) const
inline

Returns number of channels.

Returns
Number of ion channels
modigliani_base::Size modigliani_core::Ion_channels::num_states ( ) const
inline

Returns number of states.

Returns
Number of states
modigliani_base::Size modigliani_core::Ion_channels::NumChannelsInState ( modigliani_base::Size  state) const
inline

Returns number of channels in a given state.

Returns
Number of channels
Warning
States are numbered [1..m]
modigliani_base::Size modigliani_core::Ion_channels::NumClosed ( ) const
inline

Returns number of channels in closed states.

Returns
Number of channels
modigliani_base::Size modigliani_core::Ion_channels::NumOpen ( ) const

Returns number of channels in open states.

Returns
Number of channels
void modigliani_core::Ion_channels::SetAsOpenState ( modigliani_base::Size  stateId)

Defines the given state as "open".

Channels that are in one of the open states are taken into account to calculate the conductance.

Parameters
stateIdState number
Warning
States are numbered [1..m]
modigliani_base::ReturnEnum modigliani_core::Ion_channels::SingleChannelStep ( modigliani_base::Real  voltage)

Runs one step of the single channel algorithm at the given membrane potential.

Parameters
voltageMembrane potential in [ $\si{\milli\volt}$]
Returns
Success or failure
modigliani_base::ReturnEnum modigliani_core::Ion_channels::SteadyStateDistribution ( modigliani_base::Real  voltage)
virtual

Distributes channels in different states according to the steady-state distribution at the given membrane potential.

This is done by running 1000 step of the binomial algorithm. This is not the best way to do it. Ideally, this should be time dependent, or maybe we could directly calculate the distribution?

Parameters
voltageMembrane potential in [ $\si{\milli\volt}$]
Returns
Success or failure
Warning
Do not call before rate constants were set.

The documentation for this class was generated from the following files: