Chaste  Release::3.4
Alarcon2004OxygenBasedCellCycleOdeSystem.cpp
1 /*
2 
3 Copyright (c) 2005-2016, University of Oxford.
4 All rights reserved.
5 
6 University of Oxford means the Chancellor, Masters and Scholars of the
7 University of Oxford, having an administrative office at Wellington
8 Square, Oxford OX1 2JD, UK.
9 
10 This file is part of Chaste.
11 
12 Redistribution and use in source and binary forms, with or without
13 modification, are permitted provided that the following conditions are met:
14  * Redistributions of source code must retain the above copyright notice,
15  this list of conditions and the following disclaimer.
16  * Redistributions in binary form must reproduce the above copyright notice,
17  this list of conditions and the following disclaimer in the documentation
18  and/or other materials provided with the distribution.
19  * Neither the name of the University of Oxford nor the names of its
20  contributors may be used to endorse or promote products derived from this
21  software without specific prior written permission.
22 
23 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
29 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
32 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 
34 */
35 
36 #include "Alarcon2004OxygenBasedCellCycleOdeSystem.hpp"
37 #include "CellwiseOdeSystemInformation.hpp"
38 #include "IsNan.hpp"
39 
41  bool isLabelled,
42  std::vector<double> stateVariables)
43  : AbstractOdeSystem(6),
44  mOxygenConcentration(oxygenConcentration),
45  mIsLabelled(isLabelled)
46 {
48 
59  Init(); // set up parameters
60 
61  // Parameter values are taken from the Alarcon et al. (2004) paper
62  if (mIsLabelled) // labelled "cancer" cells
63  {
64  ma1 = 0.04;
65  mc1 = 0.007;
66  mxThreshold = 0.004;
67  myThreshold = 0.05;
68  }
69  else // normal cells
70  {
71  ma1 = 0.05;
72  mc1 = 0.1;
73  mxThreshold = 0.004;
74  myThreshold = 0.2;
75  }
76 
77  // Cell-specific initial conditions
79  SetDefaultInitialCondition(5, oxygenConcentration);
80 
81  if (stateVariables != std::vector<double>())
82  {
83  SetStateVariables(stateVariables);
84  }
85 }
86 
88 {
89  // Do nothing
90 }
91 
93 {
94  // Parameter values are taken from the Alarcon et al. (2004) paper
95  ma2 = 1.0;
96  ma3 = 0.25;
97  ma4 = 0.04;
98  mb3 = 10.0;
99  mb4 = 5.5;
100  mc2 = 0.01;
101  md1 = 0.01;
102  md2 = 0.1;
103  mJ3 = 0.04;
104  mJ4 = 0.04;
105  mEta = 0.01;
106  mMstar = 10.0;
107  mB = 0.01;
108 }
109 
110 void Alarcon2004OxygenBasedCellCycleOdeSystem::EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY)
111 {
112  double x = rY[0];
113  double y = rY[1];
114  double z = rY[2];
115  double mass = rY[3];
116  double u = rY[4];
117  double oxygen_concentration = rY[5];
118 
119  double dx = 0.0;
120  double dy = 0.0;
121  double dz = 0.0;
122  double dmass = 0.0;
123  double du = 0.0;
124 
125  /*
126  % The variables are
127  % 1. x = Cdh1-APC complexes
128  % 2. y = cyclin-CDK
129  % 3. z = p27
130  % 4. m = mass
131  % 5. u = RBNP
132  */
133 
134  dx = ((1 + mb3*u)*(1-x))/(mJ3 + 1 - x) - (mb4*mass*x*y)/(mJ4 + x);
135  dy = ma4 -(ma1 + ma2*x + ma3*z)*y;
136 
137  // Parameter values are taken from the Alarcon et al. (2004) paper
138  if (mIsLabelled) // labelled "cancer" cells
139  {
140  dz = mc1 - mc2*oxygen_concentration*z/(mB + oxygen_concentration);
141  }
142  else // normal cells
143  {
144  dz = mc1*(1 - mass/mMstar) - mc2*oxygen_concentration*z/(mB + oxygen_concentration);
145  }
146 
147  dmass = mEta*mass*(1 - mass/mMstar);
148  du = md1 - (md2 + md1*y)*u;
149 
150  // Rescale time to be in hours
151  rDY[0] = 60.0*dx;
152  rDY[1] = 60.0*dy;
153  rDY[2] = 60.0*dz;
154  rDY[3] = 60.0*dmass;
155  rDY[4] = 60.0*du;
156  rDY[5] = 0.0; // do not change the oxygen concentration
157 }
158 
159 bool Alarcon2004OxygenBasedCellCycleOdeSystem::CalculateStoppingEvent(double time, const std::vector<double>& rY)
160 {
161  return (rY[0] < mxThreshold && rY[1] > myThreshold);
162 }
163 
164 template<>
166 {
167  this->mVariableNames.push_back("Cdh1_APC_complexes");
168  this->mVariableUnits.push_back("non_dim");
169  this->mInitialConditions.push_back(0.9);
170 
171  this->mVariableNames.push_back("cyclin_CDK");
172  this->mVariableUnits.push_back("non_dim");
173  this->mInitialConditions.push_back(0.01);
174 
175  this->mVariableNames.push_back("p27");
176  this->mVariableUnits.push_back("non_dim");
177  this->mInitialConditions.push_back(0.0);
178 
179  this->mVariableNames.push_back("mass");
180  this->mVariableUnits.push_back("non_dim");
181  this->mInitialConditions.push_back(NAN); // will be filled in later
182 
183  this->mVariableNames.push_back("RBNP");
184  this->mVariableUnits.push_back("non_dim");
185  this->mInitialConditions.push_back(1.0);
186 
187  this->mVariableNames.push_back("O2");
188  this->mVariableUnits.push_back("non_dim");
189  this->mInitialConditions.push_back(NAN); // will be filled in later
190 
191  this->mInitialised = true;
192 }
193 
195 {
196  mIsLabelled = isLabelled;
197 }
198 
200 {
201  return mIsLabelled;
202 }
203 
205 {
206  return mOxygenConcentration;
207 }
208 
209 // Serialization for Boost >= 1.36
void SetDefaultInitialCondition(unsigned index, double initialCondition)
void SetStateVariables(const std::vector< double > &rStateVariables)
void EvaluateYDerivatives(double time, const std::vector< double > &rY, std::vector< double > &rDY)
boost::shared_ptr< AbstractOdeSystemInformation > mpSystemInfo
#define CHASTE_CLASS_EXPORT(T)
bool CalculateStoppingEvent(double time, const std::vector< double > &rY)
#define NAN
Definition: IsNan.hpp:73
Alarcon2004OxygenBasedCellCycleOdeSystem(double oxygenConcentration, bool isLabelled, std::vector< double > stateVariables=std::vector< double >())