sbml3¶
A single SBML model runs with input from a files and output to a file. This example demonstrates the use of the only_output_final_step model parameter to only get the final output of the simulation.
SBML Version¶
Model Code:
1<?xml version="1.0" encoding="UTF-8"?>
2<sbml xmlns="http://www.sbml.org/sbml/level2" xmlns:jd2="http://www.sys-bio.org/sbml/jd2" level="2" version="1">
3 <model id="feedback" name="Feedback">
4 <annotation>
5 <jd2:JDesignerLayout xmlns:jd2="http://www.sys-bio.org/sbml/jd2" version="2.0" MajorVersion="2" MinorVersion="3" BuildVersion="45">
6 <jd2:header>
7 <jd2:VersionHeader JDesignerVersion="1.0"/>
8 <jd2:ModelHeader ModelTitle="Feedback"/>
9 <jd2:TimeCourseDetails timeStart="0" timeEnd="25" numberOfPoints="200"/>
10 </jd2:header>
11 <jd2:JDGraphicsHeader BackGroundColor="FFFFFFEF"/>
12 <jd2:listOfCompartments>
13 <jd2:compartment id="compartment" size="1" visible="false">
14 <jd2:boundingBox x="0" y="0" w="0" h="0"/>
15 <jd2:membraneStyle thickness="12" color="FF00A5FF"/>
16 <jd2:interiorStyle color="FFEEEEFF"/>
17 <jd2:text value="compartment" visible="true">
18 <jd2:position rx="-31" ry="-16"/>
19 <jd2:font fontName="Arial" fontSize="8" fontColor="FF000000"/>
20 </jd2:text>
21 </jd2:compartment>
22 </jd2:listOfCompartments>
23 <jd2:listOfSpecies>
24 <jd2:species id="S1" boundaryCondition="false" compartment="compartment" initialConcentration="0">
25 <jd2:positionLocked value="false"/>
26 <jd2:boundingBox x="138" y="104"/>
27 <jd2:displayValue visible="false">
28 <jd2:position rx="0" ry="0"/>
29 <jd2:font fontName="Arial" fontSize="8" fontColor="FF000000"/>
30 </jd2:displayValue>
31 <jd2:text value="S1" visible="true">
32 <jd2:position rx="4" ry="6"/>
33 <jd2:font fontName="Arial" fontSize="8" fontColor="FF000000"/>
34 </jd2:text>
35 <jd2:complex id="DefaultMolecule" w="24" h="24" boundarySpeciesStyle="bsBox" boundaryStyleColor="FF0000FF" captionPosition="npCenter" aliasBoundaryColor="FFFF0000" aliasBoundaryThickness="3">
36 <jd2:subunit shape="suRoundSquare">
37 <jd2:boundingBox rx="0" ry="0" w="24" h="24"/>
38 <jd2:text value="S1" visible="false">
39 <jd2:position rx="6" ry="5"/>
40 <jd2:font fontName="Arial" fontSize="8" fontColor="FF000000"/>
41 </jd2:text>
42 <jd2:color scheme="gtHorizLinear" startColor="FFCCFFFF" endColor="FFFFFFFF"/>
43 <jd2:edgeStyle color="FF969696" thickness="1" stroke="dsSolid"/>
44 </jd2:subunit>
45 </jd2:complex>
46 </jd2:species>
47 <jd2:species id="S2" boundaryCondition="false" compartment="compartment" initialConcentration="0">
48 <jd2:positionLocked value="false"/>
49 <jd2:boundingBox x="234" y="143"/>
50 <jd2:displayValue visible="false">
51 <jd2:position rx="0" ry="0"/>
52 <jd2:font fontName="Arial" fontSize="8" fontColor="FF000000"/>
53 </jd2:displayValue>
54 <jd2:text value="S2" visible="true">
55 <jd2:position rx="4" ry="6"/>
56 <jd2:font fontName="Arial" fontSize="8" fontColor="FF000000"/>
57 </jd2:text>
58 <jd2:complex id="DefaultMolecule" w="24" h="24" boundarySpeciesStyle="bsBox" boundaryStyleColor="FF0000FF" captionPosition="npCenter" aliasBoundaryColor="FFFF0000" aliasBoundaryThickness="3">
59 <jd2:subunit shape="suRoundSquare">
60 <jd2:boundingBox rx="0" ry="0" w="24" h="24"/>
61 <jd2:text value="S1" visible="false">
62 <jd2:position rx="6" ry="5"/>
63 <jd2:font fontName="Arial" fontSize="8" fontColor="FF000000"/>
64 </jd2:text>
65 <jd2:color scheme="gtHorizLinear" startColor="FFCCFFFF" endColor="FFFFFFFF"/>
66 <jd2:edgeStyle color="FF969696" thickness="1" stroke="dsSolid"/>
67 </jd2:subunit>
68 </jd2:complex>
69 </jd2:species>
70 <jd2:species id="S3" boundaryCondition="false" compartment="compartment" initialConcentration="0">
71 <jd2:positionLocked value="false"/>
72 <jd2:boundingBox x="318" y="178"/>
73 <jd2:displayValue visible="false">
74 <jd2:position rx="0" ry="0"/>
75 <jd2:font fontName="Arial" fontSize="8" fontColor="FF000000"/>
76 </jd2:displayValue>
77 <jd2:text value="S3" visible="true">
78 <jd2:position rx="4" ry="6"/>
79 <jd2:font fontName="Arial" fontSize="8" fontColor="FF000000"/>
80 </jd2:text>
81 <jd2:complex id="DefaultMolecule" w="24" h="24" boundarySpeciesStyle="bsBox" boundaryStyleColor="FF0000FF" captionPosition="npCenter" aliasBoundaryColor="FFFF0000" aliasBoundaryThickness="3">
82 <jd2:subunit shape="suRoundSquare">
83 <jd2:boundingBox rx="0" ry="0" w="24" h="24"/>
84 <jd2:text value="S1" visible="false">
85 <jd2:position rx="6" ry="5"/>
86 <jd2:font fontName="Arial" fontSize="8" fontColor="FF000000"/>
87 </jd2:text>
88 <jd2:color scheme="gtHorizLinear" startColor="FFCCFFFF" endColor="FFFFFFFF"/>
89 <jd2:edgeStyle color="FF969696" thickness="1" stroke="dsSolid"/>
90 </jd2:subunit>
91 </jd2:complex>
92 </jd2:species>
93 <jd2:species id="S4" boundaryCondition="false" compartment="compartment" initialConcentration="0">
94 <jd2:positionLocked value="false"/>
95 <jd2:boundingBox x="411" y="212"/>
96 <jd2:displayValue visible="false">
97 <jd2:position rx="0" ry="0"/>
98 <jd2:font fontName="Arial" fontSize="8" fontColor="FF000000"/>
99 </jd2:displayValue>
100 <jd2:text value="S4" visible="true">
101 <jd2:position rx="4" ry="6"/>
102 <jd2:font fontName="Arial" fontSize="8" fontColor="FF000000"/>
103 </jd2:text>
104 <jd2:complex id="DefaultMolecule" w="24" h="24" boundarySpeciesStyle="bsBox" boundaryStyleColor="FF0000FF" captionPosition="npCenter" aliasBoundaryColor="FFFF0000" aliasBoundaryThickness="3">
105 <jd2:subunit shape="suRoundSquare">
106 <jd2:boundingBox rx="0" ry="0" w="24" h="24"/>
107 <jd2:text value="S1" visible="false">
108 <jd2:position rx="6" ry="5"/>
109 <jd2:font fontName="Arial" fontSize="8" fontColor="FF000000"/>
110 </jd2:text>
111 <jd2:color scheme="gtHorizLinear" startColor="FFCCFFFF" endColor="FFFFFFFF"/>
112 <jd2:edgeStyle color="FF969696" thickness="1" stroke="dsSolid"/>
113 </jd2:subunit>
114 </jd2:complex>
115 </jd2:species>
116 <jd2:species id="X0" boundaryCondition="true" compartment="compartment" initialConcentration="10">
117 <jd2:positionLocked value="false"/>
118 <jd2:boundingBox x="33" y="60"/>
119 <jd2:displayValue visible="false">
120 <jd2:position rx="0" ry="0"/>
121 <jd2:font fontName="Arial" fontSize="8" fontColor="FF000000"/>
122 </jd2:displayValue>
123 <jd2:text value="X0" visible="true">
124 <jd2:position rx="4" ry="6"/>
125 <jd2:font fontName="Arial" fontSize="8" fontColor="FF000000"/>
126 </jd2:text>
127 <jd2:complex id="DefaultMolecule" w="24" h="24" boundarySpeciesStyle="bsBox" boundaryStyleColor="FF0000FF" captionPosition="npCenter" aliasBoundaryColor="FFFF0000" aliasBoundaryThickness="3">
128 <jd2:subunit shape="suRoundSquare">
129 <jd2:boundingBox rx="0" ry="0" w="24" h="24"/>
130 <jd2:text value="S1" visible="false">
131 <jd2:position rx="6" ry="5"/>
132 <jd2:font fontName="Arial" fontSize="8" fontColor="FF000000"/>
133 </jd2:text>
134 <jd2:color scheme="gtHorizLinear" startColor="FFCCFFFF" endColor="FFFFFFFF"/>
135 <jd2:edgeStyle color="FF969696" thickness="1" stroke="dsSolid"/>
136 </jd2:subunit>
137 </jd2:complex>
138 </jd2:species>
139 <jd2:species id="X1" boundaryCondition="true" compartment="compartment" initialConcentration="0">
140 <jd2:positionLocked value="false"/>
141 <jd2:boundingBox x="415" y="292"/>
142 <jd2:displayValue visible="false">
143 <jd2:position rx="0" ry="0"/>
144 <jd2:font fontName="Arial" fontSize="8" fontColor="FF000000"/>
145 </jd2:displayValue>
146 <jd2:text value="X1" visible="true">
147 <jd2:position rx="4" ry="6"/>
148 <jd2:font fontName="Arial" fontSize="8" fontColor="FF000000"/>
149 </jd2:text>
150 <jd2:complex id="DefaultMolecule" w="24" h="24" boundarySpeciesStyle="bsBox" boundaryStyleColor="FF0000FF" captionPosition="npCenter" aliasBoundaryColor="FFFF0000" aliasBoundaryThickness="3">
151 <jd2:subunit shape="suRoundSquare">
152 <jd2:boundingBox rx="0" ry="0" w="24" h="24"/>
153 <jd2:text value="S1" visible="false">
154 <jd2:position rx="6" ry="5"/>
155 <jd2:font fontName="Arial" fontSize="8" fontColor="FF000000"/>
156 </jd2:text>
157 <jd2:color scheme="gtHorizLinear" startColor="FFCCFFFF" endColor="FFFFFFFF"/>
158 <jd2:edgeStyle color="FF969696" thickness="1" stroke="dsSolid"/>
159 </jd2:subunit>
160 </jd2:complex>
161 </jd2:species>
162 </jd2:listOfSpecies>
163 <jd2:listOfReactions>
164 <jd2:reaction id="J0" reversible="false">
165 <jd2:listOfReactants>
166 <jd2:speciesReference species="X0" stoichiometry="1"/>
167 </jd2:listOfReactants>
168 <jd2:listOfProducts>
169 <jd2:speciesReference species="S1" stoichiometry="1"/>
170 </jd2:listOfProducts>
171 <jd2:listOfModifierEdges>
172 <jd2:modifierEdge>
173 <jd2:speciesReference species="S4"/>
174 <jd2:destinationReaction name="J0" regulatorType="rtNegative" relativePosition="0.415929203539823" destinationArcId="0" destinationLineSegmentId="0"/>
175 <jd2:display lineThickness="2" lineColor="FF0000FF" lineDashStyle="dsSolid" negativeMarkerStyle="rmBar">
176 <jd2:lineType type="ltSegmentedLine">
177 <jd2:pt x="423" y="224" type="modifier" speciesRef="S4"/>
178 <jd2:pt x="353" y="243"/>
179 <jd2:pt x="69" y="127"/>
180 <jd2:pt x="84" y="101"/>
181 </jd2:lineType>
182 </jd2:display>
183 </jd2:modifierEdge>
184 </jd2:listOfModifierEdges>
185 <jd2:kineticLaw type="explicit">
186 <jd2:rateEquation value="J0_VM1*(X0-S1/J0_Keq1)/(1+X0+S1+pow(S4,J0_h))"/>
187 </jd2:kineticLaw>
188 <jd2:display arrowStyle="ar1" arrowFillColor="FF000000" lineColor="FF838464" lineThickness="2">
189 <jd2:lineType type="ltLine">
190 <jd2:edge>
191 <jd2:pt x="45" y="72" type="substrate" speciesRef="X0"/>
192 <jd2:pt x="150" y="116" type="product" speciesRef="S1"/>
193 </jd2:edge>
194 </jd2:lineType>
195 </jd2:display>
196 </jd2:reaction>
197 <jd2:reaction id="J1" reversible="false">
198 <jd2:listOfReactants>
199 <jd2:speciesReference species="S1" stoichiometry="1"/>
200 </jd2:listOfReactants>
201 <jd2:listOfProducts>
202 <jd2:speciesReference species="S2" stoichiometry="1"/>
203 </jd2:listOfProducts>
204 <jd2:listOfModifierEdges/>
205 <jd2:kineticLaw type="explicit">
206 <jd2:rateEquation value="(10*S1-2*S2)/(1+S1+S2)"/>
207 </jd2:kineticLaw>
208 <jd2:display arrowStyle="ar1" arrowFillColor="FF000000" lineColor="FF838464" lineThickness="2">
209 <jd2:lineType type="ltLine">
210 <jd2:edge>
211 <jd2:pt x="150" y="116" type="substrate" speciesRef="S1"/>
212 <jd2:pt x="246" y="155" type="product" speciesRef="S2"/>
213 </jd2:edge>
214 </jd2:lineType>
215 </jd2:display>
216 </jd2:reaction>
217 <jd2:reaction id="J2" reversible="false">
218 <jd2:listOfReactants>
219 <jd2:speciesReference species="S2" stoichiometry="1"/>
220 </jd2:listOfReactants>
221 <jd2:listOfProducts>
222 <jd2:speciesReference species="S3" stoichiometry="1"/>
223 </jd2:listOfProducts>
224 <jd2:listOfModifierEdges/>
225 <jd2:kineticLaw type="explicit">
226 <jd2:rateEquation value="(10*S2-2*S3)/(1+S2+S3)"/>
227 </jd2:kineticLaw>
228 <jd2:display arrowStyle="ar1" arrowFillColor="FF000000" lineColor="FF838464" lineThickness="2">
229 <jd2:lineType type="ltLine">
230 <jd2:edge>
231 <jd2:pt x="246" y="155" type="substrate" speciesRef="S2"/>
232 <jd2:pt x="330" y="190" type="product" speciesRef="S3"/>
233 </jd2:edge>
234 </jd2:lineType>
235 </jd2:display>
236 </jd2:reaction>
237 <jd2:reaction id="J3" reversible="false">
238 <jd2:listOfReactants>
239 <jd2:speciesReference species="S3" stoichiometry="1"/>
240 </jd2:listOfReactants>
241 <jd2:listOfProducts>
242 <jd2:speciesReference species="S4" stoichiometry="1"/>
243 </jd2:listOfProducts>
244 <jd2:listOfModifierEdges/>
245 <jd2:kineticLaw type="explicit">
246 <jd2:rateEquation value="(10*S3-2*S4)/(1+S3+S4)"/>
247 </jd2:kineticLaw>
248 <jd2:display arrowStyle="ar1" arrowFillColor="FF000000" lineColor="FF838464" lineThickness="2">
249 <jd2:lineType type="ltLine">
250 <jd2:edge>
251 <jd2:pt x="330" y="190" type="substrate" speciesRef="S3"/>
252 <jd2:pt x="423" y="224" type="product" speciesRef="S4"/>
253 </jd2:edge>
254 </jd2:lineType>
255 </jd2:display>
256 </jd2:reaction>
257 <jd2:reaction id="J4" reversible="false">
258 <jd2:listOfReactants>
259 <jd2:speciesReference species="S4" stoichiometry="1"/>
260 </jd2:listOfReactants>
261 <jd2:listOfProducts>
262 <jd2:speciesReference species="X1" stoichiometry="1"/>
263 </jd2:listOfProducts>
264 <jd2:listOfModifierEdges/>
265 <jd2:kineticLaw type="explicit">
266 <jd2:rateEquation value="J4_V4*S4/(J4_KS4+S4)"/>
267 </jd2:kineticLaw>
268 <jd2:display arrowStyle="ar1" arrowFillColor="FF000000" lineColor="FF838464" lineThickness="2">
269 <jd2:lineType type="ltLine">
270 <jd2:edge>
271 <jd2:pt x="423" y="224" type="substrate" speciesRef="S4"/>
272 <jd2:pt x="427" y="304" type="product" speciesRef="X1"/>
273 </jd2:edge>
274 </jd2:lineType>
275 </jd2:display>
276 </jd2:reaction>
277 </jd2:listOfReactions>
278 </jd2:JDesignerLayout>
279 </annotation>
280 <listOfCompartments>
281 <compartment id="compartment" size="1"/>
282 </listOfCompartments>
283 <listOfSpecies>
284 <species id="S1" compartment="compartment" initialConcentration="0"/>
285 <species id="S2" compartment="compartment" initialConcentration="0"/>
286 <species id="S3" compartment="compartment" initialConcentration="0"/>
287 <species id="S4" compartment="compartment" initialConcentration="0"/>
288 <species id="X0" compartment="compartment" initialConcentration="10" boundaryCondition="true"/>
289 <species id="X1" compartment="compartment" initialConcentration="0" boundaryCondition="true"/>
290 </listOfSpecies>
291 <listOfParameters>
292 <parameter id="J0_VM1" value="10"/>
293 <parameter id="J0_Keq1" value="10"/>
294 <parameter id="J0_h" value="10"/>
295 <parameter id="J4_V4" value="2.5"/>
296 <parameter id="J4_KS4" value="0.5"/>
297 </listOfParameters>
298 <listOfReactions>
299 <reaction id="J0" reversible="false">
300 <listOfReactants>
301 <speciesReference species="X0"/>
302 </listOfReactants>
303 <listOfProducts>
304 <speciesReference species="S1"/>
305 </listOfProducts>
306 <listOfModifiers>
307 <modifierSpeciesReference species="S4"/>
308 </listOfModifiers>
309 <kineticLaw>
310 <math xmlns="http://www.w3.org/1998/Math/MathML">
311 <apply>
312 <divide/>
313 <apply>
314 <times/>
315 <ci> J0_VM1 </ci>
316 <apply>
317 <minus/>
318 <ci> X0 </ci>
319 <apply>
320 <divide/>
321 <ci> S1 </ci>
322 <ci> J0_Keq1 </ci>
323 </apply>
324 </apply>
325 </apply>
326 <apply>
327 <plus/>
328 <cn type="integer"> 1 </cn>
329 <ci> X0 </ci>
330 <ci> S1 </ci>
331 <apply>
332 <power/>
333 <ci> S4 </ci>
334 <ci> J0_h </ci>
335 </apply>
336 </apply>
337 </apply>
338 </math>
339 </kineticLaw>
340 </reaction>
341 <reaction id="J1" reversible="false">
342 <listOfReactants>
343 <speciesReference species="S1"/>
344 </listOfReactants>
345 <listOfProducts>
346 <speciesReference species="S2"/>
347 </listOfProducts>
348 <kineticLaw>
349 <math xmlns="http://www.w3.org/1998/Math/MathML">
350 <apply>
351 <divide/>
352 <apply>
353 <minus/>
354 <apply>
355 <times/>
356 <cn type="integer"> 10 </cn>
357 <ci> S1 </ci>
358 </apply>
359 <apply>
360 <times/>
361 <cn type="integer"> 2 </cn>
362 <ci> S2 </ci>
363 </apply>
364 </apply>
365 <apply>
366 <plus/>
367 <cn type="integer"> 1 </cn>
368 <ci> S1 </ci>
369 <ci> S2 </ci>
370 </apply>
371 </apply>
372 </math>
373 </kineticLaw>
374 </reaction>
375 <reaction id="J2" reversible="false">
376 <listOfReactants>
377 <speciesReference species="S2"/>
378 </listOfReactants>
379 <listOfProducts>
380 <speciesReference species="S3"/>
381 </listOfProducts>
382 <kineticLaw>
383 <math xmlns="http://www.w3.org/1998/Math/MathML">
384 <apply>
385 <divide/>
386 <apply>
387 <minus/>
388 <apply>
389 <times/>
390 <cn type="integer"> 10 </cn>
391 <ci> S2 </ci>
392 </apply>
393 <apply>
394 <times/>
395 <cn type="integer"> 2 </cn>
396 <ci> S3 </ci>
397 </apply>
398 </apply>
399 <apply>
400 <plus/>
401 <cn type="integer"> 1 </cn>
402 <ci> S2 </ci>
403 <ci> S3 </ci>
404 </apply>
405 </apply>
406 </math>
407 </kineticLaw>
408 </reaction>
409 <reaction id="J3" reversible="false">
410 <listOfReactants>
411 <speciesReference species="S3"/>
412 </listOfReactants>
413 <listOfProducts>
414 <speciesReference species="S4"/>
415 </listOfProducts>
416 <kineticLaw>
417 <math xmlns="http://www.w3.org/1998/Math/MathML">
418 <apply>
419 <divide/>
420 <apply>
421 <minus/>
422 <apply>
423 <times/>
424 <cn type="integer"> 10 </cn>
425 <ci> S3 </ci>
426 </apply>
427 <apply>
428 <times/>
429 <cn type="integer"> 2 </cn>
430 <ci> S4 </ci>
431 </apply>
432 </apply>
433 <apply>
434 <plus/>
435 <cn type="integer"> 1 </cn>
436 <ci> S3 </ci>
437 <ci> S4 </ci>
438 </apply>
439 </apply>
440 </math>
441 </kineticLaw>
442 </reaction>
443 <reaction id="J4" reversible="false">
444 <listOfReactants>
445 <speciesReference species="S4"/>
446 </listOfReactants>
447 <listOfProducts>
448 <speciesReference species="X1"/>
449 </listOfProducts>
450 <kineticLaw>
451 <math xmlns="http://www.w3.org/1998/Math/MathML">
452 <apply>
453 <divide/>
454 <apply>
455 <times/>
456 <ci> J4_V4 </ci>
457 <ci> S4 </ci>
458 </apply>
459 <apply>
460 <plus/>
461 <ci> J4_KS4 </ci>
462 <ci> S4 </ci>
463 </apply>
464 </apply>
465 </math>
466 </kineticLaw>
467 </reaction>
468 </listOfReactions>
469 </model>
470</sbml>
Model YAML:
1model:
2 name: feedback
3 language: sbml
4 args: ./src/sbml3.xml
5 only_output_final_step: true
6 inputs:
7 - name: input
8 vars: [time,S1,S2]
9 default_file:
10 name: ./Input/input.txt
11 filetype: table
12 outputs:
13 - name: output
14 vars: [time,S1,S2]
15 default_file:
16 name: ./output.txt
17 filetype: table