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

Generated on Mon Apr 18 11:35:27 2011 for Chaste by  doxygen 1.5.5