Chaste Commit::f2ff7ee04e70ac9d06c57344df8d017dbb12b97b
SimpleOxygenBasedCellCycleModel.cpp
1/*
2
3Copyright (c) 2005-2024, University of Oxford.
4All rights reserved.
5
6University of Oxford means the Chancellor, Masters and Scholars of the
7University of Oxford, having an administrative office at Wellington
8Square, Oxford OX1 2JD, UK.
9
10This file is part of Chaste.
11
12Redistribution and use in source and binary forms, with or without
13modification, 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
23THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
29GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
32OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33
34*/
35
36#include "SimpleOxygenBasedCellCycleModel.hpp"
37#include "RandomNumberGenerator.hpp"
38#include "ApoptoticCellProperty.hpp"
39
41 : mCurrentHypoxicDuration(0.0),
42 mHypoxicConcentration(0.4),
43 mQuiescentConcentration(1.0),
44 mCriticalHypoxicDuration(2.0)
45{
47}
48
53
58
60{
61 // mG1Duration is set when the cell-cycle model is given a cell
62
63 bool cell_is_apoptotic = mpCell->HasCellProperty<ApoptoticCellProperty>();
64
65 if (!cell_is_apoptotic)
66 {
68
69 // Get cell's oxygen concentration
70 double oxygen_concentration = mpCell->GetCellData()->GetItem("oxygen");
71
73
74 if (mCurrentCellCyclePhase == G_ONE_PHASE)
75 {
76 // Update G1 duration based on oxygen concentration
78
79 if (oxygen_concentration < mQuiescentConcentration)
80 {
81 mG1Duration += (1 - std::max(oxygen_concentration, 0.0)/mQuiescentConcentration)*dt;
82 }
83 }
84 }
85}
86
89 mCurrentHypoxicDuration(rModel.mCurrentHypoxicDuration),
90 mCurrentHypoxiaOnsetTime(rModel.mCurrentHypoxiaOnsetTime),
91 mHypoxicConcentration(rModel.mHypoxicConcentration),
92 mQuiescentConcentration(rModel.mQuiescentConcentration),
93 mCriticalHypoxicDuration(rModel.mCriticalHypoxicDuration)
94{
95 /*
96 * Initialize only those member variables defined in this class.
97 *
98 * The member variables mCurrentCellCyclePhase, mG1Duration,
99 * mMinimumGapDuration, mStemCellG1Duration, mTransitCellG1Duration,
100 * mSDuration, mG2Duration and mMDuration are initialized in the
101 * AbstractPhaseBasedCellCycleModel constructor.
102 *
103 * The member variables mBirthTime, mReadyToDivide and mDimension
104 * are initialized in the AbstractCellCycleModel constructor.
105 *
106 * Note that mG1Duration is (re)set as soon as InitialiseDaughterCell()
107 * is called on the new cell-cycle model.
108 */
109}
110
115
117{
118 assert(!(mpCell->HasCellProperty<ApoptoticCellProperty>()));
119 assert(!mpCell->HasApoptosisBegun());
120
121 // Get cell's oxygen concentration
122 double oxygen_concentration = mpCell->GetCellData()->GetItem("oxygen");
123
124 if (oxygen_concentration < mHypoxicConcentration)
125 {
126 // Update the duration of the current period of hypoxia
128
129 // Include a little bit of stochasticity here
130 double prob_of_death = 0.9 - 0.5*(oxygen_concentration/mHypoxicConcentration);
132 {
133 /*
134 * This method is usually called within a CellBasedSimulation, after the CellPopulation
135 * has called CellPropertyRegistry::TakeOwnership(). This means that were we to call
136 * CellPropertyRegistry::Instance() here when adding the ApoptoticCellProperty, we would
137 * be creating a new CellPropertyRegistry. In this case the ApoptoticCellProperty cell
138 * count would be incorrect. We must therefore access the ApoptoticCellProperty via the
139 * cell's CellPropertyCollection.
140 */
141 boost::shared_ptr<AbstractCellProperty> p_apoptotic_property =
142 mpCell->rGetCellPropertyCollection().GetCellPropertyRegistry()->Get<ApoptoticCellProperty>();
143 mpCell->AddCellProperty(p_apoptotic_property);
144 }
145 }
146 else
147 {
148 // Reset the cell's hypoxic duration and update the time at which the onset of hypoxia occurs
151 }
152}
153
158
160{
161 assert(hypoxicConcentration<=1.0);
162 assert(hypoxicConcentration>=0.0);
163 mHypoxicConcentration = hypoxicConcentration;
164}
165
170
172{
173 assert(quiescentConcentration <= 1.0);
174 assert(quiescentConcentration >= 0.0);
175 mQuiescentConcentration = quiescentConcentration;
176}
177
182
184{
185 assert(criticalHypoxicDuration >= 0.0);
186 mCriticalHypoxicDuration = criticalHypoxicDuration;
187}
188
190{
191 assert(currentHypoxiaOnsetTime >= 0.0);
192 mCurrentHypoxiaOnsetTime = currentHypoxiaOnsetTime;
193}
194
196{
197 *rParamsFile << "\t\t\t<HypoxicConcentration>" << mHypoxicConcentration << "</HypoxicConcentration>\n";
198 *rParamsFile << "\t\t\t<QuiescentConcentration>" << mQuiescentConcentration << "</QuiescentConcentration>\n";
199 *rParamsFile << "\t\t\t<CriticalHypoxicDuration>" << mCriticalHypoxicDuration << "</CriticalHypoxicDuration>\n";
200
201 // Call method on direct parent class
203}
204
205// Serialization for Boost >= 1.36
#define CHASTE_CLASS_EXPORT(T)
virtual void OutputCellCycleModelParameters(out_stream &rParamsFile)
static RandomNumberGenerator * Instance()
void SetHypoxicConcentration(double hypoxicConcentration)
void SetCurrentHypoxiaOnsetTime(double currentHypoxiaOnsetTime)
void SetCriticalHypoxicDuration(double criticalHypoxicDuration)
void SetQuiescentConcentration(double quiescentConcentration)
virtual void OutputCellCycleModelParameters(out_stream &rParamsFile)
double GetTime() const
double GetTimeStep() const
static SimulationTime * Instance()