00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef INGEWNTSWATCELLCYCLEMODEL_HPP_
00029 #define INGEWNTSWATCELLCYCLEMODEL_HPP_
00030
00031 #include <boost/serialization/access.hpp>
00032 #include <boost/serialization/base_object.hpp>
00033
00034 #include <cfloat>
00035
00036 #include "AbstractOdeSystem.hpp"
00037 #include "AbstractWntOdeBasedCellCycleModel.hpp"
00038 #include "IngeWntSwatCellCycleOdeSystem.hpp"
00039 #include "CellMutationStates.hpp"
00040 #include "Exception.hpp"
00041
00042
00043
00044 #include <boost/serialization/export.hpp>
00045
00052 class IngeWntSwatCellCycleModel : public AbstractWntOdeBasedCellCycleModel
00053 {
00054 private:
00055
00057 friend class boost::serialization::access;
00064 template<class Archive>
00065 void serialize(Archive & archive, const unsigned int version)
00066 {
00067 assert(mpOdeSystem!=NULL);
00068 archive & boost::serialization::base_object<AbstractWntOdeBasedCellCycleModel>(*this);
00069
00070
00071
00072 archive & static_cast<IngeWntSwatCellCycleOdeSystem*>(mpOdeSystem)->rGetMutationState();
00073 }
00074
00083 void ChangeCellTypeDueToCurrentBetaCateninLevel();
00084
00089 unsigned mHypothesis;
00090
00091 public:
00092
00099 IngeWntSwatCellCycleModel(unsigned hypothesis)
00100 : mHypothesis(hypothesis)
00101 {
00102 if ( !(mHypothesis==1u || mHypothesis==2u) )
00103 {
00104 EXCEPTION("Model must be set up with argument(hypothesis) = 1u or 2u");
00105 }
00106 };
00107
00121 IngeWntSwatCellCycleModel(const unsigned& rHypothesis,
00122 AbstractOdeSystem* pParentOdeSystem,
00123 const CellMutationState& rMutationState,
00124 double birthTime,
00125 double lastTime,
00126 bool inSG2MPhase,
00127 bool readyToDivide,
00128 double divideTime);
00129
00137 IngeWntSwatCellCycleModel(const unsigned& rHypothesis,
00138 const std::vector<double>& rParentProteinConcentrations,
00139 const CellMutationState& rMutationState);
00140
00146 AbstractCellCycleModel* CreateDaughterCellCycleModel();
00147
00153 void Initialise();
00154
00161 bool SolveOdeToTime(double currentTime);
00162
00166 double GetMembraneBoundBetaCateninLevel();
00167
00171 double GetCytoplasmicBetaCateninLevel();
00172
00176 double GetNuclearBetaCateninLevel();
00177
00181 unsigned GetHypothesis() const;
00182
00183 };
00184
00185
00186 BOOST_CLASS_EXPORT(IngeWntSwatCellCycleModel)
00187
00188
00189 namespace boost
00190 {
00191 namespace serialization
00192 {
00197 template<class Archive>
00198 inline void save_construct_data(
00199 Archive & ar, const IngeWntSwatCellCycleModel * t, const unsigned int file_version)
00200 {
00201 const unsigned hypothesis = t->GetHypothesis();
00202 ar & hypothesis;
00203 }
00204
00209 template<class Archive>
00210 inline void load_construct_data(
00211 Archive & ar, IngeWntSwatCellCycleModel * t, const unsigned int file_version)
00212 {
00220 std::vector<double> state_vars;
00221 for (unsigned i=0; i<22; i++)
00222 {
00223 state_vars.push_back(0.0);
00224 }
00225
00226 CellMutationState mutation_state = HEALTHY;
00227
00228 unsigned hypothesis;
00229 ar & hypothesis;
00230
00231 ::new(t)IngeWntSwatCellCycleModel(hypothesis, state_vars, mutation_state);
00232 }
00233 }
00234 }
00235
00236 #endif
00237