schrodinger.ui.qt.structure2d module

2D structures drawing

schrodinger.ui.qt.structure2d.get_qpicture_protected(renderer, chmmol, gen_coord=True)[source]

Generate a QPicture for the given molecule. If the picture couldn’t be generated (e.g. the molecule is too large), then a QPicture will contain the failure message text.

Parameters
  • renderer (Chm2DRenderer intance) – The renderer to use for generating the QPicture

  • chmmol (ChmMol instance.) – Structure to generate the picture for.

  • gen_coord (bool) – if True (default) generate new coordinates; if False, use existing 2D coordinates.

Return type

QPicture

Returns

The generated picture.

schrodinger.ui.qt.structure2d.generate_qimage_from_chmmol(chmmol, width, height, renderer=None, bg_color=None, max_scale=None, gen_coord=True)[source]

“Generate a 2D image in QImage format of a ChmMol molecule.”

Parameters
  • chmmol (ChmMol instance.) – Structure to generate the picture for.

  • width (int) – width in pixels of the generated QImage.

  • height (int) – height in pixels of the generated QImage.

  • renderer (Chm2DRenderer intance or None) – The renderer to use for generating the QImage. If None, a new renderer will be created.

  • bg_color (PyQt5.QtGui.QColor or None) – background color filling the image around the scaled molecule.

  • max_scale (float or None) – maximum scaling of the structure image.

  • gen_coord (bool) – if True (default) generate new coordinates; if False, use existing 2D coordinates.

Return type

QImage

Returns

The generated QImage.

schrodinger.ui.qt.structure2d.generate_qimage_from_structure(st, width, height, renderer=None, bg_color=None, max_scale=None, stereo_mode=6, gen_coord=True)[source]

Generate a 2D image in QImage format of a schrodinger.structure.Structure. An intermediate ChmMol will be generated with stereochemstry deduced according to the stereo_mode parameter.

Parameters
  • st (Structure instance.) – Structure to generate the picture for.

  • width (int) – width in pixels of the generated QImage.

  • height (int) – height in pixels of the generated QImage.

  • renderer (Chm2DRenderer intance or None) – The renderer to use for generating the QImage.

  • bg_color (PyQt5.QtGui.QColor or None) – background color filling the image around the scaled molecule.

  • max_scale (float or None) – maximum scaling of the structure image.

  • stereo_mode (schrodinger.infra._canvas2d.ChmMmctAdaptor.StereoType) – stereo source for internal transformation to ChmMol.

  • gen_coord (bool) – if True generate coordinates for chmmol.

Return type

QImage

Returns

The generated QImage.

schrodinger.ui.qt.structure2d.get_qpicture_highlight(renderer, chmmol, atoms, bonds, color, gen_coord=False)[source]

Generate a QPicture for the given molecule and highlight given atoms and bonds. If the picture couldn’t be generated (e.g. the molecule is too large), then a QPicture will contain the failure message text.

Parameters
  • renderer (Chm2DRenderer intance) – The renderer to use for generating the QPicture

  • chmmol (ChmMol instance.) – Structure to generate the picture for.

  • atoms (list) – list of atoms that should be highlighted

  • bonds (list) – list of bonds that should be highlighted

  • color (QtGui.QColor) – color that is used to highlight atoms and bonds

  • gen_coord (bool) – if True generate coordinates.

Return type

QPicture

Returns

The generated picture.

schrodinger.ui.qt.structure2d.get_chmmol_bonds_from_atoms(chmmol, atoms)[source]

This function returns a list of bonds that connect atoms in a given list.

Parameters
  • chmmol (canvas2d.ChmMol) – molecule structure

  • atoms (list) – list of atom indices

schrodinger.ui.qt.structure2d.get_rdmol_for_2d_rendering(st)[source]

Generate a RDKit molecule from schrodinger structure object. Also modify the newly generated RDKit molecule to make it suitable for 2D rendering.

Parameters

st (structure.Structure) – structure object

Returns

RDKit molecule

Return type

Chem.rdchem.Mol

schrodinger.ui.qt.structure2d.get_st_image_using_sketcher(st, width=200, height=200)[source]
Parameters
  • st (structure.Structure) – structure object

  • width (int) – image width

  • height (int) – image height

Returns

2d structure image rendered using sketcher

Return type

QtGui.QImage

schrodinger.ui.qt.structure2d.get_aligned_pictures(sts, renderer=None, atomTyping=11, core_color=None)[source]

Calculate the maximum common substructure (MCS) between the given ligands, and generate 2D images, aligned by the core. If no MCS was detected, the images will be unaligned.

NOTE: This function becomes exponentioally slow with larger number of structures. Recommened maximum around 30 structures.

Parameters
  • sts (Iterable of structure.Structure objects) – Structures to average

  • renderer (Chm2DRenderer intance) – The renderer to use for generating the QPicture (optional)

  • atomTyping (int) – Atom typing scheme to use. Default is 11. For list of available schemes, see $SCHRODINGER/utilities/canvasMCS -h

  • highlight_color – Optional Color to highlight the common substructure.

Return type

List of QPicture objects.

Returns

QPictures for the aligned 2D images.

schrodinger.ui.qt.structure2d.get_ligand(st)[source]

Return a substructure that can be rendered in a 2D image (the first ligand in st, unless it’s also has too many atoms).

Parameters

st (structure.Structure) – the structure

Returns

the ligand structure or None if the structure has too many atoms

Return type

structure.Structure or None

class schrodinger.ui.qt.structure2d.StructurePicture(parent=None, layout=None, height=200, width=200, background='white', annotators=None)[source]

Bases: PyQt5.QtWidgets.QLabel

This is the label that normally stores the picture of the molecule. It can also store a text message.

We make sure that this stays the same size, no matter what data (if any) is stored in it.

__init__(parent=None, layout=None, height=200, width=200, background='white', annotators=None)[source]
Parameters
  • parent (QWidget) – the widget that owns this widget

  • layout (QLayout) – The layout that this widget should be placed in

  • height (int) – the height of this label in pixels

  • width (int) – the width of this label in pixels

  • annotators (list) – Each item of the list should be a canvas2d.ChemViewAnnotator object that will be applied to the canvas2d.ChmRender2DModel when generating the image

sizeHint(self) QSize[source]
drawStructure(structure, StereoType=6, hydrogenTreatment=1, wantProperties=True, wantMMStereoProps=True, readAtomBondProperties=True, allowRadicals=False)[source]

Makes a 2-D rendering of the structure

Parameters
  • structure (schrodinger.structure.Structure class object) – structure to be drawn on the canvas

  • StereoType (canvas2d.ChmMmctAdaptor.StereoType) – Stereochemistry option to use. Available options: # Does not include stereochemistry info: canvas2d.ChmMmctAdaptor.NoStereo # Ignores mmstereo annotations: canvas2d.ChmMmctAdaptor.StereoFromGeometry # Silently ignores stereo information that Canvas doesn’t agree with: canvas2d.ChmMmctAdaptor.StereoFromGeometry_Safe # Ignores 3d geometry: canvas2d.ChmMmctAdaptor.StereoFromAnnotation # Silently ignores stereo information that Canvas doesn’t agree with: canvas2d.ChmMmctAdaptor.StereoFromAnnotation_Safe # Uses mmstereo annotaions with 3D geometry as a backup: canvas2d.ChmMmctAdaptor.StereoFromAnnotationAndGeometry # Silently ignores stereo information that Canvas doesn’t agree with: canvas2d.ChmMmctAdaptor.StereoFromAnnotationAndGeometry_Safe

  • hydrogenTreatment (canvas2d.ChmAtomOption.H) – Hydrogen treatment method. Available options: canvas2d.ChmAtomOption.H_Never canvas2d.ChmAtomOption.H_ExplicitOnly canvas2d.ChmAtomOption.H_Polar canvas2d.ChmAtomOption.H_ExplicitPolar canvas2d.ChmAtomOption.H_Chiral canvas2d.ChmAtomOption.H_ExplicitChiral canvas2d.ChmAtomOption.H_ExplicitPolarAndChiral canvas2d.ChmAtomOption.H_All

  • wantProperties (bool) – Whether properties should be copied.

  • wantMMStereoProps (bool) – Whether to copy mmstereo properties.

  • readAtomBondProperties (bool) – Whether to copy atom and bond-level properties.

  • allowRadicals (bool) – Whether to assume that valence deficiencies represent unpaired electrons.

drawChmmol(chmmol, atoms=[], bonds=[], color=<PyQt5.QtGui.QColor object>, gen_coord=False)[source]

Makes a 2-D rendering of the chmmol object with optional atoms and bonds highlighting.

Parameters
  • chmmol (ChmMol instance.) – Structure to generate the picture for.

  • atoms (list) – list of atoms that should be highlighted

  • bonds (list) – list of bonds that should be highlighted

  • color (QtGui.QColor) – color that is used to highlight atoms and bonds

  • gen_coord (bool) – if True generate coordinates.

setAnnotators(annotators)[source]

This function allows to reset annotators between renderning 2-D structures.

Parameters

annotators (list) – Each item of the list should be a canvas2d.ChemViewAnnotator object that will be applied to the canvas2d.ChmRender2DModel when generating the image

Box = 1
DrawChildren = 2
DrawWindowBackground = 1
HLine = 4
IgnoreMask = 4
NoFrame = 0
class PaintDeviceMetric

Bases: int

Panel = 2
PdmDepth = 6
PdmDevicePixelRatio = 11
PdmDevicePixelRatioScaled = 12
PdmDpiX = 7
PdmDpiY = 8
PdmHeight = 2
PdmHeightMM = 4
PdmNumColors = 5
PdmPhysicalDpiX = 9
PdmPhysicalDpiY = 10
PdmWidth = 1
PdmWidthMM = 3
Plain = 16
Raised = 32
class RenderFlag

Bases: int

class RenderFlags
class RenderFlags(Union[QWidget.RenderFlags, QWidget.RenderFlag]) None
class RenderFlags(QWidget.RenderFlags) None

Bases: sip.simplewrapper

__init__(*args, **kwargs)
class Shadow

Bases: int

Shadow_Mask = 240
class Shape

Bases: int

Shape_Mask = 15
class StyleMask

Bases: int

StyledPanel = 6
Sunken = 48
VLine = 5
WinPanel = 3
acceptDrops(self) bool
accessibleDescription(self) str
accessibleName(self) str
actionEvent(self, QActionEvent)
actions(self) List[QAction]
activateWindow(self)
addAction(self, QAction)
addActions(self, Iterable[QAction])
adjustSize(self)
alignment(self) Qt.Alignment
autoFillBackground(self) bool
backgroundRole(self) QPalette.ColorRole
baseSize(self) QSize
blockSignals(self, bool) bool
buddy(self) QWidget
changeEvent(self, QEvent)
childAt(self, QPoint) QWidget
StructurePicture.childAt(self, int, int) -> QWidget
childEvent(self, QChildEvent)
children(self) List[QObject]
childrenRect(self) QRect
childrenRegion(self) QRegion
clear(self)
clearFocus(self)
clearMask(self)
close(self) bool
closeEvent(self, QCloseEvent)
colorCount(self) int
connectNotify(self, QMetaMethod)
contentsMargins(self) QMargins
contentsRect(self) QRect
contextMenuEvent(self, QContextMenuEvent)
contextMenuPolicy(self) Qt.ContextMenuPolicy
create(self, window: PyQt5.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
createWindowContainer(QWindow, parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = 0) QWidget
cursor(self) QCursor
customContextMenuRequested

customContextMenuRequested(self, QPoint) [signal]

customEvent(self, QEvent)
deleteLater(self)
depth(self) int
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
destroyed

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

devType(self) int
devicePixelRatio(self) int
devicePixelRatioF(self) float
devicePixelRatioFScale() float
disconnect(QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
drawFrame(self, QPainter)
dropEvent(self, QDropEvent)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
effectiveWinId(self) PyQt5.sip.voidptr
ensurePolished(self)
enterEvent(self, QEvent)
event(self, QEvent) bool
eventFilter(self, QObject, QEvent) bool
find(PyQt5.sip.voidptr) QWidget
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]
focusInEvent(self, QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, bool) bool
focusOutEvent(self, QFocusEvent)
focusPolicy(self) Qt.FocusPolicy
focusPreviousChild(self) bool
focusProxy(self) QWidget
focusWidget(self) QWidget
font(self) QFont
fontInfo(self) QFontInfo
fontMetrics(self) QFontMetrics
foregroundRole(self) QPalette.ColorRole
frameGeometry(self) QRect
frameRect(self) QRect
frameShadow(self) QFrame.Shadow
frameShape(self) QFrame.Shape
frameSize(self) QSize
frameStyle(self) int
frameWidth(self) int
geometry(self) QRect
getContentsMargins(self) Tuple[int, int, int, int]
grab(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(- 1, - 1))) QPixmap
grabGesture(self, Qt.GestureType, flags: Union[Qt.GestureFlags, Qt.GestureFlag] = Qt.GestureFlags())
grabKeyboard(self)
grabMouse(self)
grabMouse(self, Union[QCursor, Qt.CursorShape]) None
grabShortcut(self, Union[QKeySequence, QKeySequence.StandardKey, str, int], context: Qt.ShortcutContext = Qt.WindowShortcut) int
graphicsEffect(self) QGraphicsEffect
graphicsProxyWidget(self) QGraphicsProxyWidget
hasFocus(self) bool
hasHeightForWidth(self) bool
hasMouseTracking(self) bool
hasScaledContents(self) bool
hasSelectedText(self) bool
hasTabletTracking(self) bool
height(self) int
heightForWidth(self, int) int
heightMM(self) int
hide(self)
hideEvent(self, QHideEvent)
indent(self) int
inherits(self, str) bool
initPainter(self, QPainter)
initStyleOption(self, QStyleOptionFrame)
inputMethodEvent(self, QInputMethodEvent)
inputMethodHints(self) Qt.InputMethodHints
inputMethodQuery(self, Qt.InputMethodQuery) Any
StructurePicture.insertAction(self, QAction, QAction)
insertActions(self, QAction, Iterable[QAction])
installEventFilter(self, QObject)
isActiveWindow(self) bool
isAncestorOf(self, QWidget) bool
isEnabled(self) bool
isEnabledTo(self, QWidget) bool
isFullScreen(self) bool
isHidden(self) bool
isLeftToRight(self) bool
isMaximized(self) bool
isMinimized(self) bool
isModal(self) bool
isRightToLeft(self) bool
isSignalConnected(self, QMetaMethod) bool
isVisible(self) bool
isVisibleTo(self, QWidget) bool
isWidgetType(self) bool
isWindow(self) bool
isWindowModified(self) bool
isWindowType(self) bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
keyboardGrabber() QWidget
killTimer(self, int)
layout(self) QLayout
layoutDirection(self) Qt.LayoutDirection
leaveEvent(self, QEvent)
lineWidth(self) int
linkActivated

linkActivated(self, str) [signal]

linkHovered

linkHovered(self, str) [signal]

locale(self) QLocale
logicalDpiX(self) int
logicalDpiY(self) int
lower(self)
mapFrom(self, QWidget, QPoint) QPoint
mapFromGlobal(self, QPoint) QPoint
mapFromParent(self, QPoint) QPoint
mapTo(self, QWidget, QPoint) QPoint
mapToGlobal(self, QPoint) QPoint
mapToParent(self, QPoint) QPoint
margin(self) int
mask(self) QRegion
maximumHeight(self) int
maximumSize(self) QSize
maximumWidth(self) int
metaObject(self) QMetaObject
metric(self, QPaintDevice.PaintDeviceMetric) int
midLineWidth(self) int
minimumHeight(self) int
minimumSize(self) QSize
minimumSizeHint(self) QSize
minimumWidth(self) int
mouseDoubleClickEvent(self, QMouseEvent)
mouseGrabber() QWidget
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
move(self, QPoint)
StructurePicture.move(self, int, int) -> None
moveEvent(self, QMoveEvent)
moveToThread(self, QThread)
movie(self) QMovie
nativeEvent(self, Union[QByteArray, bytes, bytearray], sip.voidptr) Tuple[bool, int]
nativeParentWidget(self) QWidget
nextInFocusChain(self) QWidget
normalGeometry(self) QRect
objectName(self) str
objectNameChanged

objectNameChanged(self, str) [signal]

overrideWindowFlags(self, Union[Qt.WindowFlags, Qt.WindowType])
overrideWindowState(self, Union[Qt.WindowStates, Qt.WindowState])
paintEngine(self) QPaintEngine
paintEvent(self, QPaintEvent)
paintingActive(self) bool
palette(self) QPalette
parent(self) QObject
parentWidget(self) QWidget
physicalDpiX(self) int
physicalDpiY(self) int
picture(self) QPicture
pixmap(self) QPixmap
pos(self) QPoint
previousInFocusChain(self) QWidget
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.

raise_(self)
receivers(self, PYQT_SIGNAL) int
rect(self) QRect
releaseKeyboard(self)
releaseMouse(self)
releaseShortcut(self, int)
removeAction(self, QAction)
removeEventFilter(self, QObject)
render(self, QPaintDevice, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.RenderFlag.DrawWindowBackground | QWidget.RenderFlag.DrawChildren))
render(self, QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.RenderFlag.DrawWindowBackground | QWidget.RenderFlag.DrawChildren)) None
repaint(self)
StructurePicture.repaint(self, int, int, int, int) -> None
repaint(self, QRect) None
repaint(self, QRegion) None
resize(self, QSize)
StructurePicture.resize(self, int, int) -> None
resizeEvent(self, QResizeEvent)
restoreGeometry(self, Union[QByteArray, bytes, bytearray]) bool
saveGeometry(self) QByteArray
StructurePicture.scroll(self, int, int)
StructurePicture.scroll(self, int, int, QRect) -> None
selectedText(self) str
selectionStart(self) int
sender(self) QObject
senderSignalIndex(self) int
setAcceptDrops(self, bool)
setAccessibleDescription(self, str)
setAccessibleName(self, str)
setAlignment(self, Union[Qt.Alignment, Qt.AlignmentFlag])
setAttribute(self, Qt.WidgetAttribute, on: bool = True)
setAutoFillBackground(self, bool)
setBackgroundRole(self, QPalette.ColorRole)
StructurePicture.setBaseSize(self, int, int)
setBaseSize(self, QSize) None
setBuddy(self, QWidget)
StructurePicture.setContentsMargins(self, int, int, int, int)
setContentsMargins(self, QMargins) None
setContextMenuPolicy(self, Qt.ContextMenuPolicy)
setCursor(self, Union[QCursor, Qt.CursorShape])
setDisabled(self, bool)
setEnabled(self, bool)
setFixedHeight(self, int)
setFixedSize(self, QSize)
StructurePicture.setFixedSize(self, int, int) -> None
setFixedWidth(self, int)
setFocus(self)
setFocus(self, Qt.FocusReason) None
setFocusPolicy(self, Qt.FocusPolicy)
setFocusProxy(self, QWidget)
setFont(self, QFont)
setForegroundRole(self, QPalette.ColorRole)
setFrameRect(self, QRect)
setFrameShadow(self, QFrame.Shadow)
setFrameShape(self, QFrame.Shape)
setFrameStyle(self, int)
setGeometry(self, QRect)
StructurePicture.setGeometry(self, int, int, int, int) -> None
setGraphicsEffect(self, QGraphicsEffect)
setHidden(self, bool)
setIndent(self, int)
setInputMethodHints(self, Union[Qt.InputMethodHints, Qt.InputMethodHint])
setLayout(self, QLayout)
setLayoutDirection(self, Qt.LayoutDirection)
setLineWidth(self, int)
setLocale(self, QLocale)
setMargin(self, int)
setMask(self, QBitmap)
setMask(self, QRegion) None
setMaximumHeight(self, int)
StructurePicture.setMaximumSize(self, int, int)
setMaximumSize(self, QSize) None
setMaximumWidth(self, int)
setMidLineWidth(self, int)
setMinimumHeight(self, int)
StructurePicture.setMinimumSize(self, int, int)
setMinimumSize(self, QSize) None
setMinimumWidth(self, int)
setMouseTracking(self, bool)
setMovie(self, QMovie)
setNum(self, float)
setNum(self, int) None
setObjectName(self, str)
setPalette(self, QPalette)
setParent(self, QWidget)
setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType]) None
setPicture(self, QPicture)
setPixmap(self, QPixmap)
setProperty(self, str, Any) bool
setScaledContents(self, bool)
StructurePicture.setSelection(self, int, int)
setShortcutAutoRepeat(self, int, enabled: bool = True)
setShortcutEnabled(self, int, enabled: bool = True)
StructurePicture.setSizeIncrement(self, int, int)
setSizeIncrement(self, QSize) None
setSizePolicy(self, QSizePolicy)
setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy) None
setStatusTip(self, str)
setStyle(self, QStyle)
setStyleSheet(self, str)
StructurePicture.setTabOrder(QWidget, QWidget)
setTabletTracking(self, bool)
setText(self, str)
setTextFormat(self, Qt.TextFormat)
setTextInteractionFlags(self, Union[Qt.TextInteractionFlags, Qt.TextInteractionFlag])
setToolTip(self, str)
setToolTipDuration(self, int)
setUpdatesEnabled(self, bool)
setVisible(self, bool)
setWhatsThis(self, str)
setWindowFilePath(self, str)
setWindowFlag(self, Qt.WindowType, on: bool = True)
setWindowFlags(self, Union[Qt.WindowFlags, Qt.WindowType])
setWindowIcon(self, QIcon)
setWindowIconText(self, str)
setWindowModality(self, Qt.WindowModality)
setWindowModified(self, bool)
setWindowOpacity(self, float)
setWindowRole(self, str)
setWindowState(self, Union[Qt.WindowStates, Qt.WindowState])
setWindowTitle(self, str)
setWordWrap(self, bool)
sharedPainter(self) QPainter
show(self)
showEvent(self, QShowEvent)
showFullScreen(self)
showMaximized(self)
showMinimized(self)
showNormal(self)
signalsBlocked(self) bool
size(self) QSize
sizeIncrement(self) QSize
sizePolicy(self) QSizePolicy
stackUnder(self, QWidget)
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
statusTip(self) str
style(self) QStyle
styleSheet(self) str
tabletEvent(self, QTabletEvent)
testAttribute(self, Qt.WidgetAttribute) bool
text(self) str
textFormat(self) Qt.TextFormat
textInteractionFlags(self) Qt.TextInteractionFlags
thread(self) QThread
timerEvent(self, QTimerEvent)
toolTip(self) str
toolTipDuration(self) int
tr(self, str, disambiguation: str = None, n: int = - 1) str
underMouse(self) bool
ungrabGesture(self, Qt.GestureType)
unsetCursor(self)
unsetLayoutDirection(self)
unsetLocale(self)
update(self)
update(self, QRect) None
update(self, QRegion) None
StructurePicture.update(self, int, int, int, int) -> None
updateGeometry(self)
updateMicroFocus(self)
updatesEnabled(self) bool
visibleRegion(self) QRegion
whatsThis(self) str
wheelEvent(self, QWheelEvent)
width(self) int
widthMM(self) int
winId(self) PyQt5.sip.voidptr
window(self) QWidget
windowFilePath(self) str
windowFlags(self) Qt.WindowFlags
windowHandle(self) QWindow
windowIcon(self) QIcon
windowIconChanged

windowIconChanged(self, QIcon) [signal]

windowIconText(self) str
windowIconTextChanged

windowIconTextChanged(self, str) [signal]

windowModality(self) Qt.WindowModality
windowOpacity(self) float
windowRole(self) str
windowState(self) Qt.WindowStates
windowTitle(self) str
windowTitleChanged

windowTitleChanged(self, str) [signal]

windowType(self) Qt.WindowType
wordWrap(self) bool
x(self) int
y(self) int
class schrodinger.ui.qt.structure2d.StructureToolTip(structure=None, offset=(10, 10), global_position=None, height=200, width=200, **kwargs)[source]

Bases: schrodinger.ui.qt.structure2d.StructurePicture

A tooltip that shows a chemical structure

__init__(structure=None, offset=(10, 10), global_position=None, height=200, width=200, **kwargs)[source]
Parameters
  • structure (structure object that canvas2d.ChmMmctAdaptor.create() accepts.) – the structure to draw in the cell. This can be given at instantiation time if the structure will always be the same, or it can be given a show time if the structure will change dynamically.

  • offset (tuple(int, int)) – x and y pixel offset from the mouse pointer position to draw the upper left corner of the tooltip window

  • global_position (tuple(int, int)) – global position relative to the screen to to draw the upper left corner of the tooltip window. This parameter overrides the offset parameter.

  • height (int) – the height of this tooltip in pixels

  • width (int) – the width of this tooltip in pixels

This class is designed to be created once and shown/hidden as often as needed. However, there seems to be an issue with PyQt that eventually (in an unreproducible fashion) the tooltip window may simply showing up. It will claim to be visible with self.isVisible() and return the full window size using self.visibleRegion(), but it won’t be visible. Therefore it is probably best to create a new instance each time. Instances of this class are lightweight, quick to create, and garbage collect without any apparent memory leaks.

protein_present_image = None
paintEvent(event)[source]

Reimplmented the paint event to draw text on top of the image, using the value of self.top_left_text

setOffset(offset)[source]

Sets the x and y offset in pixels of the tooltip from the mouse pointer

Parameters

offset (tuple(int, int)) – x and y pixel offset from the mouse pointer position to draw the upper left corner of the tooltip window

setGlobalPosition(global_position)[source]

Sets the x and y global position relative to the screen at which to draw the top left corner of the tooltip window.

Parameters

global_position (tuple(int, int)) – global position relative to the screen to draw the upper left corner of the tooltip window. This parameter overrides the offset parameter.

show(structure=None, pic=None, top_left_text=None)[source]

Show the tooltip

Parameters

structure (structure object that canvas2d.ChmMmctAdaptor.create() accepts.) – the structure to draw in the cell. This can be given at instantiation time if the structure will always be the same, or it can be given a show time if the structure will change dynamically.

finish()[source]

Hide ourselves. This slot should be connected to a signal that is emitted when the parent widget receives a leaveEvent, or called directly from the widget’s leaveEvent routine.

Don’t destroy ourselves here even if we are being used in one-time use mode, because bus errors can result if we are created/destroyed in too short a timeframe - as can happen with tooltips.

Box = 1
DrawChildren = 2
DrawWindowBackground = 1
HLine = 4
IgnoreMask = 4
NoFrame = 0
class PaintDeviceMetric

Bases: int

Panel = 2
PdmDepth = 6
PdmDevicePixelRatio = 11
PdmDevicePixelRatioScaled = 12
PdmDpiX = 7
PdmDpiY = 8
PdmHeight = 2
PdmHeightMM = 4
PdmNumColors = 5
PdmPhysicalDpiX = 9
PdmPhysicalDpiY = 10
PdmWidth = 1
PdmWidthMM = 3
Plain = 16
Raised = 32
class RenderFlag

Bases: int

class RenderFlags
class RenderFlags(Union[QWidget.RenderFlags, QWidget.RenderFlag]) None
class RenderFlags(QWidget.RenderFlags) None

Bases: sip.simplewrapper

__init__(*args, **kwargs)
class Shadow

Bases: int

Shadow_Mask = 240
class Shape

Bases: int

Shape_Mask = 15
class StyleMask

Bases: int

StyledPanel = 6
Sunken = 48
VLine = 5
WinPanel = 3
acceptDrops(self) bool
accessibleDescription(self) str
accessibleName(self) str
actionEvent(self, QActionEvent)
actions(self) List[QAction]
activateWindow(self)
addAction(self, QAction)
addActions(self, Iterable[QAction])
adjustSize(self)
alignment(self) Qt.Alignment
autoFillBackground(self) bool
backgroundRole(self) QPalette.ColorRole
baseSize(self) QSize
blockSignals(self, bool) bool
buddy(self) QWidget
changeEvent(self, QEvent)
childAt(self, QPoint) QWidget
StructureToolTip.childAt(self, int, int) -> QWidget
childEvent(self, QChildEvent)
children(self) List[QObject]
childrenRect(self) QRect
childrenRegion(self) QRegion
clear(self)
clearFocus(self)
clearMask(self)
close(self) bool
closeEvent(self, QCloseEvent)
colorCount(self) int
connectNotify(self, QMetaMethod)
contentsMargins(self) QMargins
contentsRect(self) QRect
contextMenuEvent(self, QContextMenuEvent)
contextMenuPolicy(self) Qt.ContextMenuPolicy
create(self, window: PyQt5.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
createWindowContainer(QWindow, parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = 0) QWidget
cursor(self) QCursor
customContextMenuRequested

customContextMenuRequested(self, QPoint) [signal]

customEvent(self, QEvent)
deleteLater(self)
depth(self) int
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
destroyed

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

devType(self) int
devicePixelRatio(self) int
devicePixelRatioF(self) float
devicePixelRatioFScale() float
disconnect(QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
drawChmmol(chmmol, atoms=[], bonds=[], color=<PyQt5.QtGui.QColor object>, gen_coord=False)

Makes a 2-D rendering of the chmmol object with optional atoms and bonds highlighting.

Parameters
  • chmmol (ChmMol instance.) – Structure to generate the picture for.

  • atoms (list) – list of atoms that should be highlighted

  • bonds (list) – list of bonds that should be highlighted

  • color (QtGui.QColor) – color that is used to highlight atoms and bonds

  • gen_coord (bool) – if True generate coordinates.

drawFrame(self, QPainter)
drawStructure(structure, StereoType=6, hydrogenTreatment=1, wantProperties=True, wantMMStereoProps=True, readAtomBondProperties=True, allowRadicals=False)

Makes a 2-D rendering of the structure

Parameters
  • structure (schrodinger.structure.Structure class object) – structure to be drawn on the canvas

  • StereoType (canvas2d.ChmMmctAdaptor.StereoType) – Stereochemistry option to use. Available options: # Does not include stereochemistry info: canvas2d.ChmMmctAdaptor.NoStereo # Ignores mmstereo annotations: canvas2d.ChmMmctAdaptor.StereoFromGeometry # Silently ignores stereo information that Canvas doesn’t agree with: canvas2d.ChmMmctAdaptor.StereoFromGeometry_Safe # Ignores 3d geometry: canvas2d.ChmMmctAdaptor.StereoFromAnnotation # Silently ignores stereo information that Canvas doesn’t agree with: canvas2d.ChmMmctAdaptor.StereoFromAnnotation_Safe # Uses mmstereo annotaions with 3D geometry as a backup: canvas2d.ChmMmctAdaptor.StereoFromAnnotationAndGeometry # Silently ignores stereo information that Canvas doesn’t agree with: canvas2d.ChmMmctAdaptor.StereoFromAnnotationAndGeometry_Safe

  • hydrogenTreatment (canvas2d.ChmAtomOption.H) – Hydrogen treatment method. Available options: canvas2d.ChmAtomOption.H_Never canvas2d.ChmAtomOption.H_ExplicitOnly canvas2d.ChmAtomOption.H_Polar canvas2d.ChmAtomOption.H_ExplicitPolar canvas2d.ChmAtomOption.H_Chiral canvas2d.ChmAtomOption.H_ExplicitChiral canvas2d.ChmAtomOption.H_ExplicitPolarAndChiral canvas2d.ChmAtomOption.H_All

  • wantProperties (bool) – Whether properties should be copied.

  • wantMMStereoProps (bool) – Whether to copy mmstereo properties.

  • readAtomBondProperties (bool) – Whether to copy atom and bond-level properties.

  • allowRadicals (bool) – Whether to assume that valence deficiencies represent unpaired electrons.

dropEvent(self, QDropEvent)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
effectiveWinId(self) PyQt5.sip.voidptr
ensurePolished(self)
enterEvent(self, QEvent)
event(self, QEvent) bool
eventFilter(self, QObject, QEvent) bool
find(PyQt5.sip.voidptr) QWidget
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]
focusInEvent(self, QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, bool) bool
focusOutEvent(self, QFocusEvent)
focusPolicy(self) Qt.FocusPolicy
focusPreviousChild(self) bool
focusProxy(self) QWidget
focusWidget(self) QWidget
font(self) QFont
fontInfo(self) QFontInfo
fontMetrics(self) QFontMetrics
foregroundRole(self) QPalette.ColorRole
frameGeometry(self) QRect
frameRect(self) QRect
frameShadow(self) QFrame.Shadow
frameShape(self) QFrame.Shape
frameSize(self) QSize
frameStyle(self) int
frameWidth(self) int
geometry(self) QRect
getContentsMargins(self) Tuple[int, int, int, int]
grab(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(- 1, - 1))) QPixmap
grabGesture(self, Qt.GestureType, flags: Union[Qt.GestureFlags, Qt.GestureFlag] = Qt.GestureFlags())
grabKeyboard(self)
grabMouse(self)
grabMouse(self, Union[QCursor, Qt.CursorShape]) None
grabShortcut(self, Union[QKeySequence, QKeySequence.StandardKey, str, int], context: Qt.ShortcutContext = Qt.WindowShortcut) int
graphicsEffect(self) QGraphicsEffect
graphicsProxyWidget(self) QGraphicsProxyWidget
hasFocus(self) bool
hasHeightForWidth(self) bool
hasMouseTracking(self) bool
hasScaledContents(self) bool
hasSelectedText(self) bool
hasTabletTracking(self) bool
height(self) int
heightForWidth(self, int) int
heightMM(self) int
hide(self)
hideEvent(self, QHideEvent)
indent(self) int
inherits(self, str) bool
initPainter(self, QPainter)
initStyleOption(self, QStyleOptionFrame)
inputMethodEvent(self, QInputMethodEvent)
inputMethodHints(self) Qt.InputMethodHints
inputMethodQuery(self, Qt.InputMethodQuery) Any
StructureToolTip.insertAction(self, QAction, QAction)
insertActions(self, QAction, Iterable[QAction])
installEventFilter(self, QObject)
isActiveWindow(self) bool
isAncestorOf(self, QWidget) bool
isEnabled(self) bool
isEnabledTo(self, QWidget) bool
isFullScreen(self) bool
isHidden(self) bool
isLeftToRight(self) bool
isMaximized(self) bool
isMinimized(self) bool
isModal(self) bool
isRightToLeft(self) bool
isSignalConnected(self, QMetaMethod) bool
isVisible(self) bool
isVisibleTo(self, QWidget) bool
isWidgetType(self) bool
isWindow(self) bool
isWindowModified(self) bool
isWindowType(self) bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
keyboardGrabber() QWidget
killTimer(self, int)
layout(self) QLayout
layoutDirection(self) Qt.LayoutDirection
leaveEvent(self, QEvent)
lineWidth(self) int
linkActivated

linkActivated(self, str) [signal]

linkHovered

linkHovered(self, str) [signal]

locale(self) QLocale
logicalDpiX(self) int
logicalDpiY(self) int
lower(self)
mapFrom(self, QWidget, QPoint) QPoint
mapFromGlobal(self, QPoint) QPoint
mapFromParent(self, QPoint) QPoint
mapTo(self, QWidget, QPoint) QPoint
mapToGlobal(self, QPoint) QPoint
mapToParent(self, QPoint) QPoint
margin(self) int
mask(self) QRegion
maximumHeight(self) int
maximumSize(self) QSize
maximumWidth(self) int
metaObject(self) QMetaObject
metric(self, QPaintDevice.PaintDeviceMetric) int
midLineWidth(self) int
minimumHeight(self) int
minimumSize(self) QSize
minimumSizeHint(self) QSize
minimumWidth(self) int
mouseDoubleClickEvent(self, QMouseEvent)
mouseGrabber() QWidget
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
move(self, QPoint)
StructureToolTip.move(self, int, int) -> None
moveEvent(self, QMoveEvent)
moveToThread(self, QThread)
movie(self) QMovie
nativeEvent(self, Union[QByteArray, bytes, bytearray], sip.voidptr) Tuple[bool, int]
nativeParentWidget(self) QWidget
nextInFocusChain(self) QWidget
normalGeometry(self) QRect
objectName(self) str
objectNameChanged

objectNameChanged(self, str) [signal]

overrideWindowFlags(self, Union[Qt.WindowFlags, Qt.WindowType])
overrideWindowState(self, Union[Qt.WindowStates, Qt.WindowState])
paintEngine(self) QPaintEngine
paintingActive(self) bool
palette(self) QPalette
parent(self) QObject
parentWidget(self) QWidget
physicalDpiX(self) int
physicalDpiY(self) int
picture(self) QPicture
pixmap(self) QPixmap
pos(self) QPoint
previousInFocusChain(self) QWidget
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.

raise_(self)
receivers(self, PYQT_SIGNAL) int
rect(self) QRect
releaseKeyboard(self)
releaseMouse(self)
releaseShortcut(self, int)
removeAction(self, QAction)
removeEventFilter(self, QObject)
render(self, QPaintDevice, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.RenderFlag.DrawWindowBackground | QWidget.RenderFlag.DrawChildren))
render(self, QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.RenderFlag.DrawWindowBackground | QWidget.RenderFlag.DrawChildren)) None
repaint(self)
StructureToolTip.repaint(self, int, int, int, int) -> None
repaint(self, QRect) None
repaint(self, QRegion) None
resize(self, QSize)
StructureToolTip.resize(self, int, int) -> None
resizeEvent(self, QResizeEvent)
restoreGeometry(self, Union[QByteArray, bytes, bytearray]) bool
saveGeometry(self) QByteArray
StructureToolTip.scroll(self, int, int)
StructureToolTip.scroll(self, int, int, QRect) -> None
selectedText(self) str
selectionStart(self) int
sender(self) QObject
senderSignalIndex(self) int
setAcceptDrops(self, bool)
setAccessibleDescription(self, str)
setAccessibleName(self, str)
setAlignment(self, Union[Qt.Alignment, Qt.AlignmentFlag])
setAnnotators(annotators)

This function allows to reset annotators between renderning 2-D structures.

Parameters

annotators (list) – Each item of the list should be a canvas2d.ChemViewAnnotator object that will be applied to the canvas2d.ChmRender2DModel when generating the image

setAttribute(self, Qt.WidgetAttribute, on: bool = True)
setAutoFillBackground(self, bool)
setBackgroundRole(self, QPalette.ColorRole)
StructureToolTip.setBaseSize(self, int, int)
setBaseSize(self, QSize) None
setBuddy(self, QWidget)
StructureToolTip.setContentsMargins(self, int, int, int, int)
setContentsMargins(self, QMargins) None
setContextMenuPolicy(self, Qt.ContextMenuPolicy)
setCursor(self, Union[QCursor, Qt.CursorShape])
setDisabled(self, bool)
setEnabled(self, bool)
setFixedHeight(self, int)
setFixedSize(self, QSize)
StructureToolTip.setFixedSize(self, int, int) -> None
setFixedWidth(self, int)
setFocus(self)
setFocus(self, Qt.FocusReason) None
setFocusPolicy(self, Qt.FocusPolicy)
setFocusProxy(self, QWidget)
setFont(self, QFont)
setForegroundRole(self, QPalette.ColorRole)
setFrameRect(self, QRect)
setFrameShadow(self, QFrame.Shadow)
setFrameShape(self, QFrame.Shape)
setFrameStyle(self, int)
setGeometry(self, QRect)
StructureToolTip.setGeometry(self, int, int, int, int) -> None
setGraphicsEffect(self, QGraphicsEffect)
setHidden(self, bool)
setIndent(self, int)
setInputMethodHints(self, Union[Qt.InputMethodHints, Qt.InputMethodHint])
setLayout(self, QLayout)
setLayoutDirection(self, Qt.LayoutDirection)
setLineWidth(self, int)
setLocale(self, QLocale)
setMargin(self, int)
setMask(self, QBitmap)
setMask(self, QRegion) None
setMaximumHeight(self, int)
StructureToolTip.setMaximumSize(self, int, int)
setMaximumSize(self, QSize) None
setMaximumWidth(self, int)
setMidLineWidth(self, int)
setMinimumHeight(self, int)
StructureToolTip.setMinimumSize(self, int, int)
setMinimumSize(self, QSize) None
setMinimumWidth(self, int)
setMouseTracking(self, bool)
setMovie(self, QMovie)
setNum(self, float)
setNum(self, int) None
setObjectName(self, str)
setPalette(self, QPalette)
setParent(self, QWidget)
setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType]) None
setPicture(self, QPicture)
setPixmap(self, QPixmap)
setProperty(self, str, Any) bool
setScaledContents(self, bool)
StructureToolTip.setSelection(self, int, int)
setShortcutAutoRepeat(self, int, enabled: bool = True)
setShortcutEnabled(self, int, enabled: bool = True)
StructureToolTip.setSizeIncrement(self, int, int)
setSizeIncrement(self, QSize) None
setSizePolicy(self, QSizePolicy)
setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy) None
setStatusTip(self, str)
setStyle(self, QStyle)
setStyleSheet(self, str)
StructureToolTip.setTabOrder(QWidget, QWidget)
setTabletTracking(self, bool)
setText(self, str)
setTextFormat(self, Qt.TextFormat)
setTextInteractionFlags(self, Union[Qt.TextInteractionFlags, Qt.TextInteractionFlag])
setToolTip(self, str)
setToolTipDuration(self, int)
setUpdatesEnabled(self, bool)
setVisible(self, bool)
setWhatsThis(self, str)
setWindowFilePath(self, str)
setWindowFlag(self, Qt.WindowType, on: bool = True)
setWindowFlags(self, Union[Qt.WindowFlags, Qt.WindowType])
setWindowIcon(self, QIcon)
setWindowIconText(self, str)
setWindowModality(self, Qt.WindowModality)
setWindowModified(self, bool)
setWindowOpacity(self, float)
setWindowRole(self, str)
setWindowState(self, Union[Qt.WindowStates, Qt.WindowState])
setWindowTitle(self, str)
setWordWrap(self, bool)
sharedPainter(self) QPainter
showEvent(self, QShowEvent)
showFullScreen(self)
showMaximized(self)
showMinimized(self)
showNormal(self)
signalsBlocked(self) bool
size(self) QSize
sizeHint(self) QSize
sizeIncrement(self) QSize
sizePolicy(self) QSizePolicy
stackUnder(self, QWidget)
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
statusTip(self) str
style(self) QStyle
styleSheet(self) str
tabletEvent(self, QTabletEvent)
testAttribute(self, Qt.WidgetAttribute) bool
text(self) str
textFormat(self) Qt.TextFormat
textInteractionFlags(self) Qt.TextInteractionFlags
thread(self) QThread
timerEvent(self, QTimerEvent)
toolTip(self) str
toolTipDuration(self) int
tr(self, str, disambiguation: str = None, n: int = - 1) str
underMouse(self) bool
ungrabGesture(self, Qt.GestureType)
unsetCursor(self)
unsetLayoutDirection(self)
unsetLocale(self)
update(self)
update(self, QRect) None
update(self, QRegion) None
StructureToolTip.update(self, int, int, int, int) -> None
updateGeometry(self)
updateMicroFocus(self)
updatesEnabled(self) bool
visibleRegion(self) QRegion
whatsThis(self) str
wheelEvent(self, QWheelEvent)
width(self) int
widthMM(self) int
winId(self) PyQt5.sip.voidptr
window(self) QWidget
windowFilePath(self) str
windowFlags(self) Qt.WindowFlags
windowHandle(self) QWindow
windowIcon(self) QIcon
windowIconChanged

windowIconChanged(self, QIcon) [signal]

windowIconText(self) str
windowIconTextChanged

windowIconTextChanged(self, str) [signal]

windowModality(self) Qt.WindowModality
windowOpacity(self) float
windowRole(self) str
windowState(self) Qt.WindowStates
windowTitle(self) str
windowTitleChanged

windowTitleChanged(self, str) [signal]

windowType(self) Qt.WindowType
wordWrap(self) bool
x(self) int
y(self) int
class schrodinger.ui.qt.structure2d.LabeledStructureToolTip(structure=None, offset=(2, 16), global_position=None, height=200, width=200, **kwargs)[source]

Bases: PyQt5.QtWidgets.QFrame

Class that creates a tooltip with a 2d structure picture. An arbitrary number of labels can be added that will be displayed beneath the picture.

__init__(structure=None, offset=(2, 16), global_position=None, height=200, width=200, **kwargs)[source]
Parameters
  • structure (structure.Structure or canvas2d.ChmMol) – the structure to draw in the cell. This can be given at instantiation time if the structure will always be the same, or it can be given a show time if the structure will change dynamically.

  • offset (tuple of 2 ints) – x and y pixel offset from the mouse pointer position to draw the upper left corner of the tooltip window

  • global_position (tuple of 2 ints) – global position relative to the screen to to draw the upper left corner of the tooltip window. This parameter overrides the offset parameter.

  • height (int) – the height of this tooltip in pixels

  • width (int) – the width of this tooltip in pixels

layout(self) QLayout
draw2DPicture(structure)[source]

Draws 2D picture of the structure.

Parameters

structure (structure.Structure or canvas2d.ChmMol) – Structure to draw

setGlobalPosition(global_position)[source]

Sets the x and y global position relative to the screen at which to draw the top left corner of the tooltip window.

Parameters

global_position (tuple(int, int)) – global position relative to the screen to draw the upper left corner of the tooltip window. This parameter overrides the offset parameter.

show(structure=None)[source]

Show the tooltip

Parameters

structure (structure.Structure or canvas2d.ChmMol) – the structure to draw in the cell. This can be given at instantiation time if the structure will always be the same, or it can be given a show time if the structure will change dynamically.

addLabel(text)[source]

Add a label containing the specified text underneath the structure picture.

Parameters

text (str) – Text to be included in the label

Box = 1
DrawChildren = 2
DrawWindowBackground = 1
HLine = 4
IgnoreMask = 4
NoFrame = 0
class PaintDeviceMetric

Bases: int

Panel = 2
PdmDepth = 6
PdmDevicePixelRatio = 11
PdmDevicePixelRatioScaled = 12
PdmDpiX = 7
PdmDpiY = 8
PdmHeight = 2
PdmHeightMM = 4
PdmNumColors = 5
PdmPhysicalDpiX = 9
PdmPhysicalDpiY = 10
PdmWidth = 1
PdmWidthMM = 3
Plain = 16
Raised = 32
class RenderFlag

Bases: int

class RenderFlags
class RenderFlags(Union[QWidget.RenderFlags, QWidget.RenderFlag]) None
class RenderFlags(QWidget.RenderFlags) None

Bases: sip.simplewrapper

__init__(*args, **kwargs)
class Shadow

Bases: int

Shadow_Mask = 240
class Shape

Bases: int

Shape_Mask = 15
class StyleMask

Bases: int

StyledPanel = 6
Sunken = 48
VLine = 5
WinPanel = 3
acceptDrops(self) bool
accessibleDescription(self) str
accessibleName(self) str
actionEvent(self, QActionEvent)
actions(self) List[QAction]
activateWindow(self)
addAction(self, QAction)
addActions(self, Iterable[QAction])
adjustSize(self)
autoFillBackground(self) bool
backgroundRole(self) QPalette.ColorRole
baseSize(self) QSize
blockSignals(self, bool) bool
changeEvent(self, QEvent)
childAt(self, QPoint) QWidget
LabeledStructureToolTip.childAt(self, int, int) -> QWidget
childEvent(self, QChildEvent)
children(self) List[QObject]
childrenRect(self) QRect
childrenRegion(self) QRegion
clearFocus(self)
clearMask(self)
close(self) bool
closeEvent(self, QCloseEvent)
colorCount(self) int
connectNotify(self, QMetaMethod)
contentsMargins(self) QMargins
contentsRect(self) QRect
contextMenuEvent(self, QContextMenuEvent)
contextMenuPolicy(self) Qt.ContextMenuPolicy
create(self, window: PyQt5.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
createWindowContainer(QWindow, parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = 0) QWidget
cursor(self) QCursor
customContextMenuRequested

customContextMenuRequested(self, QPoint) [signal]

customEvent(self, QEvent)
deleteLater(self)
depth(self) int
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
destroyed

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

devType(self) int
devicePixelRatio(self) int
devicePixelRatioF(self) float
devicePixelRatioFScale() float
disconnect(QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
drawFrame(self, QPainter)
dropEvent(self, QDropEvent)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
effectiveWinId(self) PyQt5.sip.voidptr
ensurePolished(self)
enterEvent(self, QEvent)
event(self, QEvent) bool
eventFilter(self, QObject, QEvent) bool
find(PyQt5.sip.voidptr) QWidget
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]
focusInEvent(self, QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, bool) bool
focusOutEvent(self, QFocusEvent)
focusPolicy(self) Qt.FocusPolicy
focusPreviousChild(self) bool
focusProxy(self) QWidget
focusWidget(self) QWidget
font(self) QFont
fontInfo(self) QFontInfo
fontMetrics(self) QFontMetrics
foregroundRole(self) QPalette.ColorRole
frameGeometry(self) QRect
frameRect(self) QRect
frameShadow(self) QFrame.Shadow
frameShape(self) QFrame.Shape
frameSize(self) QSize
frameStyle(self) int
frameWidth(self) int
geometry(self) QRect
getContentsMargins(self) Tuple[int, int, int, int]
grab(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(- 1, - 1))) QPixmap
grabGesture(self, Qt.GestureType, flags: Union[Qt.GestureFlags, Qt.GestureFlag] = Qt.GestureFlags())
grabKeyboard(self)
grabMouse(self)
grabMouse(self, Union[QCursor, Qt.CursorShape]) None
grabShortcut(self, Union[QKeySequence, QKeySequence.StandardKey, str, int], context: Qt.ShortcutContext = Qt.WindowShortcut) int
graphicsEffect(self) QGraphicsEffect
graphicsProxyWidget(self) QGraphicsProxyWidget
hasFocus(self) bool
hasHeightForWidth(self) bool
hasMouseTracking(self) bool
hasTabletTracking(self) bool
height(self) int
heightForWidth(self, int) int
heightMM(self) int
hide(self)
hideEvent(self, QHideEvent)
inherits(self, str) bool
initPainter(self, QPainter)
initStyleOption(self, QStyleOptionFrame)
inputMethodEvent(self, QInputMethodEvent)
inputMethodHints(self) Qt.InputMethodHints
inputMethodQuery(self, Qt.InputMethodQuery) Any
LabeledStructureToolTip.insertAction(self, QAction, QAction)
insertActions(self, QAction, Iterable[QAction])
installEventFilter(self, QObject)
isActiveWindow(self) bool
isAncestorOf(self, QWidget) bool
isEnabled(self) bool
isEnabledTo(self, QWidget) bool
isFullScreen(self) bool
isHidden(self) bool
isLeftToRight(self) bool
isMaximized(self) bool
isMinimized(self) bool
isModal(self) bool
isRightToLeft(self) bool
isSignalConnected(self, QMetaMethod) bool
isVisible(self) bool
isVisibleTo(self, QWidget) bool
isWidgetType(self) bool
isWindow(self) bool
isWindowModified(self) bool
isWindowType(self) bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
keyboardGrabber() QWidget
killTimer(self, int)
layoutDirection(self) Qt.LayoutDirection
leaveEvent(self, QEvent)
lineWidth(self) int
locale(self) QLocale
logicalDpiX(self) int
logicalDpiY(self) int
lower(self)
mapFrom(self, QWidget, QPoint) QPoint
mapFromGlobal(self, QPoint) QPoint
mapFromParent(self, QPoint) QPoint
mapTo(self, QWidget, QPoint) QPoint
mapToGlobal(self, QPoint) QPoint
mapToParent(self, QPoint) QPoint
mask(self) QRegion
maximumHeight(self) int
maximumSize(self) QSize
maximumWidth(self) int
metaObject(self) QMetaObject
metric(self, QPaintDevice.PaintDeviceMetric) int
midLineWidth(self) int
minimumHeight(self) int
minimumSize(self) QSize
minimumSizeHint(self) QSize
minimumWidth(self) int
mouseDoubleClickEvent(self, QMouseEvent)
mouseGrabber() QWidget
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
move(self, QPoint)
LabeledStructureToolTip.move(self, int, int) -> None
moveEvent(self, QMoveEvent)
moveToThread(self, QThread)
nativeEvent(self, Union[QByteArray, bytes, bytearray], sip.voidptr) Tuple[bool, int]
nativeParentWidget(self) QWidget
nextInFocusChain(self) QWidget
normalGeometry(self) QRect
objectName(self) str
objectNameChanged

objectNameChanged(self, str) [signal]

overrideWindowFlags(self, Union[Qt.WindowFlags, Qt.WindowType])
overrideWindowState(self, Union[Qt.WindowStates, Qt.WindowState])
paintEngine(self) QPaintEngine
paintEvent(self, QPaintEvent)
paintingActive(self) bool
palette(self) QPalette
parent(self) QObject
parentWidget(self) QWidget
physicalDpiX(self) int
physicalDpiY(self) int
pos(self) QPoint
previousInFocusChain(self) QWidget
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.

raise_(self)
receivers(self, PYQT_SIGNAL) int
rect(self) QRect
releaseKeyboard(self)
releaseMouse(self)
releaseShortcut(self, int)
removeAction(self, QAction)
removeEventFilter(self, QObject)
render(self, QPaintDevice, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.RenderFlag.DrawWindowBackground | QWidget.RenderFlag.DrawChildren))
render(self, QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.RenderFlag.DrawWindowBackground | QWidget.RenderFlag.DrawChildren)) None
repaint(self)
LabeledStructureToolTip.repaint(self, int, int, int, int) -> None
repaint(self, QRect) None
repaint(self, QRegion) None
resize(self, QSize)
LabeledStructureToolTip.resize(self, int, int) -> None
resizeEvent(self, QResizeEvent)
restoreGeometry(self, Union[QByteArray, bytes, bytearray]) bool
saveGeometry(self) QByteArray
LabeledStructureToolTip.scroll(self, int, int)
LabeledStructureToolTip.scroll(self, int, int, QRect) -> None
sender(self) QObject
senderSignalIndex(self) int
setAcceptDrops(self, bool)
setAccessibleDescription(self, str)
setAccessibleName(self, str)
setAttribute(self, Qt.WidgetAttribute, on: bool = True)
setAutoFillBackground(self, bool)
setBackgroundRole(self, QPalette.ColorRole)
LabeledStructureToolTip.setBaseSize(self, int, int)
setBaseSize(self, QSize) None
LabeledStructureToolTip.setContentsMargins(self, int, int, int, int)
setContentsMargins(self, QMargins) None
setContextMenuPolicy(self, Qt.ContextMenuPolicy)
setCursor(self, Union[QCursor, Qt.CursorShape])
setDisabled(self, bool)
setEnabled(self, bool)
setFixedHeight(self, int)
setFixedSize(self, QSize)
LabeledStructureToolTip.setFixedSize(self, int, int) -> None
setFixedWidth(self, int)
setFocus(self)
setFocus(self, Qt.FocusReason) None
setFocusPolicy(self, Qt.FocusPolicy)
setFocusProxy(self, QWidget)
setFont(self, QFont)
setForegroundRole(self, QPalette.ColorRole)
setFrameRect(self, QRect)
setFrameShadow(self, QFrame.Shadow)
setFrameShape(self, QFrame.Shape)
setFrameStyle(self, int)
setGeometry(self, QRect)
LabeledStructureToolTip.setGeometry(self, int, int, int, int) -> None
setGraphicsEffect(self, QGraphicsEffect)
setHidden(self, bool)
setInputMethodHints(self, Union[Qt.InputMethodHints, Qt.InputMethodHint])
setLayout(self, QLayout)
setLayoutDirection(self, Qt.LayoutDirection)
setLineWidth(self, int)
setLocale(self, QLocale)
setMask(self, QBitmap)
setMask(self, QRegion) None
setMaximumHeight(self, int)
LabeledStructureToolTip.setMaximumSize(self, int, int)
setMaximumSize(self, QSize) None
setMaximumWidth(self, int)
setMidLineWidth(self, int)
setMinimumHeight(self, int)
LabeledStructureToolTip.setMinimumSize(self, int, int)
setMinimumSize(self, QSize) None
setMinimumWidth(self, int)
setMouseTracking(self, bool)
setObjectName(self, str)
setPalette(self, QPalette)
setParent(self, QWidget)
setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType]) None
setProperty(self, str, Any) bool
setShortcutAutoRepeat(self, int, enabled: bool = True)
setShortcutEnabled(self, int, enabled: bool = True)
LabeledStructureToolTip.setSizeIncrement(self, int, int)
setSizeIncrement(self, QSize) None
setSizePolicy(self, QSizePolicy)
setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy) None
setStatusTip(self, str)
setStyle(self, QStyle)
setStyleSheet(self, str)
LabeledStructureToolTip.setTabOrder(QWidget, QWidget)
setTabletTracking(self, bool)
setToolTip(self, str)
setToolTipDuration(self, int)
setUpdatesEnabled(self, bool)
setVisible(self, bool)
setWhatsThis(self, str)
setWindowFilePath(self, str)
setWindowFlag(self, Qt.WindowType, on: bool = True)
setWindowFlags(self, Union[Qt.WindowFlags, Qt.WindowType])
setWindowIcon(self, QIcon)
setWindowIconText(self, str)
setWindowModality(self, Qt.WindowModality)
setWindowModified(self, bool)
setWindowOpacity(self, float)
setWindowRole(self, str)
setWindowState(self, Union[Qt.WindowStates, Qt.WindowState])
setWindowTitle(self, str)
sharedPainter(self) QPainter
showEvent(self, QShowEvent)
showFullScreen(self)
showMaximized(self)
showMinimized(self)
showNormal(self)
signalsBlocked(self) bool
size(self) QSize
sizeHint(self) QSize
sizeIncrement(self) QSize
sizePolicy(self) QSizePolicy
stackUnder(self, QWidget)
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
statusTip(self) str
style(self) QStyle
styleSheet(self) str
tabletEvent(self, QTabletEvent)
testAttribute(self, Qt.WidgetAttribute) bool
thread(self) QThread
timerEvent(self, QTimerEvent)
toolTip(self) str
toolTipDuration(self) int
tr(self, str, disambiguation: str = None, n: int = - 1) str
underMouse(self) bool
ungrabGesture(self, Qt.GestureType)
unsetCursor(self)
unsetLayoutDirection(self)
unsetLocale(self)
update(self)
update(self, QRect) None
update(self, QRegion) None
LabeledStructureToolTip.update(self, int, int, int, int) -> None
updateGeometry(self)
updateMicroFocus(self)
updatesEnabled(self) bool
visibleRegion(self) QRegion
whatsThis(self) str
wheelEvent(self, QWheelEvent)
width(self) int
widthMM(self) int
winId(self) PyQt5.sip.voidptr
window(self) QWidget
windowFilePath(self) str
windowFlags(self) Qt.WindowFlags
windowHandle(self) QWindow
windowIcon(self) QIcon
windowIconChanged

windowIconChanged(self, QIcon) [signal]

windowIconText(self) str
windowIconTextChanged

windowIconTextChanged(self, str) [signal]

windowModality(self) Qt.WindowModality
windowOpacity(self) float
windowRole(self) str
windowState(self) Qt.WindowStates
windowTitle(self) str
windowTitleChanged

windowTitleChanged(self, str) [signal]

windowType(self) Qt.WindowType
x(self) int
y(self) int
class schrodinger.ui.qt.structure2d.structure_scene[source]

Bases: PyQt5.QtWidgets.QGraphicsScene

Scene which holds the structure_view object

AllLayers = 65535
BackgroundLayer = 2
BspTreeIndex = 0
ForegroundLayer = 4
class ItemIndexMethod

Bases: int

ItemLayer = 1
NoIndex = -1
class SceneLayer

Bases: int

class SceneLayers
class SceneLayers(Union[QGraphicsScene.SceneLayers, QGraphicsScene.SceneLayer]) None
class SceneLayers(QGraphicsScene.SceneLayers) None

Bases: sip.simplewrapper

__init__(*args, **kwargs)
__init__(*args, **kwargs)
activePanel(self) QGraphicsItem
activeWindow(self) QGraphicsWidget
addEllipse(self, QRectF, pen: Union[QPen, QColor, Qt.GlobalColor, QGradient] = QPen(), brush: Union[QBrush, QColor, Qt.GlobalColor, QGradient] = QBrush()) QGraphicsEllipseItem
structure_scene.addEllipse(self, float, float, float, float, pen: Union[QPen, QColor, Qt.GlobalColor, QGradient] = QPen(), brush: Union[QBrush, QColor, Qt.GlobalColor, QGradient] = QBrush()) -> QGraphicsEllipseItem
addItem(self, QGraphicsItem)
addLine(self, QLineF, pen: Union[QPen, QColor, Qt.GlobalColor, QGradient] = QPen()) QGraphicsLineItem
structure_scene.addLine(self, float, float, float, float, pen: Union[QPen, QColor, Qt.GlobalColor, QGradient] = QPen()) -> QGraphicsLineItem
addPath(self, QPainterPath, pen: Union[QPen, QColor, Qt.GlobalColor, QGradient] = QPen(), brush: Union[QBrush, QColor, Qt.GlobalColor, QGradient] = QBrush()) QGraphicsPathItem
addPixmap(self, QPixmap) QGraphicsPixmapItem
addPolygon(self, QPolygonF, pen: Union[QPen, QColor, Qt.GlobalColor, QGradient] = QPen(), brush: Union[QBrush, QColor, Qt.GlobalColor, QGradient] = QBrush()) QGraphicsPolygonItem
addRect(self, QRectF, pen: Union[QPen, QColor, Qt.GlobalColor, QGradient] = QPen(), brush: Union[QBrush, QColor, Qt.GlobalColor, QGradient] = QBrush()) QGraphicsRectItem
structure_scene.addRect(self, float, float, float, float, pen: Union[QPen, QColor, Qt.GlobalColor, QGradient] = QPen(), brush: Union[QBrush, QColor, Qt.GlobalColor, QGradient] = QBrush()) -> QGraphicsRectItem
addSimpleText(self, str, font: QFont = QFont()) QGraphicsSimpleTextItem
addText(self, str, font: QFont = QFont()) QGraphicsTextItem
addWidget(self, QWidget, flags: Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags()) QGraphicsProxyWidget
advance(self)
backgroundBrush(self) QBrush
blockSignals(self, bool) bool
bspTreeDepth(self) int
changed

changed(self, Iterable[QRectF]) [signal]

childEvent(self, QChildEvent)
children(self) List[QObject]
clear(self)
clearFocus(self)
clearSelection(self)
collidingItems(self, QGraphicsItem, mode: Qt.ItemSelectionMode = Qt.IntersectsItemShape) List[QGraphicsItem]
connectNotify(self, QMetaMethod)
contextMenuEvent(self, QGraphicsSceneContextMenuEvent)
createItemGroup(self, Iterable[QGraphicsItem]) QGraphicsItemGroup
customEvent(self, QEvent)
deleteLater(self)
destroyItemGroup(self, QGraphicsItemGroup)
destroyed

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

disconnect(QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QGraphicsSceneDragDropEvent)
dragLeaveEvent(self, QGraphicsSceneDragDropEvent)
dragMoveEvent(self, QGraphicsSceneDragDropEvent)
drawBackground(self, QPainter, QRectF)
drawForeground(self, QPainter, QRectF)
dropEvent(self, QGraphicsSceneDragDropEvent)
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]
focusInEvent(self, QFocusEvent)
focusItem(self) QGraphicsItem
focusItemChanged

focusItemChanged(self, QGraphicsItem, QGraphicsItem, Qt.FocusReason) [signal]

focusNextPrevChild(self, bool) bool
focusOnTouch(self) bool
focusOutEvent(self, QFocusEvent)
font(self) QFont
foregroundBrush(self) QBrush
hasFocus(self) bool
height(self) float
helpEvent(self, QGraphicsSceneHelpEvent)
inherits(self, str) bool
inputMethodEvent(self, QInputMethodEvent)
inputMethodQuery(self, Qt.InputMethodQuery) Any
installEventFilter(self, QObject)
invalidate(self, rect: QRectF = QRectF(), layers: Union[QGraphicsScene.SceneLayers, QGraphicsScene.SceneLayer] = QGraphicsScene.AllLayers)
structure_scene.invalidate(self, float, float, float, float, layers: Union[QGraphicsScene.SceneLayers, QGraphicsScene.SceneLayer] = QGraphicsScene.AllLayers) -> None
isActive(self) bool
isSignalConnected(self, QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
itemAt(self, Union[QPointF, QPoint], QTransform) QGraphicsItem
structure_scene.itemAt(self, float, float, QTransform) -> QGraphicsItem
itemIndexMethod(self) QGraphicsScene.ItemIndexMethod
items(self, order: Qt.SortOrder = Qt.DescendingOrder) List[QGraphicsItem]
items(self, Union[QPointF, QPoint], mode: Qt.ItemSelectionMode = Qt.IntersectsItemShape, order: Qt.SortOrder = Qt.DescendingOrder, deviceTransform: QTransform = QTransform()) List[QGraphicsItem]
items(self, QRectF, mode: Qt.ItemSelectionMode = Qt.IntersectsItemShape, order: Qt.SortOrder = Qt.DescendingOrder, deviceTransform: QTransform = QTransform()) List[QGraphicsItem]
items(self, QPolygonF, mode: Qt.ItemSelectionMode = Qt.IntersectsItemShape, order: Qt.SortOrder = Qt.DescendingOrder, deviceTransform: QTransform = QTransform()) List[QGraphicsItem]
items(self, QPainterPath, mode: Qt.ItemSelectionMode = Qt.IntersectsItemShape, order: Qt.SortOrder = Qt.DescendingOrder, deviceTransform: QTransform = QTransform()) List[QGraphicsItem]
items(self, float, float, float, float, Qt.ItemSelectionMode, Qt.SortOrder, deviceTransform: QTransform = QTransform()) List[QGraphicsItem]
itemsBoundingRect(self) QRectF
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
killTimer(self, int)
metaObject(self) QMetaObject
minimumRenderSize(self) float
mouseDoubleClickEvent(self, QGraphicsSceneMouseEvent)
mouseGrabberItem(self) QGraphicsItem
mouseMoveEvent(self, QGraphicsSceneMouseEvent)
mousePressEvent(self, QGraphicsSceneMouseEvent)
mouseReleaseEvent(self, QGraphicsSceneMouseEvent)
moveToThread(self, QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, str) [signal]

palette(self) QPalette
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)
removeItem(self, QGraphicsItem)
render(self, QPainter, target: QRectF = QRectF(), source: QRectF = QRectF(), mode: Qt.AspectRatioMode = Qt.KeepAspectRatio)
sceneRect(self) QRectF
sceneRectChanged

sceneRectChanged(self, QRectF) [signal]

selectedItems(self) List[QGraphicsItem]
selectionArea(self) QPainterPath
selectionChanged

selectionChanged(self) [signal]

sendEvent(self, QGraphicsItem, QEvent) bool
sender(self) QObject
senderSignalIndex(self) int
setActivePanel(self, QGraphicsItem)
setActiveWindow(self, QGraphicsWidget)
setBackgroundBrush(self, Union[QBrush, QColor, Qt.GlobalColor, QGradient])
setBspTreeDepth(self, int)
setFocus(self, focusReason: Qt.FocusReason = Qt.OtherFocusReason)
setFocusItem(self, QGraphicsItem, focusReason: Qt.FocusReason = Qt.OtherFocusReason)
setFocusOnTouch(self, bool)
setFont(self, QFont)
setForegroundBrush(self, Union[QBrush, QColor, Qt.GlobalColor, QGradient])
setItemIndexMethod(self, QGraphicsScene.ItemIndexMethod)
setMinimumRenderSize(self, float)
setObjectName(self, str)
setPalette(self, QPalette)
setParent(self, QObject)
setProperty(self, str, Any) bool
setSceneRect(self, QRectF)
structure_scene.setSceneRect(self, float, float, float, float) -> None
setSelectionArea(self, QPainterPath, QTransform)
setSelectionArea(self, QPainterPath, mode: Qt.ItemSelectionMode = Qt.IntersectsItemShape, deviceTransform: QTransform = QTransform()) None
setSelectionArea(self, QPainterPath, Qt.ItemSelectionOperation, mode: Qt.ItemSelectionMode = Qt.IntersectsItemShape, deviceTransform: QTransform = QTransform()) None
setStickyFocus(self, bool)
setStyle(self, QStyle)
signalsBlocked(self) bool
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
stickyFocus(self) bool
style(self) QStyle
thread(self) QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = - 1) str
update(self, rect: QRectF = QRectF())
structure_scene.update(self, float, float, float, float) -> None
views(self) List[QGraphicsView]
wheelEvent(self, QGraphicsSceneWheelEvent)
width(self) float
class schrodinger.ui.qt.structure2d.structure_view(scene)[source]

Bases: PyQt5.QtWidgets.QGraphicsView

View which holds a structure_item object

atom_clicked
bond_clicked
__init__(scene)[source]
wheelEvent(self, QWheelEvent)[source]
resizeEvent(self, QResizeEvent)[source]
AdjustIgnored = 0
AdjustToContents = 2
AdjustToContentsOnFirstShow = 1
AnchorUnderMouse = 2
AnchorViewCenter = 1
BoundingRectViewportUpdate = 4
Box = 1
CacheBackground = 1
class CacheMode
class CacheMode(Union[QGraphicsView.CacheMode, QGraphicsView.CacheModeFlag]) None
class CacheMode(QGraphicsView.CacheMode) None

Bases: sip.simplewrapper

__init__(*args, **kwargs)
class CacheModeFlag

Bases: int

CacheNone = 0
DontAdjustForAntialiasing = 4
DontClipPainter = 1
DontSavePainterState = 2
class DragMode

Bases: int

DrawChildren = 2
DrawWindowBackground = 1
FullViewportUpdate = 0
HLine = 4
IgnoreMask = 4
MinimalViewportUpdate = 1
NoAnchor = 0
NoDrag = 0
NoFrame = 0
NoViewportUpdate = 3
class OptimizationFlag

Bases: int

class OptimizationFlags
class OptimizationFlags(Union[QGraphicsView.OptimizationFlags, QGraphicsView.OptimizationFlag]) None
class OptimizationFlags(QGraphicsView.OptimizationFlags) None

Bases: sip.simplewrapper

__init__(*args, **kwargs)
class PaintDeviceMetric

Bases: int

Panel = 2
PdmDepth = 6
PdmDevicePixelRatio = 11
PdmDevicePixelRatioScaled = 12
PdmDpiX = 7
PdmDpiY = 8
PdmHeight = 2
PdmHeightMM = 4
PdmNumColors = 5
PdmPhysicalDpiX = 9
PdmPhysicalDpiY = 10
PdmWidth = 1
PdmWidthMM = 3
Plain = 16
Raised = 32
class RenderFlag

Bases: int

class RenderFlags
class RenderFlags(Union[QWidget.RenderFlags, QWidget.RenderFlag]) None
class RenderFlags(QWidget.RenderFlags) None

Bases: sip.simplewrapper

__init__(*args, **kwargs)
RubberBandDrag = 2
ScrollHandDrag = 1
class Shadow

Bases: int

Shadow_Mask = 240
class Shape

Bases: int

Shape_Mask = 15
class SizeAdjustPolicy

Bases: int

SmartViewportUpdate = 2
class StyleMask

Bases: int

StyledPanel = 6
Sunken = 48
VLine = 5
class ViewportAnchor

Bases: int

class ViewportUpdateMode

Bases: int

WinPanel = 3
acceptDrops(self) bool
accessibleDescription(self) str
accessibleName(self) str
actionEvent(self, QActionEvent)
actions(self) List[QAction]
activateWindow(self)
addAction(self, QAction)
addActions(self, Iterable[QAction])
addScrollBarWidget(self, QWidget, Union[Qt.Alignment, Qt.AlignmentFlag])
adjustSize(self)
alignment(self) Qt.Alignment
autoFillBackground(self) bool
backgroundBrush(self) QBrush
backgroundRole(self) QPalette.ColorRole
baseSize(self) QSize
blockSignals(self, bool) bool
cacheMode(self) QGraphicsView.CacheMode
centerOn(self, Union[QPointF, QPoint])
centerOn(self, QGraphicsItem) None
structure_view.centerOn(self, float, float) -> None
changeEvent(self, QEvent)
childAt(self, QPoint) QWidget
structure_view.childAt(self, int, int) -> QWidget
childEvent(self, QChildEvent)
children(self) List[QObject]
childrenRect(self) QRect
childrenRegion(self) QRegion
clearFocus(self)
clearMask(self)
close(self) bool
closeEvent(self, QCloseEvent)
colorCount(self) int
connectNotify(self, QMetaMethod)
contentsMargins(self) QMargins
contentsRect(self) QRect
contextMenuEvent(self, QContextMenuEvent)
contextMenuPolicy(self) Qt.ContextMenuPolicy
cornerWidget(self) QWidget
create(self, window: PyQt5.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
createWindowContainer(QWindow, parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = 0) QWidget
cursor(self) QCursor
customContextMenuRequested

customContextMenuRequested(self, QPoint) [signal]

customEvent(self, QEvent)
deleteLater(self)
depth(self) int
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
destroyed

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

devType(self) int
devicePixelRatio(self) int
devicePixelRatioF(self) float
devicePixelRatioFScale() float
disconnect(QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMode(self) QGraphicsView.DragMode
dragMoveEvent(self, QDragMoveEvent)
drawBackground(self, QPainter, QRectF)
drawForeground(self, QPainter, QRectF)
drawFrame(self, QPainter)
dropEvent(self, QDropEvent)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
effectiveWinId(self) PyQt5.sip.voidptr
ensurePolished(self)
ensureVisible(self, QRectF, xMargin: int = 50, yMargin: int = 50)
ensureVisible(self, QGraphicsItem, xMargin: int = 50, yMargin: int = 50) None
structure_view.ensureVisible(self, float, float, float, float, xMargin: int = 50, yMargin: int = 50) -> None
enterEvent(self, QEvent)
event(self, QEvent) bool
eventFilter(self, QObject, QEvent) bool
find(PyQt5.sip.voidptr) QWidget
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]
fitInView(self, QRectF, mode: Qt.AspectRatioMode = Qt.IgnoreAspectRatio)
fitInView(self, QGraphicsItem, mode: Qt.AspectRatioMode = Qt.IgnoreAspectRatio) None
structure_view.fitInView(self, float, float, float, float, mode: Qt.AspectRatioMode = Qt.IgnoreAspectRatio) -> None
focusInEvent(self, QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, bool) bool
focusOutEvent(self, QFocusEvent)
focusPolicy(self) Qt.FocusPolicy
focusPreviousChild(self) bool
focusProxy(self) QWidget
focusWidget(self) QWidget
font(self) QFont
fontInfo(self) QFontInfo
fontMetrics(self) QFontMetrics
foregroundBrush(self) QBrush
foregroundRole(self) QPalette.ColorRole
frameGeometry(self) QRect
frameRect(self) QRect
frameShadow(self) QFrame.Shadow
frameShape(self) QFrame.Shape
frameSize(self) QSize
frameStyle(self) int
frameWidth(self) int
geometry(self) QRect
getContentsMargins(self) Tuple[int, int, int, int]
grab(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(- 1, - 1))) QPixmap
grabGesture(self, Qt.GestureType, flags: Union[Qt.GestureFlags, Qt.GestureFlag] = Qt.GestureFlags())
grabKeyboard(self)
grabMouse(self)
grabMouse(self, Union[QCursor, Qt.CursorShape]) None
grabShortcut(self, Union[QKeySequence, QKeySequence.StandardKey, str, int], context: Qt.ShortcutContext = Qt.WindowShortcut) int
graphicsEffect(self) QGraphicsEffect
graphicsProxyWidget(self) QGraphicsProxyWidget
hasFocus(self) bool
hasHeightForWidth(self) bool
hasMouseTracking(self) bool
hasTabletTracking(self) bool
height(self) int
heightForWidth(self, int) int
heightMM(self) int
hide(self)
hideEvent(self, QHideEvent)
horizontalScrollBar(self) QScrollBar
horizontalScrollBarPolicy(self) Qt.ScrollBarPolicy
inherits(self, str) bool
initPainter(self, QPainter)
initStyleOption(self, QStyleOptionFrame)
inputMethodEvent(self, QInputMethodEvent)
inputMethodHints(self) Qt.InputMethodHints
inputMethodQuery(self, Qt.InputMethodQuery) Any
structure_view.insertAction(self, QAction, QAction)
insertActions(self, QAction, Iterable[QAction])
installEventFilter(self, QObject)
invalidateScene(self, rect: QRectF = QRectF(), layers: Union[QGraphicsScene.SceneLayers, QGraphicsScene.SceneLayer] = QGraphicsScene.AllLayers)
isActiveWindow(self) bool
isAncestorOf(self, QWidget) bool
isEnabled(self) bool
isEnabledTo(self, QWidget) bool
isFullScreen(self) bool
isHidden(self) bool
isInteractive(self) bool
isLeftToRight(self) bool
isMaximized(self) bool
isMinimized(self) bool
isModal(self) bool
isRightToLeft(self) bool
isSignalConnected(self, QMetaMethod) bool
isTransformed(self) bool
isVisible(self) bool
isVisibleTo(self, QWidget) bool
isWidgetType(self) bool
isWindow(self) bool
isWindowModified(self) bool
isWindowType(self) bool
itemAt(self, QPoint) QGraphicsItem
structure_view.itemAt(self, int, int) -> QGraphicsItem
items(self) List[QGraphicsItem]
items(self, QPoint) List[QGraphicsItem]
structure_view.items(self, int, int) -> List[QGraphicsItem]
structure_view.items(self, int, int, int, int, mode: Qt.ItemSelectionMode = Qt.IntersectsItemShape) -> List[QGraphicsItem]
items(self, QRect, mode: Qt.ItemSelectionMode = Qt.IntersectsItemShape) List[QGraphicsItem]
items(self, QPolygon, mode: Qt.ItemSelectionMode = Qt.IntersectsItemShape) List[QGraphicsItem]
items(self, QPainterPath, mode: Qt.ItemSelectionMode = Qt.IntersectsItemShape) List[QGraphicsItem]
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
keyboardGrabber() QWidget
killTimer(self, int)
layout(self) QLayout
layoutDirection(self) Qt.LayoutDirection
leaveEvent(self, QEvent)
lineWidth(self) int
locale(self) QLocale
logicalDpiX(self) int
logicalDpiY(self) int
lower(self)
mapFrom(self, QWidget, QPoint) QPoint
mapFromGlobal(self, QPoint) QPoint
mapFromParent(self, QPoint) QPoint
mapFromScene(self, Union[QPointF, QPoint]) QPoint
mapFromScene(self, QRectF) QPolygon
mapFromScene(self, QPolygonF) QPolygon
mapFromScene(self, QPainterPath) QPainterPath
structure_view.mapFromScene(self, float, float) -> QPoint
structure_view.mapFromScene(self, float, float, float, float) -> QPolygon
mapTo(self, QWidget, QPoint) QPoint
mapToGlobal(self, QPoint) QPoint
mapToParent(self, QPoint) QPoint
mapToScene(self, QPoint) QPointF
mapToScene(self, QRect) QPolygonF
mapToScene(self, QPolygon) QPolygonF
mapToScene(self, QPainterPath) QPainterPath
structure_view.mapToScene(self, int, int) -> QPointF
structure_view.mapToScene(self, int, int, int, int) -> QPolygonF
mask(self) QRegion
maximumHeight(self) int
maximumSize(self) QSize
maximumViewportSize(self) QSize
maximumWidth(self) int
metaObject(self) QMetaObject
metric(self, QPaintDevice.PaintDeviceMetric) int
midLineWidth(self) int
minimumHeight(self) int
minimumSize(self) QSize
minimumSizeHint(self) QSize
minimumWidth(self) int
mouseDoubleClickEvent(self, QMouseEvent)
mouseGrabber() QWidget
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
move(self, QPoint)
structure_view.move(self, int, int) -> None
moveEvent(self, QMoveEvent)
moveToThread(self, QThread)
nativeEvent(self, Union[QByteArray, bytes, bytearray], sip.voidptr) Tuple[bool, int]
nativeParentWidget(self) QWidget
nextInFocusChain(self) QWidget
normalGeometry(self) QRect
objectName(self) str
objectNameChanged

objectNameChanged(self, str) [signal]

optimizationFlags(self) QGraphicsView.OptimizationFlags
overrideWindowFlags(self, Union[Qt.WindowFlags, Qt.WindowType])
overrideWindowState(self, Union[Qt.WindowStates, Qt.WindowState])
paintEngine(self) QPaintEngine
paintEvent(self, QPaintEvent)
paintingActive(self) bool
palette(self) QPalette
parent(self) QObject
parentWidget(self) QWidget
physicalDpiX(self) int
physicalDpiY(self) int
pos(self) QPoint
previousInFocusChain(self) QWidget
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.

raise_(self)
receivers(self, PYQT_SIGNAL) int
rect(self) QRect
releaseKeyboard(self)
releaseMouse(self)
releaseShortcut(self, int)
removeAction(self, QAction)
removeEventFilter(self, QObject)
render(self, QPainter, target: QRectF = QRectF(), source: QRect = QRect(), mode: Qt.AspectRatioMode = Qt.KeepAspectRatio)
renderHints(self) QPainter.RenderHints
repaint(self)
structure_view.repaint(self, int, int, int, int) -> None
repaint(self, QRect) None
repaint(self, QRegion) None
resetCachedContent(self)
resetTransform(self)
resize(self, QSize)
structure_view.resize(self, int, int) -> None
resizeAnchor(self) QGraphicsView.ViewportAnchor
restoreGeometry(self, Union[QByteArray, bytes, bytearray]) bool
rotate(self, float)
rubberBandChanged

rubberBandChanged(self, QRect, Union[QPointF, QPoint], Union[QPointF, QPoint]) [signal]

rubberBandRect(self) QRect
rubberBandSelectionMode(self) Qt.ItemSelectionMode
saveGeometry(self) QByteArray
structure_view.scale(self, float, float)
scene(self) QGraphicsScene
sceneRect(self) QRectF
structure_view.scroll(self, int, int)
structure_view.scroll(self, int, int, QRect) -> None
scrollBarWidgets(self, Union[Qt.Alignment, Qt.AlignmentFlag]) List[QWidget]
structure_view.scrollContentsBy(self, int, int)
sender(self) QObject
senderSignalIndex(self) int
setAcceptDrops(self, bool)
setAccessibleDescription(self, str)
setAccessibleName(self, str)
setAlignment(self, Union[Qt.Alignment, Qt.AlignmentFlag])
setAttribute(self, Qt.WidgetAttribute, on: bool = True)
setAutoFillBackground(self, bool)
setBackgroundBrush(self, Union[QBrush, QColor, Qt.GlobalColor, QGradient])
setBackgroundRole(self, QPalette.ColorRole)
structure_view.setBaseSize(self, int, int)
setBaseSize(self, QSize) None
setCacheMode(self, Union[QGraphicsView.CacheMode, QGraphicsView.CacheModeFlag])
structure_view.setContentsMargins(self, int, int, int, int)
setContentsMargins(self, QMargins) None
setContextMenuPolicy(self, Qt.ContextMenuPolicy)
setCornerWidget(self, QWidget)
setCursor(self, Union[QCursor, Qt.CursorShape])
setDisabled(self, bool)
setDragMode(self, QGraphicsView.DragMode)
setEnabled(self, bool)
setFixedHeight(self, int)
setFixedSize(self, QSize)
structure_view.setFixedSize(self, int, int) -> None
setFixedWidth(self, int)
setFocus(self)
setFocus(self, Qt.FocusReason) None
setFocusPolicy(self, Qt.FocusPolicy)
setFocusProxy(self, QWidget)
setFont(self, QFont)
setForegroundBrush(self, Union[QBrush, QColor, Qt.GlobalColor, QGradient])
setForegroundRole(self, QPalette.ColorRole)
setFrameRect(self, QRect)
setFrameShadow(self, QFrame.Shadow)
setFrameShape(self, QFrame.Shape)
setFrameStyle(self, int)
setGeometry(self, QRect)
structure_view.setGeometry(self, int, int, int, int) -> None
setGraphicsEffect(self, QGraphicsEffect)
setHidden(self, bool)
setHorizontalScrollBar(self, QScrollBar)
setHorizontalScrollBarPolicy(self, Qt.ScrollBarPolicy)
setInputMethodHints(self, Union[Qt.InputMethodHints, Qt.InputMethodHint])
setInteractive(self, bool)
setLayout(self, QLayout)
setLayoutDirection(self, Qt.LayoutDirection)
setLineWidth(self, int)
setLocale(self, QLocale)
setMask(self, QBitmap)
setMask(self, QRegion) None
setMaximumHeight(self, int)
structure_view.setMaximumSize(self, int, int)
setMaximumSize(self, QSize) None
setMaximumWidth(self, int)
setMidLineWidth(self, int)
setMinimumHeight(self, int)
structure_view.setMinimumSize(self, int, int)
setMinimumSize(self, QSize) None
setMinimumWidth(self, int)
setMouseTracking(self, bool)
setObjectName(self, str)
setOptimizationFlag(self, QGraphicsView.OptimizationFlag, enabled: bool = True)
setOptimizationFlags(self, Union[QGraphicsView.OptimizationFlags, QGraphicsView.OptimizationFlag])
setPalette(self, QPalette)
setParent(self, QWidget)
setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType]) None
setProperty(self, str, Any) bool
setRenderHint(self, QPainter.RenderHint, on: bool = True)
setRenderHints(self, Union[QPainter.RenderHints, QPainter.RenderHint])
setResizeAnchor(self, QGraphicsView.ViewportAnchor)
setRubberBandSelectionMode(self, Qt.ItemSelectionMode)
setScene(self, QGraphicsScene)
setSceneRect(self, QRectF)
structure_view.setSceneRect(self, float, float, float, float) -> None
setShortcutAutoRepeat(self, int, enabled: bool = True)
setShortcutEnabled(self, int, enabled: bool = True)
setSizeAdjustPolicy(self, QAbstractScrollArea.SizeAdjustPolicy)
structure_view.setSizeIncrement(self, int, int)
setSizeIncrement(self, QSize) None
setSizePolicy(self, QSizePolicy)
setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy) None
setStatusTip(self, str)
setStyle(self, QStyle)
setStyleSheet(self, str)
structure_view.setTabOrder(QWidget, QWidget)
setTabletTracking(self, bool)
setToolTip(self, str)
setToolTipDuration(self, int)
setTransform(self, QTransform, combine: bool = False)
setTransformationAnchor(self, QGraphicsView.ViewportAnchor)
setUpdatesEnabled(self, bool)
setVerticalScrollBar(self, QScrollBar)
setVerticalScrollBarPolicy(self, Qt.ScrollBarPolicy)
setViewport(self, QWidget)
structure_view.setViewportMargins(self, int, int, int, int)
setViewportMargins(self, QMargins) None
setViewportUpdateMode(self, QGraphicsView.ViewportUpdateMode)
setVisible(self, bool)
setWhatsThis(self, str)
setWindowFilePath(self, str)
setWindowFlag(self, Qt.WindowType, on: bool = True)
setWindowFlags(self, Union[Qt.WindowFlags, Qt.WindowType])
setWindowIcon(self, QIcon)
setWindowIconText(self, str)
setWindowModality(self, Qt.WindowModality)
setWindowModified(self, bool)
setWindowOpacity(self, float)
setWindowRole(self, str)
setWindowState(self, Union[Qt.WindowStates, Qt.WindowState])
setWindowTitle(self, str)
setupViewport(self, QWidget)
sharedPainter(self) QPainter
structure_view.shear(self, float, float)
show(self)
showEvent(self, QShowEvent)
showFullScreen(self)
showMaximized(self)
showMinimized(self)
showNormal(self)
signalsBlocked(self) bool
size(self) QSize
sizeAdjustPolicy(self) QAbstractScrollArea.SizeAdjustPolicy
sizeHint(self) QSize
sizeIncrement(self) QSize
sizePolicy(self) QSizePolicy
stackUnder(self, QWidget)
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
statusTip(self) str
style(self) QStyle
styleSheet(self) str
tabletEvent(self, QTabletEvent)
testAttribute(self, Qt.WidgetAttribute) bool
thread(self) QThread
timerEvent(self, QTimerEvent)
toolTip(self) str
toolTipDuration(self) int
tr(self, str, disambiguation: str = None, n: int = - 1) str
transform(self) QTransform
transformationAnchor(self) QGraphicsView.ViewportAnchor
structure_view.translate(self, float, float)
underMouse(self) bool
ungrabGesture(self, Qt.GestureType)
unsetCursor(self)
unsetLayoutDirection(self)
unsetLocale(self)
update(self)
update(self, QRect) None
update(self, QRegion) None
structure_view.update(self, int, int, int, int) -> None
updateGeometry(self)
updateMicroFocus(self)
updateScene(self, Iterable[QRectF])
updateSceneRect(self, QRectF)
updatesEnabled(self) bool
verticalScrollBar(self) QScrollBar
verticalScrollBarPolicy(self) Qt.ScrollBarPolicy
viewport(self) QWidget
viewportEvent(self, QEvent) bool
viewportMargins(self) QMargins
viewportSizeHint(self) QSize
viewportTransform(self) QTransform
viewportUpdateMode(self) QGraphicsView.ViewportUpdateMode
visibleRegion(self) QRegion
whatsThis(self) str
width(self) int
widthMM(self) int
winId(self) PyQt5.sip.voidptr
window(self) QWidget
windowFilePath(self) str
windowFlags(self) Qt.WindowFlags
windowHandle(self) QWindow
windowIcon(self) QIcon
windowIconChanged

windowIconChanged(self, QIcon) [signal]

windowIconText(self) str
windowIconTextChanged

windowIconTextChanged(self, str) [signal]

windowModality(self) Qt.WindowModality
windowOpacity(self) float
windowRole(self) str
windowState(self) Qt.WindowStates
windowTitle(self) str
windowTitleChanged

windowTitleChanged(self, str) [signal]

windowType(self) Qt.WindowType
x(self) int
y(self) int
class schrodinger.ui.qt.structure2d.structure_item(rect=None)[source]

Bases: PyQt5.QtWidgets.QGraphicsItem

__init__(rect=None)[source]
Parameters

rect (QRectF) – Size of the rect of the bounding box.

boundingRect(self) QRectF[source]
clear()[source]

Clear picture from item.

generate_picture(gen_coord=True)[source]

Generates a QPicture of the structure. This should be called after setting the structure and the accompaning annotators.

Parameters

gen_coord (bool) – if True generate coordinates.

paint(painter, option, widget=0)[source]

Overrides the paint function to draw the picture that has already been generated. This should never be called manually.

set_colormap(colormap)[source]

Sets the colormap for the atom and bond coloring. Otherwise, the coloring used will be that coming from the ct and/or chmmol.

set_structure(struct, StereoType=6, hydrogenTreatment=1, wantProperties=True, wantMMStereoProps=True, readAtomBondProperties=True, allowRadicals=False)[source]

Set the structure to the given Structure object.

Parameters
  • struct (schrodinger.structure.Structure class object) – structure to be drawn on the canvas

  • StereoType (ChmMmctAdaptor.StereoType) – Stereochemistry option to use. Avialable options: # Does not include stereochemistry info: canvas2d.ChmMmctAdaptor.NoStereo # Ignores mmstereo annotations: canvas2d.ChmMmctAdaptor.StereoFromGeometry # Silently ignores stereo information that Canvas doesn’t agree with: canvas2d.ChmMmctAdaptor.StereoFromGeometry_Safe # Ignores 3d geometry: canvas2d.ChmMmctAdaptor.StereoFromAnnotation # Silently ignores stereo information that Canvas doesn’t agree with: canvas2d.ChmMmctAdaptor.StereoFromAnnotation_Safe # Uses mmstereo annotaions with 3D geometry as a backup: canvas2d.ChmMmctAdaptor.StereoFromAnnotationAndGeometry # Silently ignores stereo information that Canvas doesn’t agree with: canvas2d.ChmMmctAdaptor.StereoFromAnnotationAndGeometry_Safe

  • hydrogenTreatment (canvas2d.ChmAtomOption.H) – Hydrogen treatment method. canvas2d.ChmAtomOption.H_Never canvas2d.ChmAtomOption.H_ExplicitOnly canvas2d.ChmAtomOption.H_Polar canvas2d.ChmAtomOption.H_ExplicitPolar canvas2d.ChmAtomOption.H_Chiral canvas2d.ChmAtomOption.H_ExplicitChiral canvas2d.ChmAtomOption.H_ExplicitPolarAndChiral canvas2d.ChmAtomOption.H_All

  • wantProperties (bool) – Whether properties should be copied.

  • wantMMStereoProps (bool) – Whether to copy mmstereo properties.

  • readAtomBondProperties (bool) – Whether to copy atom and bond-level properties.

  • allowRadicals (bool) – Whether to assume that valence deficiencies represent unpaired electrons.

set_rect(rect)[source]
Parameters

rect (QRect) – size of bounding box

set_text(text, alignment=None)[source]

Sets text in the view. This is useful if you display text in place of a structure, in places where no structure is available.

Parameters
  • text (string) – text to be displayed

  • alignment (Qt.AlignmentFlags) – alignment flags of text, defaults to QtCore.Qt.AlignVCenter|QtCore.Qt.AlignCenter

add_annotator(annotator)[source]

Adds annotator to stack. The order that these functions get added is the order that they will be applied to the picture.

Parameters

annotator (schrodinger.infra.canvas2d.ChemViewAnnotator) – Annotator which draws on top an image

add_annotator_function_return(function)[source]

Add functions that need to get returned after the structure is rendered on the screen. An example of this would be a function that returns drawmol coordinates.

clear_annotators()[source]

Clears all annotators

mousePressEvent(event)[source]

Emit a signal if the user left-clicked on an atom or a bond

getBondAtLocation(pos)[source]

Return the bond at the specified coordinates

Parameters

pos (PyQt5.QtCore.QPoint) – The specified coordinates

Returns

If there is a bond at the specified coordinates, return a list of the chmmol atom indices for the two bound atoms. (Note that the chmmol atom indices are zero-indexed, so you should add one to each index if you want the schrodinger.structure.Structure atom indices). If there is no bond at the specified coordinates, return an empty list.

Return type

list

class CacheMode

Bases: int

DeviceCoordinateCache = 2
class GraphicsItemChange

Bases: int

class GraphicsItemFlag

Bases: int

class GraphicsItemFlags
class GraphicsItemFlags(Union[QGraphicsItem.GraphicsItemFlags, QGraphicsItem.GraphicsItemFlag]) None
class GraphicsItemFlags(QGraphicsItem.GraphicsItemFlags) None

Bases: sip.simplewrapper

__init__(*args, **kwargs)
ItemAcceptsInputMethod = 4096
ItemChildAddedChange = 6
ItemChildRemovedChange = 7
ItemClipsChildrenToShape = 16
ItemClipsToShape = 8
ItemContainsChildrenInShape = 524288
ItemCoordinateCache = 1
ItemCursorChange = 17
ItemCursorHasChanged = 18
ItemDoesntPropagateOpacityToChildren = 128
ItemEnabledChange = 3
ItemEnabledHasChanged = 13
ItemFlagsChange = 21
ItemFlagsHaveChanged = 22
ItemHasNoContents = 1024
ItemIgnoresParentOpacity = 64
ItemIgnoresTransformations = 32
ItemIsFocusable = 4
ItemIsMovable = 1
ItemIsPanel = 16384
ItemIsSelectable = 2
ItemMatrixChange = 1
ItemNegativeZStacksBehindParent = 8192
ItemOpacityChange = 25
ItemOpacityHasChanged = 26
ItemParentChange = 5
ItemParentHasChanged = 15
ItemPositionChange = 0
ItemPositionHasChanged = 9
ItemRotationChange = 28
ItemRotationHasChanged = 29
ItemScaleChange = 30
ItemScaleHasChanged = 31
ItemSceneChange = 11
ItemSceneHasChanged = 16
ItemScenePositionHasChanged = 27
ItemSelectedChange = 4
ItemSelectedHasChanged = 14
ItemSendsGeometryChanges = 2048
ItemSendsScenePositionChanges = 65536
ItemStacksBehindParent = 256
ItemToolTipChange = 19
ItemToolTipHasChanged = 20
ItemTransformChange = 8
ItemTransformHasChanged = 10
ItemTransformOriginPointChange = 32
ItemTransformOriginPointHasChanged = 33
ItemUsesExtendedStyleOption = 512
ItemVisibleChange = 2
ItemVisibleHasChanged = 12
ItemZValueChange = 23
ItemZValueHasChanged = 24
NoCache = 0
NonModal = 0
PanelModal = 1
class PanelModality

Bases: int

SceneModal = 2
Type = 1
UserType = 65536
acceptDrops(self) bool
acceptHoverEvents(self) bool
acceptTouchEvents(self) bool
acceptedMouseButtons(self) Qt.MouseButtons
advance(self, int)
boundingRegion(self, QTransform) QRegion
boundingRegionGranularity(self) float
cacheMode(self) QGraphicsItem.CacheMode
childItems(self) List[QGraphicsItem]
childrenBoundingRect(self) QRectF
clearFocus(self)
clipPath(self) QPainterPath
collidesWithItem(self, QGraphicsItem, mode: Qt.ItemSelectionMode = Qt.IntersectsItemShape) bool
collidesWithPath(self, QPainterPath, mode: Qt.ItemSelectionMode = Qt.IntersectsItemShape) bool
collidingItems(self, mode: Qt.ItemSelectionMode = Qt.IntersectsItemShape) List[QGraphicsItem]
commonAncestorItem(self, QGraphicsItem) QGraphicsItem
contains(self, Union[QPointF, QPoint]) bool
contextMenuEvent(self, QGraphicsSceneContextMenuEvent)
cursor(self) QCursor
data(self, int) Any
deviceTransform(self, QTransform) QTransform
dragEnterEvent(self, QGraphicsSceneDragDropEvent)
dragLeaveEvent(self, QGraphicsSceneDragDropEvent)
dragMoveEvent(self, QGraphicsSceneDragDropEvent)
dropEvent(self, QGraphicsSceneDragDropEvent)
effectiveOpacity(self) float
ensureVisible(self, rect: QRectF = QRectF(), xMargin: int = 50, yMargin: int = 50)
structure_item.ensureVisible(self, float, float, float, float, xMargin: int = 50, yMargin: int = 50) -> None
filtersChildEvents(self) bool
flags(self) QGraphicsItem.GraphicsItemFlags
focusInEvent(self, QFocusEvent)
focusItem(self) QGraphicsItem
focusOutEvent(self, QFocusEvent)
focusProxy(self) QGraphicsItem
grabKeyboard(self)
grabMouse(self)
graphicsEffect(self) QGraphicsEffect
group(self) QGraphicsItemGroup
hasCursor(self) bool
hasFocus(self) bool
hide(self)
hoverEnterEvent(self, QGraphicsSceneHoverEvent)
hoverLeaveEvent(self, QGraphicsSceneHoverEvent)
hoverMoveEvent(self, QGraphicsSceneHoverEvent)
inputMethodEvent(self, QInputMethodEvent)
inputMethodHints(self) Qt.InputMethodHints
inputMethodQuery(self, Qt.InputMethodQuery) Any
installSceneEventFilter(self, QGraphicsItem)
isActive(self) bool
isAncestorOf(self, QGraphicsItem) bool
isBlockedByModalPanel(self) Tuple[bool, QGraphicsItem]
isClipped(self) bool
isEnabled(self) bool
isObscured(self, rect: QRectF = QRectF()) bool
structure_item.isObscured(self, float, float, float, float) -> bool
isObscuredBy(self, QGraphicsItem) bool
isPanel(self) bool
isSelected(self) bool
isUnderMouse(self) bool
isVisible(self) bool
isVisibleTo(self, QGraphicsItem) bool
isWidget(self) bool
isWindow(self) bool
itemChange(self, QGraphicsItem.GraphicsItemChange, Any) Any
itemTransform(self, QGraphicsItem) Tuple[QTransform, bool]
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
mapFromItem(self, QGraphicsItem, Union[QPointF, QPoint]) QPointF
mapFromItem(self, QGraphicsItem, QRectF) QPolygonF
mapFromItem(self, QGraphicsItem, QPolygonF) QPolygonF
mapFromItem(self, QGraphicsItem, QPainterPath) QPainterPath
structure_item.mapFromItem(self, QGraphicsItem, float, float) -> QPointF
structure_item.mapFromItem(self, QGraphicsItem, float, float, float, float) -> QPolygonF
mapFromParent(self, Union[QPointF, QPoint]) QPointF
mapFromParent(self, QRectF) QPolygonF
mapFromParent(self, QPolygonF) QPolygonF
mapFromParent(self, QPainterPath) QPainterPath
structure_item.mapFromParent(self, float, float) -> QPointF
structure_item.mapFromParent(self, float, float, float, float) -> QPolygonF
mapFromScene(self, Union[QPointF, QPoint]) QPointF
mapFromScene(self, QRectF) QPolygonF
mapFromScene(self, QPolygonF) QPolygonF
mapFromScene(self, QPainterPath) QPainterPath
structure_item.mapFromScene(self, float, float) -> QPointF
structure_item.mapFromScene(self, float, float, float, float) -> QPolygonF
mapRectFromItem(self, QGraphicsItem, QRectF) QRectF
structure_item.mapRectFromItem(self, QGraphicsItem, float, float, float, float) -> QRectF
mapRectFromParent(self, QRectF) QRectF
structure_item.mapRectFromParent(self, float, float, float, float) -> QRectF
mapRectFromScene(self, QRectF) QRectF
structure_item.mapRectFromScene(self, float, float, float, float) -> QRectF
mapRectToItem(self, QGraphicsItem, QRectF) QRectF
structure_item.mapRectToItem(self, QGraphicsItem, float, float, float, float) -> QRectF
mapRectToParent(self, QRectF) QRectF
structure_item.mapRectToParent(self, float, float, float, float) -> QRectF
mapRectToScene(self, QRectF) QRectF
structure_item.mapRectToScene(self, float, float, float, float) -> QRectF
mapToItem(self, QGraphicsItem, Union[QPointF, QPoint]) QPointF
mapToItem(self, QGraphicsItem, QRectF) QPolygonF
mapToItem(self, QGraphicsItem, QPolygonF) QPolygonF
mapToItem(self, QGraphicsItem, QPainterPath) QPainterPath
structure_item.mapToItem(self, QGraphicsItem, float, float) -> QPointF
structure_item.mapToItem(self, QGraphicsItem, float, float, float, float) -> QPolygonF
mapToParent(self, Union[QPointF, QPoint]) QPointF
mapToParent(self, QRectF) QPolygonF
mapToParent(self, QPolygonF) QPolygonF
mapToParent(self, QPainterPath) QPainterPath
structure_item.mapToParent(self, float, float) -> QPointF
structure_item.mapToParent(self, float, float, float, float) -> QPolygonF
mapToScene(self, Union[QPointF, QPoint]) QPointF
mapToScene(self, QRectF) QPolygonF
mapToScene(self, QPolygonF) QPolygonF
mapToScene(self, QPainterPath) QPainterPath
structure_item.mapToScene(self, float, float) -> QPointF
structure_item.mapToScene(self, float, float, float, float) -> QPolygonF
mouseDoubleClickEvent(self, QGraphicsSceneMouseEvent)
mouseMoveEvent(self, QGraphicsSceneMouseEvent)
mouseReleaseEvent(self, QGraphicsSceneMouseEvent)
structure_item.moveBy(self, float, float)
opacity(self) float
opaqueArea(self) QPainterPath
panel(self) QGraphicsItem
panelModality(self) QGraphicsItem.PanelModality
parentItem(self) QGraphicsItem
parentObject(self) QGraphicsObject
parentWidget(self) QGraphicsWidget
pos(self) QPointF
prepareGeometryChange(self)
removeSceneEventFilter(self, QGraphicsItem)
resetTransform(self)
rotation(self) float
scale(self) float
scene(self) QGraphicsScene
sceneBoundingRect(self) QRectF
sceneEvent(self, QEvent) bool
sceneEventFilter(self, QGraphicsItem, QEvent) bool
scenePos(self) QPointF
sceneTransform(self) QTransform
structure_item.scroll(self, float, float, rect: QRectF = QRectF())
setAcceptDrops(self, bool)
setAcceptHoverEvents(self, bool)
setAcceptTouchEvents(self, bool)
setAcceptedMouseButtons(self, Union[Qt.MouseButtons, Qt.MouseButton])
setActive(self, bool)
setBoundingRegionGranularity(self, float)
setCacheMode(self, QGraphicsItem.CacheMode, logicalCacheSize: QSize = QSize())
setCursor(self, Union[QCursor, Qt.CursorShape])
setData(self, int, Any)
setEnabled(self, bool)
setFiltersChildEvents(self, bool)
setFlag(self, QGraphicsItem.GraphicsItemFlag, enabled: bool = True)
setFlags(self, Union[QGraphicsItem.GraphicsItemFlags, QGraphicsItem.GraphicsItemFlag])
setFocus(self, focusReason: Qt.FocusReason = Qt.OtherFocusReason)
setFocusProxy(self, QGraphicsItem)
setGraphicsEffect(self, QGraphicsEffect)
setGroup(self, QGraphicsItemGroup)
setInputMethodHints(self, Union[Qt.InputMethodHints, Qt.InputMethodHint])
setOpacity(self, float)
setPanelModality(self, QGraphicsItem.PanelModality)
setParentItem(self, QGraphicsItem)
setPos(self, Union[QPointF, QPoint])
structure_item.setPos(self, float, float) -> None
setRotation(self, float)
setScale(self, float)
setSelected(self, bool)
setToolTip(self, str)
setTransform(self, QTransform, combine: bool = False)
setTransformOriginPoint(self, Union[QPointF, QPoint])
structure_item.setTransformOriginPoint(self, float, float) -> None
setTransformations(self, Iterable[QGraphicsTransform])
setVisible(self, bool)
setX(self, float)
setY(self, float)
setZValue(self, float)
shape(self) QPainterPath
show(self)
stackBefore(self, QGraphicsItem)
toGraphicsObject(self) QGraphicsObject
toolTip(self) str
topLevelItem(self) QGraphicsItem
topLevelWidget(self) QGraphicsWidget
transform(self) QTransform
transformOriginPoint(self) QPointF
transformations(self) List[QGraphicsTransform]
type(self) int
ungrabKeyboard(self)
ungrabMouse(self)
unsetCursor(self)
update(self, rect: QRectF = QRectF())
structure_item.update(self, float, float, float, float) -> None
updateMicroFocus(self)
wheelEvent(self, QGraphicsSceneWheelEvent)
window(self) QGraphicsWidget
x(self) float
y(self) float
zValue(self) float
class schrodinger.ui.qt.structure2d.ColoredArrowAnnotator(mol, bond_info=None, draw_arrowhead=True)[source]

Bases: schrodinger.infra._canvas2d.ChemViewAnnotator

This annotator allows you to add colored arrows to bonds in 2d renderings.

This is a slightly less terrible port from C++. Most of the logic still keeps C++-style syntax, simply because rewriting it is not worth the effort. The interface is now more pythonic, at least.

__init__(mol, bond_info=None, draw_arrowhead=True)[source]
Parameters
  • mol – is a chmmol

  • bond_info – is a list containing individual lists of: (atom1, atom2, outlined, QColor)

These lists are composed of:

  • atom1 is a ct-atom index

  • atom2 is a ct-atom index

  • outlined (0/1) is whether you want the arrow to have a black outline

  • qc is a qcolor for the bond

add_bond_arrow(atom1, atom2, outlined, qc)[source]

atom1 is a ct-atom index atom2 is a ct-atom index outlined (0/1) is whether you want the arrow to have a black outline qc is the qcolor of the bond

clear_bond_arrows()[source]

Clear all bond markers in this annotator

annotate(view, dm)[source]

This function annotates the specified arrows.

class schrodinger.ui.qt.structure2d.CgCoreAnnotator(bond_info, colors, atoms, atomColors, mol)[source]

Bases: schrodinger.ui.qt.structure2d.ColoredArrowAnnotator

This is the original ColoredArrowAnnotator class name. When that class had the format of its input changed, it became incompatible with the original class.

This class will remain to preserve backwards compatability.

__init__(bond_info, colors, atoms, atomColors, mol)[source]

bond_info is a list of size 3N, (atom1 idx, a2 idx, outline) colors is a list of size 3N (R, G, B) atoms/atomColors are deprecated mol is a chmmol

add_bond_arrow(atom1, atom2, outlined, qc)

atom1 is a ct-atom index atom2 is a ct-atom index outlined (0/1) is whether you want the arrow to have a black outline qc is the qcolor of the bond

annotate(view, dm)

This function annotates the specified arrows.

clear_bond_arrows()

Clear all bond markers in this annotator

class schrodinger.ui.qt.structure2d.BaseSquareAnnotator[source]

Bases: schrodinger.infra._canvas2d.ChemViewAnnotator

Base class for annotators that draw a square around atoms

annotate(view, dm)[source]

Add this sphere to the list of things in the picture

Parameters
  • view (Chemview) – the View this item goes in

  • dm (ChmDrawMol) – object that contains the list of atom and bond graphics

__init__(*args, **kwargs)
class schrodinger.ui.qt.structure2d.RedSquareAnnotator(atom=None, size=100, color=7)[source]

Bases: schrodinger.ui.qt.structure2d.BaseSquareAnnotator

Create a square around the specified atom.

__init__(atom=None, size=100, color=7)[source]

Instantiate a RedSquareAnnotator instance.

Parameters
  • atom (int) – the atom number to which square applies. Note that this expects the first atom to be atom 1, not 0.

  • size (float) – the size of one side of the square in pixels.

  • color (QColor) – the color used to draw annotator. Default is red.

setAtom(atom, color=None)[source]

Set the atom number to which the square applies

Parameters
  • atom (int) – the atom number to which square applies. Note that this expects the first atom to be atom 1, not 0. If 0 is passed in, no atom will be annotated.

  • color (QColor) – the color used to draw annotator. If not given, the previously set color for this annotator will be used.

clearAtom()[source]

Remove the current atom so no atoms are annotated

getAtom()[source]

Return the atom index current annotated

Return type

int or None

Returns

The index (1-based) of the atom annotated, or None if no atoms are annotated

setColor(color)[source]

Set the color of the square

Parameters

color (QColor) – the color used to draw annotator.

annotate(view, dm)

Add this sphere to the list of things in the picture

Parameters
  • view (Chemview) – the View this item goes in

  • dm (ChmDrawMol) – object that contains the list of atom and bond graphics

class schrodinger.ui.qt.structure2d.MultiSquareAnnotator(atom_dict, size=100)[source]

Bases: schrodinger.ui.qt.structure2d.BaseSquareAnnotator

Create a square around each specified atom.

__init__(atom_dict, size=100)[source]

Instantiate a MultiSquareAnnotator instance.

Parameters
  • atom_dict (dict) – A dictionary of {atom number: QColor} specifying the appropriate color for each atom

  • size (float) – The size of one side of the square in pixels. Defaults to 100 pixels.

annotate(view, dm)

Add this sphere to the list of things in the picture

Parameters
  • view (Chemview) – the View this item goes in

  • dm (ChmDrawMol) – object that contains the list of atom and bond graphics

class schrodinger.ui.qt.structure2d.AtomNumberAnnotator[source]

Bases: schrodinger.infra._canvas2d.ChemViewAnnotator

Show the atom number of each atom rather than a vertex or atomic symbol

annotate(view, dm)[source]

Add atom number to each atom

Parameters
  • view (Chemview) – the View this item goes in

  • dm (ChmDrawMol) – object that contains the list of atom and bond graphics

__init__(*args, **kwargs)
class schrodinger.ui.qt.structure2d.AtomLabelAnnotator(atom_labels)[source]

Bases: schrodinger.infra._canvas2d.ChemViewAnnotator

Changes the label displayed for an atom. The label can have subscripts.

__init__(atom_labels)[source]

Instantiate a AtomLabelAnnotator instance.

Parameters

atom_labels (dict) – A dictionary of {atom number: label} specifying the label for each atom to be custom labeled. Each label may either be a string or a (str, str) tuple. In the latter case, the first string is the main label and the second string is the subscript. Note the atom numbers used here should be 1-based (first atom number = 1)

annotate(view, drawmol)[source]

Add a label to each atom specified in the atom_labels property

Parameters
  • view (Chemview) – the View this item goes in

  • drawmol (ChmDrawMol) – object that contains the list of atom and bond graphics

class schrodinger.ui.qt.structure2d.CircleAnnotator(atom=None, radius=75.0, color=8, gradient=False, fill=False, width=4)[source]

Bases: schrodinger.infra._canvas2d.ChemViewAnnotator

Creates a circle behind one or more atoms.

__init__(atom=None, radius=75.0, color=8, gradient=False, fill=False, width=4)[source]

Instantiate a ColorCircleAnnotator instance.

Parameters
  • atom (int) – the atom number to which radius applies. Note that this expects the first atom to be atom 1, not 0.

  • radius (float) – the radius of the sphere in pixels. Default is 75.

  • color (QColor) – The color of the circle fill

  • gradient (bool) – If True, the circle is filled with a gradient that goes from white at the center to the defined color. gradient is exclusive with fill.

  • fill (bool) – If True, the circle is given a constant fill. fill is exclusive with gradient.

  • width (int) – The width of the pen if fill and gradient are both False. Default is 4.

addAtom(atom_num, radius=None, color=None)[source]

Add another sphere to this annotator

Parameters
  • atom_num (int) – the atom number to which radius applies. Note that this expects the first atom to be atom 1, not 0.

  • radius (float) – the radius of the sphere in pixels. If not given, the radius given at the time of instance creation is used.

  • color (QColor) – The color of the circle fill. If not given, the color given at the time of instance creation is used.

removeAtom(atom_num)[source]

Remove an atom from the annotator

Parameters

atom_num (int) – the atom number to which radius applies. Note that this expects the first atom to be atom 1, not 0.

clearAtoms()[source]

Remove all atoms from the annotator

setColor(color, reset_colors=False)[source]

Set the default color for this annotator

Parameters
  • color (QColor) – The color of the circle fill.

  • reset_colors (bool) – If True, all existing circles will have their color reset to this value

setRadius(radius, reset_radii=False)[source]

Set the default radius for this annotator

Parameters
  • radius (float) – The radius of the circle

  • reset_radii (bool) – If True, all existing circles will have their radius reset to this value

annotate(view, dm)[source]

Add this sphere to the list of things in the picture

Parameters
  • view (Chemview) – the View this item goes in

  • dm (ChmDrawMol) – object that contains the list of atom and bond graphics

class schrodinger.ui.qt.structure2d.ResizableStructurePicture(parent=None, layout=None, height=200, width=200, margin=10, background='white', annotators=None)[source]

Bases: schrodinger.ui.qt.structure2d.StructurePicture

StructurePicture widget that resizes the structure image with the widget.

__init__(parent=None, layout=None, height=200, width=200, margin=10, background='white', annotators=None)[source]

See StructurePicture for all arguments, except:

Parameters

margin (int) – the margin to use around the image

drawChmmol(chmmol, atoms=[], bonds=[], color=<PyQt5.QtGui.QColor object>, gen_coord=False)[source]

Makes a 2-D rendering of the chmmol object with optional atoms and bonds highlighting.

Parameters
  • chmmol (ChmMol instance.) – Structure to generate the picture for.

  • atoms (list) – list of atoms that should be highlighted

  • bonds (list) – list of bonds that should be highlighted

  • color (QtGui.QColor) – color that is used to highlight atoms and bonds

  • gen_coord (bool) – if True generate coordinates.

Box = 1
DrawChildren = 2
DrawWindowBackground = 1
HLine = 4
IgnoreMask = 4
NoFrame = 0
class PaintDeviceMetric

Bases: int

Panel = 2
PdmDepth = 6
PdmDevicePixelRatio = 11
PdmDevicePixelRatioScaled = 12
PdmDpiX = 7
PdmDpiY = 8
PdmHeight = 2
PdmHeightMM = 4
PdmNumColors = 5
PdmPhysicalDpiX = 9
PdmPhysicalDpiY = 10
PdmWidth = 1
PdmWidthMM = 3
Plain = 16
Raised = 32
class RenderFlag

Bases: int

class RenderFlags
class RenderFlags(Union[QWidget.RenderFlags, QWidget.RenderFlag]) None
class RenderFlags(QWidget.RenderFlags) None

Bases: sip.simplewrapper

__init__(*args, **kwargs)
class Shadow

Bases: int

Shadow_Mask = 240
class Shape

Bases: int

Shape_Mask = 15
class StyleMask

Bases: int

StyledPanel = 6
Sunken = 48
VLine = 5
WinPanel = 3
acceptDrops(self) bool
accessibleDescription(self) str
accessibleName(self) str
actionEvent(self, QActionEvent)
actions(self) List[QAction]
activateWindow(self)
addAction(self, QAction)
addActions(self, Iterable[QAction])
adjustSize(self)
alignment(self) Qt.Alignment
autoFillBackground(self) bool
backgroundRole(self) QPalette.ColorRole
baseSize(self) QSize
blockSignals(self, bool) bool
buddy(self) QWidget
changeEvent(self, QEvent)
childAt(self, QPoint) QWidget
ResizableStructurePicture.childAt(self, int, int) -> QWidget
childEvent(self, QChildEvent)
children(self) List[QObject]
childrenRect(self) QRect
childrenRegion(self) QRegion
clear(self)
clearFocus(self)
clearMask(self)
close(self) bool
closeEvent(self, QCloseEvent)
colorCount(self) int
connectNotify(self, QMetaMethod)
contentsMargins(self) QMargins
contentsRect(self) QRect
contextMenuEvent(self, QContextMenuEvent)
contextMenuPolicy(self) Qt.ContextMenuPolicy
create(self, window: PyQt5.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
createWindowContainer(QWindow, parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = 0) QWidget
cursor(self) QCursor
customContextMenuRequested

customContextMenuRequested(self, QPoint) [signal]

customEvent(self, QEvent)
deleteLater(self)
depth(self) int
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
destroyed

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

devType(self) int
devicePixelRatio(self) int
devicePixelRatioF(self) float
devicePixelRatioFScale() float
disconnect(QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
drawFrame(self, QPainter)
drawStructure(structure, StereoType=6, hydrogenTreatment=1, wantProperties=True, wantMMStereoProps=True, readAtomBondProperties=True, allowRadicals=False)

Makes a 2-D rendering of the structure

Parameters
  • structure (schrodinger.structure.Structure class object) – structure to be drawn on the canvas

  • StereoType (canvas2d.ChmMmctAdaptor.StereoType) – Stereochemistry option to use. Available options: # Does not include stereochemistry info: canvas2d.ChmMmctAdaptor.NoStereo # Ignores mmstereo annotations: canvas2d.ChmMmctAdaptor.StereoFromGeometry # Silently ignores stereo information that Canvas doesn’t agree with: canvas2d.ChmMmctAdaptor.StereoFromGeometry_Safe # Ignores 3d geometry: canvas2d.ChmMmctAdaptor.StereoFromAnnotation # Silently ignores stereo information that Canvas doesn’t agree with: canvas2d.ChmMmctAdaptor.StereoFromAnnotation_Safe # Uses mmstereo annotaions with 3D geometry as a backup: canvas2d.ChmMmctAdaptor.StereoFromAnnotationAndGeometry # Silently ignores stereo information that Canvas doesn’t agree with: canvas2d.ChmMmctAdaptor.StereoFromAnnotationAndGeometry_Safe

  • hydrogenTreatment (canvas2d.ChmAtomOption.H) – Hydrogen treatment method. Available options: canvas2d.ChmAtomOption.H_Never canvas2d.ChmAtomOption.H_ExplicitOnly canvas2d.ChmAtomOption.H_Polar canvas2d.ChmAtomOption.H_ExplicitPolar canvas2d.ChmAtomOption.H_Chiral canvas2d.ChmAtomOption.H_ExplicitChiral canvas2d.ChmAtomOption.H_ExplicitPolarAndChiral canvas2d.ChmAtomOption.H_All

  • wantProperties (bool) – Whether properties should be copied.

  • wantMMStereoProps (bool) – Whether to copy mmstereo properties.

  • readAtomBondProperties (bool) – Whether to copy atom and bond-level properties.

  • allowRadicals (bool) – Whether to assume that valence deficiencies represent unpaired electrons.

dropEvent(self, QDropEvent)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
effectiveWinId(self) PyQt5.sip.voidptr
ensurePolished(self)
enterEvent(self, QEvent)
event(self, QEvent) bool
eventFilter(self, QObject, QEvent) bool
find(PyQt5.sip.voidptr) QWidget
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]
focusInEvent(self, QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, bool) bool
focusOutEvent(self, QFocusEvent)
focusPolicy(self) Qt.FocusPolicy
focusPreviousChild(self) bool
focusProxy(self) QWidget
focusWidget(self) QWidget
font(self) QFont
fontInfo(self) QFontInfo
fontMetrics(self) QFontMetrics
foregroundRole(self) QPalette.ColorRole
frameGeometry(self) QRect
frameRect(self) QRect
frameShadow(self) QFrame.Shadow
frameShape(self) QFrame.Shape
frameSize(self) QSize
frameStyle(self) int
frameWidth(self) int
geometry(self) QRect
getContentsMargins(self) Tuple[int, int, int, int]
grab(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(- 1, - 1))) QPixmap
grabGesture(self, Qt.GestureType, flags: Union[Qt.GestureFlags, Qt.GestureFlag] = Qt.GestureFlags())
grabKeyboard(self)
grabMouse(self)
grabMouse(self, Union[QCursor, Qt.CursorShape]) None
grabShortcut(self, Union[QKeySequence, QKeySequence.StandardKey, str, int], context: Qt.ShortcutContext = Qt.WindowShortcut) int
graphicsEffect(self) QGraphicsEffect
graphicsProxyWidget(self) QGraphicsProxyWidget
hasFocus(self) bool
hasHeightForWidth(self) bool
hasMouseTracking(self) bool
hasScaledContents(self) bool
hasSelectedText(self) bool
hasTabletTracking(self) bool
height(self) int
heightForWidth(self, int) int
heightMM(self) int
hide(self)
hideEvent(self, QHideEvent)
indent(self) int
inherits(self, str) bool
initPainter(self, QPainter)
initStyleOption(self, QStyleOptionFrame)
inputMethodEvent(self, QInputMethodEvent)
inputMethodHints(self) Qt.InputMethodHints
inputMethodQuery(self, Qt.InputMethodQuery) Any
ResizableStructurePicture.insertAction(self, QAction, QAction)
insertActions(self, QAction, Iterable[QAction])
installEventFilter(self, QObject)
isActiveWindow(self) bool
isAncestorOf(self, QWidget) bool
isEnabled(self) bool
isEnabledTo(self, QWidget) bool
isFullScreen(self) bool
isHidden(self) bool
isLeftToRight(self) bool
isMaximized(self) bool
isMinimized(self) bool
isModal(self) bool
isRightToLeft(self) bool
isSignalConnected(self, QMetaMethod) bool
isVisible(self) bool
isVisibleTo(self, QWidget) bool
isWidgetType(self) bool
isWindow(self) bool
isWindowModified(self) bool
isWindowType(self) bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
keyboardGrabber() QWidget
killTimer(self, int)
layout(self) QLayout
layoutDirection(self) Qt.LayoutDirection
leaveEvent(self, QEvent)
lineWidth(self) int
linkActivated

linkActivated(self, str) [signal]

linkHovered

linkHovered(self, str) [signal]

locale(self) QLocale
logicalDpiX(self) int
logicalDpiY(self) int
lower(self)
mapFrom(self, QWidget, QPoint) QPoint
mapFromGlobal(self, QPoint) QPoint
mapFromParent(self, QPoint) QPoint
mapTo(self, QWidget, QPoint) QPoint
mapToGlobal(self, QPoint) QPoint
mapToParent(self, QPoint) QPoint
margin(self) int
mask(self) QRegion
maximumHeight(self) int
maximumSize(self) QSize
maximumWidth(self) int
metaObject(self) QMetaObject
metric(self, QPaintDevice.PaintDeviceMetric) int
midLineWidth(self) int
minimumHeight(self) int
minimumSize(self) QSize
minimumSizeHint(self) QSize
minimumWidth(self) int
mouseDoubleClickEvent(self, QMouseEvent)
mouseGrabber() QWidget
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
move(self, QPoint)
ResizableStructurePicture.move(self, int, int) -> None
moveEvent(self, QMoveEvent)
moveToThread(self, QThread)
movie(self) QMovie
nativeEvent(self, Union[QByteArray, bytes, bytearray], sip.voidptr) Tuple[bool, int]
nativeParentWidget(self) QWidget
nextInFocusChain(self) QWidget
normalGeometry(self) QRect
objectName(self) str
objectNameChanged

objectNameChanged(self, str) [signal]

overrideWindowFlags(self, Union[Qt.WindowFlags, Qt.WindowType])
overrideWindowState(self, Union[Qt.WindowStates, Qt.WindowState])
paintEngine(self) QPaintEngine
paintEvent(self, QPaintEvent)
paintingActive(self) bool
palette(self) QPalette
parent(self) QObject
parentWidget(self) QWidget
physicalDpiX(self) int
physicalDpiY(self) int
picture(self) QPicture
pixmap(self) QPixmap
pos(self) QPoint
previousInFocusChain(self) QWidget
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.

raise_(self)
receivers(self, PYQT_SIGNAL) int
rect(self) QRect
releaseKeyboard(self)
releaseMouse(self)
releaseShortcut(self, int)
removeAction(self, QAction)
removeEventFilter(self, QObject)
render(self, QPaintDevice, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.RenderFlag.DrawWindowBackground | QWidget.RenderFlag.DrawChildren))
render(self, QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.RenderFlag.DrawWindowBackground | QWidget.RenderFlag.DrawChildren)) None
repaint(self)
ResizableStructurePicture.repaint(self, int, int, int, int) -> None
repaint(self, QRect) None
repaint(self, QRegion) None
resize(self, QSize)
ResizableStructurePicture.resize(self, int, int) -> None
resizeEvent(self, QResizeEvent)[source]
restoreGeometry(self, Union[QByteArray, bytes, bytearray]) bool
saveGeometry(self) QByteArray
ResizableStructurePicture.scroll(self, int, int)
ResizableStructurePicture.scroll(self, int, int, QRect) -> None
selectedText(self) str
selectionStart(self) int
sender(self) QObject
senderSignalIndex(self) int
setAcceptDrops(self, bool)
setAccessibleDescription(self, str)
setAccessibleName(self, str)
setAlignment(self, Union[Qt.Alignment, Qt.AlignmentFlag])
setAnnotators(annotators)

This function allows to reset annotators between renderning 2-D structures.

Parameters

annotators (list) – Each item of the list should be a canvas2d.ChemViewAnnotator object that will be applied to the canvas2d.ChmRender2DModel when generating the image

setAttribute(self, Qt.WidgetAttribute, on: bool = True)
setAutoFillBackground(self, bool)
setBackgroundRole(self, QPalette.ColorRole)
ResizableStructurePicture.setBaseSize(self, int, int)
setBaseSize(self, QSize) None
setBuddy(self, QWidget)
ResizableStructurePicture.setContentsMargins(self, int, int, int, int)
setContentsMargins(self, QMargins) None
setContextMenuPolicy(self, Qt.ContextMenuPolicy)
setCursor(self, Union[QCursor, Qt.CursorShape])
setDisabled(self, bool)
setEnabled(self, bool)
setFixedHeight(self, int)
setFixedSize(self, QSize)
ResizableStructurePicture.setFixedSize(self, int, int) -> None
setFixedWidth(self, int)
setFocus(self)
setFocus(self, Qt.FocusReason) None
setFocusPolicy(self, Qt.FocusPolicy)
setFocusProxy(self, QWidget)
setFont(self, QFont)
setForegroundRole(self, QPalette.ColorRole)
setFrameRect(self, QRect)
setFrameShadow(self, QFrame.Shadow)
setFrameShape(self, QFrame.Shape)
setFrameStyle(self, int)
setGeometry(self, QRect)
ResizableStructurePicture.setGeometry(self, int, int, int, int) -> None
setGraphicsEffect(self, QGraphicsEffect)
setHidden(self, bool)
setIndent(self, int)
setInputMethodHints(self, Union[Qt.InputMethodHints, Qt.InputMethodHint])
setLayout(self, QLayout)
setLayoutDirection(self, Qt.LayoutDirection)
setLineWidth(self, int)
setLocale(self, QLocale)
setMargin(self, int)
setMask(self, QBitmap)
setMask(self, QRegion) None
setMaximumHeight(self, int)
ResizableStructurePicture.setMaximumSize(self, int, int)
setMaximumSize(self, QSize) None
setMaximumWidth(self, int)
setMidLineWidth(self, int)
setMinimumHeight(self, int)
ResizableStructurePicture.setMinimumSize(self, int, int)
setMinimumSize(self, QSize) None
setMinimumWidth(self, int)
setMouseTracking(self, bool)
setMovie(self, QMovie)
setNum(self, float)
setNum(self, int) None
setObjectName(self, str)
setPalette(self, QPalette)
setParent(self, QWidget)
setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType]) None
setPicture(self, QPicture)
setPixmap(self, QPixmap)
setProperty(self, str, Any) bool
setScaledContents(self, bool)
ResizableStructurePicture.setSelection(self, int, int)
setShortcutAutoRepeat(self, int, enabled: bool = True)
setShortcutEnabled(self, int, enabled: bool = True)
ResizableStructurePicture.setSizeIncrement(self, int, int)
setSizeIncrement(self, QSize) None
setSizePolicy(self, QSizePolicy)
setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy) None
setStatusTip(self, str)
setStyle(self, QStyle)
setStyleSheet(self, str)
ResizableStructurePicture.setTabOrder(QWidget, QWidget)
setTabletTracking(self, bool)
setText(self, str)
setTextFormat(self, Qt.TextFormat)
setTextInteractionFlags(self, Union[Qt.TextInteractionFlags, Qt.TextInteractionFlag])
setToolTip(self, str)
setToolTipDuration(self, int)
setUpdatesEnabled(self, bool)
setVisible(self, bool)
setWhatsThis(self, str)
setWindowFilePath(self, str)
setWindowFlag(self, Qt.WindowType, on: bool = True)
setWindowFlags(self, Union[Qt.WindowFlags, Qt.WindowType])
setWindowIcon(self, QIcon)
setWindowIconText(self, str)
setWindowModality(self, Qt.WindowModality)
setWindowModified(self, bool)
setWindowOpacity(self, float)
setWindowRole(self, str)
setWindowState(self, Union[Qt.WindowStates, Qt.WindowState])
setWindowTitle(self, str)
setWordWrap(self, bool)
sharedPainter(self) QPainter
show(self)
showEvent(self, QShowEvent)
showFullScreen(self)
showMaximized(self)
showMinimized(self)
showNormal(self)
signalsBlocked(self) bool
size(self) QSize
sizeHint(self) QSize
sizeIncrement(self) QSize
sizePolicy(self) QSizePolicy
stackUnder(self, QWidget)
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
statusTip(self) str
style(self) QStyle
styleSheet(self) str
tabletEvent(self, QTabletEvent)
testAttribute(self, Qt.WidgetAttribute) bool
text(self) str
textFormat(self) Qt.TextFormat
textInteractionFlags(self) Qt.TextInteractionFlags
thread(self) QThread
timerEvent(self, QTimerEvent)
toolTip(self) str
toolTipDuration(self) int
tr(self, str, disambiguation: str = None, n: int = - 1) str
underMouse(self) bool
ungrabGesture(self, Qt.GestureType)
unsetCursor(self)
unsetLayoutDirection(self)
unsetLocale(self)
update(self)
update(self, QRect) None
update(self, QRegion) None
ResizableStructurePicture.update(self, int, int, int, int) -> None
updateGeometry(self)
updateMicroFocus(self)
updatesEnabled(self) bool
visibleRegion(self) QRegion
whatsThis(self) str
wheelEvent(self, QWheelEvent)
width(self) int
widthMM(self) int
winId(self) PyQt5.sip.voidptr
window(self) QWidget
windowFilePath(self) str
windowFlags(self) Qt.WindowFlags
windowHandle(self) QWindow
windowIcon(self) QIcon
windowIconChanged

windowIconChanged(self, QIcon) [signal]

windowIconText(self) str
windowIconTextChanged

windowIconTextChanged(self, str) [signal]

windowModality(self) Qt.WindowModality
windowOpacity(self) float
windowRole(self) str
windowState(self) Qt.WindowStates
windowTitle(self) str
windowTitleChanged

windowTitleChanged(self, str) [signal]

windowType(self) Qt.WindowType
wordWrap(self) bool
x(self) int
y(self) int
resizeImage()[source]