Chaste Release::3.1
Alarcon2004OxygenBasedCellCycleOdeSystem.cpp
00001 /*
00002 
00003 Copyright (c) 2005-2012, 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 
00039 Alarcon2004OxygenBasedCellCycleOdeSystem::Alarcon2004OxygenBasedCellCycleOdeSystem(double oxygenConcentration,
00040                                                                                    bool isLabelled,
00041                                                                                    std::vector<double> stateVariables)
00042     : AbstractOdeSystem(6),
00043       mOxygenConcentration(oxygenConcentration),
00044       mIsLabelled(isLabelled)
00045 {
00046     mpSystemInfo.reset(new CellwiseOdeSystemInformation<Alarcon2004OxygenBasedCellCycleOdeSystem>);
00047 
00058     Init(); // set up parameters
00059 
00060     // Parameter values are taken from the Alarcon et al. (2004) paper
00061     if (mIsLabelled) // labelled "cancer" cells
00062     {
00063         ma1 = 0.04;
00064         mc1 = 0.007;
00065         mxThreshold = 0.004;
00066         myThreshold = 0.05;
00067     }
00068     else // normal cells
00069     {
00070         ma1 = 0.05;
00071         mc1 = 0.1;
00072         mxThreshold = 0.004;
00073         myThreshold = 0.2;
00074     }
00075 
00076     // Cell-specific initial conditions
00077     SetDefaultInitialCondition(3, 0.5*mMstar);
00078     SetDefaultInitialCondition(5, oxygenConcentration);
00079 
00080     if (stateVariables != std::vector<double>())
00081     {
00082         SetStateVariables(stateVariables);
00083     }
00084 }
00085 
00086 Alarcon2004OxygenBasedCellCycleOdeSystem::~Alarcon2004OxygenBasedCellCycleOdeSystem()
00087 {
00088     // Do nothing
00089 }
00090 
00091 void Alarcon2004OxygenBasedCellCycleOdeSystem::Init()
00092 {
00093     // Parameter values are taken from the Alarcon et al. (2004) paper
00094     ma2 = 1.0;
00095     ma3 = 0.25;
00096     ma4 = 0.04;
00097     mb3 = 10.0;
00098     mb4 = 5.5;
00099     mc2 = 0.01;
00100     md1 = 0.01;
00101     md2 = 0.1;
00102     mJ3 = 0.04;
00103     mJ4 = 0.04;
00104     mEta = 0.01;
00105     mMstar = 10.0;
00106     mB = 0.01;
00107 }
00108 
00109 void Alarcon2004OxygenBasedCellCycleOdeSystem::EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY)
00110 {
00111     double x = rY[0];
00112     double y = rY[1];
00113     double z = rY[2];
00114     double mass = rY[3];
00115     double u = rY[4];
00116     double oxygen_concentration = rY[5];
00117 
00118     double dx = 0.0;
00119     double dy = 0.0;
00120     double dz = 0.0;
00121     double dmass = 0.0;
00122     double du = 0.0;
00123 
00124     /*
00125      % The variables are
00126      % 1. x = Cdh1-APC complexes
00127      % 2. y = cyclin-CDK
00128      % 3. z = p27
00129      % 4. m = mass
00130      % 5. u = RBNP
00131     */
00132 
00133     dx = ((1 + mb3*u)*(1-x))/(mJ3 + 1 - x) - (mb4*mass*x*y)/(mJ4 + x);
00134     dy = ma4 -(ma1 + ma2*x + ma3*z)*y;
00135 
00136     // Parameter values are taken from the Alarcon et al. (2004) paper
00137     if (mIsLabelled) // labelled "cancer" cells
00138     {
00139         dz = mc1 - mc2*oxygen_concentration*z/(mB + oxygen_concentration);
00140     }
00141     else // normal cells
00142     {
00143         dz = mc1*(1 - mass/mMstar) - mc2*oxygen_concentration*z/(mB + oxygen_concentration);
00144     }
00145 
00146     dmass = mEta*mass*(1 - mass/mMstar);
00147     du = md1 - (md2 + md1*y)*u;
00148 
00149     // Rescale time to be in hours
00150     rDY[0] = 60.0*dx;
00151     rDY[1] = 60.0*dy;
00152     rDY[2] = 60.0*dz;
00153     rDY[3] = 60.0*dmass;
00154     rDY[4] = 60.0*du;
00155     rDY[5] = 0.0; // do not change the oxygen concentration
00156 }
00157 
00158 bool Alarcon2004OxygenBasedCellCycleOdeSystem::CalculateStoppingEvent(double time, const std::vector<double>& rY)
00159 {
00160     return (rY[0] < mxThreshold && rY[1] > myThreshold);
00161 }
00162 
00163 template<>
00164 void CellwiseOdeSystemInformation<Alarcon2004OxygenBasedCellCycleOdeSystem>::Initialise()
00165 {
00166     this->mVariableNames.push_back("Cdh1_APC_complexes");
00167     this->mVariableUnits.push_back("non_dim");
00168     this->mInitialConditions.push_back(0.9);
00169 
00170     this->mVariableNames.push_back("cyclin_CDK");
00171     this->mVariableUnits.push_back("non_dim");
00172     this->mInitialConditions.push_back(0.01);
00173 
00174     this->mVariableNames.push_back("p27");
00175     this->mVariableUnits.push_back("non_dim");
00176     this->mInitialConditions.push_back(0.0);
00177 
00178     this->mVariableNames.push_back("mass");
00179     this->mVariableUnits.push_back("non_dim");
00180     this->mInitialConditions.push_back(NAN); // will be filled in later
00181 
00182     this->mVariableNames.push_back("RBNP");
00183     this->mVariableUnits.push_back("non_dim");
00184     this->mInitialConditions.push_back(1.0);
00185 
00186     this->mVariableNames.push_back("O2");
00187     this->mVariableUnits.push_back("non_dim");
00188     this->mInitialConditions.push_back(NAN); // will be filled in later
00189 
00190     this->mInitialised = true;
00191 }
00192 
00193 void Alarcon2004OxygenBasedCellCycleOdeSystem::SetIsLabelled(bool isLabelled)
00194 {
00195     mIsLabelled = isLabelled;
00196 }
00197 
00198 bool Alarcon2004OxygenBasedCellCycleOdeSystem::IsLabelled() const
00199 {
00200     return mIsLabelled;
00201 }
00202 
00203 double Alarcon2004OxygenBasedCellCycleOdeSystem::GetOxygenConcentration() const
00204 {
00205     return mOxygenConcentration;
00206 }
00207 
00208 // Serialization for Boost >= 1.36
00209 #include "SerializationExportWrapperForCpp.hpp"
00210 CHASTE_CLASS_EXPORT(Alarcon2004OxygenBasedCellCycleOdeSystem)