00001 #ifndef _MARKOVCHANNEL_H 00002 #define _MARKOVCHANNEL_H 00003 00004 //This class deals with ion channels which can be found in one of multiple 00005 //states, some of which are conducting. This implementation assumes the 00006 //occurence of first order kinetics to calculate the probabilities of the 00007 //channel of being found in all states. Further, the rates of transition 00008 //between these states can be constant, voltage-dependent, ligand dependent 00009 //(only one ligand species) or both. The current flow obtained from the channel 00010 //is calculated in a deterministic method by solving the system of 00011 //differential equations obtained from the assumptions above. 00012 //The implicit assumption is that there are a number of ion channels present in 00013 //the system. */ 00014 00015 class MarkovChannel : public ChanCommon 00016 { 00017 public: 00018 //Default constructor. Use is not recommended as most of the class members 00019 //cannot be initialized. 00020 MarkovChannel(); 00021 00022 //Constructor to be used when number of states and number of open states are 00023 //known. Use of this constructor is recommended as all the other members of 00024 //the class can be initialized with the information provided. 00025 static const Cinfo* initCinfo(); 00026 00027 MarkovChannel( unsigned int, unsigned int); 00028 ~MarkovChannel( ); 00029 00030 double getVm( ) const; 00031 void setVm( double ); 00032 00033 double getLigandConc( ) const; 00034 void setLigandConc( double ); 00035 00036 unsigned int getNumStates( ) const; 00037 void setNumStates( unsigned int ); 00038 00039 unsigned int getNumOpenStates( ) const; 00040 void setNumOpenStates( unsigned int ); 00041 00042 vector< string > getStateLabels( ) const; 00043 void setStateLabels( vector< string > ); 00044 00045 //If the (i,j)'th is true, ligand concentration will be used instead of 00046 //voltage. 00047 vector< vector< bool > > getLigandGated( ) const; 00048 void setLigandGated ( vector< vector< bool > > ); 00049 00050 //Probabilities of the channel occupying all possible states. 00051 vector< double > getState ( ) const; 00052 void setState( vector< double > ); 00053 00054 //The initial state of the channel. State of the channel is reset to this 00055 //vector during a call to reinit(). 00056 vector< double > getInitialState() const; 00057 void setInitialState( vector< double > ); 00058 00059 //Conductances associated with each open/conducting state. 00060 vector< double > getGbars( ) const; 00061 void setGbars( vector< double > ); 00062 00064 //MsgDest functions 00066 00067 void vProcess( const Eref&, const ProcPtr); 00068 void vReinit( const Eref&, const ProcPtr); 00069 void handleLigandConc( double ); 00070 void handleState( vector< double > ); 00071 00072 private: 00073 double g_; //Expected conductance of the channel. 00074 double ligandConc_; //Ligand concentration. 00075 unsigned int numStates_; //Total number of states. 00076 unsigned int numOpenStates_; //Number of open (conducting) states. 00077 00078 vector< string > stateLabels_; 00079 vector< double > state_; //Probabilities of occupancy of each state. 00080 vector< double > initialState_; 00081 vector< double > Gbars_; //Conductance associated with each open state. 00082 }; 00083 00084 #endif