<?xml version="1.0" encoding="ISO-8859-1"?>
<neuroml xmlns="http://www.neuroml.org/schema/neuroml2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.neuroml.org/schema/neuroml2 https://raw.github.com/NeuroML/NeuroML2/development/Schemas/NeuroML2/NeuroML_v2beta4.xsd" id="kc_fast">

    <notes>ChannelML file based on Traub et al. 2003</notes>

    <ionChannel id="kc_fast" conductance="10pS" type="ionChannelHH" species="k">

        <notes>Fast voltage and [Ca2+] dependent K conductance (BK channel). Based on NEURON port of FRB L2/3 model from Traub et al 2003. Same channel used in Traub et al 2005</notes>
                
        <annotation>
            <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
                <rdf:Description rdf:about="kc_fast">
                    
                    <bqmodel:isDescribedBy xmlns:bqmodel="http://biomodels.net/model-qualifiers/">
                        <rdf:Bag>
                            <rdf:li>Roger D. Traub, Eberhard H. Buhl, Tengis Gloveli, and Miles A. Whittington                
Fast Rhythmic Bursting Can Be Induced in Layer 2/3 Cortical Neurons by Enhancing Persistent Na+ Conductance or by Blocking BK Channels
J Neurophysiol 89: 909-921, 2003</rdf:li>
                            <rdf:li rdf:resource="http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&amp;db=pubmed&amp;dopt=Abstract&amp;list_uids=12574468"/>
                        </rdf:Bag>
                    </bqmodel:isDescribedBy>

                
                    <bqmodel:isDescribedBy xmlns:bqmodel="http://biomodels.net/model-qualifiers/">
                        <rdf:Bag>
                            <rdf:li>Roger D. Traub, Diego Contreras, Mark O. Cunningham, Hilary Murray, Fiona E. N. LeBeau, Anita Roopun, Andrea Bibbig, W. Bryan Wilent, Michael J. Higley, and Miles A. Whittington
Single-column thalamocortical network model exhibiting gamma oscillations, sleep spindles, and epileptogenic bursts.
J. Neurophysiol. 93, 2194-2232, 2005</rdf:li>
                            <rdf:li rdf:resource="http://www.ncbi.nlm.nih.gov/pubmed/15525801?dopt=Abstract"/>
                        </rdf:Bag>
                    </bqmodel:isDescribedBy>

                
                    <bqbiol:isVersionOf xmlns:bqbiol="http://biomodels.net/biology-qualifiers/">
                        <rdf:Bag>
                            <rdf:li>K channels</rdf:li>
                            <rdf:li rdf:resource="http://senselab.med.yale.edu/senselab/NeuronDB/channelGene2.htm#table3"/>
                        </rdf:Bag>
                    </bqbiol:isVersionOf>

                </rdf:Description>
            </rdf:RDF>
        </annotation>

        <baseConductanceScalingCaDependent type="cond_scaling_kc_fast"/>

        <gate id="m" type="gateHHrates" instances="1">
            <forwardRate type="kc_fast_m_alpha_rate"/>
            <reverseRate type="kc_fast_m_beta_rate"/>
        </gate>
                            
    </ionChannel>

    <ComponentType name="cond_scaling_kc_fast" extends="baseConductanceScalingCaDependent">
        <Constant name="CONC_SCALE" dimension="concentration" value="1 mol_per_cm3"/>

        <Dynamics>
            <DerivedVariable name="ca_conc" dimension="none" value="caConc / CONC_SCALE"/>
            <ConditionalDerivedVariable name="factor" exposure="factor" dimension="none">
                <Case condition="ca_conc  .lt. ( 0.00025 )" value=" (ca_conc / 0.00025) "/>
                <Case value=" 1"/>
            </ConditionalDerivedVariable>
        </Dynamics>

    </ComponentType>

    <ComponentType name="kc_fast_m_alpha_rate" extends="baseVoltageDepRate">
        <Constant name="TIME_SCALE" dimension="time" value="1 ms"/>
        <Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>
        <!--Note: this parameter (speedup_factor) should ideally be defined only once within the ionChannel! Work in progress...-->
        <Constant name="speedup_factor" dimension="none" value="2"/>

        <Dynamics>
            <DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>
            <ConditionalDerivedVariable name="r" exposure="r" dimension="per_time">
                <Case condition="V  .lt. ( -10 )" value="( speedup_factor * (2 / 37.95) * ( exp ( ((V + 50 ) / 11) - (( V + 53.5) / 27) ) ) ) / TIME_SCALE"/>
                <Case value="( speedup_factor * 2 * (exp ( ( (-1 * V) - 53.5 ) / 27 ))) / TIME_SCALE"/>
            </ConditionalDerivedVariable>
        </Dynamics>

    </ComponentType>

    <ComponentType name="kc_fast_m_beta_rate" extends="baseVoltageDepRate">
        <Constant name="TIME_SCALE" dimension="time" value="1 ms"/>
        <Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>
        <!--Note: this parameter (speedup_factor) should ideally be defined only once within the ionChannel! Work in progress...-->
        <Constant name="speedup_factor" dimension="none" value="2"/>
        <Requirement name="alpha" dimension="per_time"/>
        <Requirement name="beta" dimension="per_time"/>

        <Dynamics>
            <DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>
            <DerivedVariable name="ALPHA" dimension="none" value="alpha * TIME_SCALE"/>
            <DerivedVariable name="BETA" dimension="none" value="beta * TIME_SCALE"/>
            <ConditionalDerivedVariable name="r" exposure="r" dimension="per_time">
                <Case condition="V  .lt. ( -10 )" value="( speedup_factor * 2 * (exp ( ( (-1 * V) - 53.5 ) / 27 )) - ALPHA ) / TIME_SCALE"/>
                <Case value="( speedup_factor * 0.0) / TIME_SCALE"/>
            </ConditionalDerivedVariable>
        </Dynamics>

    </ComponentType>

</neuroml>
