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

#include <NMDAChan.h>

+ Inheritance diagram for NMDAChan:
+ Collaboration diagram for NMDAChan:

Public Member Functions

void assignIntCa (double v)
 
double getCMg () const
 
double getCondFraction () const
 
double getExtCa () const
 Set external conc. More...
 
double getICa () const
 
double getIntCa () const
 Set external conc. More...
 
double getIntCaOffset () const
 
double getIntCaScale () const
 
double getKMg_A () const
 
double getKMg_B () const
 
double getPermeability () const
 
double getTemperature () const
 
 NMDAChan ()
 
void setCMg (double CMg)
 
void setCondFraction (double v)
 
void setExtCa (double conc)
 
void setIntCa (double conc)
 
void setIntCaOffset (double v)
 
void setIntCaScale (double v)
 
void setKMg_A (double Gbar)
 
void setKMg_B (double Ek)
 
void setPermeability (double permeability)
 
void setTemperature (double temperature)
 
void vProcess (const Eref &e, ProcPtr p)
 
void vReinit (const Eref &e, ProcPtr p)
 
 ~NMDAChan ()
 
- Public Member Functions inherited from SynChan
void activation (double val)
 
double calcGk ()
 Update alpha function terms for synaptic channel. More...
 
bool getNormalizeWeights () const
 
double getTau1 () const
 
double getTau2 () const
 
void normalizeGbar ()
 
void setNormalizeWeights (bool value)
 
void setTau1 (double tau1)
 
void setTau2 (double tau2)
 
 SynChan ()
 
void vProcess (const Eref &e, ProcPtr p)
 
void vReinit (const Eref &e, ProcPtr p)
 
void vSetGbar (const Eref &e, double Gbar)
 
 ~SynChan ()
 
- 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
 
double vGetModulation (const Eref &e) const
 
void vHandleVm (double Vm)
 
void vSetEk (const Eref &e, double Ek)
 
void vSetGk (const Eref &e, double Gk)
 
void vSetIk (const Eref &e, double Ic)
 
void vSetModulation (const Eref &e, double modulation)
 
 ~ChanCommon ()
 
- 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 SynChan
static const CinfoinitCinfo ()
 
- Static Public Member Functions inherited from ChanCommon
static const CinfoinitCinfo ()
 Specify the Class Info static variable for initialization. More...
 
- 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 Attributes

double Cin_
 
double CMg_
 [Mg] in mM More...
 
double condFraction_
 
double const_
 
double Cout_
 
double ICa_
 
double intCaOffset_
 
double intCaScale_
 
double KMg_A_
 1/eta More...
 
double KMg_B_
 1/gamma More...
 
double temperature_
 

Static Private Attributes

static const double valency_ = 2.0
 

Additional Inherited Members

- Protected Attributes inherited from SynChan
double activation_
 
double dt_
 
double norm_
 
int normalizeWeights_
 
double tau1_
 
double tau2_
 
double X_
 
double xconst1_
 
double xconst2_
 
double Y_
 
double yconst1_
 
double yconst2_
 
- Protected Attributes inherited from ChanCommon
double Vm_
 Vm_ is input variable from compartment, used for most rates. More...
 

Detailed Description

The NMDAChan incorporates calculations for Mg block, Nernst potential and/or GHK estimates for the fraction of current carried by Ca. These can also be done by messaging but it is messy and slow, so I've lumped them. Also I've assumed that we're only dealing with the GHK equation for Ca. This is not so good considering that other ions also go through the channel.

Definition at line 21 of file NMDAChan.h.

Constructor & Destructor Documentation

NMDAChan::NMDAChan ( )

Definition at line 168 of file NMDAChan.cpp.

169  :
170  KMg_A_( 1.0 ), // These are NOT the same as the A, B state
171  KMg_B_( 1.0 ), //. variables used for Exp Euler integration.
172  CMg_( 1.0 ),
173  temperature_( 300 ),
174  Cout_( 1.5 ),
175  Cin_( 0.0008 ),
176  intCaScale_( 1.0 ),
177  intCaOffset_( 0.0 ),
178  condFraction_( 0.02 ),
179  ICa_( 0.0 ),
181 {;}
double condFraction_
Definition: NMDAChan.h:82
double intCaOffset_
Definition: NMDAChan.h:81
const double FaradayConst
Definition: consts.cpp:17
double intCaScale_
Definition: NMDAChan.h:80
double temperature_
Definition: NMDAChan.h:77
const double GasConst
Definition: consts.cpp:19
double Cout_
Definition: NMDAChan.h:78
double CMg_
[Mg] in mM
Definition: NMDAChan.h:72
double Cin_
Definition: NMDAChan.h:79
double ICa_
Definition: NMDAChan.h:83
double const_
Definition: NMDAChan.h:84
double KMg_B_
1/gamma
Definition: NMDAChan.h:70
double KMg_A_
1/eta
Definition: NMDAChan.h:68
static const double valency_
Definition: NMDAChan.h:87
NMDAChan::~NMDAChan ( )

Definition at line 183 of file NMDAChan.cpp.

184 {;}

Member Function Documentation

void NMDAChan::assignIntCa ( double  v)

Definition at line 306 of file NMDAChan.cpp.

References Cin_, intCaOffset_, and intCaScale_.

Referenced by initCinfo().

307 {
308  Cin_ = v * intCaScale_ + intCaOffset_;
309 }
double intCaOffset_
Definition: NMDAChan.h:81
double intCaScale_
Definition: NMDAChan.h:80
double Cin_
Definition: NMDAChan.h:79

+ Here is the caller graph for this function:

double NMDAChan::getCMg ( ) const

Definition at line 222 of file NMDAChan.cpp.

References CMg_.

Referenced by initCinfo().

223 {
224  return CMg_;
225 }
double CMg_
[Mg] in mM
Definition: NMDAChan.h:72

+ Here is the caller graph for this function:

double NMDAChan::getCondFraction ( ) const

Definition at line 279 of file NMDAChan.cpp.

References condFraction_.

Referenced by initCinfo().

280 {
281  return condFraction_;
282 }
double condFraction_
Definition: NMDAChan.h:82

+ Here is the caller graph for this function:

double NMDAChan::getExtCa ( ) const

Set external conc.

Definition at line 235 of file NMDAChan.cpp.

References Cout_.

Referenced by initCinfo().

236 {
237  return Cout_;
238 }
double Cout_
Definition: NMDAChan.h:78

+ Here is the caller graph for this function:

double NMDAChan::getICa ( ) const

Definition at line 284 of file NMDAChan.cpp.

References ICa_.

Referenced by initCinfo().

285 {
286  return ICa_;
287 }
double ICa_
Definition: NMDAChan.h:83

+ Here is the caller graph for this function:

double NMDAChan::getIntCa ( ) const

Set external conc.

Definition at line 249 of file NMDAChan.cpp.

References Cin_.

Referenced by initCinfo().

250 {
251  return Cin_;
252 }
double Cin_
Definition: NMDAChan.h:79

+ Here is the caller graph for this function:

double NMDAChan::getIntCaOffset ( ) const

Definition at line 269 of file NMDAChan.cpp.

References intCaOffset_.

Referenced by initCinfo().

270 {
271  return intCaOffset_;
272 }
double intCaOffset_
Definition: NMDAChan.h:81

+ Here is the caller graph for this function:

double NMDAChan::getIntCaScale ( ) const

Definition at line 259 of file NMDAChan.cpp.

References intCaScale_.

Referenced by initCinfo().

260 {
261  return intCaScale_;
262 }
double intCaScale_
Definition: NMDAChan.h:80

+ Here is the caller graph for this function:

double NMDAChan::getKMg_A ( ) const

Definition at line 198 of file NMDAChan.cpp.

References KMg_A_.

Referenced by initCinfo().

199 {
200  return KMg_A_;
201 }
double KMg_A_
1/eta
Definition: NMDAChan.h:68

+ Here is the caller graph for this function:

double NMDAChan::getKMg_B ( ) const

Definition at line 210 of file NMDAChan.cpp.

References KMg_B_.

Referenced by initCinfo().

211 {
212  return KMg_B_;
213 }
double KMg_B_
1/gamma
Definition: NMDAChan.h:70

+ Here is the caller graph for this function:

double NMDAChan::getPermeability ( ) const
double NMDAChan::getTemperature ( ) const

Definition at line 289 of file NMDAChan.cpp.

References temperature_.

Referenced by initCinfo().

290 {
291  return temperature_;
292 }
double temperature_
Definition: NMDAChan.h:77

+ Here is the caller graph for this function:

const Cinfo * NMDAChan::initCinfo ( )
static

Definition at line 27 of file NMDAChan.cpp.

References assignIntCa(), getCMg(), getCondFraction(), getExtCa(), ChanBase::getGbar(), getICa(), getIntCa(), getIntCaOffset(), getIntCaScale(), getKMg_A(), getKMg_B(), getTemperature(), ICaOut(), SynChan::initCinfo(), NMDAChanCinfo, ChanBase::permeability(), setCMg(), setCondFraction(), setExtCa(), ChanBase::setGbar(), setIntCa(), setIntCaOffset(), setIntCaScale(), setKMg_A(), setKMg_B(), and setTemperature().

28 {
30  // Shared messages
33  // Dest definitions
36  // Field definitions
38  static ValueFinfo< NMDAChan, double > KMg_A( "KMg_A",
39  "1/eta",
42  );
43  static ValueFinfo< NMDAChan, double > KMg_B( "KMg_B",
44  "1/gamma",
47  );
48  static ValueFinfo< NMDAChan, double > CMg( "CMg",
49  "[Mg] in mM",
52  );
53  static ValueFinfo< NMDAChan, double > temperature( "temperature",
54  "Temperature in degrees Kelvin.",
57  );
58  static ValueFinfo< NMDAChan, double > extCa( "extCa",
59  "External concentration of Calcium in millimolar",
62  );
63  static ValueFinfo< NMDAChan, double > intCa( "intCa",
64  "Internal concentration of Calcium in millimolar."
65  "This is the final value used by the internal calculations, "
66  "and may also be updated by the assignIntCa message after "
67  "offset and scaling.",
70  );
71  static ValueFinfo< NMDAChan, double > intCaScale( "intCaScale",
72  "Scale factor for internal concentration of Calcium in mM, "
73  "applied to values coming in through the assignIntCa message. "
74  "Required because in many models the units of calcium may "
75  "differ. ",
78  );
79  static ValueFinfo< NMDAChan, double > intCaOffset( "intCaOffset",
80  "Offsetfor internal concentration of Calcium in mM, "
81  "applied _after_ the scaling to mM is done. "
82  "Applied to values coming in through the assignIntCa message. "
83  "Required because in many models the units of calcium may "
84  "differ. ",
87  );
88  static ValueFinfo< NMDAChan, double > condFraction( "condFraction",
89  "Fraction of total channel conductance that is due to the "
90  "passage of Ca ions. This is related to the ratio of "
91  "permeabilities of different ions, and is typically in "
92  "the range of 0.02. This small fraction is largely because "
93  "the concentrations of Na and K ions are far larger than that "
94  "of Ca. Thus, even though the channel is more permeable to "
95  "Ca, the conductivity and hence current due to Ca is smaller. ",
98  );
100  "Current carried by Ca ions",
102  );
104  "permeability",
105  "Permeability. Alias for Gbar. Note that the mapping is not"
106  " really correct. Permeability is in units of m/s whereas "
107  "Gbar is 1/ohm. Some nasty scaling is involved in the "
108  "conversion, some of which itself involves concentration "
109  "variables. Done internally. ",
112  );
114  static DestFinfo assignIntCa( "assignIntCa",
115  "Assign the internal concentration of Ca. The final value "
116  "is computed as: "
117  " intCa = assignIntCa * intCaScale + intCaOffset ",
119  );
121  static Finfo* NMDAChanFinfos[] =
122  {
123  &KMg_A, // Value
124  &KMg_B, // Value
125  &CMg, // Value
126  &temperature, // Value
127  &extCa, // Value
128  &intCa, // Value
129  &intCaScale, // Value
130  &intCaOffset, // Value
131  &condFraction, // Value
132  &ICa, // ReadOnlyValue
133  &permeability, // ElementValue
134  &assignIntCa, // Dest
135  ICaOut(), // Src
136  };
137 
138  static string doc[] =
139  {
140  "Name", "NMDAChan",
141  "Author", "Upinder S. Bhalla, 2007, NCBS",
142  "Description", "NMDAChan: Ligand-gated ion channel incorporating "
143  "both the Mg block and a GHK calculation for Calcium "
144  "component of the current carried by the channel. "
145  "Assumes a steady reversal potential regardless of "
146  "Ca gradients. "
147  "Derived from SynChan. "
148  };
149  static Dinfo< NMDAChan > dinfo;
150  static Cinfo NMDAChanCinfo(
151  "NMDAChan",
153  NMDAChanFinfos,
154  sizeof( NMDAChanFinfos )/sizeof(Finfo *),
155  &dinfo,
156  doc,
157  sizeof( doc ) / sizeof( string )
158  );
159 
160  return &NMDAChanCinfo;
161 }
static const Cinfo * initCinfo()
Definition: SynChan.cpp:20
void setIntCaOffset(double v)
Definition: NMDAChan.cpp:264
void setCondFraction(double v)
Definition: NMDAChan.cpp:274
Definition: Dinfo.h:60
double getIntCaOffset() const
Definition: NMDAChan.cpp:269
double getTemperature() const
Definition: NMDAChan.cpp:289
double getExtCa() const
Set external conc.
Definition: NMDAChan.cpp:235
SrcFinfo1< double > * ICaOut()
Definition: NMDAChan.cpp:20
double getKMg_A() const
Definition: NMDAChan.cpp:198
double getCMg() const
Definition: NMDAChan.cpp:222
void setExtCa(double conc)
Definition: NMDAChan.cpp:227
void setKMg_B(double Ek)
Definition: NMDAChan.cpp:202
static SrcFinfo1< double > * permeability()
Definition: ChanBase.cpp:14
double getCondFraction() const
Definition: NMDAChan.cpp:279
void setIntCaScale(double v)
Definition: NMDAChan.cpp:254
double getIntCaScale() const
Definition: NMDAChan.cpp:259
double getICa() const
Definition: NMDAChan.cpp:284
Definition: OpFunc.h:27
void assignIntCa(double v)
Definition: NMDAChan.cpp:306
void setIntCa(double conc)
Definition: NMDAChan.cpp:240
void setCMg(double CMg)
Definition: NMDAChan.cpp:214
void setKMg_A(double Gbar)
Definition: NMDAChan.cpp:190
double getIntCa() const
Set external conc.
Definition: NMDAChan.cpp:249
void setGbar(const Eref &e, double Gbar)
Definition: ChanBase.cpp:185
static const Cinfo * NMDAChanCinfo
Definition: NMDAChan.cpp:163
double getGbar(const Eref &e) const
Definition: ChanBase.cpp:191
Definition: Cinfo.h:18
void setTemperature(double temperature)
Definition: NMDAChan.cpp:293
Definition: Finfo.h:12
double getKMg_B() const
Definition: NMDAChan.cpp:210

+ Here is the call graph for this function:

void NMDAChan::setCMg ( double  CMg)

Definition at line 214 of file NMDAChan.cpp.

References CMg_, and EPSILON.

Referenced by initCinfo().

215 {
216  if ( CMg < EPSILON ) {
217  cout << "Error: CMg = " << CMg << " must be > 0. Not set.\n";
218  } else {
219  CMg_ = CMg;
220  }
221 }
const double EPSILON
Definition: NMDAChan.cpp:17
double CMg_
[Mg] in mM
Definition: NMDAChan.h:72

+ Here is the caller graph for this function:

void NMDAChan::setCondFraction ( double  v)

Definition at line 274 of file NMDAChan.cpp.

References condFraction_.

Referenced by initCinfo().

275 {
276  condFraction_ = v;
277 }
double condFraction_
Definition: NMDAChan.h:82

+ Here is the caller graph for this function:

void NMDAChan::setExtCa ( double  conc)

Definition at line 227 of file NMDAChan.cpp.

References Cout_, and EPSILON.

Referenced by initCinfo().

228 {
229  if ( Cout < EPSILON ) {
230  cout << "Error: Cout = " << Cout << " must be > 0. Not set.\n";
231  } else {
232  Cout_ = Cout;
233  }
234 }
const double EPSILON
Definition: NMDAChan.cpp:17
double Cout_
Definition: NMDAChan.h:78

+ Here is the caller graph for this function:

void NMDAChan::setIntCa ( double  conc)

Definition at line 240 of file NMDAChan.cpp.

References Cin_.

Referenced by initCinfo().

241 {
242  if ( Cin < 0.0 ) {
243  cout << "Error: IntCa = " << Cin << " must be > 0. Not set.\n";
244  } else {
245  Cin_ = Cin;
246  }
247 }
double Cin_
Definition: NMDAChan.h:79

+ Here is the caller graph for this function:

void NMDAChan::setIntCaOffset ( double  v)

Definition at line 264 of file NMDAChan.cpp.

References intCaOffset_.

Referenced by initCinfo().

265 {
266  intCaOffset_ = v;
267 }
double intCaOffset_
Definition: NMDAChan.h:81

+ Here is the caller graph for this function:

void NMDAChan::setIntCaScale ( double  v)

Definition at line 254 of file NMDAChan.cpp.

References intCaScale_.

Referenced by initCinfo().

255 {
256  intCaScale_ = v;
257 }
double intCaScale_
Definition: NMDAChan.h:80

+ Here is the caller graph for this function:

void NMDAChan::setKMg_A ( double  Gbar)

Definition at line 190 of file NMDAChan.cpp.

References EPSILON, and KMg_A_.

Referenced by initCinfo().

191 {
192  if ( KMg_A < EPSILON ) {
193  cout << "Error: KMg_A=" << KMg_A << " must be > 0. Not set.\n";
194  } else {
195  KMg_A_ = KMg_A;
196  }
197 }
const double EPSILON
Definition: NMDAChan.cpp:17
double KMg_A_
1/eta
Definition: NMDAChan.h:68

+ Here is the caller graph for this function:

void NMDAChan::setKMg_B ( double  Ek)

Definition at line 202 of file NMDAChan.cpp.

References EPSILON, and KMg_B_.

Referenced by initCinfo().

203 {
204  if ( KMg_B < EPSILON ) {
205  cout << "Error: KMg_B=" << KMg_B << " must be > 0. Not set.\n";
206  } else {
207  KMg_B_ = KMg_B;
208  }
209 }
const double EPSILON
Definition: NMDAChan.cpp:17
double KMg_B_
1/gamma
Definition: NMDAChan.h:70

+ Here is the caller graph for this function:

void NMDAChan::setPermeability ( double  permeability)
void NMDAChan::setTemperature ( double  temperature)

Definition at line 293 of file NMDAChan.cpp.

References const_, EPSILON, FaradayConst, GasConst, temperature_, and valency_.

Referenced by initCinfo().

294 {
295  if ( temperature < EPSILON ) {
296  cout << "Error: temperature = " << temperature << " must be > 0. Not set.\n";
297  return;
298  }
299  temperature_ = temperature;
301 }
const double FaradayConst
Definition: consts.cpp:17
const double EPSILON
Definition: NMDAChan.cpp:17
double temperature_
Definition: NMDAChan.h:77
const double GasConst
Definition: consts.cpp:19
double const_
Definition: NMDAChan.h:84
static const double valency_
Definition: NMDAChan.h:87

+ Here is the caller graph for this function:

void NMDAChan::vProcess ( const Eref e,
ProcPtr  info 
)
virtual

Note the implicit mapping between permeability and conductance. From the GENESIS source code: A thought about the units, by EDS 6/95 (based on Hille 92): Units: p in M/s EF/RT and z are dimensionless F in C/mol Cin and Cout in mM==mol/m^3 Then Ik is really in units of C/s/m^2==A/m^2, so we compute a current density. As we replace in practice p by Gbar, which has already been scaled for surface, we get rid of the density factor.

Implements ChanBase.

Definition at line 330 of file NMDAChan.cpp.

References SynChan::calcGk(), Cin_, CMg_, condFraction_, const_, Cout_, ICa_, ICaOut(), KMg_A_, KMg_B_, moose::log(), ChanCommon::sendProcessMsgs(), ChanBase::setGk(), ChanCommon::updateIk(), and ChanCommon::Vm_.

331 {
332  // First do the regular channel current calculations for the
333  // summed ions, in which the NMDAR behaves like a regular channel
334  // modulo the Mg block.
335  double Gk = SynChan::calcGk();
336  double KMg = KMg_A_ * exp(Vm_/KMg_B_);
337  Gk *= KMg / (KMg + CMg_);
338  ChanBase::setGk( e, Gk );
340 
342  // Here we do the calculations for the Ca portion of the current.
343  // Total current is still done using a regular reversal potl for chan.
344  // Here we use Gk = Permeability * Z * FaradayConst * area / dV.
345  // Note that Cin and Cout are in moles/m^3, and FaradayConst is in
346  // Coulombs/mole.
347  //
348  // The GHK flux equation for an ion S (Hille 2001):
349  // \Phi_{S} = P_{S}z_{S}^2\frac{V_{m}F^{2}}{RT}\frac{[\mbox{S}]_{i} - [\mbox{S}]_{o}\exp(-z_{S}V_{m}F/RT)}{1 - \exp(-z_{S}V_{m}F/RT)}
350  // where
351  // \PhiS is the current across the membrane carried by ion S, measured in amperes per square meter (A·m−2)
352  // PS is the permeability of the membrane for ion S measured in m·s−1
353  // zS is the valence of ion S
354  // Vm is the transmembrane potential in volts
355  // F is the Faraday constant, equal to 96,485 C·mol−1 or J·V−1·mol−1
356  // R is the gas constant, equal to 8.314 J·K−1·mol−1
357  // T is the absolute temperature, measured in Kelvin (= degrees Celsius + 273.15)
358  // [S]i is the intracellular concentration of ion S, measured in mol·m−3 or mmol·l−1
359  // [S]o is the extracellular concentration of ion S, measured in mol·m−3
360  //
361  // Put this into cleaner text, we get
362  //
363  // ICa (A/m^2) = perm * Z * Vm * F * const * (Cin-Cout * e2exponent)
364  // ----------------------
365  // (1-e2exponent)
366  //
367  // where const = zF/RT (Coulombs/J/K * K ) = Coul/J = 1/V
368  // and exponent = const * Vm ( unitless)
369  //
370  // We want ICa in Amps. We use perm times area which is m^3/s
371  // Flux ( mol/sec) = Perm (m/s ) * area (m^2) * (Cout - Cin) (mol/m^3)
372  //
373  // But we also have
374  //
375  // Flux (mol/sec) = Gk ( Coul/(sec*V) ) * dV (V) / (zF (Coul/Mol))
376  //
377  // So Perm( m/s ) * Area = Gk * dV / (Z*F * (cout - cin) )
378  //
379  // Note that dV should be just the Nernst potential for the ion, since
380  // the calculation of flux from permeability assumes no extra flux
381  // due to charge gradients.
382  //
383  // e2exponent = exp( -const * Vm)
384  //
385  // ICa (A) = (Gk * dV / (zF*(cout-cin) ) * Vm * zF * const * (Cin-Cout * e2exponent)
386  // ----------------------
387  // (1-e2exponent)
388  //
389  // = Gk * dV * Vm * const*(cin - cout*e2exponent)
390  // ------------------------------
391  // (cout-cin) * (1-e2exponent)
392  //
393  // Note how the calculation for Perm in terms of Gk has to use
394  // different terms for dV and conc, than the GHK portion.
395  //
396  // A further factor comes in because we want to relate the Gk for
397  // Ca to that for the channel as a whole. We know from Hille that
398  // the permeability of NMDAR for Ca is about 4x that for Na.
399  //
400  // Here is the calculation:
401  // Gchan = GNa + GK + GCa (Eq1)
402  // IChan = 0 = GNa*ENa + GK*EK + GCa*ECa (Eq2)
403  //
404  // Perm_Ca * area = GCa * ECa / ( ZF * (cout - cin ) ) (Eq3a)
405  // Perm_Na * area = GNa * ENa / ( ZF * (cout - cin ) ) (Eq3b)
406  // But Perm_Na ~ 0.25 * perm_Ca
407  // So GNa*ENa / (F * (cout - cin ) ) ~ 0.25*GCa*ECa/(2F*(cout-cin) )
408  // Cancelling
409  //
410  // GNa * 0.060 / (cout - cin|Na) ~ 0.25*GCa*0.128/(2*(cout-cin|Ca))
411  // GNa * 0.060 / 130 ~ GCa * 0.25 * 0.128 / (2*1.5)
412  // GNa ~ GCa * 130 * 0.25 * 0.128 / ( 2 * 1.5 * 0.060)
413  // GNa ~ 23 GCa (!!!!!!) (Eq4)
414  //
415  // Now plug into Eq2:
416  //
417  // 0 = 23GCa*0.06 - GK*0.08 + GCa*0.128
418  // So
419  // GK = GCa(0.06*23 + 0.128) / 0.06 = 25*GCa. (Not surprised any more)
420  //
421  // Finally, put into Eq1:
422  //
423  // Gchan = 23GCa + 25GCa + GCa
424  // So GCa = Gchan / 49. So condFraction ~0.02 in the vicinity of 0.0mV.
425  //
426  // Rather than build in this calculation, I'll just provide the user
427  // with a scaling field to use and set it to the default of 0.02
428  //
429  double ErevCa = log( Cout_ / Cin_ ) / const_;
430  double dV = ErevCa;
431  //double dV = ErevCa - Vm_;
432  // double dV = vGetEk( e ) - Vm_;
433  // double dV = Vm_;
434  double exponent = const_ * Vm_;
435  double e2e = exp( -exponent );
436  if ( fabs( exponent) < 0.00001 ) { // Exponent too near zero, use Taylor
437  ICa_ = Gk * dV * exponent * ( Cin_ - Cout_ * e2e ) /
438  ( ( Cin_ - Cout_ ) * (1 - 0.5 * exponent ) );
439  } else {
440  ICa_ = Gk * dV * exponent * ( Cin_ - Cout_ * e2e ) /
441  ( ( Cin_ - Cout_ ) * (1 - e2e ) );
442  }
443  ICa_ *= condFraction_; // Scale Ca current by fraction carried by Ca.
444 
445  sendProcessMsgs( e, info );
446  ICaOut()->send( e, ICa_ );
447 }
double condFraction_
Definition: NMDAChan.h:82
SrcFinfo1< double > * ICaOut()
Definition: NMDAChan.cpp:20
void updateIk()
Definition: ChanCommon.cpp:119
void log(string msg, serverity_level_ type=debug, bool redirectToConsole=true, bool removeTicks=true)
Log to console (and to a log-file)
void setGk(const Eref &e, double Gk)
Definition: ChanBase.cpp:216
double Vm_
Vm_ is input variable from compartment, used for most rates.
Definition: ChanCommon.h:80
double Cout_
Definition: NMDAChan.h:78
double calcGk()
Update alpha function terms for synaptic channel.
Definition: SynChan.cpp:200
double CMg_
[Mg] in mM
Definition: NMDAChan.h:72
double Cin_
Definition: NMDAChan.h:79
double ICa_
Definition: NMDAChan.h:83
double const_
Definition: NMDAChan.h:84
double KMg_B_
1/gamma
Definition: NMDAChan.h:70
double KMg_A_
1/eta
Definition: NMDAChan.h:68
void sendProcessMsgs(const Eref &e, const ProcPtr info)
Definition: ChanCommon.cpp:100

+ Here is the call graph for this function:

void NMDAChan::vReinit ( const Eref e,
ProcPtr  p 
)
virtual

Implements ChanBase.

Definition at line 449 of file NMDAChan.cpp.

References CMg_, EPSILON, ICaOut(), KMg_A_, KMg_B_, ChanCommon::sendReinitMsgs(), and SynChan::vReinit().

450 {
451  SynChan::vReinit( e, info );
452  if ( CMg_ < EPSILON || KMg_B_ < EPSILON || KMg_A_ < EPSILON ) {
453  cout << "Error: NMDAChan::innerReinitFunc: fields KMg_A, KMg_B, CMg\nmust be greater than zero. Resetting to 1 to avoid numerical errors\n";
454  if ( CMg_ < EPSILON ) CMg_ = 1.0;
455  if ( KMg_B_ < EPSILON ) KMg_B_ = 1.0;
456  if ( KMg_A_ < EPSILON ) KMg_A_ = 1.0;
457  }
458  sendReinitMsgs( e, info );
459  ICaOut()->send( e, 0.0 );
460 }
SrcFinfo1< double > * ICaOut()
Definition: NMDAChan.cpp:20
const double EPSILON
Definition: NMDAChan.cpp:17
void sendReinitMsgs(const Eref &e, const ProcPtr info)
Definition: ChanCommon.cpp:111
double CMg_
[Mg] in mM
Definition: NMDAChan.h:72
double KMg_B_
1/gamma
Definition: NMDAChan.h:70
void vReinit(const Eref &e, ProcPtr p)
Definition: SynChan.cpp:229
double KMg_A_
1/eta
Definition: NMDAChan.h:68

+ Here is the call graph for this function:

Member Data Documentation

double NMDAChan::Cin_
private

Definition at line 79 of file NMDAChan.h.

Referenced by assignIntCa(), getIntCa(), setIntCa(), and vProcess().

double NMDAChan::CMg_
private

[Mg] in mM

Definition at line 72 of file NMDAChan.h.

Referenced by getCMg(), setCMg(), vProcess(), and vReinit().

double NMDAChan::condFraction_
private

Definition at line 82 of file NMDAChan.h.

Referenced by getCondFraction(), setCondFraction(), and vProcess().

double NMDAChan::const_
private

Definition at line 84 of file NMDAChan.h.

Referenced by setTemperature(), and vProcess().

double NMDAChan::Cout_
private

Definition at line 78 of file NMDAChan.h.

Referenced by getExtCa(), setExtCa(), and vProcess().

double NMDAChan::ICa_
private

Definition at line 83 of file NMDAChan.h.

Referenced by getICa(), and vProcess().

double NMDAChan::intCaOffset_
private

Definition at line 81 of file NMDAChan.h.

Referenced by assignIntCa(), getIntCaOffset(), and setIntCaOffset().

double NMDAChan::intCaScale_
private

Definition at line 80 of file NMDAChan.h.

Referenced by assignIntCa(), getIntCaScale(), and setIntCaScale().

double NMDAChan::KMg_A_
private

1/eta

Definition at line 68 of file NMDAChan.h.

Referenced by getKMg_A(), setKMg_A(), vProcess(), and vReinit().

double NMDAChan::KMg_B_
private

1/gamma

Definition at line 70 of file NMDAChan.h.

Referenced by getKMg_B(), setKMg_B(), vProcess(), and vReinit().

double NMDAChan::temperature_
private

Original Gk passed by NMDA channel, we keep this separate from Gk so that the computed Gk can be recorded without being overwritten by origChannel message.

Definition at line 77 of file NMDAChan.h.

Referenced by getTemperature(), and setTemperature().

const double NMDAChan::valency_ = 2.0
staticprivate

Definition at line 87 of file NMDAChan.h.

Referenced by setTemperature().


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