Views
A quantitative description of membrane current and its application to conductance and excitation in nerve
The CellML code.
<!--
This CellML file was generated on 14/06/2005 at 13:34:14 using:
COR (0.9.31.69)
Copyright 2002-2005 Oxford Cardiac Electrophysiology Group
http://COR.physiol.ox.ac.uk/ - COR@physiol.ox.ac.uk
CellML 1.0 was used to generate this cellular model
http://www.CellML.org/
-->
<model xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:cellml="http://www.cellml.org/cellml/1.0#" xmlns:bqs="http://www.cellml.org/bqs/1.0#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cmeta="http://www.cellml.org/metadata/1.0#" xmlns:xpp="http://www.physiome.org.nz/xml_pretty_printer" xmlns="http://www.cellml.org/cellml/1.0#" cmeta:id="hodgkin_huxley_squid_axon_1952" name="hodgkin_huxley_squid_axon_1952">
<documentation xmlns="http://cellml.org/tmp-documentation">
<article>
<articleinfo>
<title>Hodgkin Huxley Squid Axon Model 1952</title>
<authorgroup>
<author>
<firstname>Warren</firstname>
<surname>Hedley</surname>
<affiliation>
<shortaffil>Bioengineering Institute, University of Auckland</shortaffil>
</affiliation>
</author>
<author>
<firstname>Geoff</firstname>
<surname>Carden</surname>
<affiliation>
<shortaffil>Bioengineering Institute, University of Auckland</shortaffil>
</affiliation>
</author>
<author>
<firstname>Autumn</firstname>
<surname>Cuellar</surname>
<affiliation>
<shortaffil>Bioengineering Institute, University of Auckland</shortaffil>
</affiliation>
</author>
<collab>
<collabname>Greg Sands</collabname>
<affiliation>
<shortaffil>Bioengineering Institute, University of Auckland</shortaffil>
</affiliation>
</collab>
<collab>
<collabname>David Nickerson</collabname>
<affiliation>
<shortaffil>Bioengineering Institute, University of Auckland</shortaffil>
</affiliation>
</collab>
</authorgroup>
</articleinfo>
<section id="sec_status">
<title>Model Status</title>
<para>
This version was created by Penny Noble of Oxford University and is known to run in COR and PCEnv. The intial voltage membrane potential was changed from 0 mV to the correct value of -75 mV.
</para>
</section>
<sect1 id="sec_introduction">
<title>Introduction</title>
<para>
In a series of papers published in 1952, A.L. Hodgkin and A.F. Huxley presented the results of a series of experiments in which they investigated the flow of electric current through the surface membrane of the giant nerve fibre of a squid. In the summary paper of the Hodgkin and Huxley model, the authors developed a mathematical description of the behaviour of the membrane based upon these experiments, which accounts for the conduction and excitation of the fibre. The form of this description has been used as the basis for almost all other ionic current models of excitable tissues, including Purkinje fibres and cardiac atrial and ventricular muscle.
</para>
<para>
The summary paper is:
</para>
<para>
A Quantitative Description of Membrane Current and its Application to Conduction and Excitation in Nerve, A. L. Hodgkin and A. F. Huxley, 1952, <emphasis>J. Physiol</emphasis>, 117, 500-544
</para>
</sect1>
<sect1 id="sec_status_of_the_model">
<title>Status of the Model and Documentation</title>
<para>
The CellML description of the Hodgkin-Huxley model (which can be downloaded in various formats as described in <xref linkend="sec_download_this_model" />) and documentation were revised and updated in September 2003 to conform to the 10 August 2001 version of the <ulink url="${HTML_SPEC_20010810_OVERVIEW}">CellML 1.0 Specification</ulink> and the 16 January 2002 version of the <ulink url="${HTML_METADATA_20020116_OVERVIEW}">CellML Metadata 1.0 Specification</ulink>.
</para>
<para>
The model description itself is intended to demonstrate the best practices for the definition of electrophysiological models using CellML, as intended by the authors of the CellML Specification.
</para>
<para>
The metadata included in the CellML description should not be regarded as a demonstration of best practice for metadata. It is neither complete nor final, as the version of the CellML Metadata Specification on which it is based has a status of <emphasis>Research Summary</emphasis>.
</para>
</sect1>
<sect1 id="sec_hodgkin_huxley_model_overview">
<title>Hodgkin Huxley Model Overview</title>
<para>
The current flow across the cell membrane depends on the capacitance of the membrane and the resistance of the ion channels. The total ionic current is represented by the sum of the sodium current, potassium current and a small leakage current. The leakage current represents the collective contribution of ions such as chloride and bicarbonate. Hodgkin and Huxley developed an electrical circuit diagram to represent the ion flows in their model. A modified version of this diagram is shown in <xref linkend="fig_circuit_diagram" />, where the currents have been reversed to be consistent with the convention proposed by Noble, commonly adopted for cardiac muscle.
</para>
<informalfigure float="0" id="fig_circuit_diagram">
<mediaobject>
<imageobject>
<objectinfo>
<title>Electrical circuit describing the current across the cell membrane</title>
</objectinfo>
<imagedata fileref="../images/hh_squid_axon_1952/circuit_diagram.gif" />
</imageobject>
</mediaobject>
<caption>An electrical circuit diagram describing the current flows across the cell membrane that are captured in the Hodgkin Huxley model.</caption>
</informalfigure>
<para>
The current is represented mathematically as the sum of the resistive and capacitive components. The capacitive component <emphasis>Icap</emphasis> is derived from Ohm's law, where <emphasis>Cm</emphasis> and <emphasis>Vm</emphasis> denote the membrane capacitance and trans-membrane voltage, respectively.
</para>
<informalequation id="eqn_capacitive_current">
<cwml_equation>
I_{cap} = C_m \cdot \frac{d V_m}{d t}
</cwml_equation>
</informalequation>
<para>
The resistive components are characterised in the original model as conductances (<emphasis>g</emphasis>), the reciprocals of the resistances. The currents are dependent on the transmembrane voltage (<emphasis>Vm</emphasis>) and the equilibrium potentials (<emphasis>E</emphasis>) of the individual ions. There are two forces driving the ion flux: the chemical gradient of the ions and the electrical gradient resulting from the different concentrations of charged particles on each side of the membrane. The equilibrium potential or reversal potential arises from equating the electrical and chemical potentials. The difference between the equilibrium potential for an ion and the transmembrane potential is the driving force for the ionic flow. The resistive currents can therefore be written:
</para>
<informalequation id="eqn_resistive_current">
<cwml_equation>
I_{ion} = g_{ion} \cdot (V_m - E_{ion})
</cwml_equation>
</informalequation>
<para>
The experiments suggested that <emphasis>gNa</emphasis> and <emphasis>gK</emphasis> were time dependent but the conductances of the other ions could be considered to be constant. Depolarisation of the membrane causes a fast transient increase in sodium conductance and a gradual and sustained increase in potassium conductance. The time dependence is represented by a gate variable or activation coefficient <emphasis>x</emphasis> which indicates the probability of a gate in the channel being open. The conductance for a time dependent channel can thus be written in terms of its gate variable <emphasis>x</emphasis> (<emphasis>0 <= x <= 1</emphasis>) and a maximum conductance <emphasis>gion,max</emphasis> as follows:
</para>
<informalequation id="eqn_resistive_current_in_terms_of_gate_variable">
<cwml_equation>
g_{ion} = g_{ion,max} \cdot x
</cwml_equation>
</informalequation>
<para>
where <emphasis>x</emphasis> satisfies the differential equation:
</para>
<informalequation id="eqn_gate_variable_equation">
<cwml_equation>
\frac{d x}{d t} = \alpha_x \cdot (1 - x) - \beta_x \cdot x
</cwml_equation>
</informalequation>
<para>
<emphasis>αx</emphasis> and <emphasis>βx</emphasis> are rate coefficients which are a non-linear functions of voltage and have the units of 1/time.
</para>
<!-- 16/07/2001 - WJH - This stuff is fairly irrelevant
<paragraph>
<cwml_equation_reference href="gate_variable_equation" /> can be rewritten as:
</paragraph>
<cwml_equation name="">
\frac{d n}{d t} = -\frac{n - n_{\inf}}{\tau_x}
</cwml_equation>
<paragraph>
where
</paragraph>
<cwml_equation name="">
\tau_x = \frac{1}{\alpha_x + \beta_x}
</cwml_equation>
<cwml_equation name="">
x_{\inf} = \frac{\alpha_x}{\alpha_x + \beta_x}
</cwml_equation>
<paragraph>
When <cwml_variable>V<sub>m</sub></cwml_variable> is held constant the solution to the equation becomes:
</paragraph>
<cwml_equation name="">
x(t) = x_{\inf} - (x_{\inf} - x_0)exp(\frac{-t}{tau_x})
</cwml_equation>
<paragraph>
satisfying the boundary conditions <cwml_variable>x = x<sub>0</sub></cwml_variable> then t = 0. An example of this type of channel is in the potassium channel responsible for the repolarisation phase after the action potential
</paragraph>
-->
<para>
The activation coefficient can be raised to the power of <emphasis>k</emphasis> if there are <emphasis>k</emphasis> gates in series in one ion channel. Channels can also be given more then one gate variable to describe activation-inactivation behaviour. This gives current equations of the form:
</para>
<informalequation id="eqn_activation_inactivation_current">
<cwml_equation>
I_{ion} = g_{ion,max} \cdot x \cdot y \cdot (V_m - E_{ion})
</cwml_equation>
</informalequation>
<para>
where <emphasis>x</emphasis> is the activation variable and <emphasis>y</emphasis> is the inactivation variable. The rate coefficients for the inactivation variable <emphasis>αy</emphasis> and <emphasis>βy</emphasis> are in general much slower than the rate coefficients for the activation variable. An example of this type of channel is the fast sodium channel involved in the depolarisation of the membrane to generate the upstroke of the action potential.
</para>
<sect2 id="sec_sodium_conductance">
<title>Sodium conductance</title>
<para>
The sodium conductance control theory that Hodgkin and Huxley chose to adopt involved two control particles. The first moves out of an inhibitory site when the transmembrane potential reaches a threshold allowing sodium ions to flow though the channel. A second inhibitory particle moves slowly to occupy the inhibitory site and stop the ion flow. These are represented by two variables each governed by a first order differential equation. The conductance is then expressed:
</para>
<informalequation id="eqn_sodium_conductance">
<cwml_equation>
g_{Na} = g_{Na,max} \cdot m^3 \cdot h
</cwml_equation>
</informalequation>
<para>
where <emphasis>m</emphasis> is an activation coefficient, <emphasis>h</emphasis> is an inactivation coefficient and <emphasis>gNa,max</emphasis> is the maximum sodium conductance. Both activation and inactivation variables are governed by the differential equations
</para>
<informalequation id="eqn_dm_dt">
<cwml_equation>
\frac{d m}{d t} = \alpha_m \cdot (1 - m) - \beta_m \cdot m
</cwml_equation>
</informalequation>
<informalequation id="eqn_dh_dt">
<cwml_equation>
\frac{d h}{d t} = \alpha_h \cdot (1 - h) - \beta_h \cdot h
</cwml_equation>
</informalequation>
<para>
where the rate constants <emphasis>α</emphasis> and <emphasis>β</emphasis> are functions of voltage but not of time. Expressions for rate constants were found by fitting curves to experimental data from nerve fibres to give:
</para>
<informalequation id="eqn_alpha_m">
<cwml_equation>
\alpha_m = \frac{0.1 \cdot (V_m + 25.0)}{exp\left(0.1 \cdot (V_m + 25.0)\right) - 1.0}
</cwml_equation>
</informalequation>
<informalequation id="eqn_beta_m">
<cwml_equation>
\beta_m = 4 \cdot exp\left(\frac{V_m}{18.0}\right)
</cwml_equation>
</informalequation>
<informalequation id="eqn_alpha_h">
<cwml_equation>
\alpha_h = 0.07 \cdot exp\left(\frac{V_m}{20.0}\right)
</cwml_equation>
</informalequation>
<informalequation id="eqn_beta_h">
<cwml_equation>
\beta_h = \frac{1.0}{exp\left(0.1 \cdot (V_m + 30.0)\right) + 1.0}
</cwml_equation>
</informalequation>
<para>
The total sodium current is then given by
</para>
<informalequation id="eqn_sodium_current">
<cwml_equation>
\begin{split}
i_{Na} &= g_{Na} \cdot (V_m - E_{Na}) \\
&= g_{Na,max} \cdot m^3 \cdot h \cdot (V_m - E_{Na})
\end{split}
</cwml_equation>
</informalequation>
<para>
where <emphasis>ENa</emphasis> is the reversal potential for the sodium channel.
</para>
</sect2>
<sect2 id="sec_potassium_conductance">
<title>Potassium conductance</title>
<para>
The potassium conductance can be modelled similarly, but there are only activation type channels for potassium. The equations are:
</para>
<informalequation id="eqn_potassium_conductance">
<cwml_equation>
g_K = g_{K,max} \cdot n^4
</cwml_equation>
</informalequation>
<informalequation id="eqn_dn_dt">
<cwml_equation>
\frac{d n}{d t} = \alpha_n \cdot (1 - n) - \beta_n \cdot n
</cwml_equation>
</informalequation>
<informalequation id="eqn_alpha_n">
<cwml_equation>
\alpha_n = \frac{0.01 \cdot (V_m + 10.0)}{exp(0.1 \cdot (V_m + 10.0)) - 1.0}
</cwml_equation>
</informalequation>
<informalequation id="eqn_beta_n">
<cwml_equation>
\beta_n = 0.125 \cdot exp\left(\frac{V_m}{80.0}\right)
</cwml_equation>
</informalequation>
<para>
where <emphasis>n</emphasis> is the activation coefficient for the potassium channel, <emphasis>gK,max</emphasis> is the maximum conductance of potassium and <emphasis>αn</emphasis> and <emphasis>βn</emphasis> are the voltage dependent rate constants.
</para>
<para>
The total potassium current is then given by
</para>
<informalequation id="eqn_potassium_current">
<cwml_equation>
\begin{split}
i_{K} &= g_{K} \cdot (V_m - E_{K}) \\
&= g_{K,max} \cdot n^4(V_m - E_{K})
\end{split}
</cwml_equation>
</informalequation>
<para>
where <emphasis>EK</emphasis> is the reversal potential for the potassium channel.
</para>
</sect2>
<sect2 id="sec_leakage_current">
<title>Leakage current</title>
<para>
The full Hodgkin Huxley model also included the leakage current to maintain the constant resting membrane potential in the absence of any depolarisation. The leakage current is given by
</para>
<informalequation id="eqn_leakage_current">
<cwml_equation>
i_L = g_L \cdot (V_m - E_L)
</cwml_equation>
</informalequation>
<para>
where <emphasis>EL</emphasis> is the reversal potential for the leakage current.
</para>
</sect2>
<sect2 id="sec_full_hodgkin_huxley_model">
<title>Putting it all together</title>
<para>
The full Hodgkin Huxley membrane current model is assembled by now combining the capacitive and resistive currents across the membrane into a single equation.
</para>
<informalequation id="eqn_full_model">
<cwml_equation>
I = C_m \cdot \frac{d V_m}{d t} + i_{Na} + i_{K} + i_{L}
</cwml_equation>
</informalequation>
<para>
All the equilibrium potentials are related to the resting membrane potential <emphasis>ER</emphasis>. The set of values used in the model are given in the table <xref linkend="table_constant_values" />.
</para>
<informaltable id="table_constant_values">
<tgroup cols="3">
<thead>
<row>
<entry>Constant</entry>
<entry>Units</entry>
<entry>Value</entry>
</row>
</thead>
<tbody>
<thead>
<row>
<entry>Constant</entry>
<entry>Units</entry>
<entry>Value</entry>
</row>
</thead>
<row>
<entry>
<emphasis>Cm</emphasis>
</entry>
<entry>μF cm<superscript>-2</superscript>
</entry>
<entry>1.0</entry>
</row>
<row>
<entry>
<emphasis>ER</emphasis>
</entry>
<entry>mV</entry>
<entry>-75.0</entry>
</row>
<row>
<entry>
<emphasis>ENa</emphasis>
</entry>
<entry>mV</entry>
<entry>
<emphasis>ER</emphasis> + 115.0</entry>
</row>
<row>
<entry>
<emphasis>EK</emphasis>
</entry>
<entry>mV</entry>
<entry>
<emphasis>ER</emphasis> - 12.0</entry>
</row>
<row>
<entry>
<emphasis>EL</emphasis>
</entry>
<entry>mV</entry>
<entry>
<emphasis>ER</emphasis> + 10.613</entry>
</row>
<row>
<entry>
<emphasis>gNa,max</emphasis>
</entry>
<entry>mS cm<superscript>-2</superscript>
</entry>
<entry>120.0</entry>
</row>
<row>
<entry>
<emphasis>gK,max</emphasis>
</entry>
<entry>mS cm<superscript>-2</superscript>
</entry>
<entry>36.0</entry>
</row>
<row>
<entry>
<emphasis>gL</emphasis>
</entry>
<entry>mS cm<superscript>-2</superscript>
</entry>
<entry>0.3</entry>
</row>
</tbody>
</tgroup>
<caption>
Values for constants in the Hodgkin-Huxley equations.
</caption>
</informaltable>
</sect2>
</sect1>
<sect1 id="sec_representing_in_cellml">
<title>Representing the Model in CellML</title>
<para>
In CellML any model is represented by a network of components, typically chosen to reflect the natural physical entities in the system. Information is passed from one component to another through connections. A diagram showing the network defined in the CellML description of the Hodgkin-Huxley model is shown in <xref linkend="fig_cellml_rendering" />.
</para>
<informalfigure float="0" id="fig_cellml_rendering">
<mediaobject>
<imageobject>
<objectinfo>
<title>the cellml rendering of the hodgkin huxley squid axon model</title>
</objectinfo>
<imagedata fileref="../images/hh_squid_axon_1952/cellml_model.gif" />
</imageobject>
</mediaobject>
<caption>The network defined in the CellML description of the Hodgkin-Huxley model. Where a variable is passed from one component to another along a connection, the name of the variable is shown next to the component in which it is declared with a public or private interface value of <markup role="xml_attribute_value">out</markup>. The <markup role="xml_element_name">environment</markup> component discussed in <xref linkend="sec_environment_component" /> is not included in this diagram. A key describing the significance of the shapes of the components and the colours of the connections between them is in the <ulink url="${HTML_EXMPL_GRAPHICAL_NOTATION}">notation guide</ulink>.</caption>
</informalfigure>
<para>
At the highest level, the model consists of four components with identifiers <markup role="xml_element_name">membrane</markup>, <markup role="xml_element_name">sodium_channel</markup>, <markup role="xml_element_name">potassium_channel</markup> and <markup role="xml_element_name">leakage_current</markup>. The membrane physically contains the two channels and the leakage current, as indicated by the blue arrows in <xref linkend="fig_cellml_rendering" />. The channels and current act independently and are not connected to each other. Both the sodium and potassium channels encapsulate <emphasis>and</emphasis> contain further components: the sodium channel contains two components representing the m and h gates, and the potassium channel contains a component representing the n gate. The addition of an encapsulation relationship between the sodium channel and the m and h gates informs modellers and processing software that the m and h gates are important parts of the sodium channel model. It also prevents any other components that aren't also encapsulated by the sodium channel component from connecting to the m and h gates, effectively hiding them from the rest of the model.
</para>
<para>
CellML processing software might choose to use the containment and encapsulation information in the model definition for the rendering of the model. An initial rendering might have the sodium channel, potassium channel, and leakage currents drawn inside the membrane component. Some label might indicate that the sodium and potassium channel components contain hidden detail. When the user double clicks on the sodium channel, they are shown the hidden m and h gate components.
</para>
<para>
The breakdown of the model into components and the definition of encapsulation and containment relationships between them is somewhat arbitrary. When considering how a model should be broken into components, modellers are encouraged to consider which parts of a model might be re-used, and how the physiological elements of the system being modelled are naturally bounded. Containment relationships should be used to provide simple rendering information for processing software (ideally, this will correspond to the layout of the physical system), and encapsulation should be used to group sets of components into sub-models.
</para>
</sect1>
<sect1 id="sec_analysis_of_code">
<title>Analysis of the CellML Code</title>
<sect2 id="sec_the_model_element">
<title>The model element</title>
<para>
The root element of the XML document containing the CellML definition of the Hodgkin-Huxley model is the <markup role="xml_element">model</markup> element shown in <xref linkend="fig_the_model_element" />. (At this point, those not familiar with XML may want to consult the <ulink url="${HTML_XML_EXMPL_GUIDE}">quick introduction to XML</ulink> for help with understanding XML terms.) The <markup role="xml_element">model</markup> element defines a <markup role="xml_attribute">name</markup> attribute that allows this model to be unambiguously referenced by other models. For instance, this would be necessary if this model were to be combined with other models or partial models to create a larger model. It also defines an <markup role="xml_attribute">id</markup> attribute in the CellML Metadata namespace (which is mapped to the <markup role="xml_namespace_prefix">cmeta</markup> prefix). This <markup role="xml_attribute">id</markup> attribute is of XML type ID and may be used to attach metadata to this element, as discussed in <xref linkend="sec_model_metadata" />.
</para>
<informalfigure float="0" id="fig_the_model_element">
<literallayout class="normal" format="linespecific">
<embeddedxml>
<model xmlns="http://www.cellml.org/cellml/1.0#" name="hodgkin_huxley_squid_axon_1952" xpp:indent="4" cmeta:id="hodgkin_huxley_squid_axon_1952">
...
</model>
</embeddedxml>
</literallayout>
<caption>The root element of the XML document containing the CellML description of the Hodgkin-Huxley model is the <markup role="xml_element">model</markup> element shown above.</caption>
</informalfigure>
<para>
The <markup role="xml_element">model</markup> element also defines two XML namespaces. The first is the CellML namepsace, which is set to the default namespace and also mapped explicitly to the <markup role="xml_namespace_prefix">cellml</markup> prefix. The default namespace declaration (which looks like an <markup role="xml_attribute">xmlns</markup> attribute) means that the <markup role="xml_element">model</markup> element is itself in the CellML namespace. As such, it can be identified by any namespace-aware XML parser as a CellML element. In addition, any child elements that are not placed in another namespace, or that do not declare a new default namespace, will also be in the CellML namespace. Mapping the CellML namespace to the <markup role="xml_namespace_prefix">cellml</markup> prefix simplifies the declaration of elements and attributes in the CellML namespace later in the file. For instance, the <markup role="xml_namespace_prefix">cellml</markup> prefix can be used to place the <markup role="xml_attribute">units</markup> attribute on the <markup role="xml_element">cn</markup> element (which is in the MathML namespace) in the CellML namespace. The declaration of the CellML namespace as both the default namespace and as a namespace mapped to the <markup role="xml_namespace_prefix">cellml</markup> prefix is recommended practice for any <markup role="xml_element">model</markup> element.
</para>
<para>
The model element also defines the CellML Metadata namespace and maps it to the <markup role="xml_namespace_prefix">cmeta</markup> prefix. This allows the <markup role="xml_attribute">id</markup> attribute to be placed in the CellML Metadata namespace.
</para>
</sect2>
<sect2 id="sec_declaration_of_units">
<title>Declaration of units</title>
<para>
The CellML Specification defines a <ulink url="${HTML_SPEC_20010810_UNITS}#sec_units_cellml_units_dictionary">standard dictionary of units</ulink> that can be used in CellML models without further definition. This dictionary consists of the base SI units (as defined by the <ulink url="http://www.bipm.fr/">Bureau International des Poids et Mesures</ulink>) and some additional units commonly found in the types of biological models likely to be defined using CellML.
</para>
<para>
A modeller who wishes to use units not declared in the standard dictionary can define additional units in the CellML model document. The units definitions from the Hodgkin Huxley model are shown in <xref linkend="fig_declaration_of_units" />. These units definitions occur immediately within the root <markup role="xml_element">model</markup> element, giving them document-wide scope.
</para>
<informalfigure float="0" id="fig_declaration_of_units">
<literallayout class="normal" format="linespecific">
<embeddedxml>
<units name="millisecond">
<unit units="second" prefix="milli" />
</units>
<units name="per_millisecond">
<unit units="second" prefix="milli" exponent="-1" />
</units>
<units name="millivolt">
<unit units="volt" prefix="milli" />
</units>
<units name="milliS_per_cm2">
<unit units="siemens" prefix="milli" />
<unit units="metre" prefix="centi" exponent="-2" />
</units>
<units name="microF_per_cm2">
<unit units="farad" prefix="micro" />
<unit units="metre" prefix="centi" exponent="-2" />
</units>
<units name="microA_per_cm2">
<unit units="ampere" prefix="micro" />
<unit units="metre" prefix="centi" exponent="-2" />
</units>
</embeddedxml>
</literallayout>
<caption>The units definitions from the CellML description of the Hodgkin-Huxley model.</caption>
</informalfigure>
<para>
The units definitions are declared with a set of <markup role="xml_element">units</markup> elements. Each <markup role="xml_element">units</markup> element must have a <markup role="xml_attribute">name</markup> attribute, which declares an identifier that can then be referenced in the <markup role="xml_attribute">units</markup> attribute on <markup role="xml_element">variable</markup> and <markup role="xml_element">cn</markup> elements (<markup role="xml_element">cn</markup> elements enclose bare numbers in MathML).
</para>
<para>
Each <markup role="xml_element">units</markup> element may contain one or more <markup role="xml_element">unit</markup> elements. The units defined by the <markup role="xml_element">units</markup> element are a combination of the contents of these <markup role="xml_element">unit</markup> elements. <ulink url="${HTML_SPEC_20010810_UNITS}#sec_units_user_defined_units">Section 5.2.2</ulink> of the CellML Specification explains how the attributes for each <markup role="xml_element">unit</markup> element contribute to a new units definition. CellML processing software may choose to use these units definitions to verify the consistency of units across connections (inserting scale-factors, if appropriate) and check the dimensions of equations, as described in <ulink url="${HTML_SPEC_20010810_UNITS}#sec_units_conversion_between_units_definitions">Section 5.2.6</ulink> and <ulink url="${HTML_SPEC_20010810_UNITS}#sec_units_equation_dimension_checking">Section 5.2.7</ulink> of the CellML Specification, respectively.
</para>
</sect2>
<sect2 id="sec_model_components">
<title>Model components</title>
<para>
The CellML definition of the Hodgkin-Huxley model consists of a total of eight components. Seven of these correspond to physiological entities and were shown in the diagram in <xref linkend="fig_cellml_rendering" />. Within each component variables are declared for use within the mathematics that determine the model's function. The interface on each variable declaration determines whether the value of the variable is calculated in the current component and exported, or calculated elsewhere and imported. The last component represents the model's environment. This is a convenient container for variables and constants that are global to the model, and for variables that are not associated with any other component.
</para>
<para>
In the subsequent sections, the components corresponding to the environment, membrane, sodium channel, and sodium channel activation gate are all examined in detail. The remainder of the components closely resemble one of the components discussed and are not examined here.
</para>
<sect3 id="sec_environment_component">
<title>The environment component</title>
<para>
The first <markup role="xml_element">component</markup> element defined in the CellML description of the Hodgkin-Huxley model has an identifier of <markup role="xml_element_name">environment</markup>. The complete definition is given in <xref linkend="fig_the_environment_component" />. As the name suggests, this component does not correspond to a physical compartment in a cell, but rather is an abstract container used to define variables whose reach or scope could be thought of as <emphasis>global</emphasis>.
</para>
<informalfigure float="0" id="fig_the_environment_component">
<literallayout class="normal" format="linespecific">
<embeddedxml>
<component name="environment">
<variable units="millisecond" public_interface="out" name="time" />
</component>
</embeddedxml>
</literallayout>
<caption>The <markup role="xml_element_name">environment</markup> component represents a convenient abstract container, which is used to define the independent variable <markup role="xml_element_name">time</markup> separately from the rest of the model.</caption>
</informalfigure>
<para>
In the Hodgkin-Huxley model, the only global variable is the independent variable <markup role="xml_element_name">time</markup>. In CellML models no variables are given any kind of precedence or implicitly assumed to exist. This makes the model definition more robust and model components more re-usable. It is therefore necessary to declare variables to represent time and space if they are needed in a model, but it is not necessary to indicate that a variable like time is an independent variable, as this can be determined from analysis of the differential equations. One could theoretically call the variable that represents time <markup role="xml_element_name">A1</markup> and use the names <markup role="xml_element_name">t</markup> and <markup role="xml_element_name">time</markup> to represent other concepts in your model. It would be unwise to use the names <markup role="xml_element_name">time</markup> and <markup role="xml_element_name">t</markup> to represent anything other than time, or the names <markup role="xml_element_name">x</markup>, <markup role="xml_element_name">y</markup>, or <markup role="xml_element_name">z</markup> to represent anything other than space. Doing so would make it more difficult for other model authors to re-use your work.
</para>
<para>
Note that the name <markup role="xml_element_name">environment</markup> has no special significance, but is simply a human-readable identifier enabling the modeller to determine the purpose of this component. We expect that software would make use of ontology or metadata information associated with the component to work out that this component would not be rendered in the same way as the <markup role="xml_element_name">membrane</markup> component, for example.
</para>
</sect3>
<sect3 id="sec_membrane_component">
<title>The membrane component</title>
<para>
The component at the root of the geometric hierarchy defined within the model is a component with an identifier of <markup role="xml_element_name">membrane</markup>, the full definition of which is shown in <xref linkend="fig_membrane_component" />.
</para>
<informalfigure float="0" id="fig_membrane_component">
<literallayout class="normal" format="linespecific">
<embeddedxml>
<component xmlns:cmeta="cmeta" name="membrane">
<!-- these variables are defined here and used in other components -->
<variable name="V" initial_value="-75.0" xpp:ncols="2" xpp:indent="6" units="millivolt" public_interface="out" />
<variable name="E_R" initial_value="-75.0" xpp:ncols="2" xpp:indent="6" units="millivolt" public_interface="out" />
<!-- these variables are defined here and only used internally -->
<variable units="microF_per_cm2" name="Cm" initial_value="1.0" />
<variable units="microA_per_cm2" name="I" initial_value="0.0" />
<!-- these variables are imported from other components -->
<variable units="millisecond" public_interface="in" name="time" />
<variable units="microA_per_cm2" public_interface="in" name="i_Na" />
<variable
This CellML file was generated on 14/06/2005 at 13:34:14 using:
COR (0.9.31.69)
Copyright 2002-2005 Oxford Cardiac Electrophysiology Group
http://COR.physiol.ox.ac.uk/ - COR@physiol.ox.ac.uk
CellML 1.0 was used to generate this cellular model
http://www.CellML.org/
-->
<model xmlns:vCard="http://www.w3.org/2001/vcard-rdf/3.0#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:cellml="http://www.cellml.org/cellml/1.0#" xmlns:bqs="http://www.cellml.org/bqs/1.0#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cmeta="http://www.cellml.org/metadata/1.0#" xmlns:xpp="http://www.physiome.org.nz/xml_pretty_printer" xmlns="http://www.cellml.org/cellml/1.0#" cmeta:id="hodgkin_huxley_squid_axon_1952" name="hodgkin_huxley_squid_axon_1952">
<documentation xmlns="http://cellml.org/tmp-documentation">
<article>
<articleinfo>
<title>Hodgkin Huxley Squid Axon Model 1952</title>
<authorgroup>
<author>
<firstname>Warren</firstname>
<surname>Hedley</surname>
<affiliation>
<shortaffil>Bioengineering Institute, University of Auckland</shortaffil>
</affiliation>
</author>
<author>
<firstname>Geoff</firstname>
<surname>Carden</surname>
<affiliation>
<shortaffil>Bioengineering Institute, University of Auckland</shortaffil>
</affiliation>
</author>
<author>
<firstname>Autumn</firstname>
<surname>Cuellar</surname>
<affiliation>
<shortaffil>Bioengineering Institute, University of Auckland</shortaffil>
</affiliation>
</author>
<collab>
<collabname>Greg Sands</collabname>
<affiliation>
<shortaffil>Bioengineering Institute, University of Auckland</shortaffil>
</affiliation>
</collab>
<collab>
<collabname>David Nickerson</collabname>
<affiliation>
<shortaffil>Bioengineering Institute, University of Auckland</shortaffil>
</affiliation>
</collab>
</authorgroup>
</articleinfo>
<section id="sec_status">
<title>Model Status</title>
<para>
This version was created by Penny Noble of Oxford University and is known to run in COR and PCEnv. The intial voltage membrane potential was changed from 0 mV to the correct value of -75 mV.
</para>
</section>
<sect1 id="sec_introduction">
<title>Introduction</title>
<para>
In a series of papers published in 1952, A.L. Hodgkin and A.F. Huxley presented the results of a series of experiments in which they investigated the flow of electric current through the surface membrane of the giant nerve fibre of a squid. In the summary paper of the Hodgkin and Huxley model, the authors developed a mathematical description of the behaviour of the membrane based upon these experiments, which accounts for the conduction and excitation of the fibre. The form of this description has been used as the basis for almost all other ionic current models of excitable tissues, including Purkinje fibres and cardiac atrial and ventricular muscle.
</para>
<para>
The summary paper is:
</para>
<para>
A Quantitative Description of Membrane Current and its Application to Conduction and Excitation in Nerve, A. L. Hodgkin and A. F. Huxley, 1952, <emphasis>J. Physiol</emphasis>, 117, 500-544
</para>
</sect1>
<sect1 id="sec_status_of_the_model">
<title>Status of the Model and Documentation</title>
<para>
The CellML description of the Hodgkin-Huxley model (which can be downloaded in various formats as described in <xref linkend="sec_download_this_model" />) and documentation were revised and updated in September 2003 to conform to the 10 August 2001 version of the <ulink url="${HTML_SPEC_20010810_OVERVIEW}">CellML 1.0 Specification</ulink> and the 16 January 2002 version of the <ulink url="${HTML_METADATA_20020116_OVERVIEW}">CellML Metadata 1.0 Specification</ulink>.
</para>
<para>
The model description itself is intended to demonstrate the best practices for the definition of electrophysiological models using CellML, as intended by the authors of the CellML Specification.
</para>
<para>
The metadata included in the CellML description should not be regarded as a demonstration of best practice for metadata. It is neither complete nor final, as the version of the CellML Metadata Specification on which it is based has a status of <emphasis>Research Summary</emphasis>.
</para>
</sect1>
<sect1 id="sec_hodgkin_huxley_model_overview">
<title>Hodgkin Huxley Model Overview</title>
<para>
The current flow across the cell membrane depends on the capacitance of the membrane and the resistance of the ion channels. The total ionic current is represented by the sum of the sodium current, potassium current and a small leakage current. The leakage current represents the collective contribution of ions such as chloride and bicarbonate. Hodgkin and Huxley developed an electrical circuit diagram to represent the ion flows in their model. A modified version of this diagram is shown in <xref linkend="fig_circuit_diagram" />, where the currents have been reversed to be consistent with the convention proposed by Noble, commonly adopted for cardiac muscle.
</para>
<informalfigure float="0" id="fig_circuit_diagram">
<mediaobject>
<imageobject>
<objectinfo>
<title>Electrical circuit describing the current across the cell membrane</title>
</objectinfo>
<imagedata fileref="../images/hh_squid_axon_1952/circuit_diagram.gif" />
</imageobject>
</mediaobject>
<caption>An electrical circuit diagram describing the current flows across the cell membrane that are captured in the Hodgkin Huxley model.</caption>
</informalfigure>
<para>
The current is represented mathematically as the sum of the resistive and capacitive components. The capacitive component <emphasis>Icap</emphasis> is derived from Ohm's law, where <emphasis>Cm</emphasis> and <emphasis>Vm</emphasis> denote the membrane capacitance and trans-membrane voltage, respectively.
</para>
<informalequation id="eqn_capacitive_current">
<cwml_equation>
I_{cap} = C_m \cdot \frac{d V_m}{d t}
</cwml_equation>
</informalequation>
<para>
The resistive components are characterised in the original model as conductances (<emphasis>g</emphasis>), the reciprocals of the resistances. The currents are dependent on the transmembrane voltage (<emphasis>Vm</emphasis>) and the equilibrium potentials (<emphasis>E</emphasis>) of the individual ions. There are two forces driving the ion flux: the chemical gradient of the ions and the electrical gradient resulting from the different concentrations of charged particles on each side of the membrane. The equilibrium potential or reversal potential arises from equating the electrical and chemical potentials. The difference between the equilibrium potential for an ion and the transmembrane potential is the driving force for the ionic flow. The resistive currents can therefore be written:
</para>
<informalequation id="eqn_resistive_current">
<cwml_equation>
I_{ion} = g_{ion} \cdot (V_m - E_{ion})
</cwml_equation>
</informalequation>
<para>
The experiments suggested that <emphasis>gNa</emphasis> and <emphasis>gK</emphasis> were time dependent but the conductances of the other ions could be considered to be constant. Depolarisation of the membrane causes a fast transient increase in sodium conductance and a gradual and sustained increase in potassium conductance. The time dependence is represented by a gate variable or activation coefficient <emphasis>x</emphasis> which indicates the probability of a gate in the channel being open. The conductance for a time dependent channel can thus be written in terms of its gate variable <emphasis>x</emphasis> (<emphasis>0 <= x <= 1</emphasis>) and a maximum conductance <emphasis>gion,max</emphasis> as follows:
</para>
<informalequation id="eqn_resistive_current_in_terms_of_gate_variable">
<cwml_equation>
g_{ion} = g_{ion,max} \cdot x
</cwml_equation>
</informalequation>
<para>
where <emphasis>x</emphasis> satisfies the differential equation:
</para>
<informalequation id="eqn_gate_variable_equation">
<cwml_equation>
\frac{d x}{d t} = \alpha_x \cdot (1 - x) - \beta_x \cdot x
</cwml_equation>
</informalequation>
<para>
<emphasis>αx</emphasis> and <emphasis>βx</emphasis> are rate coefficients which are a non-linear functions of voltage and have the units of 1/time.
</para>
<!-- 16/07/2001 - WJH - This stuff is fairly irrelevant
<paragraph>
<cwml_equation_reference href="gate_variable_equation" /> can be rewritten as:
</paragraph>
<cwml_equation name="">
\frac{d n}{d t} = -\frac{n - n_{\inf}}{\tau_x}
</cwml_equation>
<paragraph>
where
</paragraph>
<cwml_equation name="">
\tau_x = \frac{1}{\alpha_x + \beta_x}
</cwml_equation>
<cwml_equation name="">
x_{\inf} = \frac{\alpha_x}{\alpha_x + \beta_x}
</cwml_equation>
<paragraph>
When <cwml_variable>V<sub>m</sub></cwml_variable> is held constant the solution to the equation becomes:
</paragraph>
<cwml_equation name="">
x(t) = x_{\inf} - (x_{\inf} - x_0)exp(\frac{-t}{tau_x})
</cwml_equation>
<paragraph>
satisfying the boundary conditions <cwml_variable>x = x<sub>0</sub></cwml_variable> then t = 0. An example of this type of channel is in the potassium channel responsible for the repolarisation phase after the action potential
</paragraph>
-->
<para>
The activation coefficient can be raised to the power of <emphasis>k</emphasis> if there are <emphasis>k</emphasis> gates in series in one ion channel. Channels can also be given more then one gate variable to describe activation-inactivation behaviour. This gives current equations of the form:
</para>
<informalequation id="eqn_activation_inactivation_current">
<cwml_equation>
I_{ion} = g_{ion,max} \cdot x \cdot y \cdot (V_m - E_{ion})
</cwml_equation>
</informalequation>
<para>
where <emphasis>x</emphasis> is the activation variable and <emphasis>y</emphasis> is the inactivation variable. The rate coefficients for the inactivation variable <emphasis>αy</emphasis> and <emphasis>βy</emphasis> are in general much slower than the rate coefficients for the activation variable. An example of this type of channel is the fast sodium channel involved in the depolarisation of the membrane to generate the upstroke of the action potential.
</para>
<sect2 id="sec_sodium_conductance">
<title>Sodium conductance</title>
<para>
The sodium conductance control theory that Hodgkin and Huxley chose to adopt involved two control particles. The first moves out of an inhibitory site when the transmembrane potential reaches a threshold allowing sodium ions to flow though the channel. A second inhibitory particle moves slowly to occupy the inhibitory site and stop the ion flow. These are represented by two variables each governed by a first order differential equation. The conductance is then expressed:
</para>
<informalequation id="eqn_sodium_conductance">
<cwml_equation>
g_{Na} = g_{Na,max} \cdot m^3 \cdot h
</cwml_equation>
</informalequation>
<para>
where <emphasis>m</emphasis> is an activation coefficient, <emphasis>h</emphasis> is an inactivation coefficient and <emphasis>gNa,max</emphasis> is the maximum sodium conductance. Both activation and inactivation variables are governed by the differential equations
</para>
<informalequation id="eqn_dm_dt">
<cwml_equation>
\frac{d m}{d t} = \alpha_m \cdot (1 - m) - \beta_m \cdot m
</cwml_equation>
</informalequation>
<informalequation id="eqn_dh_dt">
<cwml_equation>
\frac{d h}{d t} = \alpha_h \cdot (1 - h) - \beta_h \cdot h
</cwml_equation>
</informalequation>
<para>
where the rate constants <emphasis>α</emphasis> and <emphasis>β</emphasis> are functions of voltage but not of time. Expressions for rate constants were found by fitting curves to experimental data from nerve fibres to give:
</para>
<informalequation id="eqn_alpha_m">
<cwml_equation>
\alpha_m = \frac{0.1 \cdot (V_m + 25.0)}{exp\left(0.1 \cdot (V_m + 25.0)\right) - 1.0}
</cwml_equation>
</informalequation>
<informalequation id="eqn_beta_m">
<cwml_equation>
\beta_m = 4 \cdot exp\left(\frac{V_m}{18.0}\right)
</cwml_equation>
</informalequation>
<informalequation id="eqn_alpha_h">
<cwml_equation>
\alpha_h = 0.07 \cdot exp\left(\frac{V_m}{20.0}\right)
</cwml_equation>
</informalequation>
<informalequation id="eqn_beta_h">
<cwml_equation>
\beta_h = \frac{1.0}{exp\left(0.1 \cdot (V_m + 30.0)\right) + 1.0}
</cwml_equation>
</informalequation>
<para>
The total sodium current is then given by
</para>
<informalequation id="eqn_sodium_current">
<cwml_equation>
\begin{split}
i_{Na} &= g_{Na} \cdot (V_m - E_{Na}) \\
&= g_{Na,max} \cdot m^3 \cdot h \cdot (V_m - E_{Na})
\end{split}
</cwml_equation>
</informalequation>
<para>
where <emphasis>ENa</emphasis> is the reversal potential for the sodium channel.
</para>
</sect2>
<sect2 id="sec_potassium_conductance">
<title>Potassium conductance</title>
<para>
The potassium conductance can be modelled similarly, but there are only activation type channels for potassium. The equations are:
</para>
<informalequation id="eqn_potassium_conductance">
<cwml_equation>
g_K = g_{K,max} \cdot n^4
</cwml_equation>
</informalequation>
<informalequation id="eqn_dn_dt">
<cwml_equation>
\frac{d n}{d t} = \alpha_n \cdot (1 - n) - \beta_n \cdot n
</cwml_equation>
</informalequation>
<informalequation id="eqn_alpha_n">
<cwml_equation>
\alpha_n = \frac{0.01 \cdot (V_m + 10.0)}{exp(0.1 \cdot (V_m + 10.0)) - 1.0}
</cwml_equation>
</informalequation>
<informalequation id="eqn_beta_n">
<cwml_equation>
\beta_n = 0.125 \cdot exp\left(\frac{V_m}{80.0}\right)
</cwml_equation>
</informalequation>
<para>
where <emphasis>n</emphasis> is the activation coefficient for the potassium channel, <emphasis>gK,max</emphasis> is the maximum conductance of potassium and <emphasis>αn</emphasis> and <emphasis>βn</emphasis> are the voltage dependent rate constants.
</para>
<para>
The total potassium current is then given by
</para>
<informalequation id="eqn_potassium_current">
<cwml_equation>
\begin{split}
i_{K} &= g_{K} \cdot (V_m - E_{K}) \\
&= g_{K,max} \cdot n^4(V_m - E_{K})
\end{split}
</cwml_equation>
</informalequation>
<para>
where <emphasis>EK</emphasis> is the reversal potential for the potassium channel.
</para>
</sect2>
<sect2 id="sec_leakage_current">
<title>Leakage current</title>
<para>
The full Hodgkin Huxley model also included the leakage current to maintain the constant resting membrane potential in the absence of any depolarisation. The leakage current is given by
</para>
<informalequation id="eqn_leakage_current">
<cwml_equation>
i_L = g_L \cdot (V_m - E_L)
</cwml_equation>
</informalequation>
<para>
where <emphasis>EL</emphasis> is the reversal potential for the leakage current.
</para>
</sect2>
<sect2 id="sec_full_hodgkin_huxley_model">
<title>Putting it all together</title>
<para>
The full Hodgkin Huxley membrane current model is assembled by now combining the capacitive and resistive currents across the membrane into a single equation.
</para>
<informalequation id="eqn_full_model">
<cwml_equation>
I = C_m \cdot \frac{d V_m}{d t} + i_{Na} + i_{K} + i_{L}
</cwml_equation>
</informalequation>
<para>
All the equilibrium potentials are related to the resting membrane potential <emphasis>ER</emphasis>. The set of values used in the model are given in the table <xref linkend="table_constant_values" />.
</para>
<informaltable id="table_constant_values">
<tgroup cols="3">
<thead>
<row>
<entry>Constant</entry>
<entry>Units</entry>
<entry>Value</entry>
</row>
</thead>
<tbody>
<thead>
<row>
<entry>Constant</entry>
<entry>Units</entry>
<entry>Value</entry>
</row>
</thead>
<row>
<entry>
<emphasis>Cm</emphasis>
</entry>
<entry>μF cm<superscript>-2</superscript>
</entry>
<entry>1.0</entry>
</row>
<row>
<entry>
<emphasis>ER</emphasis>
</entry>
<entry>mV</entry>
<entry>-75.0</entry>
</row>
<row>
<entry>
<emphasis>ENa</emphasis>
</entry>
<entry>mV</entry>
<entry>
<emphasis>ER</emphasis> + 115.0</entry>
</row>
<row>
<entry>
<emphasis>EK</emphasis>
</entry>
<entry>mV</entry>
<entry>
<emphasis>ER</emphasis> - 12.0</entry>
</row>
<row>
<entry>
<emphasis>EL</emphasis>
</entry>
<entry>mV</entry>
<entry>
<emphasis>ER</emphasis> + 10.613</entry>
</row>
<row>
<entry>
<emphasis>gNa,max</emphasis>
</entry>
<entry>mS cm<superscript>-2</superscript>
</entry>
<entry>120.0</entry>
</row>
<row>
<entry>
<emphasis>gK,max</emphasis>
</entry>
<entry>mS cm<superscript>-2</superscript>
</entry>
<entry>36.0</entry>
</row>
<row>
<entry>
<emphasis>gL</emphasis>
</entry>
<entry>mS cm<superscript>-2</superscript>
</entry>
<entry>0.3</entry>
</row>
</tbody>
</tgroup>
<caption>
Values for constants in the Hodgkin-Huxley equations.
</caption>
</informaltable>
</sect2>
</sect1>
<sect1 id="sec_representing_in_cellml">
<title>Representing the Model in CellML</title>
<para>
In CellML any model is represented by a network of components, typically chosen to reflect the natural physical entities in the system. Information is passed from one component to another through connections. A diagram showing the network defined in the CellML description of the Hodgkin-Huxley model is shown in <xref linkend="fig_cellml_rendering" />.
</para>
<informalfigure float="0" id="fig_cellml_rendering">
<mediaobject>
<imageobject>
<objectinfo>
<title>the cellml rendering of the hodgkin huxley squid axon model</title>
</objectinfo>
<imagedata fileref="../images/hh_squid_axon_1952/cellml_model.gif" />
</imageobject>
</mediaobject>
<caption>The network defined in the CellML description of the Hodgkin-Huxley model. Where a variable is passed from one component to another along a connection, the name of the variable is shown next to the component in which it is declared with a public or private interface value of <markup role="xml_attribute_value">out</markup>. The <markup role="xml_element_name">environment</markup> component discussed in <xref linkend="sec_environment_component" /> is not included in this diagram. A key describing the significance of the shapes of the components and the colours of the connections between them is in the <ulink url="${HTML_EXMPL_GRAPHICAL_NOTATION}">notation guide</ulink>.</caption>
</informalfigure>
<para>
At the highest level, the model consists of four components with identifiers <markup role="xml_element_name">membrane</markup>, <markup role="xml_element_name">sodium_channel</markup>, <markup role="xml_element_name">potassium_channel</markup> and <markup role="xml_element_name">leakage_current</markup>. The membrane physically contains the two channels and the leakage current, as indicated by the blue arrows in <xref linkend="fig_cellml_rendering" />. The channels and current act independently and are not connected to each other. Both the sodium and potassium channels encapsulate <emphasis>and</emphasis> contain further components: the sodium channel contains two components representing the m and h gates, and the potassium channel contains a component representing the n gate. The addition of an encapsulation relationship between the sodium channel and the m and h gates informs modellers and processing software that the m and h gates are important parts of the sodium channel model. It also prevents any other components that aren't also encapsulated by the sodium channel component from connecting to the m and h gates, effectively hiding them from the rest of the model.
</para>
<para>
CellML processing software might choose to use the containment and encapsulation information in the model definition for the rendering of the model. An initial rendering might have the sodium channel, potassium channel, and leakage currents drawn inside the membrane component. Some label might indicate that the sodium and potassium channel components contain hidden detail. When the user double clicks on the sodium channel, they are shown the hidden m and h gate components.
</para>
<para>
The breakdown of the model into components and the definition of encapsulation and containment relationships between them is somewhat arbitrary. When considering how a model should be broken into components, modellers are encouraged to consider which parts of a model might be re-used, and how the physiological elements of the system being modelled are naturally bounded. Containment relationships should be used to provide simple rendering information for processing software (ideally, this will correspond to the layout of the physical system), and encapsulation should be used to group sets of components into sub-models.
</para>
</sect1>
<sect1 id="sec_analysis_of_code">
<title>Analysis of the CellML Code</title>
<sect2 id="sec_the_model_element">
<title>The model element</title>
<para>
The root element of the XML document containing the CellML definition of the Hodgkin-Huxley model is the <markup role="xml_element">model</markup> element shown in <xref linkend="fig_the_model_element" />. (At this point, those not familiar with XML may want to consult the <ulink url="${HTML_XML_EXMPL_GUIDE}">quick introduction to XML</ulink> for help with understanding XML terms.) The <markup role="xml_element">model</markup> element defines a <markup role="xml_attribute">name</markup> attribute that allows this model to be unambiguously referenced by other models. For instance, this would be necessary if this model were to be combined with other models or partial models to create a larger model. It also defines an <markup role="xml_attribute">id</markup> attribute in the CellML Metadata namespace (which is mapped to the <markup role="xml_namespace_prefix">cmeta</markup> prefix). This <markup role="xml_attribute">id</markup> attribute is of XML type ID and may be used to attach metadata to this element, as discussed in <xref linkend="sec_model_metadata" />.
</para>
<informalfigure float="0" id="fig_the_model_element">
<literallayout class="normal" format="linespecific">
<embeddedxml>
<model xmlns="http://www.cellml.org/cellml/1.0#" name="hodgkin_huxley_squid_axon_1952" xpp:indent="4" cmeta:id="hodgkin_huxley_squid_axon_1952">
...
</model>
</embeddedxml>
</literallayout>
<caption>The root element of the XML document containing the CellML description of the Hodgkin-Huxley model is the <markup role="xml_element">model</markup> element shown above.</caption>
</informalfigure>
<para>
The <markup role="xml_element">model</markup> element also defines two XML namespaces. The first is the CellML namepsace, which is set to the default namespace and also mapped explicitly to the <markup role="xml_namespace_prefix">cellml</markup> prefix. The default namespace declaration (which looks like an <markup role="xml_attribute">xmlns</markup> attribute) means that the <markup role="xml_element">model</markup> element is itself in the CellML namespace. As such, it can be identified by any namespace-aware XML parser as a CellML element. In addition, any child elements that are not placed in another namespace, or that do not declare a new default namespace, will also be in the CellML namespace. Mapping the CellML namespace to the <markup role="xml_namespace_prefix">cellml</markup> prefix simplifies the declaration of elements and attributes in the CellML namespace later in the file. For instance, the <markup role="xml_namespace_prefix">cellml</markup> prefix can be used to place the <markup role="xml_attribute">units</markup> attribute on the <markup role="xml_element">cn</markup> element (which is in the MathML namespace) in the CellML namespace. The declaration of the CellML namespace as both the default namespace and as a namespace mapped to the <markup role="xml_namespace_prefix">cellml</markup> prefix is recommended practice for any <markup role="xml_element">model</markup> element.
</para>
<para>
The model element also defines the CellML Metadata namespace and maps it to the <markup role="xml_namespace_prefix">cmeta</markup> prefix. This allows the <markup role="xml_attribute">id</markup> attribute to be placed in the CellML Metadata namespace.
</para>
</sect2>
<sect2 id="sec_declaration_of_units">
<title>Declaration of units</title>
<para>
The CellML Specification defines a <ulink url="${HTML_SPEC_20010810_UNITS}#sec_units_cellml_units_dictionary">standard dictionary of units</ulink> that can be used in CellML models without further definition. This dictionary consists of the base SI units (as defined by the <ulink url="http://www.bipm.fr/">Bureau International des Poids et Mesures</ulink>) and some additional units commonly found in the types of biological models likely to be defined using CellML.
</para>
<para>
A modeller who wishes to use units not declared in the standard dictionary can define additional units in the CellML model document. The units definitions from the Hodgkin Huxley model are shown in <xref linkend="fig_declaration_of_units" />. These units definitions occur immediately within the root <markup role="xml_element">model</markup> element, giving them document-wide scope.
</para>
<informalfigure float="0" id="fig_declaration_of_units">
<literallayout class="normal" format="linespecific">
<embeddedxml>
<units name="millisecond">
<unit units="second" prefix="milli" />
</units>
<units name="per_millisecond">
<unit units="second" prefix="milli" exponent="-1" />
</units>
<units name="millivolt">
<unit units="volt" prefix="milli" />
</units>
<units name="milliS_per_cm2">
<unit units="siemens" prefix="milli" />
<unit units="metre" prefix="centi" exponent="-2" />
</units>
<units name="microF_per_cm2">
<unit units="farad" prefix="micro" />
<unit units="metre" prefix="centi" exponent="-2" />
</units>
<units name="microA_per_cm2">
<unit units="ampere" prefix="micro" />
<unit units="metre" prefix="centi" exponent="-2" />
</units>
</embeddedxml>
</literallayout>
<caption>The units definitions from the CellML description of the Hodgkin-Huxley model.</caption>
</informalfigure>
<para>
The units definitions are declared with a set of <markup role="xml_element">units</markup> elements. Each <markup role="xml_element">units</markup> element must have a <markup role="xml_attribute">name</markup> attribute, which declares an identifier that can then be referenced in the <markup role="xml_attribute">units</markup> attribute on <markup role="xml_element">variable</markup> and <markup role="xml_element">cn</markup> elements (<markup role="xml_element">cn</markup> elements enclose bare numbers in MathML).
</para>
<para>
Each <markup role="xml_element">units</markup> element may contain one or more <markup role="xml_element">unit</markup> elements. The units defined by the <markup role="xml_element">units</markup> element are a combination of the contents of these <markup role="xml_element">unit</markup> elements. <ulink url="${HTML_SPEC_20010810_UNITS}#sec_units_user_defined_units">Section 5.2.2</ulink> of the CellML Specification explains how the attributes for each <markup role="xml_element">unit</markup> element contribute to a new units definition. CellML processing software may choose to use these units definitions to verify the consistency of units across connections (inserting scale-factors, if appropriate) and check the dimensions of equations, as described in <ulink url="${HTML_SPEC_20010810_UNITS}#sec_units_conversion_between_units_definitions">Section 5.2.6</ulink> and <ulink url="${HTML_SPEC_20010810_UNITS}#sec_units_equation_dimension_checking">Section 5.2.7</ulink> of the CellML Specification, respectively.
</para>
</sect2>
<sect2 id="sec_model_components">
<title>Model components</title>
<para>
The CellML definition of the Hodgkin-Huxley model consists of a total of eight components. Seven of these correspond to physiological entities and were shown in the diagram in <xref linkend="fig_cellml_rendering" />. Within each component variables are declared for use within the mathematics that determine the model's function. The interface on each variable declaration determines whether the value of the variable is calculated in the current component and exported, or calculated elsewhere and imported. The last component represents the model's environment. This is a convenient container for variables and constants that are global to the model, and for variables that are not associated with any other component.
</para>
<para>
In the subsequent sections, the components corresponding to the environment, membrane, sodium channel, and sodium channel activation gate are all examined in detail. The remainder of the components closely resemble one of the components discussed and are not examined here.
</para>
<sect3 id="sec_environment_component">
<title>The environment component</title>
<para>
The first <markup role="xml_element">component</markup> element defined in the CellML description of the Hodgkin-Huxley model has an identifier of <markup role="xml_element_name">environment</markup>. The complete definition is given in <xref linkend="fig_the_environment_component" />. As the name suggests, this component does not correspond to a physical compartment in a cell, but rather is an abstract container used to define variables whose reach or scope could be thought of as <emphasis>global</emphasis>.
</para>
<informalfigure float="0" id="fig_the_environment_component">
<literallayout class="normal" format="linespecific">
<embeddedxml>
<component name="environment">
<variable units="millisecond" public_interface="out" name="time" />
</component>
</embeddedxml>
</literallayout>
<caption>The <markup role="xml_element_name">environment</markup> component represents a convenient abstract container, which is used to define the independent variable <markup role="xml_element_name">time</markup> separately from the rest of the model.</caption>
</informalfigure>
<para>
In the Hodgkin-Huxley model, the only global variable is the independent variable <markup role="xml_element_name">time</markup>. In CellML models no variables are given any kind of precedence or implicitly assumed to exist. This makes the model definition more robust and model components more re-usable. It is therefore necessary to declare variables to represent time and space if they are needed in a model, but it is not necessary to indicate that a variable like time is an independent variable, as this can be determined from analysis of the differential equations. One could theoretically call the variable that represents time <markup role="xml_element_name">A1</markup> and use the names <markup role="xml_element_name">t</markup> and <markup role="xml_element_name">time</markup> to represent other concepts in your model. It would be unwise to use the names <markup role="xml_element_name">time</markup> and <markup role="xml_element_name">t</markup> to represent anything other than time, or the names <markup role="xml_element_name">x</markup>, <markup role="xml_element_name">y</markup>, or <markup role="xml_element_name">z</markup> to represent anything other than space. Doing so would make it more difficult for other model authors to re-use your work.
</para>
<para>
Note that the name <markup role="xml_element_name">environment</markup> has no special significance, but is simply a human-readable identifier enabling the modeller to determine the purpose of this component. We expect that software would make use of ontology or metadata information associated with the component to work out that this component would not be rendered in the same way as the <markup role="xml_element_name">membrane</markup> component, for example.
</para>
</sect3>
<sect3 id="sec_membrane_component">
<title>The membrane component</title>
<para>
The component at the root of the geometric hierarchy defined within the model is a component with an identifier of <markup role="xml_element_name">membrane</markup>, the full definition of which is shown in <xref linkend="fig_membrane_component" />.
</para>
<informalfigure float="0" id="fig_membrane_component">
<literallayout class="normal" format="linespecific">
<embeddedxml>
<component xmlns:cmeta="cmeta" name="membrane">
<!-- these variables are defined here and used in other components -->
<variable name="V" initial_value="-75.0" xpp:ncols="2" xpp:indent="6" units="millivolt" public_interface="out" />
<variable name="E_R" initial_value="-75.0" xpp:ncols="2" xpp:indent="6" units="millivolt" public_interface="out" />
<!-- these variables are defined here and only used internally -->
<variable units="microF_per_cm2" name="Cm" initial_value="1.0" />
<variable units="microA_per_cm2" name="I" initial_value="0.0" />
<!-- these variables are imported from other components -->
<variable units="millisecond" public_interface="in" name="time" />
<variable units="microA_per_cm2" public_interface="in" name="i_Na" />
<variable
