Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

MichaelisMentenHeterodimerizationReaction.cpp

Go to the documentation of this file.
00001 // MichaelisMentenHeterodimerizationReaction.cpp: implementation of the CMichaelisMentenHeterodimerizationReaction class.  Difference from regular MM reaction is that here the "enzyme" concentration decreases by 1, it is a sigma looking heterodimerization rxn
00002 //
00004 
00005 #include "MichaelisMentenHeterodimerizationReaction.h"
00006 
00008 // Construction/Destruction
00010 
00011 CMichaelisMentenHeterodimerizationReaction::CMichaelisMentenHeterodimerizationReaction(Chemical *Enzyme, Chemical *Substrate, Chemical *Product, RateConstant *k_2, RateConstant *K_m, std::string reactionName)
00012 :Reaction(reactionName)
00013 {
00014         // stoichiometry
00015         this->Enzyme = chemicals.size();
00016         chemicals.push_back(Enzyme);
00017         numberOfEachChemicalChangedByReaction.push_back(-1);
00018 
00019         this->Substrate = chemicals.size();
00020         chemicals.push_back(Substrate);
00021         numberOfEachChemicalChangedByReaction.push_back(-1);
00022 
00023         this->Product = chemicals.size();
00024         chemicals.push_back(Product);
00025         numberOfEachChemicalChangedByReaction.push_back(+1);
00026 
00027         // rates
00028         this->k_2 = rateConstants.size();
00029         rateConstants.push_back(k_2);
00030 
00031         this->K_m = rateConstants.size();
00032         rateConstants.push_back(K_m);
00033 
00034         // put enough dummy chemicalJacobian elements on the vector 
00035         // - they are recomputed every time you ask for the chemicalJacobian
00036         chemicalJacobian.push_back(new JElement(-1,-1));
00037         chemicalJacobian.push_back(new JElement(-1,-1));
00038 
00039         this->SetTeXForm();
00040 }
00041 
00042 CMichaelisMentenHeterodimerizationReaction::~CMichaelisMentenHeterodimerizationReaction()
00043 {
00044 
00045 }
00046 
00047 double CMichaelisMentenHeterodimerizationReaction::GetRate() const
00048 {
00049         return rateConstants[k_2]->GetValue()*chemicals[Enzyme]->GetAmount()*
00050                 (chemicals[Substrate]->GetAmount()/(chemicals[Substrate]->GetAmount() + rateConstants[K_m]->GetValue()));
00051 }
00052 
00053 void CMichaelisMentenHeterodimerizationReaction::SetTeXForm()
00054 {
00055 //      strstream stream;
00056         std::ostringstream stream;
00057         // TeX form of the reaction
00058         stream << rateConstants[k_2]->GetTeXName().c_str();
00059         stream << " \\left[" << chemicals[Enzyme]->GetTeXName().c_str() << "\\right]";
00060         stream << " {\\left[" << chemicals[Substrate]->GetTeXName().c_str() << "\\right]";
00061         stream << "\\over {";
00062         stream << "\\left[" << chemicals[Substrate]->GetTeXName().c_str() << "\\right]";
00063         stream << " + " << rateConstants[K_m]->GetTeXName().c_str() << "}}";
00064         // add a NULL
00065         stream << std::ends;
00066         // set the TeX string equal to what's in the stream
00067         m_sTeXForm = stream.str();
00068         // allow memory to be freed
00069 //      stream.rdbuf()->freeze(0);
00070 }
00071 
00072 std::vector<Reaction::JElement *> *CMichaelisMentenHeterodimerizationReaction::GetChemicalJacobian()
00073 {
00074         chemicalJacobian[0]->SetWithRespectTo(chemicals[Enzyme]->GetChemicalNumber());
00075         chemicalJacobian[0]->SetJValue((rateConstants[k_2]->GetValue()*chemicals[Substrate]->GetAmount())/(chemicals[Substrate]->GetAmount() + rateConstants[K_m]->GetValue()));
00076         
00077         chemicalJacobian[1]->SetWithRespectTo(chemicals[Substrate]->GetChemicalNumber());
00078         chemicalJacobian[1]->SetWithRespectTo((rateConstants[k_2]->GetValue()*rateConstants[K_m]->GetValue()*chemicals[Enzyme]->GetAmount())
00079                 / ((chemicals[Substrate]->GetAmount() + rateConstants[K_m]->GetValue())*(chemicals[Substrate]->GetAmount() + rateConstants[K_m]->GetValue())) );
00080 
00081         return &chemicalJacobian;
00082 }

Generated on Mon Nov 3 09:37:59 2003 by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002