PSICS - the Parallel Stochastic Ion Channel Simulator
previous ←  → next
Under development
Please let us know of errors, unclear text or if you have suggestions form improvements:

Importing ChannelML channel models for use in PSICS

ChannelML provides data structures for representing chanel models based on Hodgkin-Huxley style kinetics and as kinetic schemes. It has rather different objectives from those of PSICS, in that it aims to provide a declarative format for a large number of legacy models, whereas PSICS aims to provide a simple, minimal format for future models based on biophysiucal principles of channel gating. Nevertheless, because of the extensions to PSICS necessitated by the need for validation against existing models, a fair number of ChannelML models can be read by PSICS.

The final section of this page presents comparisons of a number of ChannelML models and thier nearest PSICS equivalent, but first we examine the specification and highlight aspects that make it difficult to use with PSICS.

Channel representation

A number of the general concerns about NeuroML have been illustrated with examples from ChannelML, including the use of unnecessarily deep nesting and the splitting of related concepts between separate blocks. These make for rather deep and verbose specifications as can be seen by comparing the ChannelML (blue background) and PSICS (beige background) exmples below. The following paragraphs summarise the main concerns.

Separating the hh_gate elements from the gate elements inside a current_voltage_relation element seems unnecessary. Rather than making a refernce between the two, the contents of the hh_gate element could just be inserted where the gate element is.

The use of name as an attribute of state inside the current_voltage_relation which must be matched from the state attribute of an hh_gate element is making a reference to a deeply nested object from a object much higher in the tree. This is rather counter-intuitive. It would be more normal to have the deeply nested state object refer to the gate. Or better still, put the gate definition where the state is and scrap the reference entirely.

The nesting of conductance within ohmic within current_voltage_relation as in

<current_voltage_relation>
            <ohmic ion="ca">
                <conductance default_gmax="9.084216">
                    <rate_adjustments>
                        <q10_settings q10_factor="3" experimental_temp="17.350264793" />
                        <offset value="0.010" />
                    </rate_adjustments>
                    <gate power="2">
                        <state name="m" fraction="1" />
                    </gate>
                    <gate power="1">
                        <state name="h" fraction="1" />
                    </gate>
                </conductance>
            </ohmic>
        </current_voltage_relation>

looks as though it could better be expressed as
<current_voltage_relation ion="Ca" law="ohmic" default_gmax="9.08">
...
</current_voltage_relation>

Since q10_settings can only be to do with the rate adjustment, they do not need to be nested inside a list of rate_adjustments.

It is not clear what the state elements inside gate elements are doing. Presumably this is the state variable for the gate (a number between 0 and 1) but it is rather confusing in a PSICS context (and for ChannelML kinetic schemes) where "state" is used to refer to the possible states of a channel.

For the gates themselves, since a gate only contains transitions, the transition block is not necessary: the transitions could just be elements of the gate.

The terms "alpha" and "beta" are conventionally used for the forward and reverse rates but are not really nouns like the other element tags. Something like forwardTransition and reverseTransition might be better as labels for what these blocks are.

The parameterized_hh element with one of a few special type parameters could usefully be replaced by a few type-specfic elements.

Taking these issues into account, instead of expressiong a gate as:

<hh_gate state="m">
            <transition>
                <voltage_gate>
                    <alpha>
                        <parameterised_hh type="sigmoid" expr="A/(1 + exp(-k*(d-v)))">
                            <parameter name="A" value="1600" />
                            <parameter name="k" value="-72" />
                            <parameter name="d" value="0.005" />
                        </parameterised_hh>
                    </alpha>
                    <beta>
                        <parameterised_hh type="linoid" expr="A*(k*(v-d))/(1 - exp(-(k*(v-d))))">
                            <parameter name="A" value="100" />
                            <parameter name="k" value="-200" />
                            <parameter name="d" value="-0.0089" />
                        </parameterised_hh>
                    </beta>
                </voltage_gate>
            </transition>
        </hh_gate>

it could be expressed as:
<HH_Gate name="m" power="2">
      <SigmoidTransition A="1600.0" k="-72" d="0.0050" direction="forward" />
      <ExpLinearTransition A="100.0" k="-200" d="-0.0050" direction="reverse" />
</HH_Gate>

Even though this is an HH gate, the PSICS representation uses a kinetic scheme with two possible states and takes a further step of including the Q10 data and the units with the transition. Treating a HH gate as a kinetic schem incurs a slight cost in that the two states (closed and open) must be explicitly listed, but the resulting xml is still relatively compact. The equivalent for the above gate (plus the q10_settings information) is then:

<KSComplex id="m" instances="2">
      <ClosedState id="mc" />
      <OpenState gRel="1.0" id="mo" />
      <SigmoidTransition rate="1600.0per_ms" scale="0.01388mV" midpoint="0.0050mV" from="mc" to="mo" baseTemperature="17.350264793Celsius" q10="3.0" />
      <ExpLinearTransition rate="100.0per_ms" midpoint="-0.0089mV" scale="-0.0050mV" from="mo" to="mc" baseTemperature="17.350264793Celsius" q10="3.0" />
</KSComplex>

The generic_eqution_hh is a bit contradictory since it looks like a generic expression, not an equation, and doesn't seem to have anything specifically 'hh' about it. The examples below also show cases where rather a lot of code has been squeezed into a single expression using the hard-to-parse (for humans) "?" conditional operator and lots of brackets. The need for generic expressions also exists in PSICS for some legacy modes used in validation. The adopted solution was to allow the definition of functions containing arbitrary code to compute the rates. This has even more potential for abuse than allowing a generic expression, but does allow any rate to be implemented in a readable, if not a portable, way.

Kinetic scheme channels in ChannelML

Apart from the same concerns about unnecessary nesting and magic type attributes expressed above, the ChannelML structure for kinetic schems (ks_gate blocks) is broadly similar to that used by PSICS. There are just a few concerns about structure and naming.

The nesting of a single state block with a name inside the current_voltage_relation as in

<current_voltage_relation>
            <ohmic ion="k">
                <conductance default_gmax="36">  <!-- phys units: mS/cm2-->
                    <gate power="4">
                        <state name="n4" fraction="1" />
                    </gate>
                </conductance>
            </ohmic>
</current_voltage_relation>

Conflicts with the use of named states inside the ks_gate block. And how can the power 4 be applied to only one state?

For transition elements, the src attribute is an abbreviation but the target attribute (a word the same length as "source") is not. The terms "source" and "target" would be better, or possibly "from" and "to" as in normal usage where a transition is said to be "from state a to state b".

If ther are transitions with sources and targets, then the use of alpha and beta blocks has some redundancy: a block like

<transition src="a" tgt="b">
 	<alpha>
 		forward rate data
 	</alpha>
 	<beta>
 		rverse rate data
 	</beta>
</transition>
 
Is the same as
<transition src="b" tgt="a">
 	<alpha>
 		reverse rate data
 	</alpha>
 	<beta>
 		forward rate data
 	</beta>
</transition>
 

This means that the alpha and beta blocks can be scrapped yielding

<transition src="a" tgt="b">
	forward rate data
</transition>
 <transition src="b" tgt="a">
	reverse rate data
</transition>
 	

ChannelML import examples

The rest of this section contains examples of ChannelML files and, where possible, the xml serialization of the PSICS model resulting from importing the file. The ChannelML examples are taken from morphml.org, selecting only those models that correspond to voltage-gated channels.

XML source file: CaHVA_Chan.xml

<channelml xmlns="http://morphml.org/channelml/schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:meta="http://morphml.org/metadata/schema" xsi:schemaLocation="http://morphml.org/channelml/schema ../../Schemata/v1.3/Level2/ChannelML_v1.3.xsd" units="SI Units">

    <meta:notes>A channel from Maex, R and De Schutter, E. Synchronization of Golgi and Granule Cell Firing in a 
    Detailed Network Model of the Cerebellar Granule Cell Layer</meta:notes>

    
    <ion name="ca" charge="2" default_erev="0.080" />  
     
    <channel_type name="Generic_CaHVA" density="yes">
           
        <meta:notes>High Voltage Activated Ca2+ channel</meta:notes>
                
        <meta:publication>
            <meta:fullTitle>Maex, R and De Schutter, E. 
            Synchronization of Golgi and Granule Cell Firing in a Detailed Network Model of the 
            cerebellar Granule Cell Layer. J Neurophysiol, Nov 1998; 80: 2521 - 2537</meta:fullTitle>
            <meta:pubmedRef>http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&amp;db=PubMed&amp;list_uids=9819260&amp;dopt=Abstract</meta:pubmedRef>
        </meta:publication>
            
           
        <meta:neuronDBref>
            <meta:modelName>Calcium channels</meta:modelName>
            <meta:uri>http://senselab.med.yale.edu/senselab/NeuronDB/channelGene2.htm#table1</meta:uri>
        </meta:neuronDBref>
            
    
        <current_voltage_relation>
            <ohmic ion="ca">
                <conductance default_gmax="9.084216"> 
                    <rate_adjustments>
                        <q10_settings q10_factor="3" experimental_temp="17.350264793" />
                        <offset value="0.010" />
                    </rate_adjustments>
                    <gate power="2">
                        <state name="m" fraction="1" />
                    </gate>
                    <gate power="1">
                        <state name="h" fraction="1" />
                    </gate>
                </conductance>
            </ohmic>
        </current_voltage_relation>
        
        
        <hh_gate state="m">
            <transition>
                <voltage_gate>
                    <alpha>
                        <parameterised_hh type="sigmoid" expr="A/(1 + exp(-k*(d-v)))">
                            <parameter name="A" value="1600" />
                            <parameter name="k" value="-72" />
                            <parameter name="d" value="0.005" />
                        </parameterised_hh>
                    </alpha>
                    <beta>
                        <parameterised_hh type="linoid" expr="A*(k*(v-d))/(1 - exp(-(k*(v-d))))">
                            <parameter name="A" value="100" />
                            <parameter name="k" value="-200" />
                            <parameter name="d" value="-0.0089" />
                        </parameterised_hh>
                    </beta>
                </voltage_gate>
            </transition>
        </hh_gate>
        
        
        <hh_gate state="h">
            <transition>
                <voltage_gate>
                    <alpha>
                        <generic_equation_hh expr="v &lt; -0.060 ? 5.0 : 5 * (exp (-50 * (v - (-0.060))))" />
                    </alpha>
                    <beta>
                        <generic_equation_hh expr="v &lt; -0.060 ? 0 : 5 - (5 * (exp (-50 * (v - (-0.060)))))" />
                    </beta>
                </voltage_gate>
            </transition>
        </hh_gate>
            
        
        
    </channel_type>
</channelml>

PSICS version: CaHVA_Chan.psix

<KSChannel id="Generic_CaHVA" permeantIon="Ca">
   <KSComplex id="m" instances="2">
      <ClosedState id="mc" />
      <OpenState gRel="1.0" id="mo" />
      <SigmoidTransition rate="1600.0per_ms" scale="0.013888888888888888mV" midpoint="0.0050mV" from="mc" to="mo" baseTemperature="17.350264793Celsius" q10="3.0" />
      <ExpLinearTransition rate="100.0per_ms" midpoint="-0.0089mV" scale="-0.0050mV" from="mo" to="mc" baseTemperature="17.350264793Celsius" q10="3.0" />
   </KSComplex>

   <KSComplex id="h" instances="1">
      <ClosedState id="hc" />
      <OpenState gRel="1.0" id="ho" />
      <AlphaBetaCodedTransition alphavar="alpha" betavar="beta" fwdFactor="1.0" revFactor="1.0" codeFragment="alpha = v &lt; -0.060 ? 5.0 : 5 * (exp (-50 * (v - (-0.060)))); beta = v &lt; -0.060 ? 0 : 5 - (5 * (exp (-50 * (v - (-0.060)))));" from="hc" to="ho" baseTemperature="17.350264793Celsius" q10="3.0">
         <constants />
      </AlphaBetaCodedTransition>

   </KSComplex>

</KSChannel>

XML source file: GateDepQ10.xml

<channelml xmlns="http://morphml.org/channelml/schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:meta="http://morphml.org/metadata/schema" xsi:schemaLocation="http://morphml.org/channelml/schema ../../Schemata/v1.5/Level2/ChannelML_v1.5.xsd" units="Physiological Units">

    <meta:notes>ChannelML file containing a single Channel description</meta:notes>
    
    <ion name="na" charge="1" default_erev="50" />  <!-- phys units: mV -->

    <channel_type name="NaConduction" density="yes">

        <meta:notes>Example showing a channel with different Q10 adjustments for each gate, based on HH Na example</meta:notes>


        <current_voltage_relation>
            <ohmic ion="na">
                <conductance default_gmax="120"> <!-- phys units: mS/cm2 -->
                                    
                    <rate_adjustments>
                        <q10_settings gate="m" q10_factor="3" experimental_temp="17" />
                        <q10_settings gate="h" q10_factor="3.5" experimental_temp="17" />
                    </rate_adjustments>
                    
                    <gate power="3">
                        <state name="m" fraction="1" />
                    </gate>
                    <gate power="1">
                        <state name="h" fraction="1" />
                    </gate>
                </conductance>
            </ohmic>
        </current_voltage_relation>
        
        
        <hh_gate state="m">
            <transition>
                <voltage_gate>
                    <alpha>
                        <parameterised_hh type="linoid" expr="A*(k*(v-d))/(1 - exp(-(k*(v-d))))">
                            <parameter name="A" value="1" />
                            <parameter name="k" value="0.1" />
                            <parameter name="d" value="-40" />
                        </parameterised_hh>
                    </alpha>
                    <beta>
                        <parameterised_hh type="exponential" expr="A*exp(k*(v-d))">
                            <parameter name="A" value="4" />
                            <parameter name="k" value="-0.0555555555" />
                            <parameter name="d" value="-65" />
                        </parameterised_hh>
                    </beta>
                </voltage_gate>
            </transition>
        </hh_gate>
        
        <hh_gate state="h">
            <transition>
                <voltage_gate>
                    <alpha>
                        <parameterised_hh type="exponential" expr="A*exp(k*(v-d))">
                            <parameter name="A" value="0.07" />
                            <parameter name="k" value="-0.05" />
                            <parameter name="d" value="-65" />
                        </parameterised_hh>
                    </alpha>
                    <beta>
                        <parameterised_hh type="sigmoid" expr="A/(1 + exp(-k*(d-v)))">
                            <parameter name="A" value="1" />
                            <parameter name="k" value="-0.1" />
                            <parameter name="d" value="-35" />
                        </parameterised_hh>
                    </beta>
                </voltage_gate>
            </transition>
        </hh_gate>
        
        
    </channel_type>
</channelml>

PSICS version: GateDepQ10.psix

<KSChannel id="NaConduction" permeantIon="Na">
   <KSComplex id="m" instances="3">
      <ClosedState id="mc" />
      <OpenState gRel="1.0" id="mo" />
      <ExpLinearTransition rate="1.0per_ms" midpoint="-40.0mV" scale="10.0mV" from="mc" to="mo" baseTemperature="17.0Celsius" q10="3.0" />
      <ExpTransition rate="4.0per_ms" scale="-18.000000018mV" midpoint="-65.0mV" from="mo" to="mc" baseTemperature="17.0Celsius" q10="3.0" />
   </KSComplex>

   <KSComplex id="h" instances="1">
      <ClosedState id="hc" />
      <OpenState gRel="1.0" id="ho" />
      <ExpTransition rate="0.07per_ms" scale="-20.0mV" midpoint="-65.0mV" from="hc" to="ho" baseTemperature="17.0Celsius" q10="3.5" />
      <SigmoidTransition rate="1.0per_ms" scale="10.0mV" midpoint="-35.0mV" from="ho" to="hc" baseTemperature="17.0Celsius" q10="3.5" />
   </KSComplex>

</KSChannel>

XML source file: KA_Chan.xml

<channelml xmlns="http://morphml.org/channelml/schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:meta="http://morphml.org/metadata/schema" xsi:schemaLocation="http://morphml.org/channelml/schema ../../Schemata/v1.6/Level2/ChannelML_v1.6.xsd" units="Physiological Units">

    <meta:notes>A channel from Maex and De Schutter 1998.
    Note, the values used here are based on the GENESIS scripts accompanying the paper</meta:notes>
    
    <ion name="k" charge="1" default_erev="-90" />  
    
    <channel_type name="Generic_KA" density="yes">
    
        <meta:notes>A-type K channel, with rate equations expressed in tau and inf form</meta:notes>
        
        <meta:authorList>
            <meta:modelTranslator>
                <meta:name>Padraig Gleeson</meta:name>
                <meta:institution>UCL</meta:institution>    
                <meta:email>p.gleeson - at - ucl.ac.uk</meta:email>
            </meta:modelTranslator>
        </meta:authorList>
            
        <meta:publication>
            <meta:fullTitle>Maex, R and De Schutter, E. 
            Synchronization of Golgi and Granule Cell Firing in a Detailed Network Model of the 
            cerebellar Granule Cell Layer. J Neurophysiol, Nov 1998; 80: 2521 - 2537</meta:fullTitle>
            <meta:pubmedRef>http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&amp;db=PubMed&amp;list_uids=9819260&amp;dopt=Abstract</meta:pubmedRef>
        </meta:publication>        
   
        <meta:neuronDBref>
            <meta:modelName>K channels</meta:modelName>
            <meta:uri>http://senselab.med.yale.edu/senselab/NeuronDB/channelGene2.htm#table3</meta:uri>
        </meta:neuronDBref>

        
        <current_voltage_relation>
            <ohmic ion="k">
                <conductance default_gmax="1.14567">   
                    <rate_adjustments>
                        <q10_settings q10_factor="1" experimental_temp="17.350264793" />
                        <offset value="10" />
                    </rate_adjustments>
                    <gate power="3">
                        <state name="m" fraction="1" />
                    </gate>
                    <gate power="1">
                        <state name="h" fraction="1" />
                    </gate>
                </conductance>
            </ohmic>
        </current_voltage_relation>
        
        
        <hh_gate state="m">
            <transition>
                <voltage_gate>
                    <tau>
                        <generic_equation_hh expr="0.410 * ((exp (( ((v) + 43.5) / (-42.8))))) + 0.167" />
                    </tau>
                    <inf>
                        <parameterised_hh type="sigmoid" expr="A/(1 + exp(k*(v-d)))">
                            <parameter name="A" value="1" />
                            <parameter name="k" value="-0.050505051" />
                            <parameter name="d" value="-46.7" />
                        </parameterised_hh>
                    </inf>
                </voltage_gate>
            </transition>
        </hh_gate>
        
        
        <hh_gate state="h">
            <transition>
                <voltage_gate>
                    <tau>
                        <generic_equation_hh expr="10.8 + (0.03 * v) + (1 / (57.9 * (exp (v *0.127)) + (134e-6 * (exp (v * -0.059)))))" />
                    </tau>
                    <inf>
                        <parameterised_hh type="sigmoid" expr="A/(1 + exp(k*(v-d)))">
                            <parameter name="A" value="1" />
                            <parameter name="k" value="0.119047619" />
                            <parameter name="d" value="-78.8" />
                        </parameterised_hh>
                    </inf>
                </voltage_gate>
            </transition>
        </hh_gate>

        
    </channel_type>
</channelml>

PSICS version: KA_Chan.psix

<KSChannel id="Generic_KA" permeantIon="K">
   <KSComplex id="m" instances="3">
      <ClosedState id="mc" />
      <OpenState gRel="1.0" id="mo" />
      <TauInfCodedTransition tauvar="tau" infvar="inf" fwdFactor="1.0" revFactor="1.0" codeFragment="tau = 0.410 * ((exp (( ((v) + 43.5) / (-42.8))))) + 0.167; inf = A/(1 + exp(k*(v-d)));" from="mc" to="mo" baseTemperature="17.350264793Celsius" q10="1.0">
         <constants />
      </TauInfCodedTransition>

   </KSComplex>

   <KSComplex id="h" instances="1">
      <ClosedState id="hc" />
      <OpenState gRel="1.0" id="ho" />
      <TauInfCodedTransition tauvar="tau" infvar="inf" fwdFactor="1.0" revFactor="1.0" codeFragment="tau = 10.8 + (0.03 * v) + (1 / (57.9 * (exp (v *0.127)) + (134e-6 * (exp (v * -0.059))))); inf = A/(1 + exp(k*(v-d)));" from="hc" to="ho" baseTemperature="17.350264793Celsius" q10="1.0">
         <constants />
      </TauInfCodedTransition>

   </KSComplex>

</KSChannel>

XML source file: KChannelKS.xml

<channelml xmlns="http://morphml.org/channelml/schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:meta="http://morphml.org/metadata/schema" xsi:schemaLocation="http://morphml.org/channelml/schema ../../Schemata/v1.3/Level2/ChannelML_v1.3.xsd" units="Physiological Units">

    <meta:notes>Example of 5 state kinetic scheme K conductance specified in ChannelML.
    Based on Michael Hines's initial proposal.</meta:notes>
    
    <ion name="k" default_erev="-77.0" charge="1" />  <!-- phys units: mV -->

    <channel_type name="KChannel" density="yes">

        <meta:notes>K conductance with 5 kinetic states. NOTE: this only maps successfully on to the NEURON Channel Builder format!</meta:notes>

        <current_voltage_relation>
            <ohmic ion="k">
                <conductance default_gmax="36">  <!-- phys units: mS/cm2-->
                    <gate power="4">
                        <state name="n4" fraction="1" />
                    </gate>
                </conductance>
            </ohmic>
        </current_voltage_relation>
        
        
        <ks_gate>
            <state name="n0" />
            <state name="n1" />
            <state name="n2" />
            <state name="n3" />
            <state name="n4" />
            <transition src="n0" target="n1">
                <voltage_gate>
                    <alpha>
                        <parameterised_hh type="linoid" expr="A*x/(1 - exp(-x)) where x = k*v-d)">
                            <parameter name="A" value="0.4" />
                            <parameter name="k" value="0.1" />
                            <parameter name="d" value="-55" />
                        </parameterised_hh>
                    </alpha>
                    <beta>
                        <parameterised_hh type="exponential" expr="A*exp(k*(v-d))">
                            <parameter name="A" value="0.125" />
                            <parameter name="k" value="-0.0125" />
                            <parameter name="d" value="-65" />
                        </parameterised_hh>
                    </beta>
                </voltage_gate>
            </transition>
            <transition src="n1" target="n2">
                <voltage_gate>
                    <alpha>
                        <parameterised_hh type="linoid" expr="A*x/(1 - exp(-x)) where x = k*v-d)">
                            <parameter name="A" value="0.3" />
                            <parameter name="k" value="0.1" />
                            <parameter name="d" value="-55" />
                        </parameterised_hh>
                    </alpha>
                    <beta>
                        <parameterised_hh type="exponential" expr="A*exp(k*(v-d))">
                            <parameter name="A" value="0.25" />
                            <parameter name="k" value="-0.0125" />
                            <parameter name="d" value="-65" />
                        </parameterised_hh>
                    </beta>
                </voltage_gate>
            </transition>
            <transition src="n2" target="n3">
                <voltage_gate>
                    <alpha>
                        <parameterised_hh type="linoid" expr="A*x/(1 - exp(-x)) where x = k*v-d)">
                            <parameter name="A" value="0.2" />
                            <parameter name="k" value="0.1" />
                            <parameter name="d" value="-55" />
                        </parameterised_hh>
                    </alpha>
                    <beta>
                        <parameterised_hh type="exponential" expr="A*exp(k*(v-d))">
                            <parameter name="A" value="0.375" />
                            <parameter name="k" value="-0.0125" />
                          &