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
00029 #include "SimpleOxygenBasedCellCycleModel.hpp"
00030 #include "RandomNumberGenerator.hpp"
00031 #include "ApoptoticCellProperty.hpp"
00032 #include "CellPropertyRegistry.hpp"
00033
00034 SimpleOxygenBasedCellCycleModel::SimpleOxygenBasedCellCycleModel()
00035 : mTimeSpentInG1Phase(0.0),
00036 mCurrentHypoxicDuration(0.0),
00037 mHypoxicConcentration(0.4),
00038 mQuiescentConcentration(1.0),
00039 mCriticalHypoxicDuration(2.0)
00040 {
00041 mCurrentHypoxiaOnsetTime = SimulationTime::Instance()->GetTime();
00042 }
00043
00044
00045 double SimpleOxygenBasedCellCycleModel::GetCurrentHypoxicDuration()
00046 {
00047 return mCurrentHypoxicDuration;
00048 }
00049
00050
00051 double SimpleOxygenBasedCellCycleModel::GetCurrentHypoxiaOnsetTime()
00052 {
00053 return mCurrentHypoxiaOnsetTime;
00054 }
00055
00056
00057 void SimpleOxygenBasedCellCycleModel::UpdateCellCyclePhase()
00058 {
00059
00060
00061 bool cell_is_apoptotic = mpCell->HasCellProperty<ApoptoticCellProperty>();
00062
00063 if (!cell_is_apoptotic)
00064 {
00065 UpdateHypoxicDuration();
00066
00067
00068 double oxygen_concentration;
00069 switch (mDimension)
00070 {
00071 case 1:
00072 {
00073 const unsigned DIM = 1;
00074 oxygen_concentration = CellwiseData<DIM>::Instance()->GetValue(mpCell, 0);
00075 break;
00076 }
00077 case 2:
00078 {
00079 const unsigned DIM = 2;
00080 oxygen_concentration = CellwiseData<DIM>::Instance()->GetValue(mpCell, 0);
00081 break;
00082 }
00083 case 3:
00084 {
00085 const unsigned DIM = 3;
00086 oxygen_concentration = CellwiseData<DIM>::Instance()->GetValue(mpCell, 0);
00087 break;
00088 }
00089
00090 default:
00091 NEVER_REACHED;
00092 }
00093
00094 AbstractSimpleCellCycleModel::UpdateCellCyclePhase();
00095
00096 if (mCurrentCellCyclePhase == G_ONE_PHASE)
00097 {
00098
00099 double dt = SimulationTime::Instance()->GetTimeStep();
00100
00101 if (oxygen_concentration < mQuiescentConcentration)
00102 {
00103 mG1Duration += (1 - std::max(oxygen_concentration, 0.0)/mQuiescentConcentration)*dt;
00104 mTimeSpentInG1Phase += dt;
00105 }
00106 }
00107 }
00108 }
00109
00110
00111 AbstractCellCycleModel* SimpleOxygenBasedCellCycleModel::CreateCellCycleModel()
00112 {
00113
00114 SimpleOxygenBasedCellCycleModel* p_model = new SimpleOxygenBasedCellCycleModel();
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129 p_model->SetBirthTime(mBirthTime);
00130 p_model->SetDimension(mDimension);
00131 p_model->SetCellProliferativeType(mCellProliferativeType);
00132 p_model->SetMinimumGapDuration(mMinimumGapDuration);
00133 p_model->SetStemCellG1Duration(mStemCellG1Duration);
00134 p_model->SetTransitCellG1Duration(mTransitCellG1Duration);
00135 p_model->SetSDuration(mSDuration);
00136 p_model->SetG2Duration(mG2Duration);
00137 p_model->SetMDuration(mMDuration);
00138 p_model->SetHypoxicConcentration(mHypoxicConcentration);
00139 p_model->SetQuiescentConcentration(mQuiescentConcentration);
00140 p_model->SetCriticalHypoxicDuration(mCriticalHypoxicDuration);
00141 p_model->SetCurrentHypoxiaOnsetTime(mCurrentHypoxiaOnsetTime);
00142
00143 return p_model;
00144 }
00145
00146
00147 void SimpleOxygenBasedCellCycleModel::UpdateHypoxicDuration()
00148 {
00149 assert(!(mpCell->HasCellProperty<ApoptoticCellProperty>()));
00150 assert(!mpCell->HasApoptosisBegun());
00151
00152
00153 double oxygen_concentration;
00154 switch (mDimension)
00155 {
00156 case 1:
00157 {
00158 const unsigned DIM = 1;
00159 oxygen_concentration = CellwiseData<DIM>::Instance()->GetValue(mpCell, 0);
00160 break;
00161 }
00162 case 2:
00163 {
00164 const unsigned DIM = 2;
00165 oxygen_concentration = CellwiseData<DIM>::Instance()->GetValue(mpCell, 0);
00166 break;
00167 }
00168 case 3:
00169 {
00170 const unsigned DIM = 3;
00171 oxygen_concentration = CellwiseData<DIM>::Instance()->GetValue(mpCell, 0);
00172 break;
00173 }
00174 default:
00175 NEVER_REACHED;
00176 }
00177
00178 if (oxygen_concentration < mHypoxicConcentration)
00179 {
00180
00181 mCurrentHypoxicDuration = (SimulationTime::Instance()->GetTime() - mCurrentHypoxiaOnsetTime);
00182
00183
00184 double prob_of_death = 0.9 - 0.5*(oxygen_concentration/mHypoxicConcentration);
00185 if (mCurrentHypoxicDuration > mCriticalHypoxicDuration && RandomNumberGenerator::Instance()->ranf() < prob_of_death)
00186 {
00187 mpCell->AddCellProperty(CellPropertyRegistry::Instance()->Get<ApoptoticCellProperty>());
00188 }
00189 }
00190 else
00191 {
00192
00193 mCurrentHypoxicDuration = 0.0;
00194 mCurrentHypoxiaOnsetTime = SimulationTime::Instance()->GetTime();
00195 }
00196 }
00197
00198
00199 double SimpleOxygenBasedCellCycleModel::GetHypoxicConcentration()
00200 {
00201 return mHypoxicConcentration;
00202 }
00203
00204
00205 void SimpleOxygenBasedCellCycleModel::SetHypoxicConcentration(double hypoxicConcentration)
00206 {
00207 assert(hypoxicConcentration<=1.0);
00208 assert(hypoxicConcentration>=0.0);
00209 mHypoxicConcentration = hypoxicConcentration;
00210 }
00211
00212
00213 double SimpleOxygenBasedCellCycleModel::GetQuiescentConcentration()
00214 {
00215 return mQuiescentConcentration;
00216 }
00217
00218
00219 void SimpleOxygenBasedCellCycleModel::SetQuiescentConcentration(double quiescentConcentration)
00220 {
00221 assert(quiescentConcentration <= 1.0);
00222 assert(quiescentConcentration >= 0.0);
00223 mQuiescentConcentration = quiescentConcentration;
00224 }
00225
00226
00227 double SimpleOxygenBasedCellCycleModel::GetCriticalHypoxicDuration()
00228 {
00229 return mCriticalHypoxicDuration;
00230 }
00231
00232
00233 void SimpleOxygenBasedCellCycleModel::SetCriticalHypoxicDuration(double criticalHypoxicDuration)
00234 {
00235 assert(criticalHypoxicDuration >= 0.0);
00236 mCriticalHypoxicDuration = criticalHypoxicDuration;
00237 }
00238
00239 void SimpleOxygenBasedCellCycleModel::SetCurrentHypoxiaOnsetTime(double currentHypoxiaOnsetTime)
00240 {
00241 assert(currentHypoxiaOnsetTime >= 0.0);
00242 mCurrentHypoxiaOnsetTime = currentHypoxiaOnsetTime;
00243 }
00244
00245 void SimpleOxygenBasedCellCycleModel::OutputCellCycleModelParameters(out_stream& rParamsFile)
00246 {
00247 *rParamsFile << "\t\t\t<HypoxicConcentration>" << mHypoxicConcentration << "</HypoxicConcentration>\n";
00248 *rParamsFile << "\t\t\t<QuiescentConcentration>" << mQuiescentConcentration << "</QuiescentConcentration>\n";
00249 *rParamsFile << "\t\t\t<CriticalHypoxicDuration>" << mCriticalHypoxicDuration << "</CriticalHypoxicDuration>\n";
00250
00251
00252 AbstractSimpleCellCycleModel::OutputCellCycleModelParameters(rParamsFile);
00253 }
00254
00255
00256 #include "SerializationExportWrapperForCpp.hpp"
00257 CHASTE_CLASS_EXPORT(SimpleOxygenBasedCellCycleModel)