Chaste  Release::3.4
AbstractCellCycleModel.hpp
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 #ifndef ABSTRACTCELLCYCLEMODEL_HPP_
37 #define ABSTRACTCELLCYCLEMODEL_HPP_
38 
39 #include "ChasteSerialization.hpp"
40 #include "ClassIsAbstract.hpp"
41 #include "Identifiable.hpp"
42 
43 #include <boost/serialization/base_object.hpp>
44 
45 #include <vector>
46 
47 #include "OutputFileHandler.hpp"
48 #include "CellCyclePhases.hpp"
49 #include "SimulationTime.hpp"
50 #include "Cell.hpp"
51 
52 class Cell; // Circular definition (cells need to know about cycle models and vice-versa)
53 typedef boost::shared_ptr<Cell> CellPtr;
54 
61 class AbstractCellCycleModel : public Identifiable, boost::noncopyable
62 {
63 private:
64 
73  template<class Archive>
74  void serialize(Archive & archive, const unsigned int version)
75  {
76  // Make sure the SimulationTime singleton gets saved too
78  archive & p_time_wrapper;
79 
80  // DO NOT archive & mpCell; -- The CellCycleModel is only ever archived from the Cell
81  // which knows this and it is handled in the load_construct of Cell.
82  archive & mBirthTime;
83  archive & mCurrentCellCyclePhase;
84  archive & mG1Duration;
85  archive & mReadyToDivide;
86  archive & mDimension;
87  archive & mMinimumGapDuration;
88  archive & mStemCellG1Duration;
89  archive & mTransitCellG1Duration;
90  archive & mSDuration;
91  archive & mG2Duration;
92  archive & mMDuration;
93  }
94 
95 protected:
96 
98  CellPtr mpCell;
99 
104  double mBirthTime;
105 
107  CellCyclePhase mCurrentCellCyclePhase;
108 
113  double mG1Duration;
114 
119 
123  unsigned mDimension;
124 
133 
140 
146 
150  double mSDuration;
151 
155  double mG2Duration;
156 
160  double mMDuration;
161 
162 public:
163 
169 
175  virtual ~AbstractCellCycleModel();
176 
186  void SetCell(CellPtr pCell);
187 
199  virtual void Initialise();
200 
213  virtual void InitialiseDaughterCell();
214 
218  CellPtr GetCell();
219 
228  virtual void SetBirthTime(double birthTime);
229 
235  void SetDimension(unsigned dimension);
236 
240  unsigned GetDimension();
241 
245  double GetBirthTime() const;
246 
250  double GetAge();
251 
260  virtual bool ReadyToDivide();
261 
268  virtual void UpdateCellCyclePhase()=0;
269 
278  virtual void ResetForDivision();
279 
296 
300  CellCyclePhase GetCurrentCellCyclePhase();
301 
305  virtual double GetG1Duration();
306 
310  double GetStemCellG1Duration();
311 
315  double GetTransitCellG1Duration();
316 
320  double GetSG2MDuration();
321 
325  virtual double GetSDuration();
326 
330  virtual double GetG2Duration();
331 
335  virtual double GetMDuration();
336 
342  virtual void SetStemCellG1Duration(double stemCellG1Duration);
343 
349  virtual void SetTransitCellG1Duration(double transitCellG1Duration);
350 
356  void SetSDuration(double sDuration);
357 
363  void SetG2Duration(double g2Duration);
364 
370  void SetMDuration(double mDuration);
371 
376  virtual double GetAverageTransitCellCycleTime();
377 
382  virtual double GetAverageStemCellCycleTime();
383 
387  virtual bool CanCellTerminallyDifferentiate();
388 
392  double GetMinimumGapDuration();
393 
399  void SetMinimumGapDuration(double minimumGapDuration);
400 
407  void OutputCellCycleModelInfo(out_stream& rParamsFile);
408 
417  virtual void OutputCellCycleModelParameters(out_stream& rParamsFile)=0;
418 };
419 
421 
422 #endif /*ABSTRACTCELLCYCLEMODEL_HPP_*/
Definition: Cell.hpp:77
virtual void SetBirthTime(double birthTime)
void OutputCellCycleModelInfo(out_stream &rParamsFile)
virtual void SetStemCellG1Duration(double stemCellG1Duration)
virtual void UpdateCellCyclePhase()=0
void SetMinimumGapDuration(double minimumGapDuration)
void SetMDuration(double mDuration)
#define CLASS_IS_ABSTRACT(T)
static SimulationTime * Instance()
void SetG2Duration(double g2Duration)
virtual bool CanCellTerminallyDifferentiate()
void SetDimension(unsigned dimension)
friend class boost::serialization::access
void serialize(Archive &archive, const unsigned int version)
CellCyclePhase GetCurrentCellCyclePhase()
virtual void OutputCellCycleModelParameters(out_stream &rParamsFile)=0
virtual void SetTransitCellG1Duration(double transitCellG1Duration)
virtual double GetAverageStemCellCycleTime()
SerializableSingleton< SINGLETON_CLASS > * GetSerializationWrapper() const
virtual AbstractCellCycleModel * CreateCellCycleModel()=0
void SetSDuration(double sDuration)
virtual double GetAverageTransitCellCycleTime()