.. highlight:: js :linenothreshold: 4 Channel Type File ================= Each *Channel Type* file is a JSON file that describes the membrane properties of a particular voltage gated ion channel. These files are referenced by :doc:`Cell Type files `. It is possible for multiple :doc:`Cell Type files ` to reference the same *Channel Type* file(s), which may be useful in cases where several neuron types share some ion channel types. Any of the channel properties described below can be overridden by the individual :doc:`Cell Type file(s) ` that reference the channel. A *Channel Type* file should contain a single JSON object. The fields that this object should contain depends on the equation that is used to calculate the current across the channel, but the following fields are required for all equation types. Each field is required unless otherwise specified. ==================== ======= =========== Field Type Description ==================== ======= =========== ``name`` string A unique name for the channel. ``i_eqn`` string The type of equation to use to calculate the maximum (ungated) current across the channel. The allowed values are "standard" or "ghk". See below for details. ``gates`` array A list of one or more gates that scale the maximum (ungated) current in order to calculate the actual current across the channel. See below for details. ==================== ======= =========== Current Equation Types ---------------------- The base current across a channel (before the effects of any gates are taken into account) can be calculated according to either the standard Hodgkin-Huxley equation or the Goldman-Hodgkin-Katz equation. In most cases the standard Hodgkin-Huxley equation should be adequate. The equation types (and the parameters they require) are described below. Standard current equation This is selected by using the value "standard" for the ``i_eqn`` field. The base current I is calculated using the equation :math:`I=g_{max}(V-E_{rev})`, where V is the current membrane potential of the neuron in millivolts. The channel parameters that can be specified if the standard equation is used are given in the table below. Parameters are required unless otherwise stated. ==================== ======= =========== Field Type Description ==================== ======= =========== ``gmax`` decimal The maximum conductance of the channel, in nanosiemens per square centimetre (?). ``gmax_stdev`` decimal *Optional.* If specified, the conductance of the channel varies from neuron to neuron according to a Gaussian distribution. This parameter gives the standard deviation for the distribution. ``erev`` decimal The reversal potential of the channel, in millivolts. ``erev_stdev`` decimal *Optional.* If specified, the reversal potential of the channel varies from neuron to neuron according to a Gaussian distribution. This parameter gives the standard deviation for the distribution. ==================== ======= =========== Goldman-Hodgkin-Katz current equation This is selected by using the value "ghk" for the ``i_eqn`` field. The base current I is calculated using the equation :math:`I=-\frac{p_{max}kzF(S_{in}-S_{out}*exp(k))}{1-exp(k)}`, where :math:`k=\frac{zFV}{RT}`. Here V is the current membrane potential of the neuron (in **volts**), F is Faraday's constant and R is the ideal gas constant. The remaining terms in the equations are channel parameters that must be specified and are described in the table below. Parameters are required unless otherwise stated. ==================== ======= =========== Field Type Description ==================== ======= =========== ``pmax`` decimal The maximum ionic permeability of the channel, in (?). ``pmax_stdev`` decimal *Optional.* If specified, the permeability of the channel varies from neuron to neuron according to a Gaussian distribution. This parameter gives the standard deviation for the distribution. ``z`` integer The valence of the ion that the channel is permeable to. ``S`` object An object containing two decimal values called ``in`` and ``out``, corresponding to the internal and external ionic concentrations (in ?) respectively. ``temp`` object Temperature of the simulation, in kelvin (this corresponds to the term T in the above equation). ``temp_stdev`` decimal *Optional.* If specified, the temperature varies from neuron to neuron according to a Gaussian distribution. This parameter gives the standard deviation for the distribution. ==================== ======= =========== Gates ----- The base current that is calculated according to one of the equations above is scaled by one or more gating variables in order to get the actual current across the channels. Each gate has an associated steady-state value that its gating variable will tend to over time at some rate, which is denoted by :math:`\tau`. Both the steady state value and :math:`\tau` are functions that may depend on the neuron's current membrane potential. It is also possible for completely different steady state value and :math:`\tau` functions to be used for different values of the membrane potential. The ``gates`` field within a channel should contain an array of gate objects, each of which must contain the following fields: ==================== ======= =========== Field Type Description ==================== ======= =========== ``name`` string A name describing the gate. ``power`` integer The power to which the gating variable is raised to when calculating channel current. ``equations`` array A list of one or more pairs of steady state and :math:`tau` functions. If more than one pairs of equations is specified, the range of membrane potentials for which each pair of functions is valid should be specified. ==================== ======= =========== Each entry in the ``equations`` array should be an object which may contain the following fields. ==================== ======= =========== Field Type Description ==================== ======= =========== ``steadystate`` object An equation object that specifies how the steady state value of the gating variable should be calculated. ``tau`` object *Optional.* An equation object that specifies how the rate of the gating variable should be calculated. If this is not given, then the gating variable will change value instantaneously. ``v_min`` decimal *Optional.* The minimum value of the membrane potential for which the given equations are valid. ``v_max`` decimal *Optional.* The maximum value of the membrane potential for which the given equations are valid. ``alpha_coeffs`` string *Optional.* If the steady state and/or :math:`\tau` equations are of type "alphabeta" (see below), this field should be present and its value should be a string containing a comma-separated list of the alpha coefficients A,B,C,D,E. ``beta_coeffs`` string *Optional.* If the steady state and/or :math:`\tau` equations are of type "alphabeta" (see below), this field should be present and its value should be a string containing a comma-separated list of the beta coefficients A,B,C,D,E. ==================== ======= =========== During simulation, the pair of steady state and :math:`\tau` equations that is used will be the first entry in the ``equations`` array for which the ``v_min`` and ``v_max`` constraints (if present) are satisfied. There must always be one pair of equations that has neither ``v_min`` nor ``v_max`` specified - this is the default set of equations and should be the last entry in the array (because no equations specified after a pair with no constraints will ever be used). The ``steadystate`` and ``tau`` fields should contain equation objects. There are several possible types of equation that may be used, and the fields that should be specified vary depending on the equation type. A required field called ``eqn`` should always be present and determines the type of equation to be used. It can contain one of the following values: "standard", "const", "alphabeta". Each of the possible equation types is described below. Standard Sigmoid Equation If the value of ``eqn`` is "standard", then a standard sigmoidal function :math:`F(V)=X_{min}+\frac{X_{max}-X_{min}}{1+exp(\frac{V_{mid} - V}{k})}` is used, where V is the neuron's current membrane potential. The parameters of this equation are given by the following fields that should be present in the equation object: ==================== ======= =========== Field Type Description ==================== ======= =========== ``min`` decimal The minimum value of the equation (i.e. the limit as V tends to :math:`-\inf`). ``max`` decimal The maximum value of the equation (i.e. the limit as V tends to :math:`+\inf`). *Note:* This is only used for time constant equations; for steady state equations, the maximum value is always fixed as 1. ``half_v`` decimal The membrane potential (in mV) at the mid-point of the sigmoid curve. ``k`` decimal The slope of the sigmoid. ==================== ======= =========== Constant Value If the value of ``eqn`` is "const" then the corresponding steady state or :math:`\tau` value has a constant value that does not depend on the membrane potential. The constant value should be given as a decimal value for a field named `value`. Alpha-Beta Equations If the value of ``eqn`` is "alphabeta" then two intermediate functions, :math:`\alpha(V)` and :math:`\beta(V)` are used to calculate the steady state value or :math:`tau`. Both these functions are of the form :math:`\frac{A+BV}{C+exp(\frac{V+D}{E})}`, where the coefficients A, B, C, D and E are given in the ``alpha_coeffs`` and ``beta_coeffs`` fields of the parent object (see above). The steady state value is then given by :math:`X_\inf(V) = \frac{\alpha(V)}{\alpha(V)+\beta(V)}` and the rate is given by :math:`\tau(V) = \frac{1}{\alpha(V)+\beta(V)}`.