00001 #ifndef _HHNEURON_H_
00002 #define _HHNEURON_H_
00003
00004 #include "ODESystemBasedSpikingNeuron.h"
00005
00007
00050
00051
00052
00053
00054 class HHNeuron: public ODESystemBasedSpikingNeuron
00055 {
00056 SIMOBJECT(HHNeuron, AdvancePhase::One)
00057
00058 public:
00059 double Amembrane;
00060 double TADJM;
00061
00063 double gbar_Na;
00065 double E_Na;
00067 double gbar_K;
00069 double E_K;
00071 double gbar_M;
00073 double E_M;
00074
00076 HHNeuron(double Rm=100e6,
00077 double Cm=3e-10,
00078 double Vresting=-60e-3,
00079 double Vthresh=0.03,
00080 double Vinit=-60e-3,
00081 double Trefract=5e-3,
00082 double Inoise=0.0,
00083 double Iinject=0.0)
00084 : ODESystemBasedSpikingNeuron(5)
00085 {
00086 Amembrane=34636e-12;
00087 TADJM=2.9529;
00088
00089 this->Rm=Rm;
00090 this->Cm=Cm;
00091 this->Vresting=Vresting;
00092 this->Vthresh=Vthresh;
00093 this->Vinit=Vinit;
00094 this->Trefract=Trefract;
00095 this->Inoise=Inoise;
00096 this->Iinject=Iinject;
00097
00098
00099 gbar_Na = 4.3 * 120 * Amembrane;
00100 E_Na = 50e-3;
00101
00102 gbar_K = 100.0 * Amembrane;
00103 E_K = -90e-3;
00104
00105 gbar_M = 5.0 * Amembrane;
00106 E_M = -90e-3;
00107 };
00108
00110 double alpha_m(double V) { return 1000.0*0.32*(13.0 - V)/(exp((13.0 - V)/4.0) - 1.0); }
00111 double beta_m(double V) { return 1000.0*0.28*(V - 40.0) / (exp((V - 40.0)/5.0) - 1.0); }
00112 double infty_m(double V) { return alpha_m(V)/(beta_m(V)+alpha_m(V)); }
00113
00115 double alpha_h(double V) { return 1000.0*0.128*exp((17.0 - V - 10.0)/18.0); }
00116 double beta_h(double V) { return 1000.0*4/(1.0 + exp((40.0 - V - 10.0)/5.0)); }
00117 double infty_h(double V) { return alpha_h(V)/(beta_h(V)+alpha_h(V)); }
00118
00120 double alpha_n(double V) { return 1000.0*0.032*(15.0 - V)/(exp((15.0 - V)/5.0) - 1.0); }
00121 double beta_n(double V) { return 1000.0*0.5*exp((10.0 - V)/40.0); }
00122 double infty_n(double V) { return alpha_n(V)/(beta_n(V)+alpha_n(V)); }
00123
00125 double alpha_nM(double V) { return TADJM*1000.0*0.0001*(V+30.0)/(1.0 - exp(-(V+30.0)/9.0)); }
00126 double beta_nM(double V) { return TADJM*1000.0*-0.0001*(V+30.0)/(1.0 - exp((V+30.0)/9.0)); }
00127 double infty_nM(double V) { return alpha_nM(V)/(beta_nM(V)+alpha_nM(V)); }
00128
00129 virtual void derivatives(double t, const double y[], double f[]);
00130
00132 virtual int reset(double dt);
00133 };
00134
00135
00136 class HHINeuron : public ODESystemBasedSpikingNeuron
00137 {
00138 SIMOBJECT(HHINeuron, AdvancePhase::One)
00139
00140 public:
00141 double Amembrane;
00142
00144 double gbar_Na;
00146 double E_Na;
00147
00149 double gbar_K;
00151 double E_K;
00152
00154 HHINeuron(double Rm=100e6,
00155 double Cm=3e-10,
00156 double Vresting=-60e-3,
00157 double Vthresh=0.03,
00158 double Vinit=-60e-3,
00159 double Trefract=5e-3,
00160 double Inoise=0.0,
00161 double Iinject=0.0)
00162 : ODESystemBasedSpikingNeuron(4)
00163 {
00164 Amembrane=34636e-12;
00165
00166 this->Rm=Rm;
00167 this->Cm=Cm;
00168 this->Vresting=Vresting;
00169 this->Vthresh=Vthresh;
00170 this->Vinit=Vinit;
00171 this->Trefract=Trefract;
00172 this->Inoise=Inoise;
00173 this->Iinject=Iinject;
00174
00175
00176 gbar_Na = 4.3 * 120 * Amembrane;
00177 E_Na = 50e-3;
00178
00179 gbar_K = 100.0 * Amembrane;
00180 E_K = -90e-3;
00181 };
00182
00184 double alpha_m(double V) { return 1000.0*0.32*(13.0 - V)/(exp((13 - V)/4.0) - 1.0); }
00185 double beta_m(double V) { return 1000.0*0.28*(V - 40.0) / (exp((V - 40)/5.0) - 1.0); }
00186 double infty_m(double V) { return alpha_m(V)/(beta_m(V)+alpha_m(V)); }
00187
00189 double alpha_h(double V) { return 1000.0*0.128*exp((17.0 - V - 10.0)/18.0); }
00190 double beta_h(double V) { return 1000.0*4.0/(1.0 + exp((40.0 - V - 10.0)/5.0)); }
00191 double infty_h(double V) { return alpha_h(V)/(beta_h(V)+alpha_h(V)); }
00192
00194 double alpha_n(double V) { return 1000.0*0.032*(15.0 - V)/(exp((15.0 - V)/5.0) - 1.0); }
00195 double beta_n(double V) { return 1000.0*0.5*exp((10.0 - V)/40.0); }
00196 double infty_n(double V) { return alpha_n(V)/(beta_n(V)+alpha_n(V)); }
00197
00198 virtual void derivatives(double t, const double y[], double f[]);
00199
00201 virtual int reset(double dt);
00202 };
00203
00204 #endif // _HHNEURON_H_