CSIM: ionbuffer.h Source File

ionbuffer.h

Go to the documentation of this file.
00001 
00005 #ifndef _IONBUFFER_H_
00006 #define _IONBUFFER_H_
00007 
00008 #include "ionchannel.h"
00009 
00010 #define FARADAY 96589   // Faraday constant [Coulomb]
00011 #define R 8.31          // universal gas constant [Joules/Mol]
00012 #define DEPTH 0.1e-6    // thickness of the intracellular perimembrane shell [m]
00013 
00014 #define V_REST_BIOL   -70e-3    // [V]
00015 #define V_THRESH_BIOL -40e-3    // [V]
00016 
00017 class IonChannel;
00018 
00020 
00023 class IonBuffer {
00024 
00025  public:
00026 
00027   IonBuffer(float ConcRest_def, float ConcOut_def, float Tau_def, float Temp_def, int zIon_def);
00028 
00029   virtual ~IonBuffer();
00030 
00032   void reset(double *Gtot, double *Ich, double Vresting, double VmScale);
00033 
00035   void nextstate(double *Imtot, double *Gmtot, double Vm, double Vresting, double VmScale);
00036 
00038   void getConc(double **C) {  ConcActive = 1; (*C) =  &(this->Conc);}
00039 
00041   void getErev(double **E) { ConcActive = 1; ErevActive = 1; (*E) =  &(this->Erev);}
00042 
00044   float ConcRest;
00045 
00047   float ConcOut;
00048 
00050   float ConcScale;
00051 
00053   float Tau;
00054 
00056   float Temp;
00057 
00058  protected:
00059   friend class MembranePatch;
00060 
00061 
00063   double Conc;
00064 
00066   double Erev;
00067 
00069   bool active;
00070 
00072   bool ConcActive;
00073 
00075   bool ErevActive;
00076 
00078   int zIon;
00079 
00081   double C1;
00082 
00084   int nChannels;
00085 
00087   int lChannels;
00088 
00090   IonChannel **channels;
00091 
00093   void addChannel(IonChannel *newChannel);
00094 
00096   void SetErev(double Vresting, double VmScale);
00097 
00098 };
00099 
00100 #endif

 
(C) 2003, Thomas Natschläger last modified 07/10/2006