Location: FCU_cardiacAP_Pan @ fb097ba802e0 / Kp_channel.cellml

Author:
Shelley Fong <s.fong@auckland.ac.nz>
Date:
2022-02-15 13:09:01+13:00
Desc:
Fixing errors in code, from extraction of Pan cellml txt
Permanent Source URI:
https://models.physiomeproject.org/workspace/81b/rawfile/fb097ba802e02b61ff1ac1a9a58703c381675544/Kp_channel.cellml

<?xml version='1.0' encoding='UTF-8'?>
<model name="cardiac_AP_Kp_only" xmlns="http://www.cellml.org/cellml/1.0#" xmlns:cellml="http://www.cellml.org/cellml/1.0#">
    <units name="J_per_K_per_mol">
        <unit units="joule"/>
        <unit exponent="-1" units="kelvin"/>
        <unit exponent="-1" units="mole"/>
    </units>
    <units name="C_per_mol">
        <unit units="coulomb"/>
        <unit exponent="-1" units="mole"/>
    </units>
    <units name="fF">
        <unit prefix="femto" units="farad"/>
    </units>
    <units name="fmol">
        <unit prefix="femto" units="mole"/>
    </units>
    <units name="per_fmol">
        <unit exponent="-1" units="fmol"/>
    </units>
    <units name="fmol_per_sec">
        <unit units="fmol"/>
        <unit exponent="-1" units="second"/>
    </units>
    <units name="fC">
        <unit prefix="femto" units="coulomb"/>
    </units>
    <units name="fA">
        <unit prefix="femto" units="ampere"/>
    </units>
    <units name="J_per_mol">
        <unit units="joule"/>
        <unit exponent="-1" units="mole"/>
    </units>
    <component name="environment">
        <variable initial_value="0" name="t" public_interface="out" units="second"/>
        <variable initial_value="8.314" 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="96485" name="F" public_interface="out" units="C_per_mol"/>
        <variable initial_value="153400" name="C_m" public_interface="out" units="fF"/>
        <variable initial_value="27.9828" name="x_Ke_init" units="fmol"/>
        <variable initial_value="5510" name="x_Ki_init" units="fmol"/>
        <variable initial_value="9.6314e-07" name="x_C_Kp_init" units="fmol"/>
        <variable initial_value="2.4078e-07" name="x_O_Kp_init" units="fmol"/>
        <variable name="x_Ke_mKp" public_interface="in" units="fmol"/>
        <variable name="x_Ke" public_interface="out" units="fmol"/>
        <variable name="x_Ki_mKp" public_interface="in" units="fmol"/>
        <variable name="x_Ki" public_interface="out" units="fmol"/>
        <variable name="x_C_Kp_mKp" public_interface="in" units="fmol"/>
        <variable name="x_C_Kp" public_interface="out" units="fmol"/>
        <variable name="x_O_Kp_mKp" public_interface="in" units="fmol"/>
        <variable name="x_O_Kp" public_interface="out" units="fmol"/>
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <ci>x_Ke</ci>
                <apply>
                    <plus/>
                    <ci>x_Ke_init</ci>
                    <ci>x_Ke_mKp</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>x_Ki</ci>
                <apply>
                    <plus/>
                    <ci>x_Ki_init</ci>
                    <ci>x_Ki_mKp</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>x_C_Kp</ci>
                <apply>
                    <plus/>
                    <ci>x_C_Kp_init</ci>
                    <ci>x_C_Kp_mKp</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>x_O_Kp</ci>
                <apply>
                    <plus/>
                    <ci>x_O_Kp_init</ci>
                    <ci>x_O_Kp_mKp</ci>
                </apply>
            </apply>
        </math>
        <variable initial_value="-13039" name="q_mem_init" units="fC"/>
        <variable name="q_mem_mKp" public_interface="in" units="fC"/>
        <variable name="q_mem" public_interface="out" units="fC"/>
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <ci>q_mem</ci>
                <apply>
                    <plus/>
                    <ci>q_mem_init</ci>
                    <ci>q_mem_mKp</ci>
                </apply>
            </apply>
        </math>
    </component>
    <component name="Kp_parameters">
        <variable initial_value="41.6265" name="K_C_Kp" public_interface="out" units="per_fmol"/>
        <variable initial_value="0.059344" name="K_Ke" public_interface="out" units="per_fmol"/>
        <variable initial_value="0.0080926" name="K_Ki" public_interface="out" units="per_fmol"/>
        <variable initial_value="145.607" name="K_O_Kp" public_interface="out" units="per_fmol"/>
        <variable initial_value="252.3419" name="kappa_Kp" public_interface="out" units="fmol_per_sec"/>
        <variable initial_value="24.0195" name="kappa_gKp" public_interface="out" units="fmol_per_sec"/>
        <variable initial_value="1" name="zK" public_interface="out" units="dimensionless"/>
        <variable initial_value="0" name="z_f_Kp" public_interface="out" units="dimensionless"/>
        <variable initial_value="-4.4669" name="z_r_Kp" public_interface="out" units="dimensionless"/>
    </component>
    <component name="Kp_channel">
        <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="F" public_interface="in" units="C_per_mol"/>
        <variable name="C_m" public_interface="in" units="fF"/>
        <variable name="K_C_Kp" public_interface="in" units="per_fmol"/>
        <variable name="K_Ke" public_interface="in" units="per_fmol"/>
        <variable name="K_Ki" public_interface="in" units="per_fmol"/>
        <variable name="K_O_Kp" public_interface="in" units="per_fmol"/>
        <variable name="kappa_Kp" public_interface="in" units="fmol_per_sec"/>
        <variable name="kappa_gKp" public_interface="in" units="fmol_per_sec"/>
        <variable name="zK" public_interface="in" units="dimensionless"/>
        <variable name="z_f_Kp" public_interface="in" units="dimensionless"/>
        <variable name="z_r_Kp" public_interface="in" units="dimensionless"/>
        <variable name="x_Ke_global" public_interface="in" units="fmol"/>
        <variable name="x_Ki_global" public_interface="in" units="fmol"/>
        <variable name="x_C_Kp_global" public_interface="in" units="fmol"/>
        <variable name="x_O_Kp_global" public_interface="in" units="fmol"/>
        <variable initial_value="0" name="x_Ke" public_interface="out" units="fmol"/>
        <variable initial_value="0" name="x_Ki" public_interface="out" units="fmol"/>
        <variable initial_value="0" name="x_C_Kp" public_interface="out" units="fmol"/>
        <variable initial_value="0" name="x_O_Kp" public_interface="out" units="fmol"/>
        <variable name="q_mem_global" public_interface="in" units="fC"/>
        <variable initial_value="0" name="q_mem" public_interface="out" units="fC"/>
        <variable name="mu_Ke" units="J_per_mol"/>
        <variable name="mu_Ki" units="J_per_mol"/>
        <variable name="mu_C_Kp" units="J_per_mol"/>
        <variable name="mu_O_Kp" units="J_per_mol"/>
        <variable name="v_Ke" units="fmol_per_sec"/>
        <variable name="v_Ki" units="fmol_per_sec"/>
        <variable name="v_C_Kp" units="fmol_per_sec"/>
        <variable name="v_O_Kp" units="fmol_per_sec"/>
        <variable name="Am_Kp" units="J_per_mol"/>
        <variable name="Af_Kp" units="J_per_mol"/>
        <variable name="Ar_Kp" units="J_per_mol"/>
        <variable name="v_Kp" units="fmol_per_sec"/>
        <variable name="Af_gKp" units="J_per_mol"/>
        <variable name="Ar_gKp" units="J_per_mol"/>
        <variable name="v_gKp" units="fmol_per_sec"/>
        <variable name="V_mem" units="volt"/>
        <variable name="I_mem" units="fA"/>
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <ci>V_mem</ci>
                <apply>
                    <divide/>
                    <ci>q_mem_global</ci>
                    <ci>C_m</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>I_mem</ci>
                <apply>
                    <times/>
                    <ci>F</ci>
                    <apply>
                        <plus/>
                        <apply>
                            <minus/>
                            <apply>
                                <times/>
                                <ci>zK</ci>
                                <ci>v_Kp</ci>
                            </apply>
                        </apply>
                        <apply>
                            <minus/>
                            <apply>
                                <times/>
                                <ci>z_r_Kp</ci>
                                <ci>v_gKp</ci>
                            </apply>
                            <apply>
                                <times/>
                                <ci>z_f_Kp</ci>
                                <ci>v_gKp</ci>
                            </apply>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>mu_Ke</ci>
                <apply>
                    <times/>
                    <ci>R</ci>
                    <ci>T</ci>
                    <apply>
                        <ln/>
                        <apply>
                            <times/>
                            <ci>K_Ke</ci>
                            <ci>x_Ke_global</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>mu_Ki</ci>
                <apply>
                    <times/>
                    <ci>R</ci>
                    <ci>T</ci>
                    <apply>
                        <ln/>
                        <apply>
                            <times/>
                            <ci>K_Ki</ci>
                            <ci>x_Ki_global</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>mu_C_Kp</ci>
                <apply>
                    <times/>
                    <ci>R</ci>
                    <ci>T</ci>
                    <apply>
                        <ln/>
                        <apply>
                            <times/>
                            <ci>K_C_Kp</ci>
                            <ci>x_C_Kp_global</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>mu_O_Kp</ci>
                <apply>
                    <times/>
                    <ci>R</ci>
                    <ci>T</ci>
                    <apply>
                        <ln/>
                        <apply>
                            <times/>
                            <ci>K_O_Kp</ci>
                            <ci>x_O_Kp_global</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_gKp</ci>
                <apply>
                    <times/>
                    <ci>kappa_gKp</ci>
                    <apply>
                        <minus/>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Af_gKp</ci>
                                <apply>
                                    <times/>
                                    <ci>R</ci>
                                    <ci>T</ci>
                                </apply>
                            </apply>
                        </apply>
                        <apply>
                            <exp/>
                            <apply>
                                <divide/>
                                <ci>Ar_gKp</ci>
                                <apply>
                                    <times/>
                                    <ci>R</ci>
                                    <ci>T</ci>
                                </apply>
                            </apply>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Af_Kp</ci>
                <apply>
                    <plus/>
                    <ci>mu_Ki</ci>
                    <apply>
                        <times/>
                        <ci>zK</ci>
                        <apply>
                            <times/>
                            <ci>F</ci>
                            <ci>V_mem</ci>
                        </apply>
                    </apply>
                    <ci>mu_O_Kp</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Af_gKp</ci>
                <apply>
                    <plus/>
                    <ci>mu_C_Kp</ci>
                    <apply>
                        <times/>
                        <ci>z_f_Kp</ci>
                        <apply>
                            <times/>
                            <ci>F</ci>
                            <ci>V_mem</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Am_Kp</ci>
                <apply>
                    <times/>
                    <ci>zK</ci>
                    <apply>
                        <times/>
                        <ci>F</ci>
                        <ci>V_mem</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Ar_Kp</ci>
                <apply>
                    <plus/>
                    <ci>mu_Ke</ci>
                    <ci>mu_O_Kp</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>Ar_gKp</ci>
                <apply>
                    <plus/>
                    <ci>mu_O_Kp</ci>
                    <apply>
                        <times/>
                        <ci>z_r_Kp</ci>
                        <apply>
                            <times/>
                            <ci>F</ci>
                            <ci>V_mem</ci>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_C_Kp</ci>
                <apply>
                    <minus/>
                    <ci>v_gKp</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_Ke</ci>
                <ci>v_Kp</ci>
            </apply>
            <apply>
                <eq/>
                <ci>v_Ki</ci>
                <apply>
                    <minus/>
                    <ci>v_Kp</ci>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_O_Kp</ci>
                <apply>
                    <minus/>
                    <ci>v_gKp</ci>
                    <apply>
                        <minus/>
                        <ci>v_Kp</ci>
                        <ci>v_Kp</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>v_Kp</ci>
                <piecewise>
                    <piece>
                        <apply>
                            <times/>
                            <ci>kappa_Kp</ci>
                            <apply>
                                <minus/>
                                <apply>
                                    <exp/>
                                    <apply>
                                        <divide/>
                                        <ci>Af_Kp</ci>
                                        <apply>
                                            <times/>
                                            <ci>R</ci>
                                            <ci>T</ci>
                                        </apply>
                                    </apply>
                                </apply>
                                <apply>
                                    <exp/>
                                    <apply>
                                        <divide/>
                                        <ci>Ar_Kp</ci>
                                        <apply>
                                            <times/>
                                            <ci>R</ci>
                                            <ci>T</ci>
                                        </apply>
                                    </apply>
                                </apply>
                            </apply>
                        </apply>
                        <apply>
                            <eq/>
                            <ci>Am_Kp</ci>
                            <cn cellml:units="J_per_mol">0</cn>
                        </apply>
                    </piece>
                    <otherwise>
                        <apply>
                            <times/>
                            <apply>
                                <divide/>
                                <apply>
                                    <divide/>
                                    <apply>
                                        <times/>
                                        <ci>kappa_Kp</ci>
                                        <ci>Am_Kp</ci>
                                    </apply>
                                    <apply>
                                        <times/>
                                        <ci>R</ci>
                                        <ci>T</ci>
                                    </apply>
                                </apply>
                                <apply>
                                    <minus/>
                                    <apply>
                                        <exp/>
                                        <apply>
                                            <divide/>
                                            <ci>Am_Kp</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_Kp</ci>
                                        <apply>
                                            <times/>
                                            <ci>R</ci>
                                            <ci>T</ci>
                                        </apply>
                                    </apply>
                                </apply>
                                <apply>
                                    <exp/>
                                    <apply>
                                        <divide/>
                                        <ci>Ar_Kp</ci>
                                        <apply>
                                            <times/>
                                            <ci>R</ci>
                                            <ci>T</ci>
                                        </apply>
                                    </apply>
                                </apply>
                            </apply>
                        </apply>
                    </otherwise>
                </piecewise>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>x_Ke</ci>
                </apply>
                <ci>v_Ke</ci>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>x_Ki</ci>
                </apply>
                <ci>v_Ki</ci>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>x_C_Kp</ci>
                </apply>
                <ci>v_C_Kp</ci>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>x_O_Kp</ci>
                </apply>
                <ci>v_O_Kp</ci>
            </apply>
            <apply>
                <eq/>
                <apply>
                    <diff/>
                    <bvar>
                        <ci>t</ci>
                    </bvar>
                    <ci>q_mem</ci>
                </apply>
                <ci>I_mem</ci>
            </apply>
        </math>
    </component>
    <connection>
        <map_components component_1="Kp_channel" component_2="Kp_parameters"/>
        <map_variables variable_1="K_C_Kp" variable_2="K_C_Kp"/>
        <map_variables variable_1="K_Ke" variable_2="K_Ke"/>
        <map_variables variable_1="K_Ki" variable_2="K_Ki"/>
        <map_variables variable_1="K_O_Kp" variable_2="K_O_Kp"/>
        <map_variables variable_1="kappa_Kp" variable_2="kappa_Kp"/>
        <map_variables variable_1="kappa_gKp" variable_2="kappa_gKp"/>
        <map_variables variable_1="zK" variable_2="zK"/>
        <map_variables variable_1="z_f_Kp" variable_2="z_f_Kp"/>
        <map_variables variable_1="z_r_Kp" variable_2="z_r_Kp"/>
    </connection>
    <connection>
        <map_components component_1="Kp_channel" component_2="environment"/>
        <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="C_m" variable_2="C_m"/>
        <map_variables variable_1="x_Ke_global" variable_2="x_Ke"/>
        <map_variables variable_1="x_Ke" variable_2="x_Ke_mKp"/>
        <map_variables variable_1="x_Ki_global" variable_2="x_Ki"/>
        <map_variables variable_1="x_Ki" variable_2="x_Ki_mKp"/>
        <map_variables variable_1="x_C_Kp_global" variable_2="x_C_Kp"/>
        <map_variables variable_1="x_C_Kp" variable_2="x_C_Kp_mKp"/>
        <map_variables variable_1="x_O_Kp_global" variable_2="x_O_Kp"/>
        <map_variables variable_1="x_O_Kp" variable_2="x_O_Kp_mKp"/>
        <map_variables variable_1="q_mem_global" variable_2="q_mem"/>
        <map_variables variable_1="q_mem" variable_2="q_mem_mKp"/>
    </connection>
</model>