Location: OpenCOR @ 902e04339cd9 / tests / cellml / cellml_1_1 / experiments / periodic-stimulus.xml

Author:
Alan Garny <a.garny@auckland.ac.nz>
Date:
2018-12-05 18:16:37-05:00
Desc:
Models that come with the OpenCOR repository.
Permanent Source URI:
http://models.cellml.org/workspace/55d/rawfile/902e04339cd9643a375562c2b871da8a3a801060/tests/cellml/cellml_1_1/experiments/periodic-stimulus.xml

<?xml version='1.0'?>
<model name="periodic_stimulus" xmlns="http://www.cellml.org/cellml/1.1#" xmlns:cellml="http://www.cellml.org/cellml/1.1#" xmlns:xlink="http://www.w3.org/1999/xlink">
    <import xlink:href="../components/units.xml">
        <units name="ms" units_ref="ms"/>
        <units name="mV" units_ref="mV"/>
        <units name="uA_per_cmsq" units_ref="uA_per_cmsq"/>
    </import>
    <import xlink:href="../components/stimulated.xml">
        <component component_ref="action_potential" name="_model"/>
    </import>
    <import xlink:href="periodic-IStim-protocol.xml">
        <component component_ref="stimulus_protocol" name="stimulus_protocol"/>
    </import>
    <import xlink:href="time.xml">
        <component component_ref="time" name="time"/>
    </import>
    <import xlink:href="../components/default-variable-values.xml">
        <component component_ref="parameters" name="default_parameters"/>
        <component component_ref="initial_conditions" name="default_initial_conditions"/>
    </import>
    <!-- Connect the time source variable to the model and stimulus protocol -->
    <connection>
        <map_components component_1="_model" component_2="time"/>
        <map_variables variable_1="time" variable_2="time"/>
    </connection>
    <connection>
        <map_components component_1="time" component_2="stimulus_protocol"/>
        <map_variables variable_1="time" variable_2="time"/>
    </connection>
    <!-- Define the stimulus protocol parameter values -->
    <component name="stimulus_protocol_params">
        <variable initial_value="50" name="stimPeriod" public_interface="out" units="ms"/>
        <variable initial_value="0.5" name="stimDuration" public_interface="out" units="ms"/>
        <variable initial_value="-10" name="stimCurrent" public_interface="out" units="uA_per_cmsq"/>
    </component>
    <!-- and connect the parameters to the protocol definition -->
    <connection>
        <map_components component_1="stimulus_protocol_params" component_2="stimulus_protocol"/>
        <map_variables variable_1="stimPeriod" variable_2="stimPeriod"/>
        <map_variables variable_1="stimDuration" variable_2="stimDuration"/>
        <map_variables variable_1="stimCurrent" variable_2="stimCurrent"/>
    </connection>
    <!-- and connect the actual stimulus current to the model -->
    <connection>
        <map_components component_1="_model" component_2="stimulus_protocol"/>
        <map_variables variable_1="Istim" variable_2="IStim"/>
    </connection>
    <!-- Here we could define any parameters that we want to differ from the default -->
    <component name="parameters"/>
    <!-- but since we want all default parameters we just connect the default values through to the model -->
    <connection>
        <map_components component_1="_model" component_2="default_parameters"/>
        <map_variables variable_1="Cm" variable_2="Cm"/>
        <map_variables variable_1="VNa" variable_2="VNa"/>
        <map_variables variable_1="VK" variable_2="VK"/>
        <map_variables variable_1="Vleak" variable_2="Vleak"/>
        <map_variables variable_1="gNa_max" variable_2="gNa_max"/>
        <map_variables variable_1="gK_max" variable_2="gK_max"/>
        <map_variables variable_1="gleak_max" variable_2="gleak_max"/>
    </connection>
    <!-- similarly for the initial conditions -->
    <component name="initial_conditions"/>
    <connection>
        <map_components component_1="_model" component_2="default_initial_conditions"/>
        <map_variables variable_1="V_initial" variable_2="V_initial"/>
        <map_variables variable_1="m_initial" variable_2="m_initial"/>
        <map_variables variable_1="h_initial" variable_2="h_initial"/>
        <map_variables variable_1="n_initial" variable_2="n_initial"/>
    </connection>
    <!-- SED-ML (and CSim simulation description above) is only able to address variables at the top level of the model hierarchy, so we need to define the variables we want SED-ML to be able to address here. -->
    <component name="outputs">
        <variable name="time" public_interface="in" units="ms"/>
        <variable name="INa" public_interface="in" units="uA_per_cmsq"/>
        <variable name="IK" public_interface="in" units="uA_per_cmsq"/>
        <variable name="Ileak" public_interface="in" units="uA_per_cmsq"/>
        <variable name="V" public_interface="in" units="mV"/>
        <variable name="minus_V" public_interface="in" units="mV"/>
        <variable name="h" public_interface="in" units="dimensionless"/>
        <variable name="m" public_interface="in" units="dimensionless"/>
        <variable name="n" public_interface="in" units="dimensionless"/>
    </component>
    <!-- and connect the output variable definitions to their actual source in the model -->
    <connection>
        <map_components component_1="outputs" component_2="_model"/>
        <map_variables variable_1="INa" variable_2="INa"/>
        <map_variables variable_1="IK" variable_2="IK"/>
        <map_variables variable_1="Ileak" variable_2="Ileak"/>
        <map_variables variable_1="V" variable_2="V"/>
        <map_variables variable_1="minus_V" variable_2="minus_V"/>
        <map_variables variable_1="h" variable_2="h"/>
        <map_variables variable_1="m" variable_2="m"/>
        <map_variables variable_1="n" variable_2="n"/>
    </connection>
    <!-- and connect the time output to the source time variable -->
    <connection>
        <map_components component_1="outputs" component_2="time"/>
        <map_variables variable_1="time" variable_2="time"/>
    </connection>
</model>