schrodinger.application.matsci.smartsutilsgui module

GUI elements for working with SMARTS patterns

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.application.matsci.smartsutilsgui.SMARTSNameValidator(*args, **kwargs)[source]

Bases: schrodinger.application.matsci.atomicsymbolsgui.AtomNameLabelValidator

Ensures that the line edit contains only valid SMARTS name characters

VALID_LABEL_PUNCTUATION = '_-()[]'
Acceptable = 2
Intermediate = 1
Invalid = 0
class State

Bases: int

__init__(*args, **kwargs)

Overwrite parent to set the valid label characters dictionary on creation

blockSignals(self, bool) bool
changed

changed(self) [signal]

childEvent(self, QChildEvent)
children(self) List[QObject]
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
deleteLater(self)
destroyed

destroyed(self, object: QObject = None) [signal]

disconnect(QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, QMetaMethod)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
event(self, QEvent) bool
eventFilter(self, QObject, QEvent) bool
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChild(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
fixup(self, str) str
inherits(self, str) bool
installEventFilter(self, QObject)
isSignalConnected(self, QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
killTimer(self, int)
locale(self) QLocale
metaObject(self) QMetaObject
moveToThread(self, QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, str) [signal]

parent(self) QObject
property(self, str) Any
pyqtConfigure(...)

Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.

receivers(self, PYQT_SIGNAL) int
removeEventFilter(self, QObject)
restoreLastValidValue(edit)

Restores edit to the last valid value validated by this Validator

Parameters

edit (QLineEdit) – The QLineEdit to restore the value to

sender(self) QObject
senderSignalIndex(self) int
setLocale(self, QLocale)
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) bool
signalsBlocked(self) bool
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = - 1) str
validate(value, position)

See PyQt documentation for arguments and return values.

schrodinger.application.matsci.smartsutilsgui.getSMARTSFromWS(maestro, warning, smart_edit, canvas_api=False, use_rdkit=False, fall_back=False, check_connectivity=True, allow_intermolecular=False)[source]

Get the SMARTS pattern for the selected atoms in the workspace and insert it into the SMARTS entry

Parameters
  • maestro (schrodinger.maestro.maestro) – maestro provides structure and selected atom index

  • warning (function) – prints warning message

  • smart_edit (schrodinger.ui.qt.swidgets.SMARTSEdit) – setText() sets the name of the smart pattern in GUI

  • canvas_api (bool) – whether to use analyze.generate_smarts or analyze.generate_smarts_canvas

  • use_rdkit (bool) – Whether to use rdkit

  • fall_back (bool) – whether to fall back on using analyze.generate_smarts if canvas/rdkit fails, used only if canvas_api is True

  • check_connectivity (bool) – If True, check for whether the atoms given are connected and raise a ValueError if they are not. SMARTS generation will give bogus results for unconnected atoms.

  • allow_intermolecular (bool) – if check_connectivity is False this controls whether matches must be intramolecular or allowed to be intermolecular