Alarcon2004OxygenBasedCellCycleOdeSystem.cpp

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