Using the 'groups' package example.
27 sbmlns = SBMLNamespaces(3,1,
"groups",1)
55 document = SBMLDocument(sbmlns)
56 document.setPkgRequired(
'groups',
False)
60 model= document.createModel()
64 compartment = model.createCompartment()
65 compartment.setId(
"cytosol")
66 compartment.setConstant(
True)
68 compartment=model.createCompartment()
69 compartment.setId(
"mitochon")
70 compartment.setConstant(
True)
74 species = model.createSpecies()
76 species.setCompartment(
"cytosol")
77 species.setInitialConcentration(1)
78 species.setHasOnlySubstanceUnits(
False)
79 species.setBoundaryCondition(
False)
80 species.setConstant(
False)
82 species = model.createSpecies()
84 species.setCompartment(
"mitochon")
85 species.setInitialConcentration(2)
86 species.setHasOnlySubstanceUnits(
False)
87 species.setBoundaryCondition(
False)
88 species.setConstant(
False)
98 mplugin = model.getPlugin(
"groups")
103 group = mplugin.createGroup()
106 group.setKind(
"classification")
107 group.setSBOTerm(
"SBO:0000252")
109 member = group.createMember()
110 member.setIdRef(
"ATPc")
112 member = group.createMember()
113 member.setIdRef(
"ATPm")
115 writeSBML(document,
"groups_example1-python.xml")