Obtaining stoichiometry from speciesReference

10 views
Skip to first unread message

Deepa

unread,
Mar 2, 2019, 10:14:13 PM3/2/19
to libsbml-development
Hi All,

I'm trying to fetch the stoichiometry of the species (reactants and products)  involved in every reaction

I am not able to fetch values given in SBML(L-2,V4)
 
<listOfReactants>
          <speciesReference species="eglc" stoichiometry="1"/>
        </listOfReactants>
        <listOfProducts>
          <speciesReference species="glc" stoichiometry="1"/>


I could obtain the species names, but reactant.getStoichiometry() doesn't work.

Could someone help? I also tried reactant.getName() and getId(). It returns none type objects though.


Here's my code


    ReactionList=  model.getListOfReactions()

    for reaction in ReactionList:
        reactionID = reaction.getId()
        Reactants = reaction.getListOfReactants()
        for reactant in Reactants:
            print(reactant.getSpecies())
            

Deepa

unread,
Mar 2, 2019, 10:53:44 PM3/2/19
to libsbml-development
getStoichiometry () works.

Thanks!


--
You received this message because you are subscribed to the Google Groups "libsbml-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to libsbml-develop...@googlegroups.com.
To post to this group, send email to libsbml-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/libsbml-development/e1b741dd-d1af-44e5-9387-ec2d0894a1c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages