MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <HHChannel.h>
Public Member Functions | |
bool | checkOriginal (Id chanId) const |
Returns true if channel is original, false if copy. More... | |
void | destroyGate (const Eref &e, string gateType) |
HHChannel () | |
void | innerCreateGate (const string &gateName, HHGate **gatePtr, Id chanId, Id gateId) |
Inner utility function for creating the gate. More... | |
void | innerDestroyGate (const string &gateName, HHGate **gatePtr, Id chanId) |
void | innerSetXpower (double Xpower) |
void | innerSetYpower (double Ypower) |
void | innerSetZpower (double Zpower) |
bool | setGatePower (const Eref &e, double power, double *assignee, const string &gateType) |
void | vCreateGate (const Eref &e, string gateType) |
int | vGetInstant (const Eref &e) const |
double | vGetModulation (const Eref &e) const |
double | vGetX (const Eref &e) const |
HHGate * | vGetXgate (unsigned int i) const |
double | vGetY (const Eref &e) const |
HHGate * | vGetYgate (unsigned int i) const |
double | vGetZ (const Eref &e) const |
HHGate * | vGetZgate (unsigned int i) const |
void | vHandleConc (const Eref &e, double conc) |
void | vProcess (const Eref &e, ProcPtr p) |
void | vReinit (const Eref &e, ProcPtr p) |
void | vSetInstant (const Eref &e, int Instant) |
void | vSetModulation (const Eref &e, double modulation) |
void | vSetUseConcentration (const Eref &e, int value) |
void | vSetX (const Eref &e, double X) |
void | vSetXpower (const Eref &e, double Xpower) |
void | vSetY (const Eref &e, double Y) |
void | vSetYpower (const Eref &e, double Ypower) |
void | vSetZ (const Eref &e, double Z) |
void | vSetZpower (const Eref &e, double Zpower) |
~HHChannel () | |
Public Member Functions inherited from HHChannelBase | |
void | createGate (const Eref &e, string gateType) |
int | getInstant (const Eref &e) const |
unsigned int | getNumXgates () const |
unsigned int | getNumYgates () const |
Returns 1 if Y gate present, otherwise 0. More... | |
unsigned int | getNumZgates () const |
Returns 1 if Z gate present, otherwise 0. More... | |
int | getUseConcentration (const Eref &e) const |
double | getX (const Eref &e) const |
HHGate * | getXgate (unsigned int i) |
double | getXpower (const Eref &e) const |
double | getY (const Eref &e) const |
HHGate * | getYgate (unsigned int i) |
double | getYpower (const Eref &e) const |
double | getZ (const Eref &e) const |
HHGate * | getZgate (unsigned int i) |
double | getZpower (const Eref &e) const |
void | handleConc (const Eref &e, double conc) |
HHChannelBase () | |
void | setInstant (const Eref &e, int Instant) |
void | setNumGates (unsigned int num) |
void | setUseConcentration (const Eref &e, int value) |
void | setX (const Eref &e, double X) |
void | setXpower (const Eref &e, double Xpower) |
void | setY (const Eref &e, double Y) |
void | setYpower (const Eref &e, double Ypower) |
void | setZ (const Eref &e, double Z) |
void | setZpower (const Eref &e, double Zpower) |
double | vGetModulation (const Eref &e) const |
virtual void | vSetSolver (const Eref &e, Id hsolve) |
~HHChannelBase () | |
Public Member Functions inherited from ChanBase | |
ChanBase () | |
double | getEk (const Eref &e) const |
double | getGbar (const Eref &e) const |
double | getGk (const Eref &e) const |
double | getIk (const Eref &e) const |
double | getModulation (const Eref &e) const |
void | handleVm (double Vm) |
void | process (const Eref &e, const ProcPtr info) |
void | reinit (const Eref &e, const ProcPtr info) |
void | setEk (const Eref &e, double Ek) |
void | setGbar (const Eref &e, double Gbar) |
void | setGk (const Eref &e, double Gk) |
void | setIk (const Eref &e, double Ic) |
void | setModulation (const Eref &e, double modulation) |
~ChanBase () | |
Public Member Functions inherited from ChanCommon | |
ChanCommon () | |
double | getGbar () const |
Utility function to acces Gbar. More... | |
double | getModulation () const |
double | getVm () const |
Utility function to access Vm. More... | |
void | sendProcessMsgs (const Eref &e, const ProcPtr info) |
void | sendReinitMsgs (const Eref &e, const ProcPtr info) |
void | updateIk () |
double | vGetEk (const Eref &e) const |
double | vGetGbar (const Eref &e) const |
double | vGetGk (const Eref &e) const |
double | vGetIk (const Eref &e) const |
void | vHandleVm (double Vm) |
void | vSetEk (const Eref &e, double Ek) |
void | vSetGbar (const Eref &e, double Gbar) |
void | vSetGk (const Eref &e, double Gk) |
void | vSetIk (const Eref &e, double Ic) |
~ChanCommon () | |
Static Public Member Functions | |
static const Cinfo * | initCinfo () |
Static Public Member Functions inherited from HHChannelBase | |
static const Cinfo * | initCinfo () |
static double | power1 (double x, double p) |
static double | power2 (double x, double p) |
static double | power3 (double x, double p) |
static double | power4 (double x, double p) |
static double | powerN (double x, double p) |
static PFDD | selectPower (double power) |
static void | zombify (Element *orig, const Cinfo *zClass, Id hsolve) |
Static Public Member Functions inherited from ChanBase | |
static SrcFinfo2< double, double > * | channelOut () |
static SrcFinfo1< double > * | IkOut () |
static const Cinfo * | initCinfo () |
Specify the Class Info static variable for initialization. More... | |
static SrcFinfo1< double > * | permeability () |
Static Public Member Functions inherited from ChanCommon | |
static const Cinfo * | initCinfo () |
Specify the Class Info static variable for initialization. More... | |
Private Member Functions | |
double | integrate (double state, double dt, double A, double B) |
Internal variable used to calculate conductance. More... | |
Private Attributes | |
double | conc_ |
Conc_ is input variable for Ca-dependent channels. More... | |
double | g_ |
int | instant_ |
bitmapped flag for X, Y, Z, to do equil calculation for gate More... | |
Id | myId_ |
double(* | takeXpower_ )(double, double) |
double(* | takeYpower_ )(double, double) |
double(* | takeZpower_ )(double, double) |
double | X_ |
HHGate * | xGate_ |
bool | xInited_ |
double | Y_ |
State variable for Y gate. More... | |
HHGate * | yGate_ |
HHGate data structure for the yGate. More... | |
bool | yInited_ |
double | Z_ |
State variable for Z gate. More... | |
HHGate * | zGate_ |
HHGate data structure for the yGate. More... | |
bool | zInited_ |
Static Private Attributes | |
static const double | EPSILON = 1.0e-10 |
static const int | INSTANT_X = 1 |
static const int | INSTANT_Y = 2 |
static const int | INSTANT_Z = 4 |
Additional Inherited Members | |
Protected Attributes inherited from HHChannelBase | |
double | modulation_ |
Value used to scale channel conductance up or down. More... | |
bool | useConcentration_ |
Flag for use of conc for input to Z gate calculations. More... | |
double | Xpower_ |
Exponent for X gate. More... | |
double | Ypower_ |
Exponent for Y gate. More... | |
double | Zpower_ |
Exponent for Z gate. More... | |
Protected Attributes inherited from ChanCommon | |
double | Vm_ |
Vm_ is input variable from compartment, used for most rates. More... | |
The HHChannel class sets up a Hodkin-Huxley type ion channel. The form used here is quite general and can handle up to 3 gates, named X, Y and Z. The Z gate can be a function of concentration as well as voltage. The gates are normally computed using the form
alpha(V)
closed <---------—> open beta(V)
where the rates for the transition are alpha and beta, and both are functions of V. The state variables for each gate (X_, Y_, and Z_) are the fraction in the open state.
Gates can also be computed instantaneously, giving the instantaneous ratio of alpha to beta rather than solving the above conversion process. The actual functions alpha and beta are provided by an auxiliary class, the HHGate. The idea is that all copies of a channel share the same gate, thus saving a great deal of space. It also makes it possible to cleanly change the parameters of all the channels of a give class, all at once. Should one want to mutate a subset of channels, they just need to set up separate gates.
HHGates are implemented as a special category of FieldElement, so that they can be accessed as readonly pointers available to the HHChannel. The FieldElement containing the HHGate appears as a child Element of the HHChannel. The HHChannel Element can be an array; the associated HHGate is a singleton. So there has to be a local copy of the HHGate on each node.
Definition at line 48 of file HHChannel.h.
HHChannel::HHChannel | ( | ) |
Definition at line 58 of file HHChannel.cpp.
HHChannel::~HHChannel | ( | ) |
Definition at line 73 of file HHChannel.cpp.
bool HHChannel::checkOriginal | ( | Id | chanId | ) | const |
Returns true if channel is original, false if copy.
If the gate exists and has only this element for input, then change the gate power. If the gate exists and has multiple parents, then make a new gate, set its power. If the gate does not exist, make a new gate, set its power.
The function is designed with the idea that if copies of this channel are made, then they all point back to the original HHGate. (Unless they are cross-node copies). It is only if we subsequently alter the HHGate of this channel that we need to make our own variant of the HHGate, or disconnect from an existing one.
Definition at line 146 of file HHChannel.cpp.
References HHGate::isOriginalChannel(), xGate_, yGate_, and zGate_.
Referenced by destroyGate(), and vCreateGate().
void HHChannel::destroyGate | ( | const Eref & | e, |
string | gateType | ||
) |
Utility function for destroying gate. Works only on original HHChannel. Somewhat dangerous, should never be used after a copy has been made as the pointer of the gate will be in use elsewhere.
Definition at line 202 of file HHChannel.cpp.
References checkOriginal(), Eref::id(), innerDestroyGate(), Id::path(), xGate_, yGate_, and zGate_.
|
static |
Definition at line 24 of file HHChannel.cpp.
References HHChannelBase::initCinfo().
Referenced by HSolve::unzombify().
void HHChannel::innerCreateGate | ( | const string & | gateName, |
HHGate ** | gatePtr, | ||
Id | chanId, | ||
Id | gateId | ||
) |
Inner utility function for creating the gate.
Definition at line 159 of file HHChannel.cpp.
References Id::path().
Referenced by vCreateGate().
Inner utility for destroying the gate
Definition at line 190 of file HHChannel.cpp.
References Id::path().
Referenced by destroyGate().
void HHChannel::innerSetXpower | ( | double | Xpower | ) |
void HHChannel::innerSetYpower | ( | double | Ypower | ) |
void HHChannel::innerSetZpower | ( | double | Zpower | ) |
|
private |
Internal variable used to calculate conductance.
Returns the state variable for the new timestep based on the internal variables A_ and B_ which were passed in from the gate.
Definition at line 278 of file HHChannel.cpp.
References EPSILON.
Referenced by vProcess().
bool HHChannel::setGatePower | ( | const Eref & | e, |
double | power, | ||
double * | assignee, | ||
const string & | gateType | ||
) |
Utility for altering gate powers
Definition at line 86 of file HHChannel.cpp.
References HHChannelBase::createGate(), and doubleEq().
Referenced by vSetXpower(), vSetYpower(), and vSetZpower().
|
virtual |
Implements HHChannelBase.
Definition at line 171 of file HHChannel.cpp.
References checkOriginal(), Eref::id(), innerCreateGate(), Id::path(), Id::value(), xGate_, yGate_, and zGate_.
|
virtual |
Implements HHChannelBase.
Definition at line 230 of file HHChannel.cpp.
References instant_.
|
virtual |
Reimplemented from ChanCommon.
Definition at line 411 of file HHChannel.cpp.
References HHChannelBase::modulation_.
|
virtual |
|
virtual |
Access function used for the X gate. The index is ignored.
Implements HHChannelBase.
Definition at line 422 of file HHChannel.cpp.
References xGate_.
|
virtual |
|
virtual |
Access function used for the Y gate. The index is ignored.
Implements HHChannelBase.
Definition at line 427 of file HHChannel.cpp.
References yGate_.
|
virtual |
|
virtual |
Access function used for the Z gate. The index is ignored.
Implements HHChannelBase.
Definition at line 432 of file HHChannel.cpp.
References zGate_.
|
virtual |
Assign the local Vm_ to the incoming Vm from the compartment void handleVm( double Vm ); Assign the local conc_ to the incoming conc from the concentration calculations for the compartment. Typically the message source will be a CaConc object, but there are other options for computing the conc.
Implements HHChannelBase.
Definition at line 400 of file HHChannel.cpp.
References conc_.
processFunc handles the update and calculations every clock tick. It first sends the request for evaluation of the gate variables to the respective gate objects and recieves their response immediately through a return message. This is done so that many channel instances can share the same gate lookup tables, but do so cleanly. Such messages should never go to a remote node. Then the function does its own little calculations to send back to the parent compartment through regular messages.
Implements ChanBase.
Definition at line 287 of file HHChannel.cpp.
References conc_, ProcInfo::dt, g_, instant_, INSTANT_X, INSTANT_Y, INSTANT_Z, integrate(), HHGate::lookupBoth(), HHChannelBase::modulation_, ChanCommon::sendProcessMsgs(), takeXpower_, takeYpower_, takeZpower_, ChanCommon::updateIk(), HHChannelBase::useConcentration_, ChanCommon::vGetGbar(), ChanCommon::Vm_, ChanCommon::vSetGk(), X_, xGate_, HHChannelBase::Xpower_, Y_, yGate_, HHChannelBase::Ypower_, Z_, zGate_, and HHChannelBase::Zpower_.
Reinitializes the values for the channel. This involves computing the steady-state value for the channel gates using the provided Vm from the parent compartment. It involves a similar cycle through the gates and then updates to the parent compartment as for the processFunc.
Here we get the steady-state values for the gate (the 'instant' calculation) as A_/B_.
Implements ChanBase.
Definition at line 339 of file HHChannel.cpp.
References conc_, Eref::element(), EPSILON, g_, Element::getName(), HHGate::lookupBoth(), HHChannelBase::modulation_, ChanCommon::sendReinitMsgs(), takeXpower_, takeYpower_, takeZpower_, ChanCommon::updateIk(), HHChannelBase::useConcentration_, ChanCommon::vGetGbar(), ChanCommon::Vm_, ChanCommon::vSetGk(), X_, xGate_, xInited_, HHChannelBase::Xpower_, Y_, yGate_, yInited_, HHChannelBase::Ypower_, Z_, zGate_, zInited_, and HHChannelBase::Zpower_.
|
virtual |
Implements HHChannelBase.
Definition at line 225 of file HHChannel.cpp.
References instant_.
|
virtual |
Reimplemented from ChanCommon.
Definition at line 405 of file HHChannel.cpp.
References HHChannelBase::modulation_.
|
virtual |
Implements HHChannelBase.
Definition at line 265 of file HHChannel.cpp.
References HHChannelBase::useConcentration_, and value.
|
virtual |
|
virtual |
Assigns the Xpower for this gate. If the gate exists and has only this element for input, then change the gate value. If the gate exists and has multiple parents, then make a new gate. If the gate does not exist, make a new gate
Implements HHChannelBase.
Definition at line 108 of file HHChannel.cpp.
References HHChannelBase::selectPower(), setGatePower(), takeXpower_, and HHChannelBase::Xpower_.
|
virtual |
|
virtual |
Implements HHChannelBase.
Definition at line 114 of file HHChannel.cpp.
References HHChannelBase::selectPower(), setGatePower(), takeYpower_, and HHChannelBase::Ypower_.
|
virtual |
|
virtual |
Implements HHChannelBase.
Definition at line 120 of file HHChannel.cpp.
References HHChannelBase::selectPower(), setGatePower(), takeZpower_, HHChannelBase::useConcentration_, and HHChannelBase::Zpower_.
|
private |
Conc_ is input variable for Ca-dependent channels.
Definition at line 173 of file HHChannel.h.
Referenced by vHandleConc(), vProcess(), and vReinit().
|
staticprivate |
Definition at line 210 of file HHChannel.h.
Referenced by integrate(), and vReinit().
|
private |
Definition at line 191 of file HHChannel.h.
Referenced by vProcess(), and vReinit().
|
private |
bitmapped flag for X, Y, Z, to do equil calculation for gate
Definition at line 180 of file HHChannel.h.
Referenced by vGetInstant(), vProcess(), and vSetInstant().
|
staticprivate |
Definition at line 211 of file HHChannel.h.
Referenced by vProcess().
|
staticprivate |
Definition at line 212 of file HHChannel.h.
Referenced by vProcess().
|
staticprivate |
Definition at line 213 of file HHChannel.h.
Referenced by vProcess().
|
private |
Definition at line 208 of file HHChannel.h.
|
private |
Definition at line 175 of file HHChannel.h.
Referenced by vProcess(), vReinit(), and vSetXpower().
|
private |
Definition at line 176 of file HHChannel.h.
Referenced by vProcess(), vReinit(), and vSetYpower().
|
private |
Definition at line 177 of file HHChannel.h.
Referenced by vProcess(), vReinit(), and vSetZpower().
|
private |
Channel actual conductance depending on opening of gates. State variable for X gate
Definition at line 183 of file HHChannel.h.
Referenced by vGetX(), vProcess(), vReinit(), and vSetX().
|
private |
HHGate data structure for the xGate. This is writable only on the HHChannel that originally created the HHGate, for others it must be treated as readonly.
Definition at line 200 of file HHChannel.h.
Referenced by checkOriginal(), destroyGate(), vCreateGate(), vGetXgate(), vProcess(), and vReinit().
|
private |
Definition at line 189 of file HHChannel.h.
|
private |
State variable for Y gate.
Definition at line 185 of file HHChannel.h.
Referenced by vGetY(), vProcess(), vReinit(), and vSetY().
|
private |
HHGate data structure for the yGate.
Definition at line 203 of file HHChannel.h.
Referenced by checkOriginal(), destroyGate(), vCreateGate(), vGetYgate(), vProcess(), and vReinit().
|
private |
Definition at line 189 of file HHChannel.h.
|
private |
State variable for Z gate.
Definition at line 187 of file HHChannel.h.
Referenced by vGetZ(), vProcess(), vReinit(), and vSetZ().
|
private |
HHGate data structure for the yGate.
Definition at line 206 of file HHChannel.h.
Referenced by checkOriginal(), destroyGate(), vCreateGate(), vGetZgate(), vProcess(), and vReinit().
|
private |
Definition at line 189 of file HHChannel.h.