basic_ep_model_with_encapsulation_doc

The Simple Electrophysiological Model With Encapsulation

The Simple Electrophysiological Model With Encapsulation

Author:
        Warren Hedley (Bioengineering Institute, University of Auckland)

Introduction

This document presents a slightly more complicated version of the simple electrophysiological model. The modifications made to this model demonstrate the encapsulation functionality of CellML, with which model authors can create models with multiple levels of complexity, effectively hiding unnecessary details from the user by using a single component to provide an interface to a more complex subsystem of components.

Two new components are introduced in this extended model. These components correspond to the sodium and calcium channels in the cell membrane, and are encapsulated inside of the membrane. Why do this? Let us assume that the components containing the variables and mathematics that govern the sodium and calcium currents have been obtained from a database or library of components, and that the calculations specified in these components rely on the ion concentrations in the intra- and extra-cellular components. To obtain the values of the variables representing these concentrations, we would have to connect each of the channel components to the intra- and extra-cellular components, a situation which could easily become quite messy as more channel-like components are added to the membrane. In fact the intra- and extra-cellular components aren't really interested in the inner workings of the membrane. They only need to get the bulk current of each ion across the membrane in order to update the ion concentrations in the intra- and extra-cellular space. If the channels are encapsulated within the membrane, a user could easily experiment with different channel components within the membrane without worrying about having to re-wire the entire model with every change. The user only needs to make sure that each channel correctly interacts with the interface component.

You might find it helpful to refer to a full printout of the CellML document that makes up this example as you progress through this documentation. The various forms available online are presented in the section “Download This Model”.

Model Structure

This model consists of the same simple one-compartment cell model used in the simple electrophysiological model, with the interior of the cell separated from the extra-cellular space by a membrane, as shown in Figure 1. There are two channels in the membrane, through which sodium and calcium ions flow between the extra-cellular subspace and the intra-cellular subspace.

a conventional rendering of the electro-physiological model
Figure 1. The extended model is based on the same one-compartment cell model as the simple electro-physiological model.

The CellML network rendering of the extended model is shown in Figure 2 (those wondering “why the weird shapes?” should consult the notation guide). In the CellML network rendering, the individual channels have components associated with them. The pink arrowheads on the connections between the channel and membrane components indicate that the channels are encapsulated in and contained in the membrane. The encapsulation relationship refers to the logical grouping of the two channel components and the membrane component. The membrane component hides the complexity of the channel components from the rest of the model. The containment relationship refers to the geometric or spatial layout of the model, which is not important for this example.

the cellml rendering of the electro-physiological model
Figure 2. The CellML network defined in the CellML description of the simple electrophysiological model with encapsulation. The diagram shows the five components that represent physiological objects or regions (the intra- and extra-cellular compartments, the membrane and the two channels), four connections, and an encapsulation relationship. The variables in the model are shown next to the components in which they are declared and alongside the lines representing connections that allow the variables to be passed to other components. The environment component has not been included in this diagram.

Figure 2 also shows where variables are declared and how they are passed between components in the model. Variables that are declared in the membrane have two interfaces: a public one for the outside world (i.e., the intra- and extra-cellular components), and a private one for the encapsulated channel components. This is discussed in more detail in the section “The cell_membrane component”.

Analysis of the XML

The following analysis only includes discussion of the changes between this model and the simple electrophysiological model. You should familiarise yourself with that model before working through this example.

The cell_membrane component

The most substantial difference between the simple and extended models is in the definition of the component corresponding to the cell membrane. This component is now acting as an interface component, which hides the complexity of the channels from the intra- and extra-cellular subspaces and passes the appropriate variables between components on the two layers. Because this is just a demonstration example, there is actually no more complexity here than there was in the original simple model. However, there might be several different channel components contributing to each ion current in a more realistic model of the cell. This complexity would be handled by the membrane component, so that the components representing the intra- and extra-cellular spaces would still only need to deal with the total current for each ion. The full definition of the cell_membrane component is shown in Figure 3.




<component name="cell_membrane">

<variable

name="I_Na" public_interface="out"

private_interface="in" units="flux_units" />

<variable

name="I_Ca" public_interface="out"

private_interface="in" units="flux_units" />



<variable

name="Na_i" public_interface="in"

private_interface="out" units="concentration_units" />

<variable

name="Na_e" public_interface="in"

private_interface="out" units="concentration_units" />

<variable

name="Ca_i" public_interface="in"

private_interface="out" units="concentration_units" />

<variable

name="Ca_e" public_interface="in"

private_interface="out" units="concentration_units" />

</component>



Figure 3. The <component> element corresponding to the cell_membrane component from the extended model.

Each channel allows a particular kind of ion through the membrane. The values of these fluxes (or currents) are calculated in the channel components and may be passed to the cell_membrane component by declaring the corresponding variables with a public_interface value of "out". The flux variables are received by the cell_membrane component with a private_interface value of "in" and are then exposed to the intra- and extra-cellular components by giving them a public_interface value of "out". Note that the encapsulation relationship between the channel components and the membrane forbids a direct connection between the intra- and extra-cellular components and the channel components.

The flux calculations in the channel components are dependent on the intra- and extra-cellular ion concentrations. These variables must also be passed through the membrane, but in the opposite direction to the ion fluxes. The concentration variables in the membrane are therefore declared with a public_interface value of "in" and a private_interface value of "out", as shown in Figure 3.

The group element

Figure 4 shows the use of a <group> element to define the encapsulation and geometric relationships between the channel and membrane components. These grouping relationships do not have any mathematical significance; i.e., they do not affect the equations contained in the grouped components or imply any default behaviour in the mapping of variables between these components.




<group choice="opt" rep="norepeat"><relationship_ref relationship="encapsulation" /><relationship_ref relationship="containment" /><component_ref component="cell_membrane">

<component_ref component="sodium_channel" />

<component_ref component="calcium_channel" />

</component_ref></group>



Figure 4. The <group> element from the extended model is used to describe the encapsulation and geometric relationships between the channel and membrane components.

The <group> element contains two <relationship_ref> elements, each of which has a relationship attribute describing a relationship between the cell membrane and the sodium and calcium channel components. The CellML specification expects processing software to only know of and process two classes of grouping relationship: encapsulation and containment. Model authors are free to define other classes of relationship, but CellML software is free to ignore these.

The <component_ref> elements nest inside other <component_ref> elements in order to indicate how the components relate to one another. A relationship attribute value of "encapsulation" signifies that the sodium and calcium channels are logically encapsulated by the cell membrane, and, therefore, are hidden from the intra- and extra-cellular spaces. A relationship attribute value of "containment" indicates that the sodium and calcium channels are physically contained within the cell membrane, as well. For a better understanding of grouping hierarchies, see Section 6.2 of the CellML specification.

Component Re-use

The CellML specification does not yet define a mechanism for the re-use of components within a model. The CellML development team has always intended to include a facility whereby model authors can define a template for a certain type of component, which can then be re-used with minor modifications throughout the model.

The extended model presents a situation where a component re-use facility would be particularly useful. The calcium and sodium channels, for example, have an identical structure. The only thing differentiating the two is the initial value of the rate constant variable in each component. Note that the variable names are not important, since they could feasibly be called anything as long as the right variables are mapped to each other in the connections from the channel components to the membrane component.

Download This Model

The CellML description of this model is available in a number of formats. If you have your browser set up to view text files served with the “text/xml” MIME type, then you can have a look at the XML file directly here. If not, you can save the target of that link to disk by shift-clicking on the preceding link. A “pretty-printed” browsable HTML version of the XML file is available here — note that you cannot download and save this version for later viewing since it makes use of stylesheets for formatting. If you wish to save or print out the “pretty-printed” version of the XML, a PDF version is also available here. Finally a gzipped tarball (the Unix equivalent of a winzip file) with this documentation, the raw XML and the pretty-printed PDF version of the XML is available here.

Here are those links again: