schrodinger.application.report2d module

Utilities for generating PDF and HTML 2D report files.

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.application.report2d.PicturePrinter(printer, pictures, progress, num_cols, max_scale_factor)

Bases: object

Class for drawing structure pictures to a QPrinter for generating PDFs.

CELL_PADDING = 10
PAGE_MARGIN = 10
run()

Execute the drawing.

class schrodinger.application.report2d.Report2D(adaptor, renderer, render_model, app=None)
generateHtml(sts, num_sts, outfile)

Generates an HTML document from the structures returned by the specified Structures iterator.

sts - Iterator that yields Structure objects.
You can pass structure.StructureReader(<file>)

num_sts - Number of structures

outfile - Name of the file to generate (must end with *.html)

generatePdf(sts, num_sts, outfile)

Generates a PDF document from the structures returned by the specified Structures iterator.

sts - Iterator that yields Structure objects.
You can pass structure.StructureReader(<file>)

num_sts - Number of structures

outfile - Name of the file to generate (must end with *.pdf)

generateXls(sts, num_sts, outfile)

Generates an Excel spreadsheet, which is basically just like HTML file, but with a different exteion and only one structure per row.

sts - Iterator that yields Structure objects.
You can pass structure.StructureReader(<file>)

num_sts - Number of structures

outfile - Name of the file to generate (must end with *.html)

warning(msg)
class schrodinger.application.report2d.StructInfo(pic, width, height, labels, title)

Stores information that is needed to draw a structure to PDF/HTML. This includes the QPicture or image file path, picture dimentions, lables, and structure title.