forked from OpenSourceBrain/BlueBrainProjectShowcase
-
Notifications
You must be signed in to change notification settings - Fork 2
/
LEMS_Test_template.xml
159 lines (111 loc) · 6.78 KB
/
LEMS_Test_template.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<Lems>
<!-- Specify which component to run -->
<Target component="sim1"/>
<!-- Include core NeuroML2 ComponentType definitions -->
<Include file="Cells.xml"/>
<Include file="Networks.xml"/>
<Include file="Simulation.xml"/>
<Include file="${channel_file}"/>
<!-- These may eventually be moved to core NeuroML definition files -->
<ComponentType name="vClampedCell" extends="baseCellMembPot" description="A 'cell' which can be clamped to a specific voltage for a certain duration to examine ion channel behaviour.">
<Parameter name="delay" dimension="time"/>
<Parameter name="duration" dimension="time"/>
<Parameter name="baseVoltage" dimension="voltage"/>
<Parameter name="targetVoltage" dimension="voltage"/>
<Parameter name="caConc" dimension="concentration"/>
<Children name="channelPopulation" type="channelPopulation"/>
<Dynamics>
<StateVariable name="v" exposure="v" dimension="voltage"/>
<OnStart>
<StateAssignment variable="v" value="baseVoltage"/>
</OnStart>
<OnCondition test="t .geq. delay .and. t .lt. duration+delay">
<StateAssignment variable="v" value="targetVoltage"/>
</OnCondition>
<OnCondition test="t .gt. duration+delay">
<StateAssignment variable="v" value="baseVoltage"/>
</OnCondition>
</Dynamics>
</ComponentType>
<ComponentType name="vClampedRampCell" extends="baseCellMembPot" description="A 'cell' which can be clamped to a steadily changing voltage for a certain duration to examine ion channel behaviour.">
<Parameter name="delay" dimension="time"/>
<Parameter name="duration" dimension="time"/>
<Parameter name="baseVoltage" dimension="voltage"/>
<Parameter name="targetVoltage0" dimension="voltage"/>
<Parameter name="targetVoltage1" dimension="voltage"/>
<Parameter name="caConc" dimension="concentration"/>
<Child name="channelPopulation" type="channelPopulation"/>
<Dynamics>
<StateVariable name="v" exposure="v" dimension="voltage"/>
<OnStart>
<StateAssignment variable="v" value="baseVoltage"/>
</OnStart>
<OnCondition test="t .geq. delay .and. t .lt. duration+delay">
<StateAssignment variable="v" value="targetVoltage0 + (targetVoltage1-targetVoltage0)*(t-delay)/(duration)"/>
</OnCondition>
<OnCondition test="t .gt. duration+delay">
<StateAssignment variable="v" value="baseVoltage"/>
</OnCondition>
</Dynamics>
</ComponentType>
#foreach ($tv in $target_voltages)##
<vClampedCell id="holderCell_${tv.v_str}" delay="${clamp_delay}ms" duration="${clamp_duration}ms" baseVoltage="${clamp_base_voltage}mV" targetVoltage="${tv.v}mV" caConc="${ca_conc}mM">
<channelPopulation id="test" ionChannel="${channel}" number="1" erev="${erev}mV"/>
</vClampedCell>
#end##
<vClampedRampCell id="rampCell0" delay="0ms" duration="${duration}ms" baseVoltage="${min_target_voltage}mV" targetVoltage0="${min_target_voltage}mV" targetVoltage1="${max_target_voltage}mV" caConc="${ca_conc}mM">
<channelPopulation id="test" ionChannel="${channel}" number="1" erev="${erev}mV"/>
</vClampedRampCell>
<network id="net1" type="networkWithTemperature" temperature = "${temperature} degC">
#foreach ($tv in $target_voltages)##
<population id="holderCellPop_${tv.v_str}" component="holderCell_${tv.v_str}" size="1"/>
#end##
<population id="rampCellPop0" component="rampCell0" size="1"/>
</network>
#set( $start = -0.1 * $duration )
#set( $end = 1.1 * $duration )
#set( $startv = $min_target_voltage - (0.1 * ($max_target_voltage-$min_target_voltage)) )
#set( $endv = $max_target_voltage + (0.1 * ($max_target_voltage-$min_target_voltage)) )
#set( $dt = 0.00025 * $duration )
<Simulation id="sim1" length="${duration}ms" step="${dt}ms" target="net1">
<Display id="d0" title="${channel}: Clamp voltages (mV)" timeScale="1ms" xmin="$start" xmax="$end" ymin="$startv" ymax="$endv">
#foreach ($tv in $target_voltages)##
<Line id="${tv.v}mV" quantity="holderCellPop_${tv.v_str}[0]/v" scale="1mV" color="${tv.col}" timeScale="1ms"/>
#end##
</Display>
<Display id="d1" title="${channel}: Fractional conductance at ${temperature} degC" timeScale="1ms" xmin="$start" xmax="$end" ymin="-0.1" ymax="1.1">
#foreach ($tv in $target_voltages)##
<Line id="${tv.v}mV" quantity="holderCellPop_${tv.v_str}[0]/test/${channel}/fopen" scale="1" color="${tv.col}" timeScale="1ms"/>
#end##
</Display>
<Display id="d7" title="${channel}: Currents (nA) at different clamped potentials; ${temperature} degC; rev potential: ${erev} mV" timeScale="1ms" xmin="$start" xmax="$end" ymin="-0.00002" ymax="0.0014">
#foreach ($tv in $target_voltages)##
<Line id="${tv.v}mV" quantity="holderCellPop_${tv.v_str}[0]/test/i" scale="1nA" color="${tv.col}" timeScale="1ms"/>
#end##
</Display>
#foreach ($g in $gates)##
<Display id="${g}_inf" title="${channel}: Gate ${g} steady state, ${g}_inf" timeScale="1ms" xmin="$start" xmax="$end" ymin="-0.1" ymax="1.1">
<Line id="${g}_inf (x axis: ${min_target_voltage}mV to ${max_target_voltage}mV)" quantity="rampCellPop0[0]/test/${channel}/${g}/inf" scale="1" color="#000000" timeScale="1ms"/>
</Display>
<Display id="${g}_tau" title="${channel}: Gate ${g} time course, ${g}_tau (ms) at ${temperature} degC" timeScale="1ms" xmin="$start" xmax="$end" ymin="-10" ymax="110">
<Line id="${g}_tau (x axis: ${min_target_voltage}mV to ${max_target_voltage}mV)" quantity="rampCellPop0[0]/test/${channel}/${g}/tau" scale="1ms" color="#000000" timeScale="1ms"/>
</Display>
#end##
#foreach ($tv in $target_voltages)##
<OutputFile id="i_${tv.v_str}_of1" fileName="i_${tv.v_str}.lems.dat">
<OutputColumn id="${tv.v_str}" quantity="holderCellPop_${tv.v_str}[0]/test/i"/>
</OutputFile>
#end##
#foreach ($g in $gates)##
<OutputFile id="${g}_inf_of1" fileName="${channel}.${g}.inf.lems.dat">
<OutputColumn id="${g}" quantity="rampCellPop0[0]/test/${channel}/${g}/inf"/>
</OutputFile>
<OutputFile id="${g}_tau_of1" fileName="${channel}.${g}.tau.lems.dat">
<OutputColumn id="${g}" quantity="rampCellPop0[0]/test/${channel}/${g}/tau"/>
</OutputFile>
#end##
<OutputFile id="rampCellV" fileName="${channel}.rampV.lems.dat">
<OutputColumn id="v" quantity="rampCellPop0[0]/v"/>
</OutputFile>
</Simulation>
</Lems>