00001 /* 00002 00003 Copyright (c) 2005-2015, University of Oxford. 00004 All rights reserved. 00005 00006 University of Oxford means the Chancellor, Masters and Scholars of the 00007 University of Oxford, having an administrative office at Wellington 00008 Square, Oxford OX1 2JD, UK. 00009 00010 This file is part of Chaste. 00011 00012 Redistribution and use in source and binary forms, with or without 00013 modification, are permitted provided that the following conditions are met: 00014 * Redistributions of source code must retain the above copyright notice, 00015 this list of conditions and the following disclaimer. 00016 * Redistributions in binary form must reproduce the above copyright notice, 00017 this list of conditions and the following disclaimer in the documentation 00018 and/or other materials provided with the distribution. 00019 * Neither the name of the University of Oxford nor the names of its 00020 contributors may be used to endorse or promote products derived from this 00021 software without specific prior written permission. 00022 00023 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00024 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00025 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00026 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 00027 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00028 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 00029 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00030 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00031 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 00032 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 00034 */ 00035 00036 #include "Alarcon2004OxygenBasedCellCycleOdeSystem.hpp" 00037 #include "CellwiseOdeSystemInformation.hpp" 00038 #include "IsNan.hpp" 00039 00040 Alarcon2004OxygenBasedCellCycleOdeSystem::Alarcon2004OxygenBasedCellCycleOdeSystem(double oxygenConcentration, 00041 bool isLabelled, 00042 std::vector<double> stateVariables) 00043 : AbstractOdeSystem(6), 00044 mOxygenConcentration(oxygenConcentration), 00045 mIsLabelled(isLabelled) 00046 { 00047 mpSystemInfo.reset(new CellwiseOdeSystemInformation<Alarcon2004OxygenBasedCellCycleOdeSystem>); 00048 00059 Init(); // set up parameters 00060 00061 // Parameter values are taken from the Alarcon et al. (2004) paper 00062 if (mIsLabelled) // labelled "cancer" cells 00063 { 00064 ma1 = 0.04; 00065 mc1 = 0.007; 00066 mxThreshold = 0.004; 00067 myThreshold = 0.05; 00068 } 00069 else // normal cells 00070 { 00071 ma1 = 0.05; 00072 mc1 = 0.1; 00073 mxThreshold = 0.004; 00074 myThreshold = 0.2; 00075 } 00076 00077 // Cell-specific initial conditions 00078 SetDefaultInitialCondition(3, 0.5*mMstar); 00079 SetDefaultInitialCondition(5, oxygenConcentration); 00080 00081 if (stateVariables != std::vector<double>()) 00082 { 00083 SetStateVariables(stateVariables); 00084 } 00085 } 00086 00087 Alarcon2004OxygenBasedCellCycleOdeSystem::~Alarcon2004OxygenBasedCellCycleOdeSystem() 00088 { 00089 // Do nothing 00090 } 00091 00092 void Alarcon2004OxygenBasedCellCycleOdeSystem::Init() 00093 { 00094 // Parameter values are taken from the Alarcon et al. (2004) paper 00095 ma2 = 1.0; 00096 ma3 = 0.25; 00097 ma4 = 0.04; 00098 mb3 = 10.0; 00099 mb4 = 5.5; 00100 mc2 = 0.01; 00101 md1 = 0.01; 00102 md2 = 0.1; 00103 mJ3 = 0.04; 00104 mJ4 = 0.04; 00105 mEta = 0.01; 00106 mMstar = 10.0; 00107 mB = 0.01; 00108 } 00109 00110 void Alarcon2004OxygenBasedCellCycleOdeSystem::EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY) 00111 { 00112 double x = rY[0]; 00113 double y = rY[1]; 00114 double z = rY[2]; 00115 double mass = rY[3]; 00116 double u = rY[4]; 00117 double oxygen_concentration = rY[5]; 00118 00119 double dx = 0.0; 00120 double dy = 0.0; 00121 double dz = 0.0; 00122 double dmass = 0.0; 00123 double du = 0.0; 00124 00125 /* 00126 % The variables are 00127 % 1. x = Cdh1-APC complexes 00128 % 2. y = cyclin-CDK 00129 % 3. z = p27 00130 % 4. m = mass 00131 % 5. u = RBNP 00132 */ 00133 00134 dx = ((1 + mb3*u)*(1-x))/(mJ3 + 1 - x) - (mb4*mass*x*y)/(mJ4 + x); 00135 dy = ma4 -(ma1 + ma2*x + ma3*z)*y; 00136 00137 // Parameter values are taken from the Alarcon et al. (2004) paper 00138 if (mIsLabelled) // labelled "cancer" cells 00139 { 00140 dz = mc1 - mc2*oxygen_concentration*z/(mB + oxygen_concentration); 00141 } 00142 else // normal cells 00143 { 00144 dz = mc1*(1 - mass/mMstar) - mc2*oxygen_concentration*z/(mB + oxygen_concentration); 00145 } 00146 00147 dmass = mEta*mass*(1 - mass/mMstar); 00148 du = md1 - (md2 + md1*y)*u; 00149 00150 // Rescale time to be in hours 00151 rDY[0] = 60.0*dx; 00152 rDY[1] = 60.0*dy; 00153 rDY[2] = 60.0*dz; 00154 rDY[3] = 60.0*dmass; 00155 rDY[4] = 60.0*du; 00156 rDY[5] = 0.0; // do not change the oxygen concentration 00157 } 00158 00159 bool Alarcon2004OxygenBasedCellCycleOdeSystem::CalculateStoppingEvent(double time, const std::vector<double>& rY) 00160 { 00161 return (rY[0] < mxThreshold && rY[1] > myThreshold); 00162 } 00163 00164 template<> 00165 void CellwiseOdeSystemInformation<Alarcon2004OxygenBasedCellCycleOdeSystem>::Initialise() 00166 { 00167 this->mVariableNames.push_back("Cdh1_APC_complexes"); 00168 this->mVariableUnits.push_back("non_dim"); 00169 this->mInitialConditions.push_back(0.9); 00170 00171 this->mVariableNames.push_back("cyclin_CDK"); 00172 this->mVariableUnits.push_back("non_dim"); 00173 this->mInitialConditions.push_back(0.01); 00174 00175 this->mVariableNames.push_back("p27"); 00176 this->mVariableUnits.push_back("non_dim"); 00177 this->mInitialConditions.push_back(0.0); 00178 00179 this->mVariableNames.push_back("mass"); 00180 this->mVariableUnits.push_back("non_dim"); 00181 this->mInitialConditions.push_back(NAN); // will be filled in later 00182 00183 this->mVariableNames.push_back("RBNP"); 00184 this->mVariableUnits.push_back("non_dim"); 00185 this->mInitialConditions.push_back(1.0); 00186 00187 this->mVariableNames.push_back("O2"); 00188 this->mVariableUnits.push_back("non_dim"); 00189 this->mInitialConditions.push_back(NAN); // will be filled in later 00190 00191 this->mInitialised = true; 00192 } 00193 00194 void Alarcon2004OxygenBasedCellCycleOdeSystem::SetIsLabelled(bool isLabelled) 00195 { 00196 mIsLabelled = isLabelled; 00197 } 00198 00199 bool Alarcon2004OxygenBasedCellCycleOdeSystem::IsLabelled() const 00200 { 00201 return mIsLabelled; 00202 } 00203 00204 double Alarcon2004OxygenBasedCellCycleOdeSystem::GetOxygenConcentration() const 00205 { 00206 return mOxygenConcentration; 00207 } 00208 00209 // Serialization for Boost >= 1.36 00210 #include "SerializationExportWrapperForCpp.hpp" 00211 CHASTE_CLASS_EXPORT(Alarcon2004OxygenBasedCellCycleOdeSystem)