00001 // CompetitiveDegradationReaction.cpp: implementation of the CompetitiveDegradationReaction class. 00002 // 00004 00005 #ifdef _WINDOWS 00006 #include "stdafx.h" 00007 #endif 00008 00009 #include "CompetitiveDegradationReaction.h" 00010 00012 // Construction/Destruction 00014 00015 CompetitiveDegradationReaction::CompetitiveDegradationReaction(Chemical *phosphorylatedprotein, Chemical *competitivebinder, 00016 RateConstant *kphx, RateConstant *Km, std::string CompetitiveDegradationReaction) 00017 { 00018 int numChemicals = 0; 00019 00020 chemicals.push_back(phosphorylatedprotein); 00021 this->phosphorylatedprotein = numChemicals; // Number in private array 00022 numChemicals++; 00023 numberOfEachChemicalChangedByReaction.push_back(-1); 00024 00025 chemicals.push_back(competitivebinder); 00026 this->competitivebinder = numChemicals; 00027 numChemicals++; 00028 numberOfEachChemicalChangedByReaction.push_back(0); 00029 00030 int numRateConstants = 0; 00031 00032 rateConstants.push_back(kphx); 00033 this->kphx = numRateConstants; 00034 numRateConstants++; 00035 00036 rateConstants.push_back(Km); 00037 this->Km = numRateConstants; 00038 numRateConstants++; 00039 00040 this->SetTeXForm(); 00041 } 00042 00043 CompetitiveDegradationReaction::~CompetitiveDegradationReaction() 00044 { 00045 00046 } 00047 00048 00049 double CompetitiveDegradationReaction::GetRate() const 00050 { 00051 return rateConstants[kphx]->GetValue() * chemicals[phosphorylatedprotein]->GetAmount()/( rateConstants[Km]->GetValue() + chemicals[phosphorylatedprotein]->GetAmount() + chemicals[competitivebinder]->GetAmount()); 00052 } 00053 00054 void CompetitiveDegradationReaction::SetTeXForm() 00055 { 00056 return; 00057 } 00058 00059 // TEMPORARY 00060 00061 std::vector<Reaction::JElement *> *CompetitiveDegradationReaction::GetChemicalJacobian() 00062 { 00063 return &chemicalJacobian; 00064 }