Example #1
0
    #sparse_reaction = {1:-1, 499:-1, 603:1, 86:1}
    #sparse_reaction = {1:-1, 6:-1, 311:-1, 288:1, 5:1, 80:2, 26:1}
    #sparse_reaction = {408:-1, 6:-1, 4092:1, 5:1}
    #sparse_reaction = {588:-1, 1:-1, 114:1, 9:1}
    #sparse_reaction = {1:-1, 3:-1, 149:-1, 288:1, 4:1, 80:2, 22:1}
    react = Reaction("reaction", {408: -1, 6: -1, 4092: 1, 5: 1})

    #sys.stdout.write("The dG0_r of PPi + H20 <=> 2 Pi: \n\n")

    react.Balance()
    print react.FullReactionString()

    sys.stdout.write("%5s | %5s | %6s | %6s\n" % ("pH", "I", "T", "dG0_r"))
    for pH in np.arange(5, 10.01, 0.25):
        H_withpka.pH = pH
        sys.stdout.write("%5.2f | %5.2f | %6.1f | %6.2f\n" %
                         (H_withpka.pH, H_withpka.I, H_withpka.T,
                          react.PredictReactionEnergy(H_withpka)))

    for cid in react.get_cids():
        print '-' * 50
        print "C%05d - %s:" % (cid, H_withpka.kegg.cid2name(cid))
        print H_withpka.kegg.cid2inchi(cid)
        print "Pseudoisomers:\n", H_withpka.cid2PseudoisomerMap(cid)
        print "dG0'_f = %.1f kJ/mol" % H_withpka.cid2PseudoisomerMap(
            cid).Transform(pH=7, I=0, pMg=10, T=298.15)
        print "dG0_f = %.1f kJ/mol" % H_nopka.cid2PseudoisomerMap(
            cid).Transform(pH=7, I=0, pMg=10, T=298.15)
        print "Dissociations:\n", H_withpka.dissociation.GetDissociationTable(
            cid)