schrodinger.application.matsci.rdpattern_gui module¶
GUI elements to generate and evaluate Smiles/SMARTS pattern for both CG and all atomic structure using RDKIT
Copyright Schrodinger, LLC. All rights reserved.
- class schrodinger.application.matsci.rdpattern_gui.GuiPattern(struct, *, implicitH=False, is_cg=None, sanitize=True, include_stereo=True, fall_back=False)¶
Bases:
schrodinger.application.matsci.rdpattern.Pattern
,schrodinger.ui.qt.widgetmixins.basicmixins.MessageBoxMixin
This class describes a pattern that can be used by graphical user interface.
- evaluateSmarts(smarts, **kwargs)¶
Overwrite parent class to reload rdmol to obey stereochemistry in case smarts has stereo and current rdmol does not.
- class schrodinger.application.matsci.rdpattern_gui.SMARTSFrame(parent=None, layout=None, tag=None, empty_ok=True, label='', indicator=True, indicator_state=1, indicator_tips=True, method=SMARTS_METHOD.canvas, manage=True, show_clear=False, **kwargs)¶
Bases:
schrodinger.ui.qt.swidgets.SFrame
,schrodinger.ui.qt.widgetmixins.basicmixins.MessageBoxMixin
A composite widget class that contains the RDPatternSMARTSEdit, ‘Use Workspace Selection’ button and SavedSMARTSManager toolbutton
- BUTTON_TEXT = 'Use Workspace Selection'¶
- __init__(parent=None, layout=None, tag=None, empty_ok=True, label='', indicator=True, indicator_state=1, indicator_tips=True, method=SMARTS_METHOD.canvas, manage=True, show_clear=False, **kwargs)¶
- Parameters
parent (
QWidget
) – Parent widgetlayout (
QLayout
) – If supplied, this widget will be added to the layouttag (
str
) – A string that defines the edit for use in warning messages. ex. “No valid SMARTS pattern for ‘tag’”. If not supplied, a generic message will be used.empty_ok (
bool
) – Whether an empty edit is considered VALID or INTERMEDIATElabel (
str
) – The label preceeding the QLineEditindicator (
bool
) – True if a valid/invalid indicator should be appendedindicator_state (
int
) – The default state of the indicator (INDICATOR_VALID, INDICATOR_INVALID or INDICATOR_INTERMEDIATE)indicator_tips (
bool
) – Whether to show the tooltips for the different states of the indicatormethod (msconst.SMARTS_METHOD) – Method to use to generate SMARTS. Default is msconst.SMARTS_METHOD.canvas.
manage (
bool
) – Whether to add theSavedItemsManager
toolbuttonshow_clear (bool) – Whether to show a clear button in the line edit
- isValid()¶
Return True if valid, False otherwise.
- Returns
True if valid
- Return type
bool
- reset()¶
Reset the SMARTS edit widget
- class schrodinger.application.matsci.rdpattern_gui.RDPatternSMARTSEdit(*args, method=SMARTS_METHOD.rdkit, **kwargs)¶
Bases:
schrodinger.ui.qt.swidgets.SMARTSEdit
- __init__(*args, method=SMARTS_METHOD.rdkit, **kwargs)¶
Override parent method to get the
method
as kwarg and set canvas_api, rdkit_api bool value accordingly.- Parameters
method (msconst.SMARTS_METHOD) – Method to use to generate SMARTS