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)¶ Initialize self. See help(type(self)) for accurate signature.
-
-
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.
-
PAGE_MARGIN
= 10¶
-
CELL_PADDING
= 10¶
-
__init__
(printer, pictures, progress, 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.
- progress (QProgressDialog (or None if outside of Maestro)) – Progress dialog to update while drawing.
- 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.
-
run
()¶ Execute the drawing.
-
-
class
schrodinger.application.report2d.
Report2D
(adaptor, renderer, render_model, app=None)¶ Bases:
object
-
__init__
(adaptor, renderer, render_model, app=None)¶ Initialize self. See help(type(self)) for accurate signature.
-
warning
(msg)¶
-
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)
-
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)
-
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)
-