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)¶
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.
- __init__(pic, width, height, labels, title)¶
- class schrodinger.application.report2d.PicturePrinter(printer, pictures, num_cols, max_scale_factor)¶
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)¶
- 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, benzenes never take up the whole image.
- run()¶
Execute the drawing.
- class schrodinger.application.report2d.Report2D¶
Bases:
object
- __init__()¶
- warning(msg)¶
- generatePdf(sts, num_sts, outfile)¶
- 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)¶
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)¶
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)