00001 /* 00002 00003 Copyright (c) 2005-2015, University of Oxford. 00004 All rights reserved. 00005 00006 University of Oxford means the Chancellor, Masters and Scholars of the 00007 University of Oxford, having an administrative office at Wellington 00008 Square, Oxford OX1 2JD, UK. 00009 00010 This file is part of Chaste. 00011 00012 Redistribution and use in source and binary forms, with or without 00013 modification, are permitted provided that the following conditions are met: 00014 * Redistributions of source code must retain the above copyright notice, 00015 this list of conditions and the following disclaimer. 00016 * Redistributions in binary form must reproduce the above copyright notice, 00017 this list of conditions and the following disclaimer in the documentation 00018 and/or other materials provided with the distribution. 00019 * Neither the name of the University of Oxford nor the names of its 00020 contributors may be used to endorse or promote products derived from this 00021 software without specific prior written permission. 00022 00023 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00024 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00025 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00026 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 00027 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00028 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 00029 GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00030 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00031 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 00032 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 00034 */ 00035 00036 #ifndef CorriasBuistICCModified_HPP_ 00037 #define CorriasBuistICCModified_HPP_ 00038 00039 #include "ChasteSerialization.hpp" 00040 #include <boost/serialization/base_object.hpp> 00041 #include "AbstractCardiacCell.hpp" 00042 #include "AbstractStimulusFunction.hpp" 00043 00059 class CorriasBuistICCModified : public AbstractCardiacCell 00060 { 00061 friend class boost::serialization::access; 00069 template<class Archive> 00070 void serialize(Archive & archive, const unsigned int version) 00071 { 00072 archive & boost::serialization::base_object<AbstractCardiacCell >(*this); 00073 archive & mFractionOfVDDRInPU; 00074 archive & mIP3Concentration; 00075 archive & mScaleFactorSerca; 00076 archive & mScaleFactorCarbonMonoxide; 00077 } 00078 00079 private: 00080 00082 double mFractionOfVDDRInPU; 00084 double mIP3Concentration; 00086 double mScaleFactorSerca; 00092 double mScaleFactorCarbonMonoxide; 00093 00094 /* Concentrations */ 00095 double Ca_o; 00096 double Cl_o; 00097 double K_o; 00098 double Na_o; 00100 /* Nernst parameters */ 00101 double R; 00102 double T; 00103 double F; 00104 double FoRT; 00105 double RToF; 00107 double Cm ; 00108 double Asurf_in_cm_square; 00109 double Asurf ; 00110 double Cl_i ; 00111 double K_i ; 00112 double Na_i ; 00113 double P_cyto; 00114 double Vol ; 00115 double fc ; 00116 double fe ; 00117 double fm ; 00118 double Q10Ca ; 00119 double Q10K ; 00120 double Q10Na ; 00121 double T_exp ; 00123 double G_max_BK ; 00124 double G_max_CaCl ; 00125 double G_max_ERG ; 00126 double G_max_Ltype ; 00127 double G_max_NSCC ; 00128 double G_max_Na ; 00129 double G_max_VDDR ; 00130 double G_max_bk ; 00131 double G_max_kv11 ; 00134 double J_max_PMCA ; 00135 double J_max_PMCA_PU ; 00136 double J_ERleak ; 00137 double J_max_leak ; 00138 double Jmax_IP3 ; 00139 double Jmax_NaCa ; 00140 double Jmax_serca ; 00141 double Jmax_uni ; 00143 double NaPerm_o_Kperm ; 00144 double L ; 00145 double P_ER ; 00146 double P_PU ; 00147 double P_mito ; 00148 double b ; 00149 double na ; 00151 double K_Ca ; 00152 double K_Na ; 00153 double K_act ; 00154 double K_trans ; 00155 double k_serca ; 00156 double conc ; 00157 double d_ACT ; 00158 double d_IP3 ; 00159 double d_INH ; 00161 double tau_d_CaCl; 00162 double tau_d_NSCC ; 00163 double tauh; 00165 double deltaPsi_B; 00166 double deltaPsi_star; 00167 double deltaPsi; 00170 00171 //Calculated constants 00173 /* Volumes */ 00174 double V_cyto; 00175 double V_ER; 00176 double V_MITO; 00177 double V_PU; 00179 /* Temperature corrections */ 00180 double T_correction_Ca; 00181 double T_correction_K; 00182 double T_correction_Na; 00183 double T_correction_BK; 00185 /* Nernst potentials */ 00186 double E_Na; 00187 double E_K; 00188 double E_Cl; 00189 double E_NSCC; 00191 /* Activation gate time constants */ 00192 double tau_d_ERG; 00193 double tau_d_Ltype; 00194 double tau_d_Na; 00195 double tau_d_VDDR; 00196 double tau_d_kv11; 00198 /* Inactivation gate time constants */ 00199 double tau_f_Ltype; 00200 double tau_f_Na; 00201 double tau_f_VDDR; 00202 double tau_f_ca_Ltype; 00203 double tau_f_kv11; 00205 /* Speed ups */ 00206 double e2FoRTdPsiMdPsiS; 00207 double ebFoRTdPsiMdPsiS; 00210 public: 00217 CorriasBuistICCModified(boost::shared_ptr<AbstractIvpOdeSolver> pSolver, boost::shared_ptr<AbstractStimulusFunction> pIntracellularStimulus); 00218 00222 ~CorriasBuistICCModified(); 00223 00227 void VerifyStateVariables(); 00228 00235 double GetIIonic(const std::vector<double>* pStateVariables=NULL); 00236 00244 void EvaluateYDerivatives(double time, const std::vector<double>& rY, std::vector<double>& rDY); 00245 00251 void SetFractionOfVDDRInPU(double fraction); 00252 00258 void SetIP3Concentration(double concentration); 00259 00265 void SetSercaPumpScaleFactor(double scaleFactor); 00266 00273 void SetCarbonMonoxideScaleFactor(double scaleFactor); 00274 00278 double GetCarbonMonoxideScaleFactor(); 00279 }; 00280 00281 00282 // Needs to be included last 00283 #include "SerializationExportWrapper.hpp" 00284 CHASTE_CLASS_EXPORT(CorriasBuistICCModified) 00285 00286 namespace boost 00287 { 00288 namespace serialization 00289 { 00290 template<class Archive> 00291 inline void save_construct_data( 00292 Archive & ar, const CorriasBuistICCModified * t, const unsigned int fileVersion) 00293 { 00294 const boost::shared_ptr<AbstractIvpOdeSolver> p_solver = t->GetSolver(); 00295 const boost::shared_ptr<AbstractStimulusFunction> p_stimulus = t->GetStimulusFunction(); 00296 ar << p_solver; 00297 ar << p_stimulus; 00298 } 00299 00300 template<class Archive> 00301 inline void load_construct_data( 00302 Archive & ar, CorriasBuistICCModified * t, const unsigned int fileVersion) 00303 { 00304 boost::shared_ptr<AbstractIvpOdeSolver> p_solver; 00305 boost::shared_ptr<AbstractStimulusFunction> p_stimulus; 00306 ar >> p_solver; 00307 ar >> p_stimulus; 00308 ::new(t)CorriasBuistICCModified(p_solver, p_stimulus); 00309 } 00310 00311 } 00312 00313 } 00314 00315 #endif // CorriasBuistICCModified_HPP_