MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ZombieHHChannel Class Reference

#include <ZombieHHChannel.h>

+ Inheritance diagram for ZombieHHChannel:
+ Collaboration diagram for ZombieHHChannel:

Public Member Functions

void vCreateGate (const Eref &e, string name)
 
double vGetEk (const Eref &e) const
 
double vGetGbar (const Eref &e) const
 
double vGetGk (const Eref &e) const
 
double vGetIk (const Eref &e) const
 
int vGetInstant (const Eref &e) const
 
double vGetX (const Eref &e) const
 
HHGatevGetXgate (unsigned int i) const
 
double vGetY (const Eref &e) const
 
HHGatevGetYgate (unsigned int i) const
 
double vGetZ (const Eref &e) const
 
HHGatevGetZgate (unsigned int i) const
 
void vHandleConc (const Eref &e, double value)
 
void vHandleVm (double Vm)
 
void vProcess (const Eref &e, ProcPtr p)
 
void vReinit (const Eref &e, ProcPtr p)
 
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 Ik)
 
void vSetInstant (const Eref &e, int instant)
 
void vSetModulation (const Eref &e, double value)
 
void vSetSolver (const Eref &e, Id hsolve)
 
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)
 
 ZombieHHChannel ()
 
- 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
 
HHGategetXgate (unsigned int i)
 
double getXpower (const Eref &e) const
 
double getY (const Eref &e) const
 
HHGategetYgate (unsigned int i)
 
double getYpower (const Eref &e) const
 
double getZ (const Eref &e) const
 
HHGategetZgate (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)
 
virtual void vCreateGate (const Eref &e, string gateType)=0
 
double vGetModulation (const Eref &e) const
 
 ~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 ()
 

Static Public Member Functions

static const CinfoinitCinfo ()
 
- Static Public Member Functions inherited from HHChannelBase
static const CinfoinitCinfo ()
 
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 CinfoinitCinfo ()
 Specify the Class Info static variable for initialization. More...
 
static SrcFinfo1< double > * permeability ()
 

Private Member Functions

void copyFields (Id chanId, HSolve *hsolve_)
 

Private Attributes

HSolvehsolve_
 

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...
 

Detailed Description

Zombie object that lets HSolve do its calculations, while letting the user interact with this object as if it were the original object.

ZombieHHChannel derives directly from Neutral, unlike the regular HHChannel which derives from ChanBase. ChanBase handles fields like Gbar, Gk, Ek, Ik, which are common to HHChannel, SynChan, etc. On the other hand, these fields are stored separately for HHChannel and SynChan in the HSolver. Hence we cannot have a ZombieChanBase which does, for example: hsolve_->setGk( id, Gk ); Instead we must have ZombieHHChannel and ZombieSynChan which do: hsolve_->setHHChannelGk( id, Gk ); and: hsolve_->setSynChanGk( id, Gk ); respectively.

Definition at line 48 of file ZombieHHChannel.h.

Constructor & Destructor Documentation

ZombieHHChannel::ZombieHHChannel ( )

Definition at line 44 of file ZombieHHChannel.cpp.

45 { ; }

Member Function Documentation

void ZombieHHChannel::copyFields ( Id  chanId,
HSolve hsolve_ 
)
private
const Cinfo * ZombieHHChannel::initCinfo ( )
static

Definition at line 12 of file ZombieHHChannel.cpp.

References HHChannelBase::initCinfo(), and zombieHHChannelCinfo.

Referenced by HSolve::zombify().

13 {
14  static string doc[] =
15  {
16  "Name", "ZombieHHChannel",
17  "Author", "Upinder S. Bhalla, 2007, 2014 NCBS",
18  "Description", "ZombieHHChannel: Hodgkin-Huxley type voltage-gated Ion channel. Something "
19  "like the old tabchannel from GENESIS, but also presents "
20  "a similar interface as hhchan from GENESIS. ",
21  };
22 
23  static Dinfo< ZombieHHChannel > dinfo;
25  "ZombieHHChannel",
27  0,
28  0,
29  &dinfo,
30  doc,
31  sizeof( doc ) / sizeof( string )
32  );
33 
34  return &zombieHHChannelCinfo;
35 }
Definition: Dinfo.h:60
static const Cinfo * zombieHHChannelCinfo
static const Cinfo * initCinfo()
Definition: Cinfo.h:18

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ZombieHHChannel::vCreateGate ( const Eref e,
string  name 
)

Definition at line 185 of file ZombieHHChannel.cpp.

186 {
187  cout << "Warning: ZombieHHChannel::vCreateGate\n";
188 }
double ZombieHHChannel::vGetEk ( const Eref e) const
virtual

Implements ChanBase.

Definition at line 95 of file ZombieHHChannel.cpp.

References HSolve::getEk(), hsolve_, and Eref::id().

96 {
97  return hsolve_->getEk( e.id() );
98 }
Id id() const
Definition: Eref.cpp:62
double getEk(Id id) const

+ Here is the call graph for this function:

double ZombieHHChannel::vGetGbar ( const Eref e) const
virtual

Implements ChanBase.

Definition at line 75 of file ZombieHHChannel.cpp.

References HSolve::getHHChannelGbar(), hsolve_, and Eref::id().

76 {
77  return hsolve_->getHHChannelGbar( e.id() );
78 }
Id id() const
Definition: Eref.cpp:62
double getHHChannelGbar(Id id) const

+ Here is the call graph for this function:

double ZombieHHChannel::vGetGk ( const Eref e) const
virtual

Implements ChanBase.

Definition at line 85 of file ZombieHHChannel.cpp.

References HSolve::getGk(), hsolve_, and Eref::id().

86 {
87  return hsolve_->getGk( e.id() );
88 }
Id id() const
Definition: Eref.cpp:62
double getGk(Id id) const

+ Here is the call graph for this function:

double ZombieHHChannel::vGetIk ( const Eref e) const
virtual

Implements ChanBase.

Definition at line 105 of file ZombieHHChannel.cpp.

References HSolve::getIk(), hsolve_, and Eref::id().

106 {
107  return hsolve_->getIk( e.id() );
108 }
Id id() const
Definition: Eref.cpp:62
double getIk(Id id) const

+ Here is the call graph for this function:

int ZombieHHChannel::vGetInstant ( const Eref e) const
virtual

Implements HHChannelBase.

Definition at line 115 of file ZombieHHChannel.cpp.

References HSolve::getInstant(), hsolve_, and Eref::id().

116 {
117  return hsolve_->getInstant( e.id() );
118 }
Id id() const
Definition: Eref.cpp:62
int getInstant(Id id) const

+ Here is the call graph for this function:

double ZombieHHChannel::vGetX ( const Eref e) const
virtual

Implements HHChannelBase.

Definition at line 125 of file ZombieHHChannel.cpp.

References HSolve::getX(), hsolve_, and Eref::id().

126 {
127  return hsolve_->getX( e.id() );
128 }
Id id() const
Definition: Eref.cpp:62
double getX(Id id) const

+ Here is the call graph for this function:

HHGate * ZombieHHChannel::vGetXgate ( unsigned int  i) const
virtual

Access function used for the X gate. The index is ignored.

Implements HHChannelBase.

Definition at line 194 of file ZombieHHChannel.cpp.

195 {
196  return 0;
197 }
double ZombieHHChannel::vGetY ( const Eref e) const
virtual

Implements HHChannelBase.

Definition at line 135 of file ZombieHHChannel.cpp.

References HSolve::getY(), hsolve_, and Eref::id().

136 {
137  return hsolve_->getY( e.id() );
138 }
Id id() const
Definition: Eref.cpp:62
double getY(Id id) const

+ Here is the call graph for this function:

HHGate * ZombieHHChannel::vGetYgate ( unsigned int  i) const
virtual

Access function used for the Y gate. The index is ignored.

Implements HHChannelBase.

Definition at line 199 of file ZombieHHChannel.cpp.

200 {
201  return 0;
202 }
double ZombieHHChannel::vGetZ ( const Eref e) const
virtual

Implements HHChannelBase.

Definition at line 145 of file ZombieHHChannel.cpp.

References HSolve::getZ(), hsolve_, and Eref::id().

146 {
147  return hsolve_->getZ( e.id() );
148 }
Id id() const
Definition: Eref.cpp:62
double getZ(Id id) const

+ Here is the call graph for this function:

HHGate * ZombieHHChannel::vGetZgate ( unsigned int  i) const
virtual

Access function used for the Z gate. The index is ignored.

Implements HHChannelBase.

Definition at line 204 of file ZombieHHChannel.cpp.

205 {
206  return 0;
207 }
void ZombieHHChannel::vHandleConc ( const Eref e,
double  value 
)
virtual

Implements HHChannelBase.

Definition at line 178 of file ZombieHHChannel.cpp.

References HSolve::addConc(), hsolve_, and Eref::id().

179 {
180 
181  hsolve_->addConc(e.id(),conc);
182 
183 }
Id id() const
Definition: Eref.cpp:62
void addConc(Id id, double conc)

+ Here is the call graph for this function:

void ZombieHHChannel::vHandleVm ( double  Vm)
virtual

Implements ChanBase.

Definition at line 212 of file ZombieHHChannel.cpp.

213 {;}
void ZombieHHChannel::vProcess ( const Eref e,
ProcPtr  p 
)
virtual

Implements ChanBase.

Definition at line 168 of file ZombieHHChannel.cpp.

169 {
170  ;
171 }
void ZombieHHChannel::vReinit ( const Eref e,
ProcPtr  p 
)
virtual

Implements ChanBase.

Definition at line 173 of file ZombieHHChannel.cpp.

174 {
175  ;
176 }
void ZombieHHChannel::vSetEk ( const Eref e,
double  Ek 
)
virtual

Implements ChanBase.

Definition at line 90 of file ZombieHHChannel.cpp.

References hsolve_, Eref::id(), and HSolve::setEk().

91 {
92  hsolve_->setEk( e.id(), Ek );
93 }
Id id() const
Definition: Eref.cpp:62
void setEk(Id id, double value)

+ Here is the call graph for this function:

void ZombieHHChannel::vSetGbar ( const Eref e,
double  Gbar 
)
virtual

Implements ChanBase.

Definition at line 69 of file ZombieHHChannel.cpp.

References hsolve_, Eref::id(), and HSolve::setHHChannelGbar().

70 {
71  // cout << "in ZombieHHChannel::setGbar( " << e.id().path() << ", " << Gbar << " )\n";
72  hsolve_->setHHChannelGbar( e.id(), Gbar );
73 }
Id id() const
Definition: Eref.cpp:62
void setHHChannelGbar(Id id, double value)

+ Here is the call graph for this function:

void ZombieHHChannel::vSetGk ( const Eref e,
double  Gk 
)
virtual

Implements ChanBase.

Definition at line 80 of file ZombieHHChannel.cpp.

References hsolve_, Eref::id(), and HSolve::setGk().

81 {
82  hsolve_->setGk( e.id(), Gk );
83 }
Id id() const
Definition: Eref.cpp:62
void setGk(Id id, double value)

+ Here is the call graph for this function:

void ZombieHHChannel::vSetIk ( const Eref e,
double  Ik 
)
virtual

Implements ChanBase.

Definition at line 100 of file ZombieHHChannel.cpp.

101 {
102  ; // dummy
103 }
void ZombieHHChannel::vSetInstant ( const Eref e,
int  instant 
)
virtual

Implements HHChannelBase.

Definition at line 110 of file ZombieHHChannel.cpp.

References hsolve_, Eref::id(), and HSolve::setInstant().

111 {
112  hsolve_->setInstant( e.id(), instant );
113 }
Id id() const
Definition: Eref.cpp:62
void setInstant(Id id, int instant)

+ Here is the call graph for this function:

void ZombieHHChannel::vSetModulation ( const Eref e,
double  value 
)
virtual

Implements ChanBase.

Definition at line 156 of file ZombieHHChannel.cpp.

References hsolve_, Eref::id(), HHChannelBase::modulation_, and HSolve::setHHmodulation().

157 {
158  if ( modulation > 0.0 ) {
159  modulation_ = modulation;
160  hsolve_->setHHmodulation( e.id(), modulation );
161  }
162 }
Id id() const
Definition: Eref.cpp:62
double modulation_
Value used to scale channel conductance up or down.
void setHHmodulation(Id id, double value)
Assign scale factor for HH channel conductance.

+ Here is the call graph for this function:

void ZombieHHChannel::vSetSolver ( const Eref e,
Id  hsolve 
)
virtual

Reimplemented from HHChannelBase.

Definition at line 215 of file ZombieHHChannel.cpp.

References Element::cinfo(), Eref::data(), Id::element(), Id::eref(), hsolve_, Cinfo::isA(), and Id::path().

216 {
217  if ( !hsolve.element()->cinfo()->isA( "HSolve" ) ) {
218  cout << "Error: ZombieHHChannel::vSetSolver: Object: " <<
219  hsolve.path() << " is not an HSolve. Aborted\n";
220  hsolve_ = 0;
221  assert( 0 );
222  return;
223  }
224  hsolve_ = reinterpret_cast< HSolve* >( hsolve.eref().data() );
225 }
char * data() const
Definition: Eref.cpp:41
Element * element() const
Synonym for Id::operator()()
Definition: Id.cpp:113
std::string path(const std::string &separator="/") const
Definition: Id.cpp:76
Eref eref() const
Definition: Id.cpp:125
Definition: HSolve.h:16
bool isA(const string &ancestor) const
Definition: Cinfo.cpp:280
const Cinfo * cinfo() const
Definition: Element.cpp:66

+ Here is the call graph for this function:

void ZombieHHChannel::vSetUseConcentration ( const Eref e,
int  value 
)
virtual

Not trivial to change Ca-dependence once HSolve has been set up, and unlikely that one would want to change this field after setup, so keeping this field read-only.

Implements HHChannelBase.

Definition at line 150 of file ZombieHHChannel.cpp.

151 {
152  cerr << "Error: HSolve::setUseConcentration(): Cannot change "
153  "'useConcentration' once HSolve has been setup.\n";
154 }
void ZombieHHChannel::vSetX ( const Eref e,
double  X 
)
virtual

Implements HHChannelBase.

Definition at line 120 of file ZombieHHChannel.cpp.

References hsolve_, Eref::id(), and HSolve::setX().

121 {
122  hsolve_->setX( e.id(), X );
123 }
Id id() const
Definition: Eref.cpp:62
void setX(Id id, double value)

+ Here is the call graph for this function:

void ZombieHHChannel::vSetXpower ( const Eref e,
double  Xpower 
)
virtual

Implements HHChannelBase.

Definition at line 51 of file ZombieHHChannel.cpp.

References hsolve_, Eref::id(), HSolve::setPowers(), HHChannelBase::Xpower_, HHChannelBase::Ypower_, and HHChannelBase::Zpower_.

52 {
53  Xpower_ = Xpower;
55 }
Id id() const
Definition: Eref.cpp:62
double Zpower_
Exponent for Z gate.
double Ypower_
Exponent for Y gate.
void setPowers(Id id, double Xpower, double Ypower, double Zpower)
Interface to channels.
double Xpower_
Exponent for X gate.

+ Here is the call graph for this function:

void ZombieHHChannel::vSetY ( const Eref e,
double  Y 
)
virtual

Implements HHChannelBase.

Definition at line 130 of file ZombieHHChannel.cpp.

References hsolve_, Eref::id(), and HSolve::setY().

131 {
132  hsolve_->setY( e.id(), Y );
133 }
Id id() const
Definition: Eref.cpp:62
void setY(Id id, double value)

+ Here is the call graph for this function:

void ZombieHHChannel::vSetYpower ( const Eref e,
double  Ypower 
)
virtual

Implements HHChannelBase.

Definition at line 57 of file ZombieHHChannel.cpp.

References hsolve_, Eref::id(), HSolve::setPowers(), HHChannelBase::Xpower_, HHChannelBase::Ypower_, and HHChannelBase::Zpower_.

58 {
59  Ypower_ = Ypower;
61 }
Id id() const
Definition: Eref.cpp:62
double Zpower_
Exponent for Z gate.
double Ypower_
Exponent for Y gate.
void setPowers(Id id, double Xpower, double Ypower, double Zpower)
Interface to channels.
double Xpower_
Exponent for X gate.

+ Here is the call graph for this function:

void ZombieHHChannel::vSetZ ( const Eref e,
double  Z 
)
virtual

Implements HHChannelBase.

Definition at line 140 of file ZombieHHChannel.cpp.

References hsolve_, Eref::id(), and HSolve::setZ().

141 {
142  hsolve_->setZ( e.id(), Z );
143 }
Id id() const
Definition: Eref.cpp:62
void setZ(Id id, double value)

+ Here is the call graph for this function:

void ZombieHHChannel::vSetZpower ( const Eref e,
double  Zpower 
)
virtual

Implements HHChannelBase.

Definition at line 63 of file ZombieHHChannel.cpp.

References hsolve_, Eref::id(), HSolve::setPowers(), HHChannelBase::Xpower_, HHChannelBase::Ypower_, and HHChannelBase::Zpower_.

64 {
65  Zpower_ = Zpower;
67 }
Id id() const
Definition: Eref.cpp:62
double Zpower_
Exponent for Z gate.
double Ypower_
Exponent for Y gate.
void setPowers(Id id, double Xpower, double Ypower, double Zpower)
Interface to channels.
double Xpower_
Exponent for X gate.

+ Here is the call graph for this function:

Member Data Documentation


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