Пример #1
0
        Gr.copy_positions(Gref)
        Gprev = Gr 
        
    cumulative_svg = Scene(500, 200, 14)
    Gref.svg_reaction(Gr, cumulative_svg)

    reaction_svg = Scene(500, 200, 14)
    Gl.svg_reaction(Gr, reaction_svg)
    last_reaction_list = Gl.get_reaction_list(Gr)
    total_reaction_list += last_reaction_list

    html_file.write("<br>\n")
    html_file.write("&#916;G = %.0f kJ/mol" % (delta_G) + "<br>\n")
    html_file.write("E(activate) = %.0f kJ/mol" % (activation_energy) + "<br>\n")
    html_file.write("<br>\n".join(last_reaction_list) + "<br>\n")
    reaction_svg.embed_in_html(html_file, html_path + "/", pathway + "/step%d_reaction" % (i))
    cumulative_svg.embed_in_html(html_file, html_path + "/", pathway + "/step%d_cumulative" % (i))
    html_file.write("</p>\n")

print >> sys.stderr, "*************** FINISHED *****************"

html_file.close()

# Command to execute to display images.
browser_prog = None
for file in ['C:\Program Files\Safari\Safari.exe', \
             '/Applications/Safari.app/Contents/MacOS/Safari']:
    if (os.path.isfile(file)):
        browser_prog = file
        print >> sys.stderr, "Using SVG viewer: %s" % display_prog
        break