TissueConfig.cpp

00001 /*
00002 
00003 Copyright (C) University of Oxford, 2005-2009
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 #include "TissueConfig.hpp"
00029 
00030 TissueConfig* TissueConfig::mpInstance = NULL;
00031 
00032 TissueConfig* TissueConfig::Instance()
00033 {
00034     if (mpInstance == NULL)
00035     {
00036         mpInstance = new TissueConfig;
00037     }
00038     return mpInstance;
00039 }
00040 
00041 TissueConfig::TissueConfig()
00042 {
00043     // Make sure there's only one instance - enforces correct serialization
00044     assert(mpInstance == NULL);
00045 
00046     Reset();
00047 }
00048 
00087 void TissueConfig::Reset()
00088 {
00089     // Default parameter values
00090     mStemCellG1Duration = 14.0;
00091     mTransitCellG1Duration = 2.0;
00092     mHepaOneCellG1Duration = 8.0;   // taken from Owen et al (2004)
00093     mMinimumGapDuration = 0.01;     // educated guess
00094     mSDuration = 5.0;               // apparently between 5-6 hours normally
00095     mG2Duration = 4.0;              // apparently 3-4 hours normally
00096     mMDuration = 1.0;               // this is Meineke's approximation for cell division time
00097     mMaxTransitGenerations = 3u;
00098     mCryptWidth = 10.0;
00099     mCryptLength = 22.0;            // this is MOUSE (small intestine)
00100     mSpringStiffness = 15.0;        // this is mu in Meineke
00101     mMechanicsCutOffLength = DBL_MAX; // This needs to be set by a caller
00102     mDampingConstantNormal = 1.0;   // this is nu in Meineke
00103     mDampingConstantMutant = 2.0;
00104     mBetaCatSpringScaler = 18.14 / 6.0; // this scales the spring constant with the amount of beta-catenin
00105                                         // (divided by 6 as a cell normally is a hexagon)
00106     mApoptosisTime = 0.25;          // cell takes 15 min to fully undergo apoptosis
00107     mDivisionRestingSpringLength = 0.5;
00108     mDivisionSeparation = 0.3;
00109     mHepaOneCellHypoxicConcentration = 0.4;
00110     mHepaOneCellQuiescentConcentration = 1.0;
00111     mWntStemThreshold = 0.8;
00112     mWntTransitThreshold = 0.65;
00113     mTopOfLinearWntConcentration = 1.0;
00114     mCriticalHypoxicDuration = 2.0;
00115     mCryptProjectionParameterA = 0.5;
00116     mCryptProjectionParameterB = 2.0;
00117 
00118     mApoptoticSpringTensionStiffness = 0.25*mSpringStiffness;
00119     mApoptoticSpringCompressionStiffness = 0.75*mSpringStiffness;
00120 
00121     mWntChemotaxisStrength = 100.0;
00122     mSymmetricDivisionProbability = 0.0;
00123 
00124     mAreaBasedDampingConstantParameter = 0.1;
00125 
00126     mMatureCellTargetArea = 1.0;
00127     mDeformationEnergyParameter = 1.0;
00128     mMembraneSurfaceEnergyParameter = 0.1;
00129     mCellCellAdhesionEnergyParameter = 0.01;
00130     mCellBoundaryAdhesionEnergyParameter = 0.01;
00131 
00132     mOutputCellIdData = false;
00133     mOutputCellMutationStates = false;
00134     mOutputCellAncestors = false;
00135     mOutputCellTypes = false;
00136     mOutputCellVariables = false;
00137     mOutputCellCyclePhases = false;
00138     mOutputCellAges = false;
00139     mOutputCellAreas = false;
00140     mOutputVoronoiData = false;
00141     mOutputTissueAreas = false;
00142 }
00143 
00145 // Getter methods
00147 
00148 double TissueConfig::GetStemCellG1Duration()
00149 {
00150     return mStemCellG1Duration;
00151 }
00152 double TissueConfig::GetTransitCellG1Duration()
00153 {
00154     return mTransitCellG1Duration;
00155 }
00156 double TissueConfig::GetHepaOneCellG1Duration()
00157 {
00158     return mHepaOneCellG1Duration;
00159 }
00160 double TissueConfig::GetMinimumGapDuration()
00161 {
00162     return mMinimumGapDuration;
00163 }
00164 double TissueConfig::GetSG2MDuration()
00165 {
00166     return mSDuration + mG2Duration + mMDuration;
00167 }
00168 double TissueConfig::GetSDuration()
00169 {
00170     return mSDuration;
00171 }
00172 double TissueConfig::GetG2Duration()
00173 {
00174     return mG2Duration;
00175 }
00176 double TissueConfig::GetMDuration()
00177 {
00178     return mMDuration;
00179 }
00180 unsigned TissueConfig::GetMaxTransitGenerations()
00181 {
00182     return mMaxTransitGenerations;
00183 }
00184 double TissueConfig::GetCryptLength()
00185 {
00186     return mCryptLength;
00187 }
00188 double TissueConfig::GetCryptWidth()
00189 {
00190     return mCryptWidth;
00191 }
00192 double TissueConfig::GetSpringStiffness()
00193 {
00194     return mSpringStiffness;
00195 }
00196 double TissueConfig::GetMechanicsCutOffLength()
00197 {
00198     return mMechanicsCutOffLength;
00199 }
00200 double TissueConfig::GetDampingConstantNormal()
00201 {
00202     return mDampingConstantNormal;
00203 }
00204 double TissueConfig::GetDampingConstantMutant()
00205 {
00206     return mDampingConstantMutant;
00207 }
00208 double TissueConfig::GetBetaCatSpringScaler()
00209 {
00210     return mBetaCatSpringScaler;
00211 }
00212 double TissueConfig::GetApoptosisTime()
00213 {
00214     return mApoptosisTime;
00215 }
00216 double TissueConfig::GetDivisionRestingSpringLength()
00217 {
00218     return mDivisionRestingSpringLength;
00219 }
00220 double TissueConfig::GetDivisionSeparation()
00221 {
00222     return mDivisionSeparation;
00223 }
00224 double TissueConfig::GetHepaOneCellHypoxicConcentration()
00225 {
00226     return mHepaOneCellHypoxicConcentration;
00227 }
00228 double TissueConfig::GetHepaOneCellQuiescentConcentration()
00229 {
00230     return mHepaOneCellQuiescentConcentration;
00231 }
00232 double TissueConfig::GetWntTransitThreshold()
00233 {
00234     return mWntTransitThreshold;
00235 }
00236 double TissueConfig::GetWntStemThreshold()
00237 {
00238     return mWntStemThreshold;
00239 }
00240 double TissueConfig::GetTopOfLinearWntConcentration()
00241 {
00242     return mTopOfLinearWntConcentration;
00243 }
00244 double TissueConfig::GetCriticalHypoxicDuration()
00245 {
00246     return mCriticalHypoxicDuration;
00247 }
00248 double TissueConfig::GetCryptProjectionParameterA()
00249 {
00250     return mCryptProjectionParameterA;
00251 }
00252 double TissueConfig::GetCryptProjectionParameterB()
00253 {
00254     return mCryptProjectionParameterB;
00255 }
00256 double TissueConfig::GetApoptoticSpringTensionStiffness()
00257 {
00258     return mApoptoticSpringTensionStiffness;
00259 }
00260 double TissueConfig::GetApoptoticSpringCompressionStiffness()
00261 {
00262     return mApoptoticSpringCompressionStiffness;
00263 }
00264 double TissueConfig::GetWntChemotaxisStrength()
00265 {
00266     return mWntChemotaxisStrength;
00267 }
00268 double TissueConfig::GetSymmetricDivisionProbability()
00269 {
00270     return mSymmetricDivisionProbability;
00271 }
00272 double TissueConfig::GetAreaBasedDampingConstantParameter()
00273 {
00274     return mAreaBasedDampingConstantParameter;
00275 }
00276 double TissueConfig::GetMatureCellTargetArea()
00277 {
00278     return mMatureCellTargetArea;
00279 }
00280 double TissueConfig::GetDeformationEnergyParameter()
00281 {
00282     return mDeformationEnergyParameter;
00283 }
00284 double TissueConfig::GetMembraneSurfaceEnergyParameter()
00285 {
00286     return mMembraneSurfaceEnergyParameter;
00287 }
00288 double TissueConfig::GetCellCellAdhesionEnergyParameter()
00289 {
00290     return mCellCellAdhesionEnergyParameter;
00291 }
00292 double TissueConfig::GetCellBoundaryAdhesionEnergyParameter()
00293 {
00294     return mCellBoundaryAdhesionEnergyParameter;
00295 }
00296 bool TissueConfig::GetOutputCellIdData()
00297 {
00298     return mOutputCellIdData;
00299 }
00300 bool TissueConfig::GetOutputCellMutationStates()
00301 {
00302     return mOutputCellMutationStates;
00303 }
00304 bool TissueConfig::GetOutputCellAncestors()
00305 {
00306     return mOutputCellAncestors;
00307 }
00308 bool TissueConfig::GetOutputCellTypes()
00309 {
00310     return mOutputCellTypes;
00311 }
00312 bool TissueConfig::GetOutputCellVariables()
00313 {
00314     return mOutputCellVariables;
00315 }
00316 bool TissueConfig::GetOutputCellCyclePhases()
00317 {
00318     return mOutputCellCyclePhases;
00319 }
00320 bool TissueConfig::GetOutputCellAges()
00321 {
00322     return mOutputCellAges;
00323 }
00324 bool TissueConfig::GetOutputCellAreas()
00325 {
00326     return mOutputCellAreas;
00327 }
00328 bool TissueConfig::GetOutputVoronoiData()
00329 {
00330     return mOutputVoronoiData;
00331 }
00332 bool TissueConfig::GetOutputTissueAreas()
00333 {
00334     return mOutputTissueAreas;
00335 }
00337 // Setter methods
00339 
00340 void TissueConfig::SetStemCellG1Duration(double stemCellG1Duration)
00341 {
00342     assert(stemCellG1Duration > 0.0);
00343     mStemCellG1Duration = stemCellG1Duration;
00344 }
00345 void TissueConfig::SetTransitCellG1Duration(double transitCellG1Duration)
00346 {
00347     assert(transitCellG1Duration > 0.0);
00348     mTransitCellG1Duration = transitCellG1Duration;
00349 }
00350 void TissueConfig::SetHepaOneCellG1Duration(double hepaOneCellG1Duration)
00351 {
00352     assert(hepaOneCellG1Duration > 0.0);
00353     mHepaOneCellG1Duration = hepaOneCellG1Duration;
00354 }
00355 void TissueConfig::SetMinimumGapDuration(double minimumGapDuration)
00356 {
00357     assert(minimumGapDuration > 0.0);
00358     mMinimumGapDuration = minimumGapDuration;
00359 }
00360 void TissueConfig::SetSDuration(double SDuration)
00361 {
00362     assert(SDuration > 0.0);
00363     mSDuration = SDuration;
00364 }
00365 void TissueConfig::SetG2Duration(double G2Duration)
00366 {
00367     assert(G2Duration > 0.0);
00368     mG2Duration = G2Duration;
00369 }
00370 void TissueConfig::SetMDuration(double MDuration)
00371 {
00372     assert(MDuration > 0.0);
00373     mMDuration = MDuration;
00374 }
00375 void TissueConfig::SetMaxTransitGenerations(unsigned maxTransitGens)
00376 {
00377     mMaxTransitGenerations = maxTransitGens;
00378 }
00379 void TissueConfig::SetCryptLength(double cryptLength)
00380 {
00381     assert(cryptLength > 0.0);
00382     mCryptLength = cryptLength;
00383 }
00384 void TissueConfig::SetCryptWidth(double cryptWidth)
00385 {
00386     assert(cryptWidth > 0.0);
00387     mCryptWidth = cryptWidth;
00388 }
00389 void TissueConfig::SetSpringStiffness(double springStiffness)
00390 {
00391     assert(springStiffness > 0.0);
00392     mSpringStiffness = springStiffness;
00393 }
00394 void TissueConfig::SetMechanicsCutOffLength(double mechanicsCutOffLength)
00395 {
00396     assert(mechanicsCutOffLength > 0.0);
00397     mMechanicsCutOffLength = mechanicsCutOffLength;
00398 }
00399 
00400 void TissueConfig::SetDampingConstantNormal(double dampingConstantNormal)
00401 {
00402     assert(dampingConstantNormal > 0.0);
00403     mDampingConstantNormal = dampingConstantNormal;
00404 }
00405 void TissueConfig::SetDampingConstantMutant(double dampingConstantMutant)
00406 {
00407     assert(dampingConstantMutant > 0.0);
00408     mDampingConstantMutant = dampingConstantMutant;
00409 }
00410 void TissueConfig::SetBetaCatSpringScaler(double betaCatSpringScaler)
00411 {
00412     assert(betaCatSpringScaler > 0.0);
00413     mBetaCatSpringScaler = betaCatSpringScaler;
00414 }
00415 void TissueConfig::SetApoptosisTime(double apoptosisTime)
00416 {
00417     assert(apoptosisTime > 0.0);
00418     mApoptosisTime = apoptosisTime;
00419 }
00420 void TissueConfig::SetDivisionRestingSpringLength(double divisionRestingSpringLength)
00421 {
00422     assert(divisionRestingSpringLength<=1.0);
00423     assert(divisionRestingSpringLength>=0.0);
00424 
00425     mDivisionRestingSpringLength = divisionRestingSpringLength;
00426 }
00427 void TissueConfig::SetDivisionSeparation(double divisionSeparation)
00428 {
00429     assert(divisionSeparation<=1.0);
00430     assert(divisionSeparation>=0.0);
00431     mDivisionSeparation = divisionSeparation;
00432 }
00433 void TissueConfig::SetHepaOneCellHypoxicConcentration(double hepaOneCellHypoxicConcentration)
00434 {
00435     assert(hepaOneCellHypoxicConcentration<=1.0);
00436     assert(hepaOneCellHypoxicConcentration>=0.0);
00437     mHepaOneCellHypoxicConcentration = hepaOneCellHypoxicConcentration;
00438 }
00439 void TissueConfig::SetHepaOneCellQuiescentConcentration(double hepaOneCellQuiescentConcentration)
00440 {
00441     assert(hepaOneCellQuiescentConcentration<=1.0);
00442     assert(hepaOneCellQuiescentConcentration>=0.0);
00443     mHepaOneCellQuiescentConcentration = hepaOneCellQuiescentConcentration;
00444 }
00445 void TissueConfig::SetWntTransitThreshold(double wntThreshold)
00446 {
00447     assert(wntThreshold<=1.0);
00448     assert(wntThreshold>=0.0);
00449     mWntTransitThreshold = wntThreshold;
00450 }
00451 void TissueConfig::SetWntStemThreshold(double wntThreshold)
00452 {
00453     assert(wntThreshold<=1.0);
00454     assert(wntThreshold>=0.0);
00455     mWntStemThreshold = wntThreshold;
00456 }
00457 void TissueConfig::SetTopOfLinearWntConcentration(double top)
00458 {
00459     assert(top > 0.0);
00460     assert(top <= 1.0);
00461     mTopOfLinearWntConcentration = top;
00462 }
00463 void TissueConfig::SetCriticalHypoxicDuration(double criticalHypoxicDuration)
00464 {
00465     assert(criticalHypoxicDuration>=0.0);
00466     mCriticalHypoxicDuration = criticalHypoxicDuration;
00467 }
00468 void TissueConfig::SetHepaOneParameters()
00469 {
00470     mStemCellG1Duration = mHepaOneCellG1Duration;
00471 }
00472 void TissueConfig::SetCryptProjectionParameterA(double cryptProjectionParameterA)
00473 {
00474     assert(cryptProjectionParameterA>=0.0);
00475     mCryptProjectionParameterA = cryptProjectionParameterA;
00476 }
00477 void TissueConfig::SetCryptProjectionParameterB(double cryptProjectionParameterB)
00478 {
00479     assert(cryptProjectionParameterB>=0.0);
00480     mCryptProjectionParameterB = cryptProjectionParameterB;
00481 }
00482 void TissueConfig::SetApoptoticSpringTensionStiffness(double apoptoticSpringTensionStiffness)
00483 {
00484     assert(apoptoticSpringTensionStiffness>=0.0);
00485     mApoptoticSpringTensionStiffness = apoptoticSpringTensionStiffness;
00486 }
00487 void TissueConfig::SetApoptoticSpringCompressionStiffness(double apoptoticSpringCompressionStiffness)
00488 {
00489     assert(apoptoticSpringCompressionStiffness>=0.0);
00490     mApoptoticSpringCompressionStiffness = apoptoticSpringCompressionStiffness;
00491 }
00492 void TissueConfig::SetWntChemotaxisStrength(double wntChemotaxisStrength)
00493 {
00494     assert(wntChemotaxisStrength>=0.0);
00495     mWntChemotaxisStrength = wntChemotaxisStrength;
00496 }
00497 void TissueConfig::SetSymmetricDivisionProbability(double symmetricDivisionProbability)
00498 {
00499     assert(symmetricDivisionProbability<=1.0);
00500     assert(symmetricDivisionProbability>=0.0);
00501     mSymmetricDivisionProbability = symmetricDivisionProbability;
00502 }
00503 void TissueConfig::SetAreaBasedDampingConstantParameter(double areaBasedDampingConstantParameter)
00504 {
00505     assert(areaBasedDampingConstantParameter>=0.0);
00506     mAreaBasedDampingConstantParameter = areaBasedDampingConstantParameter;
00507 }
00508 void TissueConfig::SetMatureCellTargetArea(double matureCellTargetArea)
00509 {
00510     assert(matureCellTargetArea>=0.0);
00511     mMatureCellTargetArea = matureCellTargetArea;
00512 }
00513 void TissueConfig::SetDeformationEnergyParameter(double deformationEnergyParameter)
00514 {
00515     mDeformationEnergyParameter = deformationEnergyParameter;
00516 }
00517 void TissueConfig::SetMembraneSurfaceEnergyParameter(double membraneSurfaceEnergyParameter)
00518 {
00519     mMembraneSurfaceEnergyParameter = membraneSurfaceEnergyParameter;
00520 }
00521 void TissueConfig::SetCellCellAdhesionEnergyParameter(double cellCellAdhesionEnergyParameter)
00522 {
00523     mCellCellAdhesionEnergyParameter = cellCellAdhesionEnergyParameter;
00524 }
00525 void TissueConfig::SetCellBoundaryAdhesionEnergyParameter(double cellBoundaryAdhesionEnergyParameter)
00526 {
00527     mCellBoundaryAdhesionEnergyParameter = cellBoundaryAdhesionEnergyParameter;
00528 }
00529 void TissueConfig::SetOutputCellIdData(bool writeCellIdData)
00530 {
00531     mOutputCellIdData = writeCellIdData;
00532 }
00533 void TissueConfig::SetOutputCellMutationStates(bool outputCellMutationStates)
00534 {
00535     mOutputCellMutationStates = outputCellMutationStates;
00536 }
00537 void TissueConfig::SetOutputCellAncestors(bool outputCellAncestors)
00538 {
00539     mOutputCellAncestors = outputCellAncestors;
00540 }
00541 void TissueConfig::SetOutputCellTypes(bool outputCellTypes)
00542 {
00543     mOutputCellTypes = outputCellTypes;
00544 }
00545 void TissueConfig::SetOutputCellVariables(bool outputCellVariables)
00546 {
00547     mOutputCellVariables = outputCellVariables;
00548 }
00549 void TissueConfig::SetOutputCellCyclePhases(bool outputCellCyclePhases)
00550 {
00551     mOutputCellCyclePhases = outputCellCyclePhases;
00552 }
00553 void TissueConfig::SetOutputCellAges(bool outputCellAges)
00554 {
00555     mOutputCellAges = outputCellAges;
00556 }
00557 void TissueConfig::SetOutputCellAreas(bool outputCellAreas)
00558 {
00559     mOutputCellAreas = outputCellAreas;
00560 }
00561 void TissueConfig::SetOutputVoronoiData(bool outputVoronoiData)
00562 {
00563     mOutputVoronoiData = outputVoronoiData;
00564 }
00565 void TissueConfig::SetOutputTissueAreas(bool outputTissueAreas)
00566 {
00567     mOutputTissueAreas = outputTissueAreas;
00568 }

Generated on Tue Aug 4 16:10:21 2009 for Chaste by  doxygen 1.5.5