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

Sequence of cylindrical membrane compartments, basically an axon/dendrite. More...

+ Inheritance diagram for modigliani_core::Membrane_compartment_sequence:

Public Member Functions

 Membrane_compartment_sequence (bool use_gillespie=false)
 Constructor. More...
 
modigliani_base::ReturnEnum PushBack (Cylindrical_compartment *compartPtr)
 Adds a compartment to the axon. More...
 
modigliani_base::ReturnEnum Init ()
 Initialises the propagation compartment sequence. More...
 
modigliani_base::ReturnEnum InitialStep ()
 Setup staggering PDE integration of compartments. More...
 
modigliani_base::ReturnEnum Step ()
 Execute one time step on the compartments. More...
 
modigliani_base::ReturnEnum InjectCurrent (modigliani_base::Real current, modigliani_base::Size compartmentId)
 Inject current into a compartment. More...
 
modigliani_base::Size num_compartments () const
 Return the number of compartments. More...
 
modigliani_base::Real CompartmentSequenceChannelStateTimeConstant () const
 Compute sum of escape rates over current state. More...
 
modigliani_base::Real AttachedCurrent (modigliani_base::Size compIndex, modigliani_base::Size currIndex)
 Returns the amount of current for the given index in the compartment. More...
 
Cylindrical_compartmentReturnCompartment (modigliani_base::Size index)
 Returns the requested compartment. 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...
 

Public Attributes

std::vector
< Cylindrical_compartment * > 
compartment_vec_
 Holds pointers to member compartments.
 

Protected Member Functions

std::vector
< modigliani_base::Real > 
NumericalRecipesSolveTriDiag (const std::vector< modigliani_base::Real > &l, const std::vector< modigliani_base::Real > &d, const std::vector< modigliani_base::Real > &u, const std::vector< modigliani_base::Real > &r) const
 Solves a tri-diagonal matrix system. More...
 

Detailed Description

Sequence of cylindrical membrane compartments, basically an axon/dendrite.

This class provides an easy way to arrange compartments linearly, i.e. to simulate axons or dendrites. The class takes care of propagating the membrane potential along its member compartments. It also implements some logic to deal with Gillespie simulations.

Constructor & Destructor Documentation

modigliani_core::Membrane_compartment_sequence::Membrane_compartment_sequence ( bool  use_gillespie = false)

Constructor.

Initialises variables, and sets the seed according to the current time.

Parameters
use_gillespieAre we going to use the gillespie algortihm?

Member Function Documentation

modigliani_base::Real modigliani_core::Membrane_compartment_sequence::AttachedCurrent ( modigliani_base::Size  compIndex,
modigliani_base::Size  currIndex 
)
inline

Returns the amount of current for the given index in the compartment.

Parameters
compIndexcompartment index
currIndexcurrent index
Returns
Current
Warning
Currents indexed [1..m]
modigliani_base::Real modigliani_core::Membrane_compartment_sequence::CompartmentSequenceChannelStateTimeConstant ( ) const

Compute sum of escape rates over current state.

This is simply the sum of time constants of all compartments

Returns
Time constant in [kHz]
modigliani_base::ReturnEnum modigliani_core::Membrane_compartment_sequence::Init ( )

Initialises the propagation compartment sequence.

The most important operation here is to initialise the propagation matrix used at every step. This uses a technique developed in Aldo's PhD thesis. It accelerates calculations but seems to require a constant diameter.

Warning
Constant axon diameter required
modigliani_base::ReturnEnum modigliani_core::Membrane_compartment_sequence::InitialStep ( )

Setup staggering PDE integration of compartments.

Internal - voltage related - states of compartments(i.e. currents) are ahead t+.5 baseTimeStep, while state of compartment sequence is unchanged. imposes crank nicholson staggering.

Warning
Calling method activates Crank-Nicholson algorithm in Step()
modigliani_base::ReturnEnum modigliani_core::Membrane_compartment_sequence::InjectCurrent ( modigliani_base::Real  current,
modigliani_base::Size  compartmentId 
)

Inject current into a compartment.

This is very useful in all sorts of experiments. Usually the current is injected into the first compartment (1).

Parameters
currentis nano amperes
compartmentIdrefers to intuitive enumeriation, i.e. [1..m]
Returns
Success state
Warning
Compartments numbered [1..m]
modigliani_base::Size modigliani_core::Membrane_compartment_sequence::num_compartments ( ) const
inline

Return the number of compartments.

Returns
Number of compartments
std::vector< modigliani_base::Real > modigliani_core::Membrane_compartment_sequence::NumericalRecipesSolveTriDiag ( const std::vector< modigliani_base::Real > &  l,
const std::vector< modigliani_base::Real > &  d,
const std::vector< modigliani_base::Real > &  u,
const std::vector< modigliani_base::Real > &  r 
) const
protected

Solves a tri-diagonal matrix system.

The algorithm is taken from the book numerical receipes

Parameters
lLower diagonal
dDiagonal
uUpper diagonal
rRight hand side
Returns
Solution vector
modigliani_base::ReturnEnum modigliani_core::Membrane_compartment_sequence::PushBack ( Cylindrical_compartment compartPtr)

Adds a compartment to the axon.

Parameters
compartPtrPointer to the compartment to add
Returns
Whether the compartment was added successfully
Warning
no update of SOLVER dimensionality or SOVLER INIT done
Cylindrical_compartment* modigliani_core::Membrane_compartment_sequence::ReturnCompartment ( modigliani_base::Size  index)

Returns the requested compartment.

Parameters
indexcompartment index
Returns
Pointer to the requested compartment
Warning
Currents indexed [1..m]
modigliani_base::ReturnEnum modigliani_core::Membrane_compartment_sequence::Step ( )

Execute one time step on the compartments.

Warning
Identical axo-geometric properties required for all compartments !

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