00001 /* 00002 00003 Copyright (C) University of Oxford, 2005-2010 00004 00005 University of Oxford means the Chancellor, Masters and Scholars of the 00006 University of Oxford, having an administrative office at Wellington 00007 Square, Oxford OX1 2JD, UK. 00008 00009 This file is part of Chaste. 00010 00011 Chaste is free software: you can redistribute it and/or modify it 00012 under the terms of the GNU Lesser General Public License as published 00013 by the Free Software Foundation, either version 2.1 of the License, or 00014 (at your option) any later version. 00015 00016 Chaste is distributed in the hope that it will be useful, but WITHOUT 00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00018 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 00019 License for more details. The offer of Chaste under the terms of the 00020 License is subject to the License being interpreted in accordance with 00021 English Law and subject to any action against the University of Oxford 00022 being under the jurisdiction of the English Courts. 00023 00024 You should have received a copy of the GNU Lesser General Public License 00025 along with Chaste. If not, see <http://www.gnu.org/licenses/>. 00026 00027 */ 00028 #include "Mirams2010WntOdeSystem.hpp" 00029 #include "CellwiseOdeSystemInformation.hpp" 00030 00031 Mirams2010WntOdeSystem::Mirams2010WntOdeSystem(double wntLevel, boost::shared_ptr<AbstractCellMutationState> pMutationState) 00032 : AbstractOdeSystem(3), 00033 mpMutationState(pMutationState) 00034 { 00035 mpSystemInfo.reset(new CellwiseOdeSystemInformation<Mirams2010WntOdeSystem>); 00036 00045 Init(); // set up parameter values 00046 00047 // Set up rough guesses for the initial steady states in this Wnt conc. 00048 double b1 = 0; 00049 double b2 = 0; 00050 b1 = (mA/2.0) / (((wntLevel + mB)/(mC*wntLevel + mD)) + mF); 00051 if (!mpMutationState) 00052 { 00053 // No mutations specified 00054 } 00055 else if (mpMutationState->IsType<BetaCateninOneHitCellMutationState>()) 00056 { 00057 b2 = (mA/2.0)/mF; 00058 } 00059 else 00060 { 00061 b2 = (mA/2.0) / (((wntLevel + mB)/(mC*wntLevel + mD)) + mF); 00062 } 00063 00064 SetInitialConditionsComponent(0, b1); 00065 SetInitialConditionsComponent(1, b2); 00066 SetInitialConditionsComponent(2, wntLevel); 00067 } 00068 00069 void Mirams2010WntOdeSystem::SetMutationState(boost::shared_ptr<AbstractCellMutationState> pMutationState) 00070 { 00071 mpMutationState = pMutationState; 00072 } 00073 00074 Mirams2010WntOdeSystem::~Mirams2010WntOdeSystem() 00075 { 00076 // Do nothing 00077 } 00078 00079 void Mirams2010WntOdeSystem::Init() 00080 { 00081 // Initialise model parameter values 00082 mA = 25.38; // nM hr^{-1} 00083 mB = 0.1; // dimensionless 00084 mC = 6.386; // hr 00085 mD = 9.818e-2; // hr 00086 mE = 1.2e3; // nM 00087 mF = 1.54e-2; // hr^{-1} 00088 } 00089 00090 void Mirams2010WntOdeSystem::EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY) 00091 { 00092 double x1 = rY[0]; 00093 double x2 = rY[1]; 00094 double wnt_level = rY[2]; 00095 00096 double dx1 = 0.0; 00097 double dx2 = 0.0; 00098 /* 00099 * The variables are 00100 * 1. b = Beta-Catenin1 00101 * 2. b = Beta-Catenin2 00102 */ 00103 00104 double c = mC; 00105 double d = mD; 00106 // Mutations take effect by altering the parameters 00107 if (mpMutationState->IsType<ApcOneHitCellMutationState>()) // APC +/- 00108 { 00109 c = 31.87; 00110 d = 0.490; 00111 } 00112 else if (mpMutationState->IsType<ApcTwoHitCellMutationState>()) // APC -/- 00113 { 00114 c = 71.21; 00115 d = 1.095; 00116 } 00117 00118 // da 00119 dx1 = mA/2.0 - (((wnt_level + mB)/(c*wnt_level + d))*(mE/(mE+x1)) + mF)*x1; 00120 // db 00121 if (mpMutationState->IsType<BetaCateninOneHitCellMutationState>()) 00122 { 00123 dx2 = mA/2.0 - mF*x2; 00124 } 00125 else 00126 { 00127 dx2 = mA/2.0 - (((wnt_level + mB)/(c*wnt_level + d))*(mE/(mE+x2)) + mF)*x2; 00128 } 00129 00130 rDY[0] = dx1; 00131 rDY[1] = dx2; 00132 rDY[2] = 0.0; // do not change the Wnt level 00133 } 00134 00135 boost::shared_ptr<AbstractCellMutationState> Mirams2010WntOdeSystem::GetMutationState() 00136 { 00137 return mpMutationState; 00138 } 00139 00140 00141 template<> 00142 void CellwiseOdeSystemInformation<Mirams2010WntOdeSystem>::Initialise() 00143 { 00144 this->mVariableNames.push_back("Beta_Cat_Allele1"); 00145 this->mVariableUnits.push_back("nM"); 00146 this->mInitialConditions.push_back(50.0); // will be filled in later 00147 00148 this->mVariableNames.push_back("Beta_Cat_Allele2"); 00149 this->mVariableUnits.push_back("nM"); 00150 this->mInitialConditions.push_back(50.0); // will be filled in later 00151 00152 this->mVariableNames.push_back("Wnt Level"); 00153 this->mVariableUnits.push_back("non-dim"); 00154 this->mInitialConditions.push_back(0.5); // will be filled in later 00155 00156 this->mInitialised = true; 00157 }