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

This class is used to take concentrations into account. More...

+ Inheritance diagram for modigliani_core::Custom_cylindrical_compartment:

Public Member Functions

 Custom_cylindrical_compartment (const modigliani_base::Real length, const modigliani_base::Real diameter, const modigliani_base::Real cM, const modigliani_base::Real rA, const modigliani_base::Real newTemperature, const modigliani_base::Real vouvinratio=8)
 Construct a new cylindrical compartment. More...
 
virtual modigliani_base::ReturnEnum AttachCurrentWithConcentrations (Membrane_current *currentPtr, Real concentration_inside, Real concentration_outside)
 Adds a new current to the compartment. More...
 
virtual modigliani_base::ReturnEnum AttachCurrent (Membrane_current *currentPtr, CurrentType type=IONIC) override
 Adds a new current to the compartment. More...
 
virtual modigliani_base::ReturnEnum Step (const modigliani_base::Real newVM) override
 Runs one step of simulation and update ionic concentrations accordingly. More...
 
virtual modigliani_base::ReturnEnum SetupOutput (std::string output_file_name) override
 Opens an output file, writes the header, and use it to write data at each step. More...
 
virtual modigliani_base::ReturnEnum WriteOutput () const override
 Writes the membrane potential, reversal potential, inside and outside concentrations and current flwoing through all attached Membrane_current instances to a binary file. More...
 
const Real InsideConcentration (modigliani_base::Size currentIndex) const
 Returns the internal ionic concentration. More...
 
const Real OutsideConcentration (modigliani_base::Size currentIndex) const
 Returns the external ionic concentration. More...
 
const Real ReversalPotential (modigliani_base::Size currentIndex) const
 Returns the reversal potential. More...
 
virtual modigliani_base::ReturnEnum set_temperature (modigliani_base::Real newTemp) override
 Sets the temperature. More...
 
void SetInsideConcentration (modigliani_base::Size currentIndex, Real new_concentration)
 Sets the internal ionic concentration. More...
 
void SetOutsideConcentration (modigliani_base::Size currentIndex, Real new_concentration)
 Sets the external ionic concentration. More...
 
- Public Member Functions inherited from modigliani_core::Cylindrical_compartment
 Cylindrical_compartment (const modigliani_base::Real newLength, const modigliani_base::Real newDiameter, const modigliani_base::Real newCm, const modigliani_base::Real newRa, const modigliani_base::Real newTemperature)
 Constructs a cylindrical compartment from dimensions and electrophysiological data. More...
 
virtual modigliani_base::Real ActiveLengthConstant () const
 length constant in muMeter for instantenous membrane conductance More...
 
modigliani_base::Real CrosssectionalArea () const
 Returns the cross-sectional area of the cylinder. More...
 
modigliani_base::Real diameter () const
 
modigliani_base::Real radius () const
 
modigliani_base::Real length () const
 
modigliani_base::Real volume () const
 
- Public Member Functions inherited from modigliani_core::Membrane_compartment
 Membrane_compartment (const modigliani_base::Real newArea, const modigliani_base::Real newTemperature, const modigliani_base::Real newCm, const modigliani_base::Real newRa)
 Constructor. More...
 
virtual modigliani_base::ReturnEnum Step ()
 Sets the membrane potential according to membrane current and runs of step of simulation. More...
 
modigliani_base::ReturnEnum InjectCurrent (modigliani_base::Real current)
 Injects current into the compartment. More...
 
modigliani_base::Real AttachedConductance (modigliani_base::Size currentIndex)
 Returns the current conductance of the attached conductance source. More...
 
modigliani_base::Real AttachedReversalPotential (modigliani_base::Size currentIndex)
 Returns the reversal potential of the attached conductance source. More...
 
modigliani_base::Real TimeConstant () const
 Membrane time constant at instaneous membrane conductivity. More...
 
const Membrane_currentCurrent (modigliani_base::Size currentIndex) const
 Returns the current object at the given index. More...
 
modigliani_base::Real area () const
 Returns the membrane surface area. More...
 
modigliani_base::Real vm () const
 Returns the membrane potential. More...
 
void set_vm (modigliani_base::Real newVoltage)
 Sets the membrane potential. More...
 
modigliani_base::Real cm () const
 Sets the membrane capacitance per surface area. More...
 
modigliani_base::Real ra () const
 Sets the axial resistance. More...
 
modigliani_base::Real temperature () const
 Returns temperature in compartment. More...
 
modigliani_base::Real CompartmentMembraneCapacitance () const
 Returns total compartment capacitance. More...
 
modigliani_base::Real CompartmentMembraneNetCurrent () const
 Returns net membrane current. More...
 
modigliani_base::Real CompartmentChannelStateTimeConstant () const
 Sum of escape rates from current state. More...
 
bool GillespieStep ()
 Perform one step of the Gillespie algorithm. More...
 
modigliani_base::Size NumberCurrents () const
 Returns the number of currents attached to the compartment. More...
 
modigliani_base::Real WeightedConductance () const
 Returns the sum of attached conductance weighted by the difference between the membrane potential and the reversal potential. More...
 
const std::vector
< Membrane_current * > 
current_vec () const
 Returns the vector of attached currents. 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...
 

Detailed Description

This class is used to take concentrations into account.

This compartment can track ionic concentrations to change reversal potentials in real time.

Constructor & Destructor Documentation

modigliani_core::Custom_cylindrical_compartment::Custom_cylindrical_compartment ( const modigliani_base::Real  length,
const modigliani_base::Real  diameter,
const modigliani_base::Real  cM,
const modigliani_base::Real  rA,
const modigliani_base::Real  newTemperature,
const modigliani_base::Real  vouvinratio = 8 
)

Construct a new cylindrical compartment.

Parameters
lengthLength in [ $\si{\micro\meter}$]
diameterDiameter in [ $\si{\micro\meter}$]
cMMembrane capacitance in [ $\si{\micro\farad\per\centi\meter\squared}$]
rAAxoplasmic resistance in [ $\si{\ohm\centi\meter}$]
newTemperatureTemperature in [ $\si{\celsius}$]
vouvinratioRatio of external volume to internal volume. The default value is taken from Ng, L.J. (2013). Computer Modeling of Mild Axonal Injury. Neural Comput.

Member Function Documentation

modigliani_base::ReturnEnum modigliani_core::Custom_cylindrical_compartment::AttachCurrent ( Membrane_current currentPtr,
CurrentType  type = IONIC 
)
overridevirtual

Adds a new current to the compartment.

Sets relevant concentrations to zero.

The reversal potential for currents added using this method in not updated.

Parameters
currentPtrPointer to the Membrane_current object
typeCurrent type

Reimplemented from modigliani_core::Membrane_compartment.

modigliani_base::ReturnEnum modigliani_core::Custom_cylindrical_compartment::AttachCurrentWithConcentrations ( Membrane_current currentPtr,
Real  concentration_inside,
Real  concentration_outside 
)
virtual

Adds a new current to the compartment.

The reversal potential for currents added using this method is updated according to the relevant concentrations.

Parameters
currentPtrPointer to the Membrane_current object
concentration_insideInside concentration in [ $\si{\milli M}$]
concentration_outsideOutside concentration in [ $\si{\milli M}$]
const Real modigliani_core::Custom_cylindrical_compartment::InsideConcentration ( modigliani_base::Size  currentIndex) const
inline

Returns the internal ionic concentration.

Parameters
currentIndexIndex of the current
Returns
Inside concentration in [ $\si{\milli M}$]
Warning
Current indexed [1..m]
const Real modigliani_core::Custom_cylindrical_compartment::OutsideConcentration ( modigliani_base::Size  currentIndex) const
inline

Returns the external ionic concentration.

Parameters
currentIndexIndex of the current
Returns
Outside concentration in [ $\si{\milli M}$]
Warning
Current indexed [1..m]
const Real modigliani_core::Custom_cylindrical_compartment::ReversalPotential ( modigliani_base::Size  currentIndex) const
inline

Returns the reversal potential.

Parameters
currentIndexIndex of the current
Returns
Reversal potential in [ $\si{\milli\volt}$]
Warning
Current indexed [1..m]
virtual modigliani_base::ReturnEnum modigliani_core::Custom_cylindrical_compartment::set_temperature ( modigliani_base::Real  newTemp)
inlineoverridevirtual

Sets the temperature.

Change of temperature also affects reversal potentials.

Parameters
newTempTemperature in [ $\si{celsius}$]
Returns
Success or failure

Reimplemented from modigliani_core::Membrane_compartment.

void modigliani_core::Custom_cylindrical_compartment::SetInsideConcentration ( modigliani_base::Size  currentIndex,
Real  new_concentration 
)

Sets the internal ionic concentration.

Parameters
currentIndexIndex of the current
new_concentrationConcentration in [ $\si{\milli M}$]
Warning
Current indexed [1..m]
void modigliani_core::Custom_cylindrical_compartment::SetOutsideConcentration ( modigliani_base::Size  currentIndex,
Real  new_concentration 
)

Sets the external ionic concentration.

Parameters
currentIndexIndex of the current
new_concentrationConcentration in [ $\si{\milli M}$]
Warning
Current indexed [1..m]
modigliani_base::ReturnEnum modigliani_core::Custom_cylindrical_compartment::SetupOutput ( std::string  output_file_name)
overridevirtual

Opens an output file, writes the header, and use it to write data at each step.

Parameters
output_file_nameName of output file
Returns
Success status
Warning
Call after having attached all currents.

Reimplemented from modigliani_core::Membrane_compartment.

modigliani_base::ReturnEnum modigliani_core::Custom_cylindrical_compartment::Step ( const modigliani_base::Real  newVM)
overridevirtual

Runs one step of simulation and update ionic concentrations accordingly.

Parameters
newVMMembrane potential in [ $\si{\milli\volt}$]

Reimplemented from modigliani_core::Membrane_compartment.

modigliani_base::ReturnEnum modigliani_core::Custom_cylindrical_compartment::WriteOutput ( ) const
overridevirtual

Writes the membrane potential, reversal potential, inside and outside concentrations and current flwoing through all attached Membrane_current instances to a binary file.

Returns
Success status
Warning
Call after having attached all currents.

Reimplemented from modigliani_core::Membrane_compartment.


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