MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ZombieHHChannel.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 ** This program is part of 'MOOSE', the
3 ** Messaging Object Oriented Simulation Environment.
4 ** Copyright (C) 2003-2007 Upinder S. Bhalla. and NCBS
5 ** It is made available under the terms of the
6 ** GNU Lesser General Public License version 2.1
7 ** See the file COPYING.LIB for the full notice.
8 **********************************************************************/
9 
10 #include "ZombieHHChannel.h"
11 
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 }
36 
39 
40 
42 // Constructor
45 { ; }
46 
48 // Field function definitions
50 
51 void ZombieHHChannel::vSetXpower( const Eref& e , double Xpower )
52 {
53  Xpower_ = Xpower;
55 }
56 
57 void ZombieHHChannel::vSetYpower( const Eref& e , double Ypower )
58 {
59  Ypower_ = Ypower;
61 }
62 
63 void ZombieHHChannel::vSetZpower( const Eref& e , double Zpower )
64 {
65  Zpower_ = Zpower;
67 }
68 
69 void ZombieHHChannel::vSetGbar( const Eref& e , double Gbar )
70 {
71  // cout << "in ZombieHHChannel::setGbar( " << e.id().path() << ", " << Gbar << " )\n";
72  hsolve_->setHHChannelGbar( e.id(), Gbar );
73 }
74 
75 double ZombieHHChannel::vGetGbar( const Eref& e ) const
76 {
77  return hsolve_->getHHChannelGbar( e.id() );
78 }
79 
80 void ZombieHHChannel::vSetGk( const Eref& e , double Gk )
81 {
82  hsolve_->setGk( e.id(), Gk );
83 }
84 
85 double ZombieHHChannel::vGetGk( const Eref& e ) const
86 {
87  return hsolve_->getGk( e.id() );
88 }
89 
90 void ZombieHHChannel::vSetEk( const Eref& e , double Ek )
91 {
92  hsolve_->setEk( e.id(), Ek );
93 }
94 
95 double ZombieHHChannel::vGetEk( const Eref& e ) const
96 {
97  return hsolve_->getEk( e.id() );
98 }
99 
100 void ZombieHHChannel::vSetIk( const Eref& e , double Ik )
101 {
102  ; // dummy
103 }
104 
105 double ZombieHHChannel::vGetIk( const Eref& e ) const
106 {
107  return hsolve_->getIk( e.id() );
108 }
109 
110 void ZombieHHChannel::vSetInstant( const Eref& e , int instant )
111 {
112  hsolve_->setInstant( e.id(), instant );
113 }
114 
115 int ZombieHHChannel::vGetInstant( const Eref& e ) const
116 {
117  return hsolve_->getInstant( e.id() );
118 }
119 
120 void ZombieHHChannel::vSetX( const Eref& e , double X )
121 {
122  hsolve_->setX( e.id(), X );
123 }
124 
125 double ZombieHHChannel::vGetX( const Eref& e ) const
126 {
127  return hsolve_->getX( e.id() );
128 }
129 
130 void ZombieHHChannel::vSetY( const Eref& e , double Y )
131 {
132  hsolve_->setY( e.id(), Y );
133 }
134 
135 double ZombieHHChannel::vGetY( const Eref& e ) const
136 {
137  return hsolve_->getY( e.id() );
138 }
139 
140 void ZombieHHChannel::vSetZ( const Eref& e , double Z )
141 {
142  hsolve_->setZ( e.id(), Z );
143 }
144 
145 double ZombieHHChannel::vGetZ( const Eref& e ) const
146 {
147  return hsolve_->getZ( e.id() );
148 }
149 
151 {
152  cerr << "Error: HSolve::setUseConcentration(): Cannot change "
153  "'useConcentration' once HSolve has been setup.\n";
154 }
155 
156 void ZombieHHChannel::vSetModulation( const Eref& e , double modulation )
157 {
158  if ( modulation > 0.0 ) {
159  modulation_ = modulation;
160  hsolve_->setHHmodulation( e.id(), modulation );
161  }
162 }
163 
165 // Dest function definitions
167 
169 {
170  ;
171 }
172 
174 {
175  ;
176 }
177 
178 void ZombieHHChannel::vHandleConc( const Eref& e, double conc )
179 {
180 
181  hsolve_->addConc(e.id(),conc);
182 
183 }
184 
185 void ZombieHHChannel::vCreateGate(const Eref& e, string name)
186 {
187  cout << "Warning: ZombieHHChannel::vCreateGate\n";
188 }
189 
191 // HHGate functions
193 
194 HHGate* ZombieHHChannel::vGetXgate( unsigned int i ) const
195 {
196  return 0;
197 }
198 
199 HHGate* ZombieHHChannel::vGetYgate( unsigned int i ) const
200 {
201  return 0;
202 }
203 
204 HHGate* ZombieHHChannel::vGetZgate( unsigned int i ) const
205 {
206  return 0;
207 }
208 
210 // Assign solver
212 void ZombieHHChannel::vHandleVm( double Vm )
213 {;}
214 
215 void ZombieHHChannel::vSetSolver( const Eref& e , Id hsolve )
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 }
Id id() const
Definition: Eref.cpp:62
void setY(Id id, double value)
char * data() const
Definition: Eref.cpp:41
uint32_t value
Definition: moosemodule.h:42
void addConc(Id id, double conc)
Definition: HHGate.h:31
double modulation_
Value used to scale channel conductance up or down.
void vSetGk(const Eref &e, double Gk)
void vSetYpower(const Eref &e, double Ypower)
Element * element() const
Synonym for Id::operator()()
Definition: Id.cpp:113
void vSetEk(const Eref &e, double Ek)
std::string path(const std::string &separator="/") const
Definition: Id.cpp:76
Definition: Dinfo.h:60
double getGk(Id id) const
double Zpower_
Exponent for Z gate.
void vSetX(const Eref &e, double X)
void setX(Id id, double value)
HHGate * vGetZgate(unsigned int i) const
void setHHmodulation(Id id, double value)
Assign scale factor for HH channel conductance.
void vSetInstant(const Eref &e, int instant)
Eref eref() const
Definition: Id.cpp:125
double vGetIk(const Eref &e) const
HHGate * vGetYgate(unsigned int i) const
void vSetSolver(const Eref &e, Id hsolve)
double getHHChannelGbar(Id id) const
void vSetGbar(const Eref &e, double Gbar)
static const Cinfo * zombieHHChannelCinfo
void vSetY(const Eref &e, double Y)
void vSetModulation(const Eref &e, double value)
static const Cinfo * initCinfo()
static const Cinfo * initCinfo()
Definition: HSolve.h:16
void vSetXpower(const Eref &e, double Xpower)
double getIk(Id id) const
void vCreateGate(const Eref &e, string name)
void vProcess(const Eref &e, ProcPtr p)
void setGk(Id id, double value)
Definition: Eref.h:26
bool isA(const string &ancestor) const
Definition: Cinfo.cpp:280
double vGetGbar(const Eref &e) const
double vGetX(const Eref &e) const
double getY(Id id) const
double getZ(Id id) const
int vGetInstant(const Eref &e) const
const Cinfo * cinfo() const
Definition: Element.cpp:66
void vHandleConc(const Eref &e, double value)
void setEk(Id id, double value)
double getEk(Id id) const
double Ypower_
Exponent for Y gate.
double vGetZ(const Eref &e) const
void setZ(Id id, double value)
int getInstant(Id id) const
void setPowers(Id id, double Xpower, double Ypower, double Zpower)
Interface to channels.
void setInstant(Id id, int instant)
static char name[]
Definition: mfield.cpp:401
void vReinit(const Eref &e, ProcPtr p)
void vSetZpower(const Eref &e, double Zpower)
void setHHChannelGbar(Id id, double value)
Definition: Id.h:17
double getX(Id id) const
double vGetY(const Eref &e) const
double vGetGk(const Eref &e) const
void vSetZ(const Eref &e, double Z)
HHGate * vGetXgate(unsigned int i) const
double vGetEk(const Eref &e) const
Definition: Cinfo.h:18
double Xpower_
Exponent for X gate.
void vHandleVm(double Vm)
void vSetIk(const Eref &e, double Ik)
void vSetUseConcentration(const Eref &e, int value)