schrodinger.ui.sketcher module¶
This module is a wrapper for the sketcher SIP library
- exception schrodinger.ui.sketcher.SketcherStructureConversionError¶
Bases:
RuntimeErrorAn error that occurs when converting the Sketcher workspace molecule to a
Structureobject.
- class schrodinger.ui.sketcher.SketcherWidget¶
Bases:
SketcherWidget- setStructure(st: Structure)¶
Replace the current Sketcher workspace contents with the given molecule
- getStructure(sanitize: bool = False, dialog_on_conversion_error=False) Structure¶
Return the current Sketcher workspace contents as a
Structureobject with 3D coordinates.- Parameters:
sanitize – whether to sanitize the extracted structure
dialog_on_conversion_error – if True, any operation that raises a
SketcherStructureConversionError(see below) will instead display a dialog and returnNone
- Raises:
SketcherStructureConversionError – If
dialog_on_conversion_errorisFalseand any of the following are true: the Sketcher workspace is empty, the Sketcher workspace contains more than one molecule, sanitize` isTrueand the molecule in the Sketcher workspace cannot be sanitized.
- class schrodinger.ui.sketcher.SelectOnlySketcherWidget(parent=None)¶
Bases:
SketcherWidgetA Sketcher Widget that limits user-interaction to selecting atoms and bonds.
- __init__(parent=None)¶