HHGate Class Reference

#include <HHGate.h>

Collaboration diagram for HHGate:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 HHGate ()
 HHGate (Id originalChanId, Id originalGateId)
double lookupA (double v) const
double lookupB (double v) const
void setAlpha (const Eref &e, vector< double > val)
vector< double > getAlpha (const Eref &e) const
void setBeta (const Eref &e, vector< double > val)
vector< double > getBeta (const Eref &e) const
void setTau (const Eref &e, vector< double > val)
vector< double > getTau (const Eref &e) const
void setMinfinity (const Eref &e, vector< double > val)
vector< double > getMinfinity (const Eref &e) const
void setMin (const Eref &e, double val)
double getMin (const Eref &e) const
void setMax (const Eref &e, double val)
double getMax (const Eref &e) const
void setDivs (const Eref &e, unsigned int val)
unsigned int getDivs (const Eref &e) const
void setTableA (const Eref &e, vector< double > v)
vector< double > getTableA (const Eref &e) const
void setTableB (const Eref &e, vector< double > v)
vector< double > getTableB (const Eref &e) const
void setUseInterpolation (const Eref &e, bool val)
bool getUseInterpolation (const Eref &e) const
void setupAlpha (const Eref &e, vector< double > parms)
vector< double > getAlphaParms (const Eref &e) const
void setupTau (const Eref &e, vector< double > parms)
void tweakAlpha ()
void tweakTau ()
void setupGate (const Eref &e, vector< double > parms)
void setupTables (const vector< double > &parms, bool doTau)
void tweakTables (bool doTau)
void lookupBoth (double v, double *A, double *B) const
double lookupTable (const vector< double > &tab, double v) const
bool checkOriginal (Id id, const string &field) const
bool isOriginalChannel (Id id) const
bool isOriginalGate (Id id) const
Id originalChannelId () const
Id originalGateId () const
void tabFill (vector< double > &table, unsigned int newXdivs, double newXmin, double newXmax)
void updateTauMinf ()
void updateAlphaBeta ()
void updateTables ()

Static Public Member Functions

static const CinfoinitCinfo ()

Friends

void testHHGateLookup ()
void testHHGateSetup ()

Detailed Description

This class handles a single gate on an HHChannel. It is equivalent to the m and h terms on the Hodgkin-Huxley Na channel, or the n term on the K channel. It stores the voltage-dependence (sometimes concentration-dependence) of the gating variables for opening the channel. It does so in a tabular form which can be directly filled using experimental data points. It also provides a set of utility functions for defining the gate in functional forms, and accessing those original functional forms. The HHGate is accessed as a FieldElement, which means that it is available as a pointer on the HHChannel. HHGates are typically shared. This means that when you make a copy or a vector of an HHChannel, there is only a single HHGate created, and its pointer is used by all the copies. The lookup functions are thread-safe. Field assignment to the HHGate should be possible only from the original HHChannel, but all the others do have read permission.


Constructor & Destructor Documentation

HHGate::HHGate (  ) 

Dummy constructor, to keep Dinfo happy. Should never be used

HHGate::HHGate ( Id  originalChanId,
Id  originalGateId 
)

This constructor is the one meant to be used. It takes the originalId of the parent HHChannel as a required argument, so that any subsequent 'write' functions can be checked to see if they are legal. Also tracks its own Id.


Member Function Documentation

bool HHGate::checkOriginal ( Id  id,
const string &  field 
) const

Checks if the provided Id is the one that the HHGate was created on. If true, fine, otherwise complains about trying to set the field.

Referenced by setDivs(), setMax(), setMin(), and setUseInterpolation().

vector< double > HHGate::getAlpha ( const Eref e  )  const

Referenced by initCinfo().

vector< double > HHGate::getAlphaParms ( const Eref e  )  const

Referenced by initCinfo().

vector< double > HHGate::getBeta ( const Eref e  )  const

Referenced by initCinfo().

unsigned int HHGate::getDivs ( const Eref e  )  const

Referenced by initCinfo().

double HHGate::getMax ( const Eref e  )  const

Referenced by initCinfo().

double HHGate::getMin ( const Eref e  )  const

Referenced by initCinfo().

vector< double > HHGate::getMinfinity ( const Eref e  )  const

Referenced by initCinfo().

vector< double > HHGate::getTableA ( const Eref e  )  const

Referenced by initCinfo().

vector< double > HHGate::getTableB ( const Eref e  )  const

Referenced by initCinfo().

vector< double > HHGate::getTau ( const Eref e  )  const

Referenced by initCinfo().

bool HHGate::getUseInterpolation ( const Eref e  )  const

Referenced by initCinfo().

const Cinfo * HHGate::initCinfo (  )  [static]
bool HHGate::isOriginalChannel ( Id  id  )  const

isOriginalChannel returns true if the provided Id is the Id of the channel on which the HHGate was created.

Referenced by HHChannel::checkOriginal().

bool HHGate::isOriginalGate ( Id  id  )  const

isOriginalChannel returns true if the provided Id is the Id of the Gate created at the same time as the original channel.

double HHGate::lookupA ( double  v  )  const

lookupA: Look up the A vector from a double. Typically does so by direct scaling and offset to an integer lookup, using a fine enough table granularity that there is little error. Alternatively uses linear interpolation. The range of the double is predefined based on knowledge of voltage or conc ranges, and the granularity is specified by the xmin, xmax, and invDx fields.

References lookupTable().

Referenced by initCinfo().

Here is the call graph for this function:

double HHGate::lookupB ( double  v  )  const

lookupB: Look up the B vector from a double, similar to lookupA.

References lookupTable().

Referenced by initCinfo().

Here is the call graph for this function:

void HHGate::lookupBoth ( double  v,
double *  A,
double *  B 
) const

Single call to get both A and B values by lookup

Referenced by HSolveUtils::rates(), HHChannel::vProcess(), and HHChannel::vReinit().

double HHGate::lookupTable ( const vector< double > &  tab,
double  v 
) const

Returns looked up value of specified table

Referenced by lookupA(), and lookupB().

Id HHGate::originalChannelId (  )  const

Returns the Id of the original Channel.

Id HHGate::originalGateId (  )  const

Returns the Id of the original Gate.

Referenced by HSolveUtils::gates(), and HSolveUtils::rates().

void HHGate::setAlpha ( const Eref e,
vector< double >  val 
)

Referenced by initCinfo().

void HHGate::setBeta ( const Eref e,
vector< double >  val 
)

Referenced by initCinfo().

void HHGate::setDivs ( const Eref e,
unsigned int  val 
)

Stuff here to redo sizes.

References checkOriginal(), Eref::id(), tabFill(), and updateTables().

Referenced by initCinfo().

Here is the call graph for this function:

void HHGate::setMax ( const Eref e,
double  val 
)

References checkOriginal(), Eref::id(), tabFill(), and updateTables().

Referenced by initCinfo().

Here is the call graph for this function:

void HHGate::setMin ( const Eref e,
double  val 
)

References checkOriginal(), Eref::id(), tabFill(), and updateTables().

Referenced by initCinfo().

Here is the call graph for this function:

void HHGate::setMinfinity ( const Eref e,
vector< double >  val 
)

Referenced by initCinfo().

void HHGate::setTableA ( const Eref e,
vector< double >  v 
)

Referenced by initCinfo().

void HHGate::setTableB ( const Eref e,
vector< double >  v 
)

Referenced by initCinfo().

void HHGate::setTau ( const Eref e,
vector< double >  val 
)

Referenced by initCinfo().

void HHGate::setupAlpha ( const Eref e,
vector< double >  parms 
)

Referenced by initCinfo().

void HHGate::setupGate ( const Eref e,
vector< double >  parms 
)

Referenced by initCinfo().

void HHGate::setupTables ( const vector< double > &  parms,
bool  doTau 
)

Referenced by updateTables().

void HHGate::setupTau ( const Eref e,
vector< double >  parms 
)

Referenced by initCinfo().

void HHGate::setUseInterpolation ( const Eref e,
bool  val 
)

References checkOriginal(), and Eref::id().

Referenced by initCinfo(), and HSolveUtils::rates().

Here is the call graph for this function:

void HHGate::tabFill ( vector< double > &  table,
unsigned int  newXdivs,
double  newXmin,
double  newXmax 
)

tabFill does interpolation and range resizing for a table representing a lookup function. newXdivs is one less than the size of the table; it is the number of subdivisions that the table represents. Does NOT alter the existing xmin and xmax, but it does resize the table.

Referenced by setDivs(), setMax(), and setMin().

void HHGate::tweakAlpha (  ) 

Referenced by initCinfo().

void HHGate::tweakTables ( bool  doTau  ) 

Tweaks the A and B entries in the tables from the original alpha/beta or minf/tau values. See code in GENESIS/src/olf/new_interp.c, function tweak_tab_values

void HHGate::tweakTau (  ) 

Referenced by initCinfo().

void HHGate::updateAlphaBeta (  ) 

Update the alpha and beta parameters because the tau or minfinity tables have changed.

void HHGate::updateTables (  ) 

Take the current alpha/beta parameters, and xdivs, xmin, xmax; and rebuild the tables.

References setupTables().

Referenced by setDivs(), setMax(), and setMin().

Here is the call graph for this function:

void HHGate::updateTauMinf (  ) 

Update the Tau and Minfinity parameters because the alpha or beta tables have changed.


Friends And Related Function Documentation

void testHHGateLookup (  )  [friend]
void testHHGateSetup (  )  [friend]

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

Generated on 1 Jul 2015 for MOOSE by  doxygen 1.6.1