HHNeuronTraubMiles91.h

Go to the documentation of this file.
00001 #ifndef HHNEURONTRAUBMILES91_H_
00002 #define HHNEURONTRAUBMILES91_H_
00003 
00004 #include "ODESystemBasedSpikingNeuron.h"
00005 
00007 
00049 class HHNeuronTraubMiles91 : public ODESystemBasedSpikingNeuron {
00050 
00051         SIMOBJECT( HHNeuronTraubMiles91, AdvancePhase::One )
00052 
00053     public:
00054 
00056         float gbar_Na;
00057 
00059         float E_Na;
00060 
00062         float gbar_K;
00063 
00065         float E_K;
00066 
00068         HHNeuronTraubMiles91(
00069             float Rm       = 100e6,
00070             float Cm       = 2e-10,
00071             float Vresting =-0.06,
00072             float Vthresh  = 0.0,
00073             float Vinit    =-0.06,
00074             float Trefract = 5e-3,
00075             float Inoise   = 0.0,
00076             float Iinject  = 0.0 ) : ODESystemBasedSpikingNeuron( 4 ) {
00077               
00078             this->Rm       = Rm;
00079             this->Cm       = Cm;
00080             this->Vresting = Vresting;
00081             this->Vthresh  = Vthresh;
00082             this->Vinit    = Vinit;
00083             this->Trefract = Trefract;
00084             this->Inoise   = Inoise;
00085             this->Iinject  = Iinject;
00086 
00087             gbar_Na = 0.2 * 1e-4;
00088             E_Na    = 50e-3;
00089             gbar_K  = 0.06 * 1e-4;
00090             E_K     = -90e-3;
00091         };
00092 
00094         double alpha_m( double V ) {
00095             return 1000 * 0.32 * ( 13 - V ) / ( exp( ( 13 - V ) / 4 ) - 1 );
00096         }
00097         double beta_m( double V ) {
00098             return 1000 * 0.28 * ( V - 40 ) / ( exp( ( V - 40 ) / 5 ) - 1 );
00099         }
00100         double infty_m( double V ) {
00101             return alpha_m( V ) / ( beta_m( V ) + alpha_m( V ) );
00102         }
00103 
00105         double alpha_h( double V ) {
00106             return 1000 * 0.128 * exp( ( 17 - V ) / 18 );
00107         }
00108         double beta_h( double V ) {
00109             return 1000 * 4 / ( 1 + exp( ( 40 - V ) / 5 ) );
00110         }
00111         double infty_h( double V ) {
00112             return alpha_h( V ) / ( beta_h( V ) + alpha_h( V ) );
00113         }
00114 
00116         double alpha_n( double V ) {
00117             return 1000 * 0.032 * ( 15 - V ) / ( exp( ( 15 - V ) / 5 ) - 1 );
00118         }
00119         double beta_n( double V ) {
00120             return 1000 * 0.5 * exp( ( 10 - V ) / 40 );
00121         }
00122         double infty_n( double V ) {
00123             return alpha_n( V ) / ( beta_n( V ) + alpha_n( V ) );
00124         }
00125 
00126         virtual void derivatives( double t, const double y[], double f[] ) {
00127             // y[0] ... Vm, y[1] ... m, y[2] ... h, y[3] ... n
00128             double V = y[ 0 ];
00129 
00130             f[ 0 ] = 1.0 / Cm * (
00131                          - gbar_Na * pow( y[1], 3 ) * y[2] * ( V - E_Na )
00132                          - gbar_K * pow( y[3], 4 ) * ( V - E_K )
00133                          + I0
00134                          - G0 * V
00135                      );
00136 
00137             double v2 = V * 1000.0 + 63.0;
00138 
00139             f[1] = alpha_m( v2 ) * ( 1 - y[1] ) - beta_m( v2 ) * y[1];
00140 
00141             f[2] = alpha_h( v2 ) * ( 1 - y[2] ) - beta_h( v2 ) * y[2];
00142 
00143             f[3] = alpha_n( v2 ) * ( 1 - y[3] ) - beta_n( v2 ) * y[3];
00144 
00145         };
00146 
00148         virtual int reset( double dt ) {
00149 
00150             double y0[ 4 ];
00151 
00152             double v2 = Vinit * 1000 + 63;
00153 
00154             y0[0] = Vinit;
00155             y0[1] = infty_m( v2 );
00156             y0[2] = infty_h( v2 );
00157             y0[3] = infty_n( v2 );
00158 
00159             double gNa = gbar_Na * pow( infty_m( v2 ), 3 ) * infty_h( v2 );
00160             double gK  = gbar_K  * pow( infty_n( v2 ), 4 );
00161 
00162             double Gtot_init = 1.0 / Rm + gNa + gK;
00163             double Ich_init = gNa * E_Na + gK * E_K;
00164 
00165             Em = Rm * ( Vresting * Gtot_init - Ich_init );
00166 
00167             ODESystemBasedSpikingNeuron::reset( dt, y0 );
00168 
00169             return 0;
00170         };
00171 
00172 };
00173 
00174 #endif /*HHNEURONTRAUBMILES91_H_*/

Generated on Wed Jul 9 16:34:39 2008 for PCSIM by  doxygen 1.5.5