Chaste  Release::3.4
Mirams2010WntOdeSystem.cpp
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 #include "Mirams2010WntOdeSystem.hpp"
36 #include "CellwiseOdeSystemInformation.hpp"
37 
38 // These #includes are needed for the constructor and EvaluateYDerivatives()
39 #include "ApcOneHitCellMutationState.hpp"
40 #include "ApcTwoHitCellMutationState.hpp"
41 #include "BetaCateninOneHitCellMutationState.hpp"
42 #include "CellLabel.hpp"
43 #include "WildTypeCellMutationState.hpp"
44 
46  boost::shared_ptr<AbstractCellMutationState> pMutationState,
47  std::vector<double> stateVariables)
48  : AbstractOdeSystem(3),
49  mpMutationState(pMutationState),
50  mWntLevel(wntLevel)
51 {
53 
62  Init(); // set up parameter values
63 
64  // Set up rough guesses for the initial steady states in this Wnt conc.
65  double b1 = 0;
66  double b2 = 0;
67  b1 = (mA/2.0) / (((wntLevel + mB)/(mC*wntLevel + mD)) + mF);
68  if (!mpMutationState)
69  {
70  // No mutations specified
71  }
73  {
74  b2 = (mA/2.0)/mF;
75  }
76  else
77  {
78  b2 = (mA/2.0) / (((wntLevel + mB)/(mC*wntLevel + mD)) + mF);
79  }
80 
83  SetDefaultInitialCondition(2, wntLevel);
84 
85  if (stateVariables != std::vector<double>())
86  {
87  SetStateVariables(stateVariables);
88  }
89 }
90 
91 void Mirams2010WntOdeSystem::SetMutationState(boost::shared_ptr<AbstractCellMutationState> pMutationState)
92 {
93  mpMutationState = pMutationState;
94 }
95 
97 {
98  // Do nothing
99 }
100 
102 {
103  // Initialise model parameter values
104  mA = 25.38; // nM hr^{-1}
105  mB = 0.1; // dimensionless
106  mC = 6.386; // hr
107  mD = 9.818e-2; // hr
108  mE = 1.2e3; // nM
109  mF = 1.54e-2; // hr^{-1}
110 }
111 
112 void Mirams2010WntOdeSystem::EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY)
113 {
114  double x1 = rY[0];
115  double x2 = rY[1];
116  double wnt_level = rY[2];
117 
118  double dx1 = 0.0;
119  double dx2 = 0.0;
120  /*
121  * The variables are
122  * 1. b = Beta-Catenin1
123  * 2. b = Beta-Catenin2
124  */
125 
126  double c = mC;
127  double d = mD;
128  // Mutations take effect by altering the parameters
129  if (mpMutationState->IsType<ApcOneHitCellMutationState>()) // APC +/-
130  {
131  c = 31.87;
132  d = 0.490;
133  }
134  else if (mpMutationState->IsType<ApcTwoHitCellMutationState>()) // APC -/-
135  {
136  c = 71.21;
137  d = 1.095;
138  }
139 
140  // da
141  dx1 = mA/2.0 - (((wnt_level + mB)/(c*wnt_level + d))*(mE/(mE+x1)) + mF)*x1;
142  // db
144  {
145  dx2 = mA/2.0 - mF*x2;
146  }
147  else
148  {
149  dx2 = mA/2.0 - (((wnt_level + mB)/(c*wnt_level + d))*(mE/(mE+x2)) + mF)*x2;
150  }
151 
152  rDY[0] = dx1;
153  rDY[1] = dx2;
154  rDY[2] = 0.0; // do not change the Wnt level
155 }
156 
157 const boost::shared_ptr<AbstractCellMutationState> Mirams2010WntOdeSystem::GetMutationState() const
158 {
159  return mpMutationState;
160 }
161 
162 template<>
164 {
165  this->mVariableNames.push_back("Beta_Cat_Allele1");
166  this->mVariableUnits.push_back("nM");
167  this->mInitialConditions.push_back(50.0); // will be filled in later
168 
169  this->mVariableNames.push_back("Beta_Cat_Allele2");
170  this->mVariableUnits.push_back("nM");
171  this->mInitialConditions.push_back(50.0); // will be filled in later
172 
173  this->mVariableNames.push_back("Wnt Level");
174  this->mVariableUnits.push_back("non-dim");
175  this->mInitialConditions.push_back(0.5); // will be filled in later
176 
177  this->mInitialised = true;
178 }
179 
181 {
182  return mWntLevel;
183 }
184 
185 // Serialization for Boost >= 1.36
Mirams2010WntOdeSystem(double wntLevel=0.0, boost::shared_ptr< AbstractCellMutationState > pMutationState=boost::shared_ptr< AbstractCellMutationState >(), std::vector< double > stateVariables=std::vector< double >())
void SetDefaultInitialCondition(unsigned index, double initialCondition)
void SetStateVariables(const std::vector< double > &rStateVariables)
void SetMutationState(boost::shared_ptr< AbstractCellMutationState > pMutationState)
const boost::shared_ptr< AbstractCellMutationState > GetMutationState() const
boost::shared_ptr< AbstractOdeSystemInformation > mpSystemInfo
#define CHASTE_CLASS_EXPORT(T)
void EvaluateYDerivatives(double time, const std::vector< double > &rY, std::vector< double > &rDY)
boost::shared_ptr< AbstractCellMutationState > mpMutationState