AbstractCellCycleModel.hpp

00001 /*
00002 
00003 Copyright (C) University of Oxford, 2005-2011
00004 
00005 University of Oxford means the Chancellor, Masters and Scholars of the
00006 University of Oxford, having an administrative office at Wellington
00007 Square, Oxford OX1 2JD, UK.
00008 
00009 This file is part of Chaste.
00010 
00011 Chaste is free software: you can redistribute it and/or modify it
00012 under the terms of the GNU Lesser General Public License as published
00013 by the Free Software Foundation, either version 2.1 of the License, or
00014 (at your option) any later version.
00015 
00016 Chaste is distributed in the hope that it will be useful, but WITHOUT
00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
00019 License for more details. The offer of Chaste under the terms of the
00020 License is subject to the License being interpreted in accordance with
00021 English Law and subject to any action against the University of Oxford
00022 being under the jurisdiction of the English Courts.
00023 
00024 You should have received a copy of the GNU Lesser General Public License
00025 along with Chaste. If not, see <http://www.gnu.org/licenses/>.
00026 
00027 */
00028 
00029 #ifndef ABSTRACTCELLCYCLEMODEL_HPP_
00030 #define ABSTRACTCELLCYCLEMODEL_HPP_
00031 
00032 #include "ChasteSerialization.hpp"
00033 #include "ClassIsAbstract.hpp"
00034 #include "Identifiable.hpp"
00035 
00036 #include <boost/serialization/base_object.hpp>
00037 
00038 #include <vector>
00039 
00040 #include "OutputFileHandler.hpp"
00041 #include "CellProliferativeTypes.hpp"
00042 #include "CellCyclePhases.hpp"
00043 #include "SimulationTime.hpp"
00044 #include "Cell.hpp"
00045 
00046 class Cell; // Circular definition (cells need to know about cycle models and vice-versa)
00047 typedef boost::shared_ptr<Cell> CellPtr;
00048 
00055 class AbstractCellCycleModel : public Identifiable, boost::noncopyable
00056 {
00057 private:
00058 
00060     friend class boost::serialization::access;
00067     template<class Archive>
00068     void serialize(Archive & archive, const unsigned int version)
00069     {
00070         // Make sure the SimulationTime singleton gets saved too
00071         SerializableSingleton<SimulationTime>* p_time_wrapper = SimulationTime::Instance()->GetSerializationWrapper();
00072         archive & p_time_wrapper;
00073 
00074         // DO NOT archive & mpCell; -- The CellCycleModel is only ever archived from the Cell
00075         // which knows this and it is handled in the load_construct of Cell.
00076         archive & mBirthTime;
00077         archive & mCurrentCellCyclePhase;
00078         archive & mG1Duration;
00079         archive & mReadyToDivide;
00080         archive & mDimension;
00081         archive & mCellProliferativeType;
00082         archive & mMinimumGapDuration;
00083         archive & mStemCellG1Duration;
00084         archive & mTransitCellG1Duration;
00085         archive & mSDuration;
00086         archive & mG2Duration;
00087         archive & mMDuration;
00088     }
00089 
00090 protected:
00091 
00093     CellPtr mpCell;
00094 
00099     double mBirthTime;
00100 
00102     CellCyclePhase mCurrentCellCyclePhase;
00103 
00108     double mG1Duration;
00109 
00113     bool mReadyToDivide;
00114 
00118     unsigned mDimension;
00119 
00123     CellProliferativeType mCellProliferativeType;
00124 
00132     double mMinimumGapDuration;
00133 
00139     double mStemCellG1Duration;
00140 
00145     double mTransitCellG1Duration;
00146 
00150     double mSDuration;
00151 
00155     double mG2Duration;
00156 
00160     double mMDuration;
00161 
00162 public:
00163 
00168     AbstractCellCycleModel();
00169 
00175     virtual ~AbstractCellCycleModel();
00176 
00186     void SetCell(CellPtr pCell);
00187 
00199     virtual void Initialise();
00200 
00213     virtual void InitialiseDaughterCell();
00214 
00218     CellPtr GetCell();
00219 
00228     virtual void SetBirthTime(double birthTime);
00229 
00235     void SetDimension(unsigned dimension);
00236 
00240     unsigned GetDimension();
00241 
00245     double GetBirthTime() const;
00246 
00250     double GetAge();
00251 
00260     virtual bool ReadyToDivide();
00261 
00268     virtual void UpdateCellCyclePhase()=0;
00269 
00278     virtual void ResetForDivision();
00279 
00292     virtual AbstractCellCycleModel* CreateCellCycleModel()=0;
00293 
00297     CellCyclePhase GetCurrentCellCyclePhase();
00298 
00302     virtual double GetG1Duration();
00303 
00307     double GetStemCellG1Duration();
00308 
00312     double GetTransitCellG1Duration();
00313 
00317     double GetSG2MDuration();
00318 
00322     virtual double GetSDuration();
00323 
00327     virtual double GetG2Duration();
00328 
00332     virtual double GetMDuration();
00333 
00339     void SetStemCellG1Duration(double stemCellG1Duration);
00340 
00346     void SetTransitCellG1Duration(double transitCellG1Duration);
00347 
00353     void SetSDuration(double sDuration);
00354 
00360     void SetG2Duration(double g2Duration);
00361 
00367     void SetMDuration(double mDuration);
00368 
00373     virtual double GetAverageTransitCellCycleTime();
00374 
00379     virtual double GetAverageStemCellCycleTime();
00380 
00384     virtual bool CanCellTerminallyDifferentiate();
00385 
00389     CellProliferativeType GetCellProliferativeType() const;
00390 
00396     void SetCellProliferativeType(CellProliferativeType cellType);
00397 
00401     double GetMinimumGapDuration();
00402 
00408     void SetMinimumGapDuration(double minimumGapDuration);
00409 
00416     void OutputCellCycleModelInfo(out_stream& rParamsFile);
00417 
00426     virtual void OutputCellCycleModelParameters(out_stream& rParamsFile)=0;
00427 };
00428 
00429 CLASS_IS_ABSTRACT(AbstractCellCycleModel)
00430 
00431 #endif /*ABSTRACTCELLCYCLEMODEL_HPP_*/
Generated on Thu Dec 22 13:00:04 2011 for Chaste by  doxygen 1.6.3