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

#include <QIF.h>

+ Inheritance diagram for moose::QIF:
+ Collaboration diagram for moose::QIF:

Public Member Functions

double getA0 (const Eref &e) const
 
double getVCritical (const Eref &e) const
 
 QIF ()
 
void setA0 (const Eref &e, double val)
 
void setVCritical (const Eref &e, double val)
 
void vProcess (const Eref &e, ProcPtr p)
 
void vReinit (const Eref &e, ProcPtr p)
 
virtual ~QIF ()
 
- Public Member Functions inherited from moose::IntFireBase
void activation (double val)
 
double getLastEventTime (const Eref &e) const
 
double getRefractoryPeriod (const Eref &e) const
 
double getThresh (const Eref &e) const
 
double getVReset (const Eref &e) const
 
bool hasFired (const Eref &e) const
 
 IntFireBase ()
 
void setRefractoryPeriod (const Eref &e, double val)
 
void setThresh (const Eref &e, double val)
 
void setVReset (const Eref &e, double val)
 
virtual ~IntFireBase ()
 
- Public Member Functions inherited from moose::Compartment
void cable ()
 
 Compartment ()
 
virtual double vGetCm (const Eref &e) const
 
virtual double vGetEm (const Eref &e) const
 
virtual double vGetIm (const Eref &e) const
 
virtual double vGetInitVm (const Eref &e) const
 
virtual double vGetInject (const Eref &e) const
 
virtual double vGetRa (const Eref &e) const
 
virtual double vGetRm (const Eref &e) const
 
virtual double vGetVm (const Eref &e) const
 
void vHandleAxial (double Vm)
 
void vHandleChannel (const Eref &e, double Gk, double Ek)
 
void vHandleRaxial (double Ra, double Vm)
 
void vInitProc (const Eref &e, ProcPtr p)
 
void vInitReinit (const Eref &e, ProcPtr p)
 
void vInjectMsg (const Eref &e, double current)
 
void vRandInject (const Eref &e, double prob, double current)
 
virtual void vSetCm (const Eref &e, double Cm)
 
virtual void vSetEm (const Eref &e, double Em)
 
virtual void vSetInitVm (const Eref &e, double initVm)
 
virtual void vSetInject (const Eref &e, double Inject)
 
virtual void vSetRa (const Eref &e, double Ra)
 
virtual void vSetRm (const Eref &e, double Rm)
 
virtual void vSetVm (const Eref &e, double Vm)
 
virtual ~Compartment ()
 
- Public Member Functions inherited from moose::CompartmentBase
void cable ()
 
 CompartmentBase ()
 
void displace (double dx, double dy, double dz)
 Displaces compartment by specified distance vector. More...
 
double getCm (const Eref &e) const
 
double getDiameter () const
 
double getEm (const Eref &e) const
 
double getIm (const Eref &e) const
 
double getInitVm (const Eref &e) const
 
double getInject (const Eref &e) const
 
double getLength () const
 
double getRa (const Eref &e) const
 
double getRm (const Eref &e) const
 
double getVm (const Eref &e) const
 
double getX () const
 
double getX0 () const
 
double getY () const
 
double getY0 () const
 
double getZ () const
 
double getZ0 () const
 
void handleAxial (double Vm)
 
void handleChannel (const Eref &e, double Gk, double Ek)
 
void handleRaxial (double Ra, double Vm)
 
void initProc (const Eref &e, ProcPtr p)
 
void initReinit (const Eref &e, ProcPtr p)
 
void injectMsg (const Eref &e, double current)
 
void process (const Eref &e, ProcPtr p)
 
void randInject (const Eref &e, double prob, double current)
 
bool rangeWarning (const string &field, double value)
 
void reinit (const Eref &e, ProcPtr p)
 
void setCm (const Eref &e, double Cm)
 
void setDiameter (double diameter)
 
void setEm (const Eref &e, double Em)
 
void setGeomAndElec (const Eref &e, double length, double dia)
 Scales electrical values along with setting length, dia. More...
 
void setInitVm (const Eref &e, double initVm)
 
void setInject (const Eref &e, double Inject)
 
void setLength (double length)
 
void setRa (const Eref &e, double Ra)
 
void setRm (const Eref &e, double Rm)
 
void setVm (const Eref &e, double Vm)
 
void setX (double value)
 
void setX0 (double value)
 
void setY (double value)
 
void setY0 (double value)
 
void setZ (double value)
 
void setZ0 (double value)
 
void updateLength ()
 
virtual void vSetSolver (const Eref &e, Id hsolve)
 
virtual ~CompartmentBase ()
 

Static Public Member Functions

static const CinfoinitCinfo ()
 
- Static Public Member Functions inherited from moose::IntFireBase
static const CinfoinitCinfo ()
 
static SrcFinfo1< double > * spikeOut ()
 Message src for outgoing spikes. More...
 
- Static Public Member Functions inherited from moose::Compartment
static const CinfoinitCinfo ()
 
- Static Public Member Functions inherited from moose::CompartmentBase
static const CinfoinitCinfo ()
 
static SrcFinfo1< double > * VmOut ()
 
static void zombify (Element *orig, const Cinfo *zClass, Id hsolve)
 

Private Attributes

double a0_
 
double vCritical_
 

Additional Inherited Members

- Protected Attributes inherited from moose::IntFireBase
double activation_
 
bool fired_
 
double lastEvent_
 
double refractT_
 
double threshold_
 
double vReset_
 
- Protected Attributes inherited from moose::Compartment
double A_
 
double B_
 
double Cm_
 
double Em_
 
double Im_
 
double initVm_
 
double inject_
 
double lastIm_
 
double Ra_
 
double Rm_
 
double sumInject_
 
double Vm_
 

Detailed Description

The Quadratic Integrate and Fire class sets up an integrate-and-fire compartment, with a qudratic sub threshold behaviour.

Definition at line 21 of file QIF.h.

Constructor & Destructor Documentation

QIF::QIF ( )

Definition at line 70 of file QIF.cpp.

References a0_, and vCritical_.

71 {a0_ = 0.0;
72 vCritical_ = 0.0;}
double a0_
Definition: QIF.h:50
double vCritical_
Definition: QIF.h:49
QIF::~QIF ( )
virtual

Definition at line 74 of file QIF.cpp.

75 {;}

Member Function Documentation

double QIF::getA0 ( const Eref e) const

Definition at line 139 of file QIF.cpp.

References a0_.

Referenced by initCinfo().

140 {
141  return a0_;
142 }
double a0_
Definition: QIF.h:50

+ Here is the caller graph for this function:

double QIF::getVCritical ( const Eref e) const

Definition at line 129 of file QIF.cpp.

References vCritical_.

Referenced by initCinfo().

130 {
131  return vCritical_;
132 }
double vCritical_
Definition: QIF.h:49

+ Here is the caller graph for this function:

const Cinfo * QIF::initCinfo ( )
static

Initializes the class info.

Definition at line 19 of file QIF.cpp.

References getA0(), getVCritical(), moose::IntFireBase::initCinfo(), QIFCinfo, setA0(), and setVCritical().

20 {
21  static string doc[] =
22  {
23  "Name", "QIF",
24  "Author", "Aditya Gilra",
25  "Description", "Leaky Integrate-and-Fire neuron with Quadratic term in Vm."
26  "Based on Spiking Neuron Models book by Gerstner and Kistler."
27  "Rm*Cm * dVm/dt = a0*(Vm-Em)*(Vm-vCritical) + Rm*I"
28  };
29 
30  static ElementValueFinfo< QIF, double > vCritical(
31  "vCritical",
32  "Critical voltage for spike initiation",
35  );
36 
37 
39  "a0",
40  "Parameter in Rm*Cm dVm/dt = a0*(Vm-Em)*(Vm-vCritical) + Rm*I, a0>0",
41  &QIF::setA0,
42  &QIF::getA0
43  );
44 
45  static Finfo* QIFFinfos[] = {
46  &vCritical, // Value
47  &a0 // Value
48  };
49 
50  static Dinfo< QIF > dinfo;
51  static Cinfo QIFCinfo(
52  "QIF",
53  IntFireBase::initCinfo(), // this is the initCinfo of the parent class
54  QIFFinfos,
55  sizeof( QIFFinfos ) / sizeof (Finfo*),
56  &dinfo,
57  doc,
58  sizeof(doc)/sizeof(string)
59  );
60 
61  return &QIFCinfo;
62 }
Definition: Dinfo.h:60
double getA0(const Eref &e) const
Definition: QIF.cpp:139
double getVCritical(const Eref &e) const
Definition: QIF.cpp:129
static const Cinfo * initCinfo()
Definition: IntFireBase.cpp:27
static const Cinfo * QIFCinfo
Definition: QIF.cpp:64
void setA0(const Eref &e, double val)
Definition: QIF.cpp:134
void setVCritical(const Eref &e, double val)
Definition: QIF.cpp:124
Definition: Cinfo.h:18
Definition: Finfo.h:12

+ Here is the call graph for this function:

void QIF::setA0 ( const Eref e,
double  val 
)

Definition at line 134 of file QIF.cpp.

References a0_.

Referenced by initCinfo().

135 {
136  a0_ = val;
137 }
double a0_
Definition: QIF.h:50

+ Here is the caller graph for this function:

void QIF::setVCritical ( const Eref e,
double  val 
)

Definition at line 124 of file QIF.cpp.

References vCritical_.

Referenced by initCinfo().

125 {
126  vCritical_ = val;
127 }
double vCritical_
Definition: QIF.h:49

+ Here is the caller graph for this function:

void QIF::vProcess ( const Eref e,
ProcPtr  p 
)
virtual

The process function does the object updating and sends out messages to channels, nernsts, and so on.

Implements moose::IntFireBase.

Definition at line 81 of file QIF.cpp.

References a0_, moose::IntFireBase::activation_, moose::Compartment::Cm_, ProcInfo::currTime, ProcInfo::dt, moose::Compartment::Em_, moose::IntFireBase::fired_, moose::Compartment::Im_, moose::Compartment::inject_, moose::IntFireBase::lastEvent_, moose::Compartment::lastIm_, moose::IntFireBase::refractT_, moose::Compartment::Rm_, moose::IntFireBase::spikeOut(), moose::Compartment::sumInject_, moose::IntFireBase::threshold_, vCritical_, moose::Compartment::Vm_, moose::CompartmentBase::VmOut(), and moose::IntFireBase::vReset_.

82 {
83  // fully taking over Compartment's vProcess due to quadratic term in Vm
84  // we no longer care about A and B
85  fired_ = false;
86  if ( p->currTime < lastEvent_ + refractT_ ) {
87  Vm_ = vReset_;
88  sumInject_ = 0.0;
89  VmOut()->send( e, Vm_ );
90  } else {
91  // activation can be a continous variable (graded synapse).
92  // So integrate it at every time step, thus *dt.
93  // For a delta-fn synapse, SynHandler-s divide by dt and send activation.
94  // See: http://www.genesis-sim.org/GENESIS/Hyperdoc/Manual-26.html#synchan
95  // for this continuous definition of activation.
96  Vm_ += activation_ * p->dt;
97  activation_ = 0.0;
98  if ( Vm_ > threshold_ ) {
99  Vm_ = vReset_;
100  lastEvent_ = p->currTime;
101  fired_ = true;
102  spikeOut()->send( e, p->currTime );
103  VmOut()->send( e, Vm_ );
104  } else {
105  Vm_ += ( (inject_+sumInject_)
106  + a0_*(Vm_-Em_)*(Vm_-vCritical_)/Rm_ ) * p->dt / Cm_;
107  lastIm_ = Im_;
108  Im_ = 0.0;
109  sumInject_ = 0.0;
110  // Send out Vm to channels, SpikeGens, etc.
111  VmOut()->send( e, Vm_ );
112  }
113  }
114 }
double currTime
Definition: ProcInfo.h:19
double a0_
Definition: QIF.h:50
double dt
Definition: ProcInfo.h:18
static SrcFinfo1< double > * spikeOut()
Message src for outgoing spikes.
Definition: IntFireBase.cpp:17
double vCritical_
Definition: QIF.h:49
static SrcFinfo1< double > * VmOut()

+ Here is the call graph for this function:

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

The reinit function reinitializes all fields.

Implements moose::IntFireBase.

Definition at line 116 of file QIF.cpp.

References moose::IntFireBase::activation_, moose::IntFireBase::fired_, moose::IntFireBase::lastEvent_, moose::IntFireBase::refractT_, and moose::Compartment::vReinit().

117 {
118  activation_ = 0.0;
119  fired_ = false;
120  lastEvent_ = -refractT_; // Allow it to fire right away.
121  Compartment::vReinit( e, p );
122 }
void vReinit(const Eref &e, ProcPtr p)

+ Here is the call graph for this function:

Member Data Documentation

double moose::QIF::a0_
private

Definition at line 50 of file QIF.h.

Referenced by getA0(), QIF(), setA0(), and vProcess().

double moose::QIF::vCritical_
private

Definition at line 49 of file QIF.h.

Referenced by getVCritical(), QIF(), setVCritical(), and vProcess().


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