Location: BG_KACh @ c3fc2ab23f27 / BG_KACh_import_M2.cellml

Author:
Shelley Fong <sfon036@UoA.auckland.ac.nz>
Date:
2024-11-06 13:40:18+13:00
Desc:
Adding sedml and exposure files
Permanent Source URI:
https://models.physiomeproject.org/workspace/bbf/rawfile/c3fc2ab23f27531efc3badba5131c80076eb1d3c/BG_KACh_import_M2.cellml

<?xml version='1.0' encoding='UTF-8'?>
<model name="KACh_model" xmlns="http://www.cellml.org/cellml/1.1#" xmlns:cellml="http://www.cellml.org/cellml/1.1#" xmlns:xlink="http://www.w3.org/1999/xlink">
    <import xlink:href="units_and_constants/units_BG.cellml">
        <units name="mM" units_ref="mM"/>
        <units name="per_mol" units_ref="per_mol"/>
        <units name="J_per_mol" units_ref="J_per_mol"/>
        <units name="J_per_C" units_ref="J_per_C"/>
        <units name="J_per_K_per_mol" units_ref="J_per_K_per_mol"/>
        <units name="mol_per_s" units_ref="mol_per_s"/>
        <units name="C_per_mol" units_ref="C_per_mol"/>
        <units name="microm3" units_ref="microm3"/>
        <units name="fF" units_ref="fF"/>
        <units name="fC" units_ref="fC"/>
        <units name="fA" units_ref="fA"/>
        <units name="fmol" units_ref="fmol"/>
        <units name="fmol_per_sec" units_ref="fmol_per_sec"/>
        <units name="per_fmol" units_ref="per_fmol"/>
        <units name="pL" units_ref="pL"/>
        <units name="mA_per_mM" units_ref="mA_per_mM"/>
    </import>
    <import xlink:href="GPCR_M2/BG_GPCR_M2_reduced.cellml">
        <component component_ref="GPCR_M2_reduced" name="GPCR_M2_reduced"/>
    </import>
    <import xlink:href="GPCR_M2/BG_GPCR_M2_reduced.cellml">
        <component component_ref="GPCR_M2_reduced_parameters" name="GPCR_M2_reduced_parameters"/>
    </import>
    <import xlink:href="units_and_constants/constants_BG.cellml">
        <component component_ref="constants" name="constants"/>
    </import>
    <component name="environment">
        <variable name="t" public_interface="out" units="second"/>
        <variable initial_value="1e6" name="C_m" public_interface="out" units="fF"/>
        <variable initial_value="25.8" name="w_i" public_interface="out" units="pL"/>
        <variable initial_value="3.52" name="w_o" public_interface="out" units="pL"/>
        <variable initial_value="-8.5e4" name="q_mem" public_interface="out" units="fC"/>
        <variable initial_value="8.31" name="R" public_interface="out" units="J_per_K_per_mol"/>
        <variable initial_value="310" name="T" public_interface="out" units="kelvin"/>
        <variable initial_value="96500" name="F" public_interface="out" units="C_per_mol"/>
        <variable name="v_KACh" public_interface="in" units="fmol_per_sec"/>
        <variable initial_value="9.3276" name="q_K_o" public_interface="out" units="fmol"/>
        <variable initial_value="0.00456" name="q_K_i" public_interface="out" units="fmol"/>
        <variable name="V_mem" public_interface="out" units="J_per_C"/>
        <variable name="I_mem_KACh" public_interface="in" units="fA"/>
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_K_i</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_KACh</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_K_o</ci>
                </apply>
                <ci>v_KACh</ci>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_mem</ci>
                </apply>
                <ci>I_mem_KACh</ci>
            </apply>
            <apply>
                <eq/>
                <ci>V_mem</ci>
                <apply>
                    <divide/>
                    <ci>q_mem</ci>
                    <ci>C_m</ci>
                </apply>
            </apply>
        </math>
        <!-- M2 things-->
        <variable initial_value="0.00072162" name="q_RM2_inactive" public_interface="out" units="fmol"/>
        <variable initial_value="1e-18" name="q_L_RM2_inactive" public_interface="out" units="fmol"/>
        <variable name="q_LM2" public_interface="out" units="fmol"/>
        <variable name="q_LM2_stim" units="fmol"/>
        <variable initial_value="0" name="q_LM2_ode" units="fmol"/>
        <variable initial_value="1e-18" name="q_RM2" public_interface="out" units="fmol"/>
        <variable initial_value="0.00836" name="q_Gi" public_interface="out" units="fmol"/>
        <variable initial_value="1e-18" name="q_RM2_Gi" public_interface="out" units="fmol"/>
        <variable initial_value="1e-18" name="q_L_RM2" public_interface="out" units="fmol"/>
        <variable initial_value="1e-18" name="q_L_RM2_Gi" public_interface="out" units="fmol"/>
        <variable initial_value="1e-18" name="q_Gia_GTP" public_interface="out" units="fmol"/>
        <variable initial_value="1e-18" name="q_Gibetagamma" public_interface="out" units="fmol"/>
        <variable initial_value="1e-18" name="q_Gia_GDP" public_interface="out" units="fmol"/>
        <variable initial_value="2.2" name="q_GTP" public_interface="out" units="fmol"/>
        <variable initial_value="1.1" name="q_GDP" public_interface="out" units="fmol"/>
        <variable initial_value="570" name="q_Pi" public_interface="out" units="fmol"/>
        <variable initial_value="1e-18" name="q_RM2_tag" public_interface="out" units="fmol"/>
        <variable initial_value="1e-18" name="q_L_RM2_tag" public_interface="out" units="fmol"/>
        <variable initial_value="1e-18" name="q_RM2_GRKArr" public_interface="out" units="fmol"/>
        <variable initial_value="1e-18" name="q_L_RM2_GRKArr" public_interface="out" units="fmol"/>
        <variable initial_value="1e-18" name="q_GRKArr" public_interface="out" units="fmol"/>
        <!-- stimulus-->
        <variable initial_value="7e1" name="stimSt" units="second"/>
        <variable initial_value="5e1" name="stimDur" units="second"/>
        <variable initial_value="5e1" name="tR" units="second"/>
        <variable initial_value="1e2" name="stimMag" units="fmol"/>
        <variable initial_value="1e-8" name="stimHolding" units="fmol"/>
        <variable name="m" units="fmol_per_sec"/>
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <ci>m</ci>
                <apply>
                    <divide/>
                    <ci>stimMag</ci>
                    <ci>tR</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>q_LM2_stim</ci>
                <piecewise>
                    <piece>
                        <apply>
                            <plus/>
                            <ci>stimHolding</ci>
                            <apply>
                                <times/>
                                <ci>m</ci>
                                <apply>
                                    <plus/>
                                    <apply>
                                        <minus/>
                                        <ci>t</ci>
                                        <ci>stimSt</ci>
                                    </apply>
                                    <ci>tR</ci>
                                </apply>
                            </apply>
                        </apply>
                        <apply>
                            <and/>
                            <apply>
                                <lt/>
                                <ci>t</ci>
                                <ci>stimSt</ci>
                            </apply>
                            <apply>
                                <gt/>
                                <ci>t</ci>
                                <apply>
                                    <minus/>
                                    <ci>stimSt</ci>
                                    <ci>tR</ci>
                                </apply>
                            </apply>
                        </apply>
                    </piece>
                    <piece>
                        <apply>
                            <plus/>
                            <ci>stimMag</ci>
                            <ci>stimHolding</ci>
                        </apply>
                        <apply>
                            <and/>
                            <apply>
                                <geq/>
                                <ci>t</ci>
                                <ci>stimSt</ci>
                            </apply>
                            <apply>
                                <lt/>
                                <ci>t</ci>
                                <apply>
                                    <plus/>
                                    <ci>stimSt</ci>
                                    <ci>stimDur</ci>
                                </apply>
                            </apply>
                        </apply>
                    </piece>
                    <piece>
                        <apply>
                            <plus/>
                            <ci>stimHolding</ci>
                            <apply>
                                <times/>
                                <apply>
                                    <minus/>
                                    <ci>m</ci>
                                </apply>
                                <apply>
                                    <minus/>
                                    <apply>
                                        <minus/>
                                        <apply>
                                            <minus/>
                                            <ci>t</ci>
                                            <ci>stimSt</ci>
                                        </apply>
                                        <ci>tR</ci>
                                    </apply>
                                    <ci>stimDur</ci>
                                </apply>
                            </apply>
                        </apply>
                        <apply>
                            <and/>
                            <apply>
                                <lt/>
                                <ci>t</ci>
                                <apply>
                                    <plus/>
                                    <ci>stimSt</ci>
                                    <ci>tR</ci>
                                    <ci>stimDur</ci>
                                </apply>
                            </apply>
                            <apply>
                                <geq/>
                                <ci>t</ci>
                                <apply>
                                    <plus/>
                                    <ci>stimSt</ci>
                                    <ci>stimDur</ci>
                                </apply>
                            </apply>
                        </apply>
                    </piece>
                    <otherwise>
                        <ci>stimHolding</ci>
                    </otherwise>
                </piecewise>
            </apply>
        </math>
        <!-- mass conservation checks-->
        <variable name="conserv_R_T" units="fmol"/>
        <variable name="conserv_L_T" units="fmol"/>
        <variable name="conserv_G_T" units="fmol"/>
        <variable name="total_R" units="fmol"/>
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <ci>conserv_R_T</ci>
                <apply>
                    <plus/>
                    <ci>q_RM2_inactive</ci>
                    <ci>q_L_RM2_inactive</ci>
                    <ci>q_RM2</ci>
                    <ci>q_RM2_Gi</ci>
                    <ci>q_L_RM2</ci>
                    <ci>q_L_RM2_Gi</ci>
                    <ci>q_RM2_tag</ci>
                    <ci>q_L_RM2_tag</ci>
                    <ci>q_RM2_GRKArr</ci>
                    <ci>q_L_RM2_GRKArr</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>total_R</ci>
                <apply>
                    <plus/>
                    <ci>q_RM2_inactive</ci>
                    <ci>q_L_RM2_inactive</ci>
                    <ci>q_RM2</ci>
                    <ci>q_RM2_Gi</ci>
                    <ci>q_L_RM2</ci>
                    <ci>q_L_RM2_Gi</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>conserv_L_T</ci>
                <apply>
                    <plus/>
                    <ci>q_L_RM2_inactive</ci>
                    <ci>q_LM2</ci>
                    <ci>q_L_RM2</ci>
                    <ci>q_L_RM2_Gi</ci>
                    <ci>q_L_RM2_tag</ci>
                    <ci>q_L_RM2_GRKArr</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>conserv_G_T</ci>
                <apply>
                    <plus/>
                    <ci>q_Gi</ci>
                    <ci>q_RM2_Gi</ci>
                    <ci>q_L_RM2_Gi</ci>
                    <ci>q_Gia_GTP</ci>
                    <ci>q_Gia_GDP</ci>
                </apply>
            </apply>
        </math>
        <!-- From submodule-->
        <variable name="v_Rswitch_M2" public_interface="in" units="fmol_per_sec"/>
        <variable name="v_LRswitch_M2" public_interface="in" units="fmol_per_sec"/>
        <variable name="v_C_M2" public_interface="in" units="fmol_per_sec"/>
        <variable name="v_R_M2" public_interface="in" units="fmol_per_sec"/>
        <variable name="v_L_M2" public_interface="in" units="fmol_per_sec"/>
        <variable name="v_Act1_Gi" public_interface="in" units="fmol_per_sec"/>
        <variable name="v_Act2_Gi" public_interface="in" units="fmol_per_sec"/>
        <variable name="v_Hyd_Gi" public_interface="in" units="fmol_per_sec"/>
        <variable name="v_Reassoc_Gi" public_interface="in" units="fmol_per_sec"/>
        <variable name="v_InternR_M2" public_interface="in" units="fmol_per_sec"/>
        <variable name="v_InternLR_M2" public_interface="in" units="fmol_per_sec"/>
        <variable name="v_Rsynthesis" units="fmol_per_sec"/>
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <ci>v_Rsynthesis</ci>
                <apply>
                    <plus/>
                    <apply>
                        <plus/>
                        <ci>v_C_M2</ci>
                    </apply>
                    <ci>v_L_M2</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_RM2_inactive</ci>
                </apply>
                <apply>
                    <minus/>
                    <apply>
                        <minus/>
                        <ci>v_Rswitch_M2</ci>
                    </apply>
                    <ci>v_L_M2</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_L_RM2_inactive</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_LRswitch_M2</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_LM2_ode</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_L_M2</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_RM2</ci>
                </apply>
                <apply>
                    <plus/>
                    <apply>
                        <minus/>
                        <ci>v_Rswitch_M2</ci>
                        <ci>v_C_M2</ci>
                    </apply>
                    <apply>
                        <times/>
                        <cn cellml:units="dimensionless">1.0</cn>
                        <ci>v_Rsynthesis</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_Gi</ci>
                </apply>
                <apply>
                    <plus/>
                    <apply>
                        <minus/>
                        <apply>
                            <minus/>
                            <ci>v_C_M2</ci>
                        </apply>
                        <ci>v_R_M2</ci>
                    </apply>
                    <ci>v_Reassoc_Gi</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_RM2_Gi</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_C_M2</ci>
                    <ci>v_Act1_Gi</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_L_RM2</ci>
                </apply>
                <apply>
                    <plus/>
                    <apply>
                        <minus/>
                        <ci>v_LRswitch_M2</ci>
                        <ci>v_R_M2</ci>
                    </apply>
                    <ci>v_L_M2</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_L_RM2_Gi</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_R_M2</ci>
                    <ci>v_Act2_Gi</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_Gia_GTP</ci>
                </apply>
                <apply>
                    <minus/>
                    <apply>
                        <plus/>
                        <ci>v_Act1_Gi</ci>
                        <ci>v_Act2_Gi</ci>
                    </apply>
                    <ci>v_Hyd_Gi</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_Gibetagamma</ci>
                </apply>
                <apply>
                    <minus/>
                    <apply>
                        <plus/>
                        <ci>v_Act1_Gi</ci>
                        <ci>v_Act2_Gi</ci>
                    </apply>
                    <ci>v_Reassoc_Gi</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_Gia_GDP</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_Hyd_Gi</ci>
                    <ci>v_Reassoc_Gi</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_GTP</ci>
                </apply>
                <apply>
                    <minus/>
                    <apply>
                        <minus/>
                        <ci>v_Act1_Gi</ci>
                    </apply>
                    <ci>v_Act2_Gi</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_GDP</ci>
                </apply>
                <apply>
                    <plus/>
                    <ci>v_Act1_Gi</ci>
                    <ci>v_Act2_Gi</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_Pi</ci>
                </apply>
                <ci>v_Hyd_Gi</ci>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_RM2_tag</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_Act1_Gi</ci>
                    <ci>v_InternR_M2</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_L_RM2_tag</ci>
                </apply>
                <apply>
                    <minus/>
                    <ci>v_Act2_Gi</ci>
                    <ci>v_InternLR_M2</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_RM2_GRKArr</ci>
                </apply>
                <ci>v_InternR_M2</ci>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_L_RM2_GRKArr</ci>
                </apply>
                <ci>v_InternLR_M2</ci>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_GRKArr</ci>
                </apply>
                <apply>
                    <minus/>
                    <apply>
                        <minus/>
                        <ci>v_InternR_M2</ci>
                    </apply>
                    <ci>v_InternLR_M2</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>q_LM2</ci>
                <apply>
                    <plus/>
                    <ci>q_LM2_stim</ci>
                    <ci>q_LM2_ode</ci>
                </apply>
            </apply>
        </math>
    </component>
    <component name="KACh_parameters">
        <variable initial_value="0.217237" name="kappa_KACh" public_interface="out" units="fmol_per_sec"/>
        <variable initial_value="0.013549" name="K_K_i" public_interface="out" units="per_fmol"/>
        <variable initial_value="0.0899434" name="K_K_o" public_interface="out" units="per_fmol"/>
        <variable initial_value="1e-6" name="K_Gibetagamma" public_interface="out" units="per_fmol"/>
        <variable initial_value="1" name="zK" public_interface="out" units="dimensionless"/>
    </component>
    <component name="KACh">
        <variable name="t" public_interface="in" units="second"/>
        <variable name="R" public_interface="in" units="J_per_K_per_mol"/>
        <variable name="T" public_interface="in" units="kelvin"/>
        <variable name="zK" public_interface="in" units="dimensionless"/>
        <variable name="F" public_interface="in" units="C_per_mol"/>
        <variable name="K_K_i" public_interface="in" units="per_fmol"/>
        <variable name="K_K_o" public_interface="in" units="per_fmol"/>
        <variable name="K_Gibetagamma" public_interface="in" units="per_fmol"/>
        <variable name="kappa_KACh" public_interface="in" units="fmol_per_sec"/>
        <variable name="q_K_i" public_interface="in" units="fmol"/>
        <variable name="q_K_o" public_interface="in" units="fmol"/>
        <variable name="q_Gibetagamma" public_interface="in" units="fmol"/>
        <variable name="mu_K_i" units="J_per_mol"/>
        <variable name="mu_K_o" units="J_per_mol"/>
        <variable name="mu_Gibetagamma" units="J_per_mol"/>
        <variable name="Af_KACh" units="J_per_mol"/>
        <variable name="Ar_KACh" units="J_per_mol"/>
        <variable name="Am_KACh" units="J_per_mol"/>
        <variable name="q_mem" public_interface="in" units="fC"/>
        <variable name="v_KACh" public_interface="out" units="fmol_per_sec"/>
        <variable name="I_mem_KACh" public_interface="out" units="fA"/>
        <variable name="V_mem" public_interface="in" units="J_per_C"/>
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <ci>mu_K_i</ci>
                <apply>
                    <times/>
                    <ci>R</ci>
                    <ci>T</ci>
                    <apply>
                        <ln/>
                        <apply>
                            <times/>
                            <ci>K_K_i</ci>
                            <ci>q_K_i</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>mu_K_o</ci>
                <apply>
                    <times/>
                    <ci>R</ci>
                    <ci>T</ci>
                    <apply>
                        <ln/>
                        <apply>
                            <times/>
                            <ci>K_K_o</ci>
                            <ci>q_K_o</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>mu_Gibetagamma</ci>
                <apply>
                    <times/>
                    <ci>R</ci>
                    <ci>T</ci>
                    <apply>
                        <ln/>
                        <apply>
                            <times/>
                            <ci>K_Gibetagamma</ci>
                            <ci>q_Gibetagamma</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Am_KACh</ci>
                <apply>
                    <times/>
                    <ci>zK</ci>
                    <ci>F</ci>
                    <ci>V_mem</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Af_KACh</ci>
                <apply>
                    <plus/>
                    <ci>mu_K_i</ci>
                    <apply>
                        <times/>
                        <ci>zK</ci>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                    <ci>mu_Gibetagamma</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Ar_KACh</ci>
                <ci>mu_K_o</ci>
            </apply>
            <apply>
                <eq/>
                <ci>v_KACh</ci>
                <piecewise>
                    <piece>
                        <apply>
                            <times/>
                            <ci>kappa_KACh</ci>
                            <apply>
                                <minus/>
                                <apply>
                                    <exp/>
                                    <apply>
                                        <divide/>
                                        <ci>Af_KACh</ci>
                                        <apply>
                                            <times/>
                                            <ci>R</ci>
                                            <ci>T</ci>
                                        </apply>
                                    </apply>
                                </apply>
                                <apply>
                                    <exp/>
                                    <apply>
                                        <divide/>
                                        <ci>Ar_KACh</ci>
                                        <apply>
                                            <times/>
                                            <ci>R</ci>
                                            <ci>T</ci>
                                        </apply>
                                    </apply>
                                </apply>
                            </apply>
                        </apply>
                        <apply>
                            <eq/>
                            <ci>Am_KACh</ci>
                            <cn cellml:units="J_per_mol">0</cn>
                        </apply>
                    </piece>
                    <otherwise>
                        <apply>
                            <times/>
                            <apply>
                                <divide/>
                                <apply>
                                    <divide/>
                                    <apply>
                                        <times/>
                                        <ci>kappa_KACh</ci>
                                        <ci>Am_KACh</ci>
                                    </apply>
                                    <apply>
                                        <times/>
                                        <ci>R</ci>
                                        <ci>T</ci>
                                    </apply>
                                </apply>
                                <apply>
                                    <minus/>
                                    <apply>
                                        <exp/>
                                        <apply>
                                            <divide/>
                                            <ci>Am_KACh</ci>
                                            <apply>
                                                <times/>
                                                <ci>R</ci>
                                                <ci>T</ci>
                                            </apply>
                                        </apply>
                                    </apply>
                                    <cn cellml:units="dimensionless">1</cn>
                                </apply>
                            </apply>
                            <apply>
                                <minus/>
                                <apply>
                                    <exp/>
                                    <apply>
                                        <divide/>
                                        <ci>Af_KACh</ci>
                                        <apply>
                                            <times/>
                                            <ci>R</ci>
                                            <ci>T</ci>
                                        </apply>
                                    </apply>
                                </apply>
                                <apply>
                                    <exp/>
                                    <apply>
                                        <divide/>
                                        <ci>Ar_KACh</ci>
                                        <apply>
                                            <times/>
                                            <ci>R</ci>
                                            <ci>T</ci>
                                        </apply>
                                    </apply>
                                </apply>
                            </apply>
                        </apply>
                    </otherwise>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <ci>I_mem_KACh</ci>
                <apply>
                    <times/>
                    <apply>
                        <minus/>
                        <ci>zK</ci>
                    </apply>
                    <ci>F</ci>
                    <ci>v_KACh</ci>
                </apply>
            </apply>
        </math>
    </component>
    <connection>
        <map_components component_1="environment" component_2="KACh"/>
        <map_variables variable_1="t" variable_2="t"/>
        <map_variables variable_1="R" variable_2="R"/>
        <map_variables variable_1="T" variable_2="T"/>
        <map_variables variable_1="F" variable_2="F"/>
        <map_variables variable_1="v_KACh" variable_2="v_KACh"/>
        <map_variables variable_1="I_mem_KACh" variable_2="I_mem_KACh"/>
        <map_variables variable_1="q_K_i" variable_2="q_K_i"/>
        <map_variables variable_1="q_K_o" variable_2="q_K_o"/>
        <map_variables variable_1="q_Gibetagamma" variable_2="q_Gibetagamma"/>
        <map_variables variable_1="q_mem" variable_2="q_mem"/>
        <map_variables variable_1="V_mem" variable_2="V_mem"/>
    </connection>
    <connection>
        <map_components component_1="KACh" component_2="KACh_parameters"/>
        <map_variables variable_1="K_K_i" variable_2="K_K_i"/>
        <map_variables variable_1="K_K_o" variable_2="K_K_o"/>
        <map_variables variable_1="K_Gibetagamma" variable_2="K_Gibetagamma"/>
        <map_variables variable_1="kappa_KACh" variable_2="kappa_KACh"/>
        <map_variables variable_1="zK" variable_2="zK"/>
    </connection>
    <connection>
        <map_components component_1="environment" component_2="GPCR_M2_reduced"/>
        <map_variables variable_1="t" variable_2="time"/>
        <map_variables variable_1="q_RM2_inactive" variable_2="q_RM2_inactive"/>
        <map_variables variable_1="q_L_RM2_inactive" variable_2="q_L_RM2_inactive"/>
        <map_variables variable_1="q_LM2" variable_2="q_LM2"/>
        <map_variables variable_1="q_RM2" variable_2="q_RM2"/>
        <map_variables variable_1="q_Gi" variable_2="q_Gi"/>
        <map_variables variable_1="q_RM2_Gi" variable_2="q_RM2_Gi"/>
        <map_variables variable_1="q_L_RM2" variable_2="q_L_RM2"/>
        <map_variables variable_1="q_L_RM2_Gi" variable_2="q_L_RM2_Gi"/>
        <map_variables variable_1="q_Gia_GTP" variable_2="q_Gia_GTP"/>
        <map_variables variable_1="q_Gibetagamma" variable_2="q_Gibetagamma"/>
        <map_variables variable_1="q_Gia_GDP" variable_2="q_Gia_GDP"/>
        <map_variables variable_1="q_GTP" variable_2="q_GTP"/>
        <map_variables variable_1="q_GDP" variable_2="q_GDP"/>
        <map_variables variable_1="q_Pi" variable_2="q_Pi"/>
        <map_variables variable_1="q_RM2_tag" variable_2="q_RM2_tag"/>
        <map_variables variable_1="q_L_RM2_tag" variable_2="q_L_RM2_tag"/>
        <map_variables variable_1="q_RM2_GRKArr" variable_2="q_RM2_GRKArr"/>
        <map_variables variable_1="q_L_RM2_GRKArr" variable_2="q_L_RM2_GRKArr"/>
        <map_variables variable_1="q_GRKArr" variable_2="q_GRKArr"/>
        <map_variables variable_1="v_Rswitch_M2" variable_2="v_Rswitch_M2"/>
        <map_variables variable_1="v_LRswitch_M2" variable_2="v_LRswitch_M2"/>
        <map_variables variable_1="v_C_M2" variable_2="v_C_M2"/>
        <map_variables variable_1="v_R_M2" variable_2="v_R_M2"/>
        <map_variables variable_1="v_L_M2" variable_2="v_L_M2"/>
        <map_variables variable_1="v_Act1_Gi" variable_2="v_Act1_Gi"/>
        <map_variables variable_1="v_Act2_Gi" variable_2="v_Act2_Gi"/>
        <map_variables variable_1="v_Hyd_Gi" variable_2="v_Hyd_Gi"/>
        <map_variables variable_1="v_Reassoc_Gi" variable_2="v_Reassoc_Gi"/>
        <map_variables variable_1="v_InternR_M2" variable_2="v_InternR_M2"/>
        <map_variables variable_1="v_InternLR_M2" variable_2="v_InternLR_M2"/>
    </connection>
    <connection>
        <map_components component_1="GPCR_M2_reduced" component_2="GPCR_M2_reduced_parameters"/>
        <map_variables variable_1="kappa_Rswitch_M2" variable_2="kappa_Rswitch_M2"/>
        <map_variables variable_1="kappa_LRswitch_M2" variable_2="kappa_LRswitch_M2"/>
        <map_variables variable_1="kappa_C_M2" variable_2="kappa_C_M2"/>
        <map_variables variable_1="kappa_R_M2" variable_2="kappa_R_M2"/>
        <map_variables variable_1="kappa_L_M2" variable_2="kappa_L_M2"/>
        <map_variables variable_1="kappa_Act1_Gi" variable_2="kappa_Act1_Gi"/>
        <map_variables variable_1="kappa_Act2_Gi" variable_2="kappa_Act2_Gi"/>
        <map_variables variable_1="kappa_Hyd_Gi" variable_2="kappa_Hyd_Gi"/>
        <map_variables variable_1="kappa_Reassoc_Gi" variable_2="kappa_Reassoc_Gi"/>
        <map_variables variable_1="kappa_InternR_M2" variable_2="kappa_InternR_M2"/>
        <map_variables variable_1="kappa_InternLR_M2" variable_2="kappa_InternLR_M2"/>
        <map_variables variable_1="K_RM2_inactive" variable_2="K_RM2_inactive"/>
        <map_variables variable_1="K_L_RM2_inactive" variable_2="K_L_RM2_inactive"/>
        <map_variables variable_1="K_LM2" variable_2="K_LM2"/>
        <map_variables variable_1="K_RM2" variable_2="K_RM2"/>
        <map_variables variable_1="K_Gi" variable_2="K_Gi"/>
        <map_variables variable_1="K_RM2_Gi" variable_2="K_RM2_Gi"/>
        <map_variables variable_1="K_L_RM2" variable_2="K_L_RM2"/>
        <map_variables variable_1="K_L_RM2_Gi" variable_2="K_L_RM2_Gi"/>
        <map_variables variable_1="K_Gia_GTP" variable_2="K_Gia_GTP"/>
        <map_variables variable_1="K_Gibetagamma" variable_2="K_Gibetagamma"/>
        <map_variables variable_1="K_Gia_GDP" variable_2="K_Gia_GDP"/>
        <map_variables variable_1="K_GTP" variable_2="K_GTP"/>
        <map_variables variable_1="K_GDP" variable_2="K_GDP"/>
        <map_variables variable_1="K_Pi" variable_2="K_Pi"/>
        <map_variables variable_1="K_RM2_tag" variable_2="K_RM2_tag"/>
        <map_variables variable_1="K_L_RM2_tag" variable_2="K_L_RM2_tag"/>
        <map_variables variable_1="K_RM2_GRKArr" variable_2="K_RM2_GRKArr"/>
        <map_variables variable_1="K_L_RM2_GRKArr" variable_2="K_L_RM2_GRKArr"/>
        <map_variables variable_1="K_GRKArr" variable_2="K_GRKArr"/>
    </connection>
    <connection>
        <map_components component_1="environment" component_2="GPCR_M2_reduced"/>
        <map_variables variable_1="t" variable_2="time"/>
        <map_variables variable_1="q_RM2_inactive" variable_2="q_RM2_inactive"/>
        <map_variables variable_1="q_L_RM2_inactive" variable_2="q_L_RM2_inactive"/>
        <map_variables variable_1="q_LM2" variable_2="q_LM2"/>
        <map_variables variable_1="q_RM2" variable_2="q_RM2"/>
        <map_variables variable_1="q_Gi" variable_2="q_Gi"/>
        <map_variables variable_1="q_RM2_Gi" variable_2="q_RM2_Gi"/>
        <map_variables variable_1="q_L_RM2" variable_2="q_L_RM2"/>
        <map_variables variable_1="q_L_RM2_Gi" variable_2="q_L_RM2_Gi"/>
        <map_variables variable_1="q_Gia_GTP" variable_2="q_Gia_GTP"/>
        <map_variables variable_1="q_Gibetagamma" variable_2="q_Gibetagamma"/>
        <map_variables variable_1="q_Gia_GDP" variable_2="q_Gia_GDP"/>
        <map_variables variable_1="q_GTP" variable_2="q_GTP"/>
        <map_variables variable_1="q_GDP" variable_2="q_GDP"/>
        <map_variables variable_1="q_Pi" variable_2="q_Pi"/>
        <map_variables variable_1="q_RM2_tag" variable_2="q_RM2_tag"/>
        <map_variables variable_1="q_L_RM2_tag" variable_2="q_L_RM2_tag"/>
        <map_variables variable_1="q_RM2_GRKArr" variable_2="q_RM2_GRKArr"/>
        <map_variables variable_1="q_L_RM2_GRKArr" variable_2="q_L_RM2_GRKArr"/>
        <map_variables variable_1="q_GRKArr" variable_2="q_GRKArr"/>
        <map_variables variable_1="v_Rswitch_M2" variable_2="v_Rswitch_M2"/>
        <map_variables variable_1="v_LRswitch_M2" variable_2="v_LRswitch_M2"/>
        <map_variables variable_1="v_C_M2" variable_2="v_C_M2"/>
        <map_variables variable_1="v_R_M2" variable_2="v_R_M2"/>
        <map_variables variable_1="v_L_M2" variable_2="v_L_M2"/>
        <map_variables variable_1="v_Act1_Gi" variable_2="v_Act1_Gi"/>
        <map_variables variable_1="v_Act2_Gi" variable_2="v_Act2_Gi"/>
        <map_variables variable_1="v_Hyd_Gi" variable_2="v_Hyd_Gi"/>
        <map_variables variable_1="v_Reassoc_Gi" variable_2="v_Reassoc_Gi"/>
        <map_variables variable_1="v_InternR_M2" variable_2="v_InternR_M2"/>
        <map_variables variable_1="v_InternLR_M2" variable_2="v_InternLR_M2"/>
    </connection>
    <connection>
        <map_components component_1="constants" component_2="GPCR_M2_reduced"/>
        <map_variables variable_1="R" variable_2="R"/>
        <map_variables variable_1="T" variable_2="T"/>
    </connection>
</model>