<?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="IM">

    <notes>NeuroML file containing a single Channel description</notes>

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

        <notes>Slow M-type K+ current for spike frequency adaptation
            
Comment from original mod file:
M-current, responsible for the adaptation of firing rate and the afterhyperpolarization (AHP) of cortical pyramidal cells
First-order model described by hodgkin-Hyxley like equations.
K+ current, activated by depolarization, noninactivating.

Model taken from Yamada, W.M., Koch, C. and Adams, P.R.  Multiple channels and calcium dynamics.  In: Methods in Neuronal Modeling, 
edited by C. Koch and I. Segev, MIT press, 1989, p 97-134.
    
See also: McCormick, D.A., Wang, Z. and Huguenard, J. Neurotransmitter control of neocortical neuronal activity and excitability. 
Cerebral Cortex 3: 387-398, 1993.

Written by Alain Destexhe, Laval University, 1995
        </notes>
                
        <annotation>
            <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
                <rdf:Description rdf:about="IM">
                    
                    <bqmodel:isDescribedBy xmlns:bqmodel="http://biomodels.net/model-qualifiers/">
                        <rdf:Bag>
                            <rdf:li>Minimal Hodgkin-Huxley type models for different classes of cortical and thalamic neurons</rdf:li>
                            <rdf:li rdf:resource="19011929"/>
                        </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/NeuronDB/channelGene2.aspx#table3"/>
                        </rdf:Bag>
                    </bqbiol:isVersionOf>

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

        <gate id="p" type="gateHHtauInf" instances="1">
            <timeCourse type="IM_p_tau_tau"/>
            <steadyState type="IM_p_inf_inf"/>
        </gate>
                            
    </ionChannel>

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

        <Dynamics>
            <DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>
            <DerivedVariable name="t" exposure="t" dimension="time" value="(tmax / ( (3.3 * (exp ((V+35)/20))) + (exp (-1 * (V+35) /20)))) * TIME_SCALE"/>
        </Dynamics>

    </ComponentType>

    <ComponentType name="IM_p_inf_inf" extends="baseVoltageDepVariable">
        <Constant name="TIME_SCALE" dimension="time" value="1 ms"/>
        <Constant name="VOLT_SCALE" dimension="voltage" value="1 mV"/>

        <Dynamics>
            <DerivedVariable name="V" dimension="none" value="v / VOLT_SCALE"/>
            <DerivedVariable name="x" exposure="x" dimension="none" value="1/(1+ (exp (-1 * (V+35)/10)))"/>
        </Dynamics>

    </ComponentType>

</neuroml>
