<?xml version='1.0' encoding='UTF-8'?>
<!-- TODO read mahajan paper and find out which one this is.-->
<model name="k1_channel" 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.cellml">
        <units name="ms" units_ref="ms"/>
        <units name="per_ms" units_ref="per_ms"/>
        <units name="mV" units_ref="mV"/>
        <units name="per_mV" units_ref="per_mV"/>
        <units name="uS_per_nF" units_ref="uS_per_nF"/>
        <units name="nA_per_nF" units_ref="nA_per_nF"/>
    </import>
    <component name="IK1">
        <variable name="V" public_interface="in" units="mV"/>
        <variable name="ek" public_interface="in" units="mV"/>
        <variable name="K_o" public_interface="in" units="mM"/>
        <variable initial_value="0.3" name="gkix" units="uS_per_nF"/>
        <variable name="aki" units="per_ms"/>
        <variable name="bki" units="per_ms"/>
        <variable name="xkin" units="dimensionless"/>
        <variable name="xik1" public_interface="out" units="nA_per_nF"/>
        <math xmlns="http://www.w3.org/1998/Math/MathML">
            <apply>
                <eq/>
                <ci>aki</ci>
                <apply>
                    <divide/>
                    <cn cellml:units="per_ms">1.02</cn>
                    <apply>
                        <plus/>
                        <cn cellml:units="dimensionless">1</cn>
                        <apply>
                            <exp/>
                            <apply>
                                <times/>
                                <cn cellml:units="per_mV">0.2385</cn>
                                <apply>
                                    <minus/>
                                    <apply>
                                        <minus/>
                                        <ci>V</ci>
                                        <ci>ek</ci>
                                    </apply>
                                    <cn cellml:units="mV">59.215</cn>
                                </apply>
                            </apply>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>bki</ci>
                <apply>
                    <divide/>
                    <apply>
                        <plus/>
                        <apply>
                            <times/>
                            <cn cellml:units="per_ms">0.49124</cn>
                            <apply>
                                <exp/>
                                <apply>
                                    <times/>
                                    <cn cellml:units="per_mV">0.08032</cn>
                                    <apply>
                                        <plus/>
                                        <apply>
                                            <minus/>
                                            <ci>V</ci>
                                            <ci>ek</ci>
                                        </apply>
                                        <cn cellml:units="mV">5.476</cn>
                                    </apply>
                                </apply>
                            </apply>
                        </apply>
                        <apply>
                            <times/>
                            <cn cellml:units="per_ms">1</cn>
                            <apply>
                                <exp/>
                                <apply>
                                    <times/>
                                    <cn cellml:units="per_mV">0.06175</cn>
                                    <apply>
                                        <minus/>
                                        <apply>
                                            <minus/>
                                            <ci>V</ci>
                                            <ci>ek</ci>
                                        </apply>
                                        <cn cellml:units="mV">594.31</cn>
                                    </apply>
                                </apply>
                            </apply>
                        </apply>
                    </apply>
                    <apply>
                        <plus/>
                        <cn cellml:units="dimensionless">1</cn>
                        <apply>
                            <exp/>
                            <apply>
                                <times/>
                                <apply>
                                    <minus/>
                                    <cn cellml:units="per_mV">0.5143</cn>
                                </apply>
                                <apply>
                                    <plus/>
                                    <apply>
                                        <minus/>
                                        <ci>V</ci>
                                        <ci>ek</ci>
                                    </apply>
                                    <cn cellml:units="mV">4.753</cn>
                                </apply>
                            </apply>
                        </apply>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>xkin</ci>
                <apply>
                    <divide/>
                    <ci>aki</ci>
                    <apply>
                        <plus/>
                        <ci>aki</ci>
                        <ci>bki</ci>
                    </apply>
                </apply>
            </apply>
            <apply>
                <eq/>
                <ci>xik1</ci>
                <apply>
                    <times/>
                    <ci>gkix</ci>
                    <apply>
                        <root/>
                        <apply>
                            <divide/>
                            <ci>K_o</ci>
                            <cn cellml:units="mM">5.4</cn>
                        </apply>
                    </apply>
                    <ci>xkin</ci>
                    <apply>
                        <minus/>
                        <ci>V</ci>
                        <ci>ek</ci>
                    </apply>
                </apply>
            </apply>
        </math>
    </component>
</model>
