An example of creating a model using SBML Level 3 Qualitative Models.
50 sbmlns = SBMLNamespaces(3, 1,
"qual", 1)
53 document = SBMLDocument(sbmlns)
56 document.setPackageRequired(
"qual",
True)
59 model = document.createModel()
62 compartment = model.createCompartment()
63 compartment.setId(
"c")
64 compartment.setConstant(
True)
67 mplugin = model.getPlugin(
"qual")
70 qs = mplugin.createQualitativeSpecies()
72 qs.setCompartment(
"c")
79 t = mplugin.createTransition()
85 i.setQualitativeSpecies(
"s1")
86 i.setTransitionEffect(INPUT_TRANSITION_EFFECT_NONE)
87 i.setSign(INPUT_SIGN_NEGATIVE)
88 i.setThresholdLevel(2)
93 o.setQualitativeSpecies(
"s1")
94 o.setTransitionEffect(OUTPUT_TRANSITION_EFFECT_PRODUCTION)
98 ft = t.createFunctionTerm()
103 dt = t.createDefaultTerm()
109 if __name__ ==
'__main__':