schrodinger.application.report2d module¶
Utilities for generating PDF and HTML 2D report files.
Copyright Schrodinger, LLC. All rights reserved.
- class schrodinger.application.report2d.StructInfo(pic, width, height, labels, title)[source]¶
Bases:
object
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.
- class schrodinger.application.report2d.PicturePrinter(printer, pictures, num_cols, max_scale_factor)[source]¶
Bases:
object
Class for drawing structure pictures to a QPrinter for generating PDFs.
- PAGE_MARGIN = 10¶
- CELL_PADDING = 10¶
- __init__(printer, pictures, num_cols, max_scale_factor)[source]¶
- Parameters
printer (QPrinter instance) – PDF printer to draw the pictures to.
pictures (List of StructInfo instances.) – Pictures to draw for each structure.
num_cols (int) – Number of columns to create in the PDF.
max_scale_factor (float) – This setting will set the limit on shrinking of smaller structures. So that, for example, benzens never take up the whole image.
- class schrodinger.application.report2d.Report2D(adaptor, renderer, render_model)[source]¶
Bases:
object
- generatePdf(sts, num_sts, outfile)[source]¶
- Generates a PDF document from the structures returned by the specified
Structures iterator.
- Parameters
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)
- generateHtml(sts, num_sts, outfile)[source]¶
Generates an HTML document from the structures returned by the specified Structures iterator.
- Parameters
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)
- generateXls(sts, num_sts, outfile)[source]¶
Generates an Excel spreadsheet, which is basically just like HTML file, but with a different exteion and only one structure per row.
- Parameters
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)