Skip to content

Instantly share code, notes, and snippets.

@kozo2
Created November 9, 2012 09:56
Show Gist options
  • Save kozo2/4044934 to your computer and use it in GitHub Desktop.
Save kozo2/4044934 to your computer and use it in GitHub Desktop.
print modeljson function
# epdp model print functions
#for k,v in m.species.iteritems():
# print "s" + k + " = " + "model.Species('" + v.str_simple() + "', 1.5e-12, 5e-9)"
# print "m.add_species_type(s" + k + ")"
#counter = 0
#for result in reaction_results:
# for reaction in result.reactions:
# counter = counter + 1
# if len(reaction.reactatants) > len(reaction.products):
# print "r" + counter + " = model.create_binding_reaction_rule(s" + ",".join(["s" + str(reaction.reactants[0].id),
# "s" + str(reaction.reactants[1].id),
# "s" + str(reaction.products[0].id)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment