Chaste  Build::
Owen2011OxygenBasedCellCycleOdeSystem.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 "Owen2011OxygenBasedCellCycleOdeSystem.hpp"
37 #include "CellwiseOdeSystemInformation.hpp"
38 #include "CancerCellMutationState.hpp"
39 #include "QuiescentCancerCellMutationState.hpp"
40 #include "WildTypeCellMutationState.hpp"
41 #include "TipCellMutationState.hpp"
42 #include "StalkCellMutationState.hpp"
43 #include "Owen11Parameters.hpp"
44 #include "Secomb04Parameters.hpp"
45 #include "GenericParameters.hpp"
46 #include "BaseUnits.hpp"
47 
48 Owen2011OxygenBasedCellCycleOdeSystem::Owen2011OxygenBasedCellCycleOdeSystem(units::quantity<unit::concentration> oxygenConcentration,
49  boost::shared_ptr<AbstractCellMutationState> mutation_state,
50  std::vector<double> stateVariables)
52  mOxygenConcentration(oxygenConcentration),
53  pmMutationState(mutation_state),
54  mReferenceTimeScale(BaseUnits::Instance()->GetReferenceTimeScale()),
55  mReferenceConcentrationScale(BaseUnits::Instance()->GetReferenceConcentrationScale())
56 {
57  mpSystemInfo.reset(new CellwiseOdeSystemInformation<Owen2011OxygenBasedCellCycleOdeSystem>);
58  mpSystemInfo->SetDefaultInitialCondition(3, mOxygenConcentration/mReferenceConcentrationScale);
59 
60  mk7 = Owen11Parameters::mpP53ProductionRateConstant->GetValue("Owen2011OxygenBasedCellCycleOdeSystem");
61  mk7dash = Owen11Parameters::mpP53MaxDegradationRate->GetValue("Owen2011OxygenBasedCellCycleOdeSystem");
62  mCp53 = Owen11Parameters::mpOxygenTensionForHalfMaxP53Degradation->GetValue("Owen2011OxygenBasedCellCycleOdeSystem");
63  mk8 = Owen11Parameters::mpCellVegfProductionRate->GetValue("Owen2011OxygenBasedCellCycleOdeSystem");
64  mJ5 = Owen11Parameters::mpVegfEffectOnVegfProduction->GetValue("Owen2011OxygenBasedCellCycleOdeSystem");
65  mk8dash = Owen11Parameters::mpMaxCellVegfProductionRate->GetValue("Owen2011OxygenBasedCellCycleOdeSystem");
66  mCVEGF = Owen11Parameters::mpOxygenTensionForHalfMaxVegfDegradation->GetValue("Owen2011OxygenBasedCellCycleOdeSystem");
67 
68  // Parameter values are taken from the Owen (2011) paper
70  {
71  mCphi = Owen11Parameters::mpOxygenPartialPressureAtHalfMaxCycleRateCancer->GetValue("Owen2011OxygenBasedCellCycleOdeSystem");
72  mTmin = Owen11Parameters::mpMinimumCellCyclePeriodCancer->GetValue("Owen2011OxygenBasedCellCycleOdeSystem");
73  mk8doubledash = Owen11Parameters::mpP53EffectOnVegfProduction->GetValue("Owen2011OxygenBasedCellCycleOdeSystem");
74  }
75  else // all other cells
76  {
77  mCphi = Owen11Parameters::mpOxygenPartialPressureAtHalfMaxCycleRateNormal->GetValue("Owen2011OxygenBasedCellCycleOdeSystem");
78  mTmin = Owen11Parameters::mpMinimumCellCyclePeriodNormal->GetValue("Owen2011OxygenBasedCellCycleOdeSystem");
79  mk8doubledash = Owen11Parameters::mpP53EffectOnVegfProduction->GetValue("Owen2011OxygenBasedCellCycleOdeSystem");
80  }
81 
83  Secomb04Parameters::mpOxygenVolumetricSolubility->GetValue("Owen2011OxygenBasedCellCycleOdeSystem") *
84  GenericParameters::mpGasConcentrationAtStp->GetValue("Owen2011OxygenBasedCellCycleOdeSystem");
85 
86  /*
87  % The variables are
88  % 0. phi = Cell-cycle phase
89  % 1. p53 = p53 concentration
90  % 2. VEGF = VEGF concentration
91  % 3. O2 = Oxygen concentration
92  */
93  if (stateVariables != std::vector<double>())
94  {
95  SetStateVariables(stateVariables);
96  }
97 }
98 
100 {
101 
102 }
103 
104 bool Owen2011OxygenBasedCellCycleOdeSystem::CalculateStoppingEvent(double time, const std::vector<double>& rY)
105 {
106  return (rY[0] > 1);
107 }
108 
110  const std::vector<double>& rY,
111  std::vector<double>& rDY)
112 {
113  /*
114  % The variables are
115  % 0. phi = Cell-cycle phase
116  % 1. p53 = p53 concentration
117  % 2. VEGF = VEGF concentration
118  % 3. O2 = Oxygen concentration
119  */
120  double p53 = rY[1];
121  double VEGF = rY[2];
123 
124  units::quantity<unit::rate> dphi = 0.0* (1.0/ unit::seconds);
125  units::quantity<unit::rate> dp53 = 0.0* (1.0/ unit::seconds);
126  units::quantity<unit::rate> dVEGF = 0.0* (1.0/ unit::seconds);
127  if (pmMutationState->IsType<CancerCellMutationState>() || pmMutationState->IsType<WildTypeCellMutationState>())
128  {
130  }
131  else
132  {
133  dphi = 0.0 * (1.0/ unit::seconds);
134  }
135 
138 
139  // Non-dimensionalise wrt to the reference time scale
140  rDY[0] = dphi*mReferenceTimeScale;
141  rDY[1] = dp53*mReferenceTimeScale;
142  rDY[2] = dVEGF*mReferenceTimeScale;
143  rDY[3] = 0.0;
144 }
145 
146 boost::shared_ptr<AbstractCellMutationState> Owen2011OxygenBasedCellCycleOdeSystem::GetMutationState() const
147 {
148  return pmMutationState;
149 }
150 
151 units::quantity<unit::concentration> Owen2011OxygenBasedCellCycleOdeSystem::GetOxygenConcentration() const
152 {
153  return mOxygenConcentration;
154 }
155 
156 template<>
157 void CellwiseOdeSystemInformation<Owen2011OxygenBasedCellCycleOdeSystem>::Initialise()
158 {
159  this->mVariableNames.push_back("Cell_cycle_phase");
160  this->mVariableUnits.push_back("unitless");
161  this->mInitialConditions.push_back(0.0);
162  this->mVariableNames.push_back("p53");
163  this->mVariableUnits.push_back("unitless");
164  this->mInitialConditions.push_back(0.0);
165  this->mVariableNames.push_back("VEGF");
166  this->mVariableUnits.push_back("unitless");
167  this->mInitialConditions.push_back(0.0);
168  this->mVariableNames.push_back("Oxygen");
169  this->mVariableUnits.push_back("moles m^-3");
170  this->mInitialConditions.push_back(0.0);
171  this->mInitialised = true;
172 }
173 
174 void Owen2011OxygenBasedCellCycleOdeSystem::SetMutationState(boost::shared_ptr<AbstractCellMutationState> pMutationState)
175 {
176  pmMutationState = pMutationState;
177 }
178 
179 // Serialization for Boost >= 1.36
180 #include "SerializationExportWrapperForCpp.hpp"
181 CHASTE_CLASS_EXPORT(Owen2011OxygenBasedCellCycleOdeSystem)
void EvaluateYDerivatives(double time, const std::vector< double > &rY, std::vector< double > &rDY)
boost::shared_ptr< AbstractCellMutationState > pmMutationState
static const boost::shared_ptr< ParameterInstance< unit::pressure > > mpOxygenTensionForHalfMaxVegfDegradation
units::quantity< unit::concentration > mReferenceConcentrationScale
static const boost::shared_ptr< ParameterInstance< unit::pressure > > mpOxygenPartialPressureAtHalfMaxCycleRateCancer
static const boost::shared_ptr< ParameterInstance< unit::rate > > mpMaxCellVegfProductionRate
void SetMutationState(boost::shared_ptr< AbstractCellMutationState > pMutationState)
static const boost::shared_ptr< ParameterInstance< unit::rate > > mpP53ProductionRateConstant
Owen2011OxygenBasedCellCycleOdeSystem(units::quantity< unit::concentration > oxygenConcentration, boost::shared_ptr< AbstractCellMutationState > mutation_state, std::vector< double > stateVariables=std::vector< double >())
static const boost::shared_ptr< ParameterInstance< unit::volumetric_solubility > > mpOxygenVolumetricSolubility
static const boost::shared_ptr< ParameterInstance< unit::rate > > mpP53MaxDegradationRate
static const boost::shared_ptr< ParameterInstance< unit::pressure > > mpOxygenTensionForHalfMaxP53Degradation
static const boost::shared_ptr< ParameterInstance< unit::rate > > mpP53EffectOnVegfProduction
static const boost::shared_ptr< ParameterInstance< unit::time > > mpMinimumCellCyclePeriodCancer
boost::shared_ptr< AbstractCellMutationState > GetMutationState() const
units::quantity< unit::concentration > mOxygenConcentration
units::quantity< unit::concentration > GetOxygenConcentration() const
static const boost::shared_ptr< ParameterInstance< unit::rate > > mpCellVegfProductionRate
bool CalculateStoppingEvent(double time, const std::vector< double > &rY)
static const boost::shared_ptr< ParameterInstance< unit::concentration > > mpGasConcentrationAtStp
static const boost::shared_ptr< ParameterInstance< unit::pressure > > mpOxygenPartialPressureAtHalfMaxCycleRateNormal
static const boost::shared_ptr< ParameterInstance< unit::time > > mpMinimumCellCyclePeriodNormal
static const boost::shared_ptr< ParameterInstance< unit::dimensionless > > mpVegfEffectOnVegfProduction