Chaste Commit::ca8ccdedf819b6e02855bc0e8e6f50bdecbc5208
Mirams2010WntOdeSystem.cpp
1/*
2
3Copyright (c) 2005-2024, University of Oxford.
4All rights reserved.
5
6University of Oxford means the Chancellor, Masters and Scholars of the
7University of Oxford, having an administrative office at Wellington
8Square, Oxford OX1 2JD, UK.
9
10This file is part of Chaste.
11
12Redistribution and use in source and binary forms, with or without
13modification, 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
23THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
29GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
32OF 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)
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
91void Mirams2010WntOdeSystem::SetMutationState(boost::shared_ptr<AbstractCellMutationState> pMutationState)
92{
93 mpMutationState = pMutationState;
94}
95
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
112void 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
157const boost::shared_ptr<AbstractCellMutationState> Mirams2010WntOdeSystem::GetMutationState() const
158{
159 return mpMutationState;
160}
161
162template<>
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
#define CHASTE_CLASS_EXPORT(T)
void SetStateVariables(const std::vector< double > &rStateVariables)
void SetDefaultInitialCondition(unsigned index, double initialCondition)
boost::shared_ptr< AbstractOdeSystemInformation > mpSystemInfo
void SetMutationState(boost::shared_ptr< AbstractCellMutationState > pMutationState)
void EvaluateYDerivatives(double time, const std::vector< double > &rY, std::vector< double > &rDY)
Mirams2010WntOdeSystem(double wntLevel=0.0, boost::shared_ptr< AbstractCellMutationState > pMutationState=boost::shared_ptr< AbstractCellMutationState >(), std::vector< double > stateVariables=std::vector< double >())
const boost::shared_ptr< AbstractCellMutationState > GetMutationState() const
boost::shared_ptr< AbstractCellMutationState > mpMutationState