Chaste Commit::f2ff7ee04e70ac9d06c57344df8d017dbb12b97b
AbstractPhaseBasedCellCycleModel.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 "AbstractPhaseBasedCellCycleModel.hpp"
37
40 mCurrentCellCyclePhase(M_PHASE),
41 mG1Duration(DOUBLE_UNSET),
42 mMinimumGapDuration(0.01), // an educated guess
43 // Default parameter values all have units of hours.
44 mStemCellG1Duration(14.0),
45 mTransitCellG1Duration(2.0),
46 mSDuration(5.0), // apparently between 5-6 hours normally
47 mG2Duration(4.0), // apparently 3-4 hours normally
48 mMDuration(1.0) // taken from Meineke et al, 2001 (doi:10.1046/j.0960-7722.2001.00216.x)
49{
50}
51
55
57 : AbstractCellCycleModel(rModel),
58 mCurrentCellCyclePhase(rModel.mCurrentCellCyclePhase),
59 mG1Duration(rModel.mG1Duration),
60 mMinimumGapDuration(rModel.mMinimumGapDuration),
61 mStemCellG1Duration(rModel.mStemCellG1Duration),
62 mTransitCellG1Duration(rModel.mTransitCellG1Duration),
63 mSDuration(rModel.mSDuration),
64 mG2Duration(rModel.mG2Duration),
65 mMDuration(rModel.mMDuration)
66{
67 /*
68 * Initialize only those member variables defined in this class.
69 *
70 * The member variables mBirthTime, mReadyToDivide and mDimension
71 * are initialized in the AbstractCellCycleModel constructor.
72 */
73}
74
80
82{
83 assert(mpCell != nullptr);
84
85 if (!mReadyToDivide)
86 {
88 if ((mCurrentCellCyclePhase != G_ZERO_PHASE) &&
90 {
91 mReadyToDivide = true;
92 }
93 }
94 return mReadyToDivide;
95}
96
101
106
111
116
121
126
131
136
141
146
151
153{
154 assert(stemCellG1Duration >= 0.0);
155 mStemCellG1Duration = stemCellG1Duration;
156}
157
159{
160 assert(transitCellG1Duration >= 0.0);
161 mTransitCellG1Duration = transitCellG1Duration;
162}
163
165{
166 assert(SDuration >= 0.0);
167 mSDuration = SDuration;
168}
169
171{
172 assert(G2Duration >= 0.0);
173 mG2Duration = G2Duration;
174}
175
177{
178 assert(MDuration >= 0.0);
179 mMDuration = MDuration;
180}
181
183{
184 assert(minimumGapDuration > 0.0);
185 mMinimumGapDuration = minimumGapDuration;
186}
187
189{
190 *rParamsFile << "\t\t\t<StemCellG1Duration>" << mStemCellG1Duration << "</StemCellG1Duration>\n";
191 *rParamsFile << "\t\t\t<TransitCellG1Duration>" << mTransitCellG1Duration << "</TransitCellG1Duration>\n";
192 *rParamsFile << "\t\t\t<SDuration>" << mSDuration << "</SDuration>\n";
193 *rParamsFile << "\t\t\t<G2Duration>" << mG2Duration << "</G2Duration>\n";
194 *rParamsFile << "\t\t\t<MDuration>" << mMDuration << "</MDuration>\n";
195
196 // Call method on direct parent class
198}
const double DOUBLE_UNSET
Definition Exception.hpp:57
virtual void OutputCellCycleModelParameters(out_stream &rParamsFile)=0
virtual void SetTransitCellG1Duration(double transitCellG1Duration)
void SetMinimumGapDuration(double minimumGapDuration)
virtual void SetStemCellG1Duration(double stemCellG1Duration)
virtual void OutputCellCycleModelParameters(out_stream &rParamsFile)=0
virtual void UpdateCellCyclePhase()=0