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

#include <IzhikevichNrn.h>

+ Collaboration diagram for IzhikevichNrn:

Public Member Functions

double getA () const
 
bool getAccommodating () const
 
double getAlpha () const
 
double getB () const
 
double getBeta () const
 
double getC () const
 
double getD () const
 
double getGamma () const
 
double getIm () const
 
double getInitU () const
 
double getInitVm () const
 
double getInject () const
 
double getRmByTau () const
 
double getU () const
 
double getU0 () const
 
double getVm () const
 
double getVmax () const
 
void handleChannel (double Gk, double Ek)
 
 IzhikevichNrn ()
 
void process (const Eref &eref, ProcPtr proc)
 
void reinit (const Eref &eref, ProcPtr proc)
 
void setA (double value)
 
void setAccommodating (bool value)
 
void setAlpha (double value)
 
void setB (double value)
 
void setBeta (double value)
 
void setC (double value)
 
void setD (double value)
 
void setGamma (double value)
 
void setInitU (double value)
 
void setInitVm (double value)
 
void setInject (double value)
 
void setRmByTau (double value)
 
void setU0 (double value)
 
void setVm (double value)
 
void setVmax (double value)
 
 ~IzhikevichNrn ()
 

Static Public Member Functions

static const CinfoinitCinfo ()
 

Private Attributes

double a_
 
bool accommodating_
 
double alpha_
 
double b_
 
double beta_
 
double c_
 
double d_
 
double gamma_
 
double Im_
 
double initU_
 
double initVm_
 
double inject_
 
double RmByTau_
 
double savedVm_
 
double sum_inject_
 
double u0_
 
double u_
 
double Vm_
 
double Vmax_
 

Detailed Description

Definition at line 35 of file IzhikevichNrn.h.

Constructor & Destructor Documentation

IzhikevichNrn::IzhikevichNrn ( )

Definition at line 273 of file IzhikevichNrn.cpp.

273  :
274  alpha_(40000.0), // 0.04 physiological unit
275  beta_(5000.0), // 5 physiological unit
276  gamma_(140.0), // 140 physiological unit
277  RmByTau_(1e6), // Assuming Izhikevich was using nA as unit of
278  // current, 1e6 Ohm will be the scaling term for SI
279  a_(20.0),
280  b_(200.0),
281  c_(-0.065), // -65 mV
282  d_(2.0), // assuming u is in mV/ms
283  Vm_(-0.065),
284  u_(-13.0),
285  Vmax_(0.03), // 30 mV
286  initVm_(-0.065),// -65 mV
287  initU_(-13.0),
288  sum_inject_(0.0),
289  Im_(0.0),
290  savedVm_(-0.065),
291  accommodating_(false),
292  u0_(-0.065),
293  inject_(0.0)
294 {
295  ;
296 }
double sum_inject_
IzhikevichNrn::~IzhikevichNrn ( )

Definition at line 298 of file IzhikevichNrn.cpp.

299 {
300  ;
301 }

Member Function Documentation

double IzhikevichNrn::getA ( ) const

Definition at line 307 of file IzhikevichNrn.cpp.

References a_.

Referenced by initCinfo().

308 {
309  return a_;
310 }

+ Here is the caller graph for this function:

bool IzhikevichNrn::getAccommodating ( ) const

Definition at line 444 of file IzhikevichNrn.cpp.

References accommodating_.

Referenced by initCinfo().

445 {
446  return accommodating_;
447 }

+ Here is the caller graph for this function:

double IzhikevichNrn::getAlpha ( ) const

Definition at line 379 of file IzhikevichNrn.cpp.

References alpha_.

Referenced by initCinfo().

380 {
381  return alpha_;
382 }

+ Here is the caller graph for this function:

double IzhikevichNrn::getB ( ) const

Definition at line 317 of file IzhikevichNrn.cpp.

References b_.

Referenced by initCinfo().

318 {
319  return b_;
320 }

+ Here is the caller graph for this function:

double IzhikevichNrn::getBeta ( ) const

Definition at line 389 of file IzhikevichNrn.cpp.

References beta_.

Referenced by initCinfo().

390 {
391  return beta_;
392 }

+ Here is the caller graph for this function:

double IzhikevichNrn::getC ( ) const

Definition at line 326 of file IzhikevichNrn.cpp.

References c_.

Referenced by initCinfo().

327 {
328  return c_;
329 }

+ Here is the caller graph for this function:

double IzhikevichNrn::getD ( ) const

Definition at line 336 of file IzhikevichNrn.cpp.

References d_.

Referenced by initCinfo().

337 {
338  return d_;
339 }

+ Here is the caller graph for this function:

double IzhikevichNrn::getGamma ( ) const

Definition at line 399 of file IzhikevichNrn.cpp.

References gamma_.

Referenced by initCinfo().

400 {
401  return gamma_;
402 }

+ Here is the caller graph for this function:

double IzhikevichNrn::getIm ( ) const

Definition at line 414 of file IzhikevichNrn.cpp.

References Im_.

Referenced by initCinfo().

415 {
416  return Im_;
417 }

+ Here is the caller graph for this function:

double IzhikevichNrn::getInitU ( ) const

Definition at line 434 of file IzhikevichNrn.cpp.

References initU_.

Referenced by initCinfo().

435 {
436  return initU_;
437 }

+ Here is the caller graph for this function:

double IzhikevichNrn::getInitVm ( ) const

Definition at line 424 of file IzhikevichNrn.cpp.

References initVm_.

Referenced by initCinfo().

425 {
426  return initVm_;
427 }

+ Here is the caller graph for this function:

double IzhikevichNrn::getInject ( ) const

Definition at line 409 of file IzhikevichNrn.cpp.

References inject_.

Referenced by initCinfo().

410 {
411  return inject_;
412 }

+ Here is the caller graph for this function:

double IzhikevichNrn::getRmByTau ( ) const

Definition at line 346 of file IzhikevichNrn.cpp.

References RmByTau_.

Referenced by initCinfo().

347 {
348  return RmByTau_;
349 }

+ Here is the caller graph for this function:

double IzhikevichNrn::getU ( ) const

Definition at line 354 of file IzhikevichNrn.cpp.

References u_.

Referenced by initCinfo().

355 {
356  return u_;
357 }

+ Here is the caller graph for this function:

double IzhikevichNrn::getU0 ( ) const

Definition at line 454 of file IzhikevichNrn.cpp.

References u0_.

Referenced by initCinfo().

455 {
456  return u0_;
457 }

+ Here is the caller graph for this function:

double IzhikevichNrn::getVm ( ) const

Definition at line 359 of file IzhikevichNrn.cpp.

References savedVm_.

Referenced by initCinfo().

360 {
361  return savedVm_;
362 }

+ Here is the caller graph for this function:

double IzhikevichNrn::getVmax ( ) const

Definition at line 369 of file IzhikevichNrn.cpp.

References Vmax_.

Referenced by initCinfo().

370 {
371  return Vmax_;
372 }

+ Here is the caller graph for this function:

void IzhikevichNrn::handleChannel ( double  Gk,
double  Ek 
)

Definition at line 459 of file IzhikevichNrn.cpp.

References sum_inject_, and Vm_.

Referenced by initCinfo().

460 {
461  sum_inject_ += Gk * (Ek - Vm_);
462 }
double sum_inject_

+ Here is the caller graph for this function:

const Cinfo * IzhikevichNrn::initCinfo ( )
static

Definition at line 49 of file IzhikevichNrn.cpp.

References getA(), getAccommodating(), getAlpha(), getB(), getBeta(), getC(), getD(), getGamma(), getIm(), getInitU(), getInitVm(), getInject(), getRmByTau(), getU(), getU0(), getVm(), getVmax(), handleChannel(), Neutral::initCinfo(), IzhikevichNrnCinfo, process(), reinit(), setA(), setAccommodating(), setAlpha(), setB(), setBeta(), setC(), setD(), setGamma(), setInitU(), setInitVm(), setInject(), setRmByTau(), setU0(), setVm(), setVmax(), spikeOut(), and VmOut().

50 {
51 
52  static DestFinfo process(
53  "process",
54  "Handles process call",
56  static DestFinfo reinit(
57  "reinit",
58  "Handles reinit call",
60 
61  static Finfo * processShared[] = {
62  &process,
63  &reinit
64  };
65 
66  static SharedFinfo proc(
67  "proc",
68  "Shared message to receive Process message from scheduler",
69  processShared, sizeof( processShared ) / sizeof( Finfo* ) );
70 
72  // Field definitions
74 
76  "Vmax",
77  "Maximum membrane potential. Membrane potential is reset to c whenever"
78  " it reaches Vmax. NOTE: Izhikevich model specifies the PEAK voltage,"
79  " rather than THRSHOLD voltage. The threshold depends on the previous"
80  " history.",
84  "c",
85  "Reset potential. Membrane potential is reset to c whenever it reaches"
86  " Vmax.",
90  "d",
91  "Parameter d in Izhikevich model. Unit is V/s.",
95  "a",
96  "Parameter a in Izhikevich model. Unit is s^{-1}",
100  "b",
101  "Parameter b in Izhikevich model. Unit is s^{-1}",
105  "Vm",
106  "Membrane potential, equivalent to v in Izhikevich equation.",
110  "u",
111  "Parameter u in Izhikevich equation. Unit is V/s",
114  "Im",
115  "Total current going through the membrane. Unit is A.",
117  static ValueFinfo<IzhikevichNrn, double> initVm(
118  "initVm",
119  "Initial membrane potential. Unit is V.",
122  static ValueFinfo<IzhikevichNrn, double> inject(
123  "inject",
124  "External current injection into the neuron",
128  "initU",
129  "Initial value of u.",
132 
134  "alpha",
135  "Coefficient of v^2 in Izhikevich equation. Defaults to 0.04 in "
136  "physiological unit. In SI it should be 40000.0. Unit is V^-1 s^{-1}",
139 
141  "beta",
142  "Coefficient of v in Izhikevich model. Defaults to 5 in physiological"
143  " unit, 5000.0 for SI units. Unit is s^{-1}",
147  "gamma",
148  "Constant term in Izhikevich model. Defaults to 140 in both"
149  " physiological and SI units. unit is V/s.",
152  static ValueFinfo<IzhikevichNrn, double> RmByTau(
153  "RmByTau",
154  "Hidden coefficient of input current term (I) in Izhikevich model. Defaults to 1e9 Ohm/s.",
157 
158  static ValueFinfo<IzhikevichNrn, bool> accommodating(
159  "accommodating",
160  "True if this neuron is an accommodating one. The equation for recovery"
161  " variable u is special in this case.",
164 
166  "u0",
167  "This is used for accommodating neurons where recovery variables u is"
168  " computed as: u += tau*a*(b*(Vm-u0))",
171 
173  // MsgDest definition
175  static DestFinfo injectMsg(
176  "injectMsg",
177  "Injection current into the neuron.",
179 
180  static DestFinfo cDest(
181  "cDest",
182  "Destination message to modify parameter c at runtime.",
184 
185  static DestFinfo dDest(
186  "dDest",
187  "Destination message to modify parameter d at runtime.",
189 
190  static DestFinfo aDest(
191  "aDest",
192  "Destination message modify parameter a at runtime.",
194 
195  static DestFinfo bDest(
196  "bDest",
197  "Destination message to modify parameter b at runtime",
199 
200 
201  static DestFinfo handleChannel("handleChannel",
202  "Handles conductance and reversal potential arguments from Channel",
204 
205  static Finfo * channelShared[] = {
206  &handleChannel,
207  VmOut()
208  };
209 
210  static SharedFinfo channel("channel",
211  "This is a shared message from a IzhikevichNrn to channels."
212  "The first entry is a MsgDest for the info coming from "
213  "the channel. It expects Gk and Ek from the channel "
214  "as args. The second entry is a MsgSrc sending Vm ",
215  channelShared, sizeof( channelShared ) / sizeof( Finfo* )
216  );
217  static Finfo* IzhikevichNrnFinfos[] = {
218  &proc,
219  &Vmax,
220  &c,
221  &d,
222  &a,
223  &b,
224  &u,
225  &Vm,
226  &Im,
227  &inject,
228  &RmByTau,
229  &accommodating,
230  &u0,
231  &initVm,
232  &initU,
233  &alpha,
234  &beta,
235  &gamma,
236  &injectMsg,
237  &cDest,
238  &dDest,
239  &bDest,
240  &aDest,
241  VmOut(),
242  spikeOut(),
243  &channel,
244  };
245 
246  static string doc[] = {
247  "Name", "IzhikevichNrn",
248  "Author", "Subhasis Ray",
249  "Description", "Izhikevich model of spiking neuron "
250  "(Izhikevich,EM. 2003. Simple model of spiking neurons. Neural"
251  " Networks, IEEE Transactions on 14(6). pp 1569-1572).\n"
252  " This class obeys the equations (in physiological units):\n"
253  " dVm/dt = 0.04 * Vm^2 + 5 * Vm + 140 - u + inject\n"
254  " du/dt = a * (b * Vm - u)\n"
255  " if Vm >= Vmax then Vm = c and u = u + d\n"
256  " Vmax = 30 mV in the paper."
257  };
258  static Dinfo< IzhikevichNrn > dinfo;
259  static Cinfo IzhikevichNrnCinfo(
260  "IzhikevichNrn",
262  IzhikevichNrnFinfos,
263  sizeof( IzhikevichNrnFinfos ) / sizeof( Finfo* ),
264  &dinfo,
265  doc,
266  sizeof(doc)/sizeof(string));
267 
268  return &IzhikevichNrnCinfo;
269 }
void setBeta(double value)
void handleChannel(double Gk, double Ek)
Definition: Dinfo.h:60
void setB(double value)
double getGamma() const
void setVm(double value)
void setAlpha(double value)
double getU0() const
void setU0(double value)
double getVm() const
Definition: OpFunc.h:40
void setAccommodating(bool value)
void setInitU(double value)
double getIm() const
double getC() const
static const Cinfo * IzhikevichNrnCinfo
static SrcFinfo1< double > * spikeOut()
void setC(double value)
double getRmByTau() const
double getAlpha() const
void setInitVm(double value)
double getInitU() const
void reinit(const Eref &eref, ProcPtr proc)
Definition: OpFunc.h:27
void setInject(double value)
void setGamma(double value)
bool getAccommodating() const
double getBeta() const
double getU() const
double getB() const
void setRmByTau(double value)
void setD(double value)
static SrcFinfo1< double > * VmOut()
double getVmax() const
double getInject() const
void setVmax(double value)
double getA() const
static const Cinfo * initCinfo()
Definition: Neutral.cpp:16
void process(const Eref &eref, ProcPtr proc)
Definition: Cinfo.h:18
void setA(double value)
double getD() const
double getInitVm() const
Definition: Finfo.h:12

+ Here is the call graph for this function:

void IzhikevichNrn::process ( const Eref eref,
ProcPtr  proc 
)

Definition at line 464 of file IzhikevichNrn.cpp.

References a_, accommodating_, alpha_, b_, beta_, c_, ProcInfo::currTime, d_, ProcInfo::dt, gamma_, Im_, inject_, RmByTau_, savedVm_, spikeOut(), sum_inject_, u0_, u_, Vm_, Vmax_, and VmOut().

Referenced by initCinfo().

465 {
466  Vm_ += proc->dt * ((alpha_ * Vm_ + beta_) * Vm_
467  + gamma_ - u_ + RmByTau_ * sum_inject_);
468  if (accommodating_){
469  u_ += proc->dt * a_ * b_ * (Vm_ - u0_);
470  } else {
471  u_ += proc->dt * a_ * (b_ * Vm_ - u_);
472  }
473  Im_ = sum_inject_;
474  sum_inject_ = inject_;
475  // This check is to ensure that checking Vm field will always
476  // return Vmax when Vm actually crosses Vmax.
477  if (Vm_ >= Vmax_){
478  Vm_ = c_;
479  u_ += d_;
480  savedVm_ = Vmax_;
481  VmOut()->send(eref, Vmax_);
482  spikeOut()->send(eref, proc->currTime);
483  } else {
484  savedVm_ = Vm_;
485  VmOut()->send(eref, Vm_);
486  }
487 }
double currTime
Definition: ProcInfo.h:19
double sum_inject_
static SrcFinfo1< double > * spikeOut()
double dt
Definition: ProcInfo.h:18
static SrcFinfo1< double > * VmOut()

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void IzhikevichNrn::reinit ( const Eref eref,
ProcPtr  proc 
)

Definition at line 489 of file IzhikevichNrn.cpp.

References Im_, initU_, initVm_, savedVm_, sum_inject_, u_, Vm_, and VmOut().

Referenced by initCinfo().

490 {
491  sum_inject_ = 0.0;
492  Vm_ = initVm_;
493  u_ = initU_;
494  Im_ = 0.0;
495  savedVm_ = Vm_;
496  VmOut()->send(eref, Vm_);
497 }
double sum_inject_
static SrcFinfo1< double > * VmOut()

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void IzhikevichNrn::setA ( double  value)

Definition at line 302 of file IzhikevichNrn.cpp.

References a_, and value.

Referenced by initCinfo().

303 {
304  a_ = value;
305 }
uint32_t value
Definition: moosemodule.h:42

+ Here is the caller graph for this function:

void IzhikevichNrn::setAccommodating ( bool  value)

Definition at line 439 of file IzhikevichNrn.cpp.

References accommodating_, and value.

Referenced by initCinfo().

440 {
442 }
uint32_t value
Definition: moosemodule.h:42

+ Here is the caller graph for this function:

void IzhikevichNrn::setAlpha ( double  value)

Definition at line 374 of file IzhikevichNrn.cpp.

References alpha_, and value.

Referenced by initCinfo().

375 {
376  alpha_ = value;
377 }
uint32_t value
Definition: moosemodule.h:42

+ Here is the caller graph for this function:

void IzhikevichNrn::setB ( double  value)

Definition at line 312 of file IzhikevichNrn.cpp.

References b_, and value.

Referenced by initCinfo().

313 {
314  b_ = value;
315 }
uint32_t value
Definition: moosemodule.h:42

+ Here is the caller graph for this function:

void IzhikevichNrn::setBeta ( double  value)

Definition at line 384 of file IzhikevichNrn.cpp.

References beta_, and value.

Referenced by initCinfo().

385 {
386  beta_ = value;
387 }
uint32_t value
Definition: moosemodule.h:42

+ Here is the caller graph for this function:

void IzhikevichNrn::setC ( double  value)

Definition at line 321 of file IzhikevichNrn.cpp.

References c_, and value.

Referenced by initCinfo().

322 {
323  c_ = value;
324 }
uint32_t value
Definition: moosemodule.h:42

+ Here is the caller graph for this function:

void IzhikevichNrn::setD ( double  value)

Definition at line 331 of file IzhikevichNrn.cpp.

References d_, and value.

Referenced by initCinfo().

332 {
333  d_ = value;
334 }
uint32_t value
Definition: moosemodule.h:42

+ Here is the caller graph for this function:

void IzhikevichNrn::setGamma ( double  value)

Definition at line 394 of file IzhikevichNrn.cpp.

References gamma_, and value.

Referenced by initCinfo().

395 {
396  gamma_ = value;
397 }
uint32_t value
Definition: moosemodule.h:42

+ Here is the caller graph for this function:

void IzhikevichNrn::setInitU ( double  value)

Definition at line 429 of file IzhikevichNrn.cpp.

References initU_, and value.

Referenced by initCinfo().

430 {
431  initU_ = value;
432 }
uint32_t value
Definition: moosemodule.h:42

+ Here is the caller graph for this function:

void IzhikevichNrn::setInitVm ( double  value)

Definition at line 419 of file IzhikevichNrn.cpp.

References initVm_, and value.

Referenced by initCinfo().

420 {
421  initVm_ = value;
422 }
uint32_t value
Definition: moosemodule.h:42

+ Here is the caller graph for this function:

void IzhikevichNrn::setInject ( double  value)

Definition at line 404 of file IzhikevichNrn.cpp.

References inject_, and value.

Referenced by initCinfo().

405 {
406  inject_ = value;
407 }
uint32_t value
Definition: moosemodule.h:42

+ Here is the caller graph for this function:

void IzhikevichNrn::setRmByTau ( double  value)

Definition at line 341 of file IzhikevichNrn.cpp.

References RmByTau_, and value.

Referenced by initCinfo().

342 {
343  RmByTau_ = value;
344 }
uint32_t value
Definition: moosemodule.h:42

+ Here is the caller graph for this function:

void IzhikevichNrn::setU0 ( double  value)

Definition at line 449 of file IzhikevichNrn.cpp.

References u0_, and value.

Referenced by initCinfo().

450 {
451  u0_ = value;
452 }
uint32_t value
Definition: moosemodule.h:42

+ Here is the caller graph for this function:

void IzhikevichNrn::setVm ( double  value)

Definition at line 350 of file IzhikevichNrn.cpp.

References value, and Vm_.

Referenced by initCinfo().

351 {
352  Vm_ = value;
353 }
uint32_t value
Definition: moosemodule.h:42

+ Here is the caller graph for this function:

void IzhikevichNrn::setVmax ( double  value)

Definition at line 364 of file IzhikevichNrn.cpp.

References value, and Vmax_.

Referenced by initCinfo().

365 {
366  Vmax_ = value;
367 }
uint32_t value
Definition: moosemodule.h:42

+ Here is the caller graph for this function:

Member Data Documentation

double IzhikevichNrn::a_
private

Definition at line 101 of file IzhikevichNrn.h.

Referenced by getA(), process(), and setA().

bool IzhikevichNrn::accommodating_
private

Definition at line 113 of file IzhikevichNrn.h.

Referenced by getAccommodating(), process(), and setAccommodating().

double IzhikevichNrn::alpha_
private

Definition at line 97 of file IzhikevichNrn.h.

Referenced by getAlpha(), process(), and setAlpha().

double IzhikevichNrn::b_
private

Definition at line 102 of file IzhikevichNrn.h.

Referenced by getB(), process(), and setB().

double IzhikevichNrn::beta_
private

Definition at line 98 of file IzhikevichNrn.h.

Referenced by getBeta(), process(), and setBeta().

double IzhikevichNrn::c_
private

Definition at line 103 of file IzhikevichNrn.h.

Referenced by getC(), process(), and setC().

double IzhikevichNrn::d_
private

Definition at line 104 of file IzhikevichNrn.h.

Referenced by getD(), process(), and setD().

double IzhikevichNrn::gamma_
private

Definition at line 99 of file IzhikevichNrn.h.

Referenced by getGamma(), process(), and setGamma().

double IzhikevichNrn::Im_
private

Definition at line 111 of file IzhikevichNrn.h.

Referenced by getIm(), process(), and reinit().

double IzhikevichNrn::initU_
private

Definition at line 109 of file IzhikevichNrn.h.

Referenced by getInitU(), reinit(), and setInitU().

double IzhikevichNrn::initVm_
private

Definition at line 108 of file IzhikevichNrn.h.

Referenced by getInitVm(), reinit(), and setInitVm().

double IzhikevichNrn::inject_
private

Definition at line 115 of file IzhikevichNrn.h.

Referenced by getInject(), process(), and setInject().

double IzhikevichNrn::RmByTau_
private

Definition at line 100 of file IzhikevichNrn.h.

Referenced by getRmByTau(), process(), and setRmByTau().

double IzhikevichNrn::savedVm_
private

Definition at line 112 of file IzhikevichNrn.h.

Referenced by getVm(), process(), and reinit().

double IzhikevichNrn::sum_inject_
private

Definition at line 110 of file IzhikevichNrn.h.

Referenced by handleChannel(), process(), and reinit().

double IzhikevichNrn::u0_
private

Definition at line 114 of file IzhikevichNrn.h.

Referenced by getU0(), process(), and setU0().

double IzhikevichNrn::u_
private

Definition at line 106 of file IzhikevichNrn.h.

Referenced by getU(), process(), and reinit().

double IzhikevichNrn::Vm_
private

Definition at line 105 of file IzhikevichNrn.h.

Referenced by handleChannel(), process(), reinit(), and setVm().

double IzhikevichNrn::Vmax_
private

Definition at line 107 of file IzhikevichNrn.h.

Referenced by getVmax(), process(), and setVmax().


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