schrodinger.ui.two_d_viewer module

Embeddable 2D Viewer widget. For main panel, see mmshare/python/scripts/two_d_viewer_gui.py

Copyright Schrodinger, LLC. All rights reserved.

schrodinger.ui.two_d_viewer.get_icon(path)
schrodinger.ui.two_d_viewer.st_to_rdmol_without_hydrogens(st)

Create a sanitized RDMol from Structure. Used for MCS calculation only. Hydrogens are exlucded to make the calculation faster, and to prevent hangs.

NOTE: Atom indices will be different from the original structure, because explicit hydrogens will be stripped (and if any hydrogen has lower atom index than a heavy atom, heavy atoms will get renumbered).

Parameters

st (structure.Structure) – Structure to convert.

Returns

RDKit molecule.

Return type

Chem.Mol

schrodinger.ui.two_d_viewer.get_mcs_atoms(rdmol1, rdmol2)

Find the maximum common structure between the given structures, and return atom lists for each molecule that match the MCS. Lists are 0-indexed, because they are then passed on to rdkit. Input structures should not have explicit Hs, to make the calculation faster and avoid hangs on certen molecules

Parameters
  • rdmol1 (Chem.Mol) – First molecule

  • rdmol2 (Chem.Mol) – Second molecule

Returns

(list of MCS atoms in rdmol1, list of MCS atoms in rdmol2)

Return type

(list, list)

schrodinger.ui.two_d_viewer.kpls_color_from_value(value)

Calculate color corresponding to value for kpls annotations. Blue is minimum and red is maximum

schrodinger.ui.two_d_viewer.property_string(atom, property_name)
schrodinger.ui.two_d_viewer.generate_pic_with_text(text)

Create a QPicture with the text painted on it.

Parameters

text (str) – Text to draw in the picture.

Returns

The QPicture with the text.

Return type

QtGui.QPicture.

class schrodinger.ui.two_d_viewer.CtPropsDialog(viewer, all_props, selected_props, display_names, use_title_caps)

Bases: schrodinger.ui.qt.basewidgets.BaseDialog

Dialog for letting the user select which CT-level properties to show.

ctPropertiesChanged
initSetOptions()

Suggested subclass use: set instance variables, excluding layouts and subwidgets. Also use here to (optionally) apply the legacy stylesheet spacing settings (PANEL-19101).

__init__(viewer, all_props, selected_props, display_names, use_title_caps)
accept(self)
APPLY_LEGACY_STYLESHEET = True
APPLY_PANELX_STYLESHEET = False
Accepted = 1
class BtnPos(value)

Bases: enum.IntEnum

An enumeration.

Left = 0
Middle = 1
Right = 2
class DialogCode(value)

Bases: enum.IntEnum

An enumeration.

Rejected = 0
Accepted = 1
DrawChildren = 2
DrawWindowBackground = 1
IgnoreMask = 4
class PaintDeviceMetric(value)

Bases: enum.Enum

An enumeration.

PdmWidth = 1
PdmHeight = 2
PdmWidthMM = 3
PdmHeightMM = 4
PdmNumColors = 5
PdmDepth = 6
PdmDpiX = 7
PdmDpiY = 8
PdmPhysicalDpiX = 9
PdmPhysicalDpiY = 10
PdmDevicePixelRatio = 11
PdmDevicePixelRatioScaled = 12
PdmDepth = 6
PdmDevicePixelRatio = 11
PdmDevicePixelRatioScaled = 12
PdmDpiX = 7
PdmDpiY = 8
PdmHeight = 2
PdmHeightMM = 4
PdmNumColors = 5
PdmPhysicalDpiX = 9
PdmPhysicalDpiY = 10
PdmWidth = 1
PdmWidthMM = 3
Rejected = 0
class RenderFlag(value)

Bases: enum.Flag

An enumeration.

DrawWindowBackground = 1
DrawChildren = 2
IgnoreMask = 4
SHOW_AS_WINDOW = False
class StdBtn(value)

Bases: enum.IntEnum

An enumeration.

Ok = 0
Cancel = 1
Reset = 2
Help = 3
acceptDrops(self) bool
property accepted

accepted(self) [signal]

accessibleDescription(self) str
accessibleName(self) str
actionEvent(self, a0: QActionEvent)
actions(self) List[QAction]
activateWindow(self)
addAction(self, action: QAction)
addActions(self, actions: Iterable[QAction])
adjustSize(self)
autoFillBackground(self) bool
backgroundRole(self) QPalette.ColorRole
baseSize(self) QSize
blockSignals(self, b: bool) bool
changeEvent(self, a0: QEvent)
childAt(self, p: QPoint) QWidget
childAt(self, ax: int, ay: int) QWidget
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
childrenRect(self) QRect
childrenRegion(self) QRegion
clearFocus(self)
clearMask(self)
close(self) bool
closeEvent(event)

Ensures proper handling of OK, Cancel, and [X] button clicks

colorCount(self) int
connectNotify(self, signal: QMetaMethod)
contentsMargins(self) QMargins
contentsRect(self) QRect
contextMenuEvent(self, a0: QContextMenuEvent)
contextMenuPolicy(self) Qt.ContextMenuPolicy
create(self, window: PyQt6.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
createWindowContainer(window: QWindow, parent: typing.Optional[QWidget] = None, flags: Qt.WindowType = Qt.WindowFlags()) QWidget
cursor(self) QCursor
customContextMenuRequested

customContextMenuRequested(self, pos: QPoint) [signal]

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

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

devType(self) int
devicePixelRatio(self) float
devicePixelRatioF(self) float
devicePixelRatioFScale() float
disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
done(self, a0: int)
dragEnterEvent(self, a0: QDragEnterEvent)
dragLeaveEvent(self, a0: QDragLeaveEvent)
dragMoveEvent(self, a0: QDragMoveEvent)
dropEvent(self, a0: QDropEvent)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
effectiveWinId(self) PyQt6.sip.voidptr
ensurePolished(self)
enterEvent(self, event: QEnterEvent)
error(*args, **kwargs)

Shows a popup error message box. For parameter documentation see messagebox.MessageBox.

event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
exec(self) int
find(a0: PyQt6.sip.voidptr) QWidget
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
finished

finished(self, result: int) [signal]

focusInEvent(self, a0: QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, next: bool) bool
focusOutEvent(self, a0: 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
forgetMessageBoxResponse(key)

Forgets any previously saved response that was stored via a save_response_key.

Parameters

key – the key for the response to forget

frameGeometry(self) QRect
frameSize(self) QSize
geometry(self) QRect
grab(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(- 1, - 1))) QPixmap
grabGesture(self, type: Qt.GestureType, flags: Qt.GestureFlag = Qt.GestureFlags())
grabKeyboard(self)
grabMouse(self)
grabMouse(self, a0: Union[QCursor, Qt.CursorShape]) None
grabShortcut(self, key: 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, a0: int) int
heightMM(self) int
hide(self)
hideEvent(self, a0: QHideEvent)
info(*args, **kwargs)

Shows a popup information message box. For parameter documentation see messagebox.MessageBox.

inherits(self, classname: str) bool
initFinalize()

Suggested subclass use: perform any remaining initialization.

initLayOut()

Create a vertical layout for the widget (widget_layout) and populate it with two vertical sub-layouts: main_layout and bottom_layout.

If the user has specified the ui data member, insert the resultant ui_widget into main_layout.

If the widget already has a layout defined, this method will produce a warning (but not a traceback). main_layout and bottom_layout will be inserted into the existing widget layout, which will not be the same as widget_layout. It is therefore recommended that this mixin is used only with widgets that do not already have a layout.

Suggested subclass use: create, initialize, and populate layouts.

initPainter(self, painter: QPainter)
initSetDefaults()

Set widget to its default state. If the widget uses a model/mapper, it’s preferable to reset the widget state by resetting the model.

initSetUp()

Creates widget from ui and stores it ui_widget.

Suggested subclass use: create and initialize subwidgets, and connect signals.

inputMethodEvent(self, a0: QInputMethodEvent)
inputMethodHints(self) Qt.InputMethodHint
inputMethodQuery(self, a0: Qt.InputMethodQuery) Any
insertAction(self, before: QAction, action: QAction)
insertActions(self, before: QAction, actions: Iterable[QAction])
installEventFilter(self, a0: QObject)
isActiveWindow(self) bool
isAncestorOf(self, child: QWidget) bool
isEnabled(self) bool
isEnabledTo(self, a0: 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, signal: QMetaMethod) bool
isSizeGripEnabled(self) bool
isVisible(self) bool
isVisibleTo(self, a0: QWidget) bool
isWidgetType(self) bool
isWindow(self) bool
isWindowModified(self) bool
isWindowType(self) bool
keyPressEvent(self, a0: QKeyEvent)
keyReleaseEvent(self, a0: QKeyEvent)
keyboardGrabber() QWidget
killTimer(self, id: int)
layout(self) QLayout
layoutDirection(self) Qt.LayoutDirection
leaveEvent(self, a0: QEvent)
locale(self) QLocale
logicalDpiX(self) int
logicalDpiY(self) int
lower(self)
mapFrom(self, a0: QWidget, a1: QPoint) QPoint
mapFrom(self, a0: QWidget, a1: QPointF) QPointF
mapFromGlobal(self, a0: QPoint) QPoint
mapFromGlobal(self, a0: QPointF) QPointF
mapFromParent(self, a0: QPoint) QPoint
mapFromParent(self, a0: QPointF) QPointF
mapTo(self, a0: QWidget, a1: QPoint) QPoint
mapTo(self, a0: QWidget, a1: QPointF) QPointF
mapToGlobal(self, a0: QPoint) QPoint
mapToGlobal(self, a0: QPointF) QPointF
mapToParent(self, a0: QPoint) QPoint
mapToParent(self, a0: QPointF) QPointF
mask(self) QRegion
maximumHeight(self) int
maximumSize(self) QSize
maximumWidth(self) int
metaObject(self) QMetaObject
metric(self, a0: QPaintDevice.PaintDeviceMetric) int
minimumHeight(self) int
minimumSize(self) QSize
minimumSizeHint(self) QSize
minimumWidth(self) int
mouseDoubleClickEvent(self, a0: QMouseEvent)
mouseGrabber() QWidget
mouseMoveEvent(self, a0: QMouseEvent)
mousePressEvent(self, a0: QMouseEvent)
mouseReleaseEvent(self, a0: QMouseEvent)
move(self, a0: QPoint)
move(self, ax: int, ay: int) None
moveEvent(self, a0: QMoveEvent)
moveToThread(self, thread: QThread)
nativeEvent(self, eventType: QByteArray, message: PyQt6.sip.voidptr) Tuple[bool, PyQt6.sip.voidptr]
nativeParentWidget(self) QWidget
nextInFocusChain(self) QWidget
normalGeometry(self) QRect
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

open(self)
overrideWindowFlags(self, type: Qt.WindowType)
overrideWindowState(self, state: Qt.WindowState)
paintEngine(self) QPaintEngine
paintEvent(self, a0: 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, name: 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.

question(*args, **kwargs)

Shows a popup question message box. For parameter documentation see messagebox.QuestionMessageBox.

raise_(self)
receivers(self, signal: PYQT_SIGNAL) int
rect(self) QRect
reject(self)
rejected

rejected(self) [signal]

releaseKeyboard(self)
releaseMouse(self)
releaseShortcut(self, id: int)
removeAction(self, action: QAction)
removeEventFilter(self, a0: QObject)
render(self, target: QPaintDevice, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: QWidget.RenderFlag = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren))
render(self, painter: QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: QWidget.RenderFlag = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren)) None
repaint(self)
repaint(self, x: int, y: int, w: int, h: int) None
repaint(self, a0: QRect) None
repaint(self, a0: QRegion) None
reportValidation(results)

Present validation messages to the user. This is an implmentation of the ValidationMixin interface and does not need to be called directly.

This method assumes that error and question methods have been defined in the subclass, as in e.g. widget_mixins.MessageBoxMixin.

Parameters

results (validation.ValidationResults) – Set of validation results generated by validate

Returns

if True, there were no validation errors and the user decided to continue despite any warnings. If False, there was at least one validation error or the user decided to abort when faced with a warning.

resize(self, a0: QSize)
resize(self, w: int, h: int) None
resizeEvent(self, a0: QResizeEvent)
restoreGeometry(self, geometry: QByteArray) bool
result(self) int
run(blocking=False, modal=False, finished_callback=None)

Show this widget, while optionally blocking, making the widget window modal, and registering a callback for when the widget is closed again.

Parameters
  • blocking (bool) – if True, block progress in the calling method until the widget is closed again.

  • modal (bool) – if True, open this widget as window modal. Otherwise, open this widget as nonmodal.

  • finished_callback (a callable object) – an object that will be called with no arguments when this widget is closed.

runValidation(silent=False, validate_children=True, stop_on_fail=True)

Runs validation and reports the results (unless run silently).

Parameters
  • silent (bool) – run without any reporting (i.e. error messages to the user). This is useful if we want to programmatically test validity. Changes return value of this method from ValidationResults to a boolean.

  • validate_children (bool) – run validation on all child objects. See _validateChildren for documentation on what this entails.

  • stop_on_fail (bool) – stop validation when first failure is encountered

Returns

if silent is False, returns the validation results. If silent is True, returns a boolean generated by reportValidation.

Return type

ValidationResults or bool

saveGeometry(self) QByteArray
screen(self) QScreen
scroll(self, dx: int, dy: int)
scroll(self, dx: int, dy: int, a2: QRect) None
sender(self) QObject
senderSignalIndex(self) int
setAcceptDrops(self, on: bool)
setAccessibleDescription(self, description: str)
setAccessibleName(self, name: str)
setAttribute(self, attribute: Qt.WidgetAttribute, on: bool = True)
setAutoFillBackground(self, enabled: bool)
setBackgroundRole(self, a0: QPalette.ColorRole)
setBaseSize(self, basew: int, baseh: int)
setBaseSize(self, s: QSize) None
setContentsMargins(self, left: int, top: int, right: int, bottom: int)
setContentsMargins(self, margins: QMargins) None
setContextMenuPolicy(self, policy: Qt.ContextMenuPolicy)
setCursor(self, a0: Union[QCursor, Qt.CursorShape])
setDisabled(self, a0: bool)
setEnabled(self, a0: bool)
setFixedHeight(self, h: int)
setFixedSize(self, a0: QSize)
setFixedSize(self, w: int, h: int) None
setFixedWidth(self, w: int)
setFocus(self)
setFocus(self, reason: Qt.FocusReason) None
setFocusPolicy(self, policy: Qt.FocusPolicy)
setFocusProxy(self, a0: QWidget)
setFont(self, a0: QFont)
setForegroundRole(self, a0: QPalette.ColorRole)
setGeometry(self, a0: QRect)
setGeometry(self, ax: int, ay: int, aw: int, ah: int) None
setGraphicsEffect(self, effect: QGraphicsEffect)
setHidden(self, hidden: bool)
setInputMethodHints(self, hints: Qt.InputMethodHint)
setLayout(self, a0: QLayout)
setLayoutDirection(self, direction: Qt.LayoutDirection)
setLocale(self, locale: QLocale)
setMask(self, a0: QBitmap)
setMask(self, a0: QRegion) None
setMaximumHeight(self, maxh: int)
setMaximumSize(self, maxw: int, maxh: int)
setMaximumSize(self, s: QSize) None
setMaximumWidth(self, maxw: int)
setMinimumHeight(self, minh: int)
setMinimumSize(self, minw: int, minh: int)
setMinimumSize(self, s: QSize) None
setMinimumWidth(self, minw: int)
setModal(self, modal: bool)
setMouseTracking(self, enable: bool)
setObjectName(self, name: str)
setPalette(self, a0: QPalette)
setParent(self, parent: QWidget)
setParent(self, parent: QWidget, f: Qt.WindowType) None
setProperty(self, name: str, value: Any) bool
setResult(self, r: int)
setScreen(self, a0: QScreen)
setShortcutAutoRepeat(self, id: int, enabled: bool = True)
setShortcutEnabled(self, id: int, enabled: bool = True)
setSizeGripEnabled(self, a0: bool)
setSizeIncrement(self, w: int, h: int)
setSizeIncrement(self, s: QSize) None
setSizePolicy(self, a0: QSizePolicy)
setSizePolicy(self, hor: QSizePolicy.Policy, ver: QSizePolicy.Policy) None
setStatusTip(self, a0: str)
setStyle(self, a0: QStyle)
setStyleSheet(self, styleSheet: str)
setTabOrder(a0: QWidget, a1: QWidget)
setTabletTracking(self, enable: bool)
setToolTip(self, a0: str)
setToolTipDuration(self, msec: int)
setUpdatesEnabled(self, enable: bool)
setVisible(self, visible: bool)
setWhatsThis(self, a0: str)
setWidgetLayout()

Set the widget layout

setWindowFilePath(self, filePath: str)
setWindowFlag(self, a0: Qt.WindowType, on: bool = True)
setWindowFlags(self, type: Qt.WindowType)
setWindowFlagsForRun()
setWindowIcon(self, icon: QIcon)
setWindowIconText(self, a0: str)
setWindowModality(self, windowModality: Qt.WindowModality)
setWindowModified(self, a0: bool)
setWindowOpacity(self, level: float)
setWindowRole(self, a0: str)
setWindowState(self, state: Qt.WindowState)
setWindowTitle(self, a0: str)
sharedPainter(self) QPainter
show()

Override the show method to clear and previous value of self.accepted

showEvent(self, a0: QShowEvent)
showFullScreen(self)
showMaximized(self)
showMessageBox(*args, **kwargs)

Shows a popup message box. For parameter documentation see messagebox.MessageBox.

showMinimized(self)
showNormal(self)
signalsBlocked(self) bool
size(self) QSize
sizeHint(self) QSize
sizeIncrement(self) QSize
sizePolicy(self) QSizePolicy
stackUnder(self, a0: QWidget)
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
statusTip(self) str
style(self) QStyle
styleSheet(self) str
tabletEvent(self, a0: QTabletEvent)
testAttribute(self, attribute: Qt.WidgetAttribute) bool
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toolTip(self) str
toolTipDuration(self) int
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
ui_module = None
underMouse(self) bool
ungrabGesture(self, type: Qt.GestureType)
unsetCursor(self)
unsetLayoutDirection(self)
unsetLocale(self)
update(self)
update(self, a0: QRect) None
update(self, a0: QRegion) None
update(self, ax: int, ay: int, aw: int, ah: int) None
updateGeometry(self)
updateMicroFocus(self, query: Qt.InputMethodQuery = Qt.ImQueryAll)
updatesEnabled(self) bool
visibleRegion(self) QRegion
warning(*args, **kwargs)

Shows a popup warning message box. For parameter documentation see messagebox.MessageBox.

whatsThis(self) str
wheelEvent(self, a0: QWheelEvent)
width(self) int
widthMM(self) int
winId(self) PyQt6.sip.voidptr
window(self) QWidget
windowFilePath(self) str
windowFlags(self) Qt.WindowType
windowHandle(self) QWindow
windowIcon(self) QIcon
windowIconChanged

windowIconChanged(self, icon: QIcon) [signal]

windowIconText(self) str
windowIconTextChanged

windowIconTextChanged(self, iconText: str) [signal]

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

windowTitleChanged(self, title: str) [signal]

windowType(self) Qt.WindowType
x(self) int
y(self) int
class schrodinger.ui.two_d_viewer.AtomPropertyDialog(viewer, annotate_property)

Bases: schrodinger.ui.qt.basewidgets.BaseDialog

Dialog for letting the user select which atom-level property to show.

atomPropertyChanged
initSetOptions()

Suggested subclass use: set instance variables, excluding layouts and subwidgets. Also use here to (optionally) apply the legacy stylesheet spacing settings (PANEL-19101).

__init__(viewer, annotate_property)
accept(self)
APPLY_LEGACY_STYLESHEET = True
APPLY_PANELX_STYLESHEET = False
Accepted = 1
class BtnPos(value)

Bases: enum.IntEnum

An enumeration.

Left = 0
Middle = 1
Right = 2
class DialogCode(value)

Bases: enum.IntEnum

An enumeration.

Rejected = 0
Accepted = 1
DrawChildren = 2
DrawWindowBackground = 1
IgnoreMask = 4
class PaintDeviceMetric(value)

Bases: enum.Enum

An enumeration.

PdmWidth = 1
PdmHeight = 2
PdmWidthMM = 3
PdmHeightMM = 4
PdmNumColors = 5
PdmDepth = 6
PdmDpiX = 7
PdmDpiY = 8
PdmPhysicalDpiX = 9
PdmPhysicalDpiY = 10
PdmDevicePixelRatio = 11
PdmDevicePixelRatioScaled = 12
PdmDepth = 6
PdmDevicePixelRatio = 11
PdmDevicePixelRatioScaled = 12
PdmDpiX = 7
PdmDpiY = 8
PdmHeight = 2
PdmHeightMM = 4
PdmNumColors = 5
PdmPhysicalDpiX = 9
PdmPhysicalDpiY = 10
PdmWidth = 1
PdmWidthMM = 3
Rejected = 0
class RenderFlag(value)

Bases: enum.Flag

An enumeration.

DrawWindowBackground = 1
DrawChildren = 2
IgnoreMask = 4
SHOW_AS_WINDOW = False
class StdBtn(value)

Bases: enum.IntEnum

An enumeration.

Ok = 0
Cancel = 1
Reset = 2
Help = 3
acceptDrops(self) bool
property accepted

accepted(self) [signal]

accessibleDescription(self) str
accessibleName(self) str
actionEvent(self, a0: QActionEvent)
actions(self) List[QAction]
activateWindow(self)
addAction(self, action: QAction)
addActions(self, actions: Iterable[QAction])
adjustSize(self)
autoFillBackground(self) bool
backgroundRole(self) QPalette.ColorRole
baseSize(self) QSize
blockSignals(self, b: bool) bool
changeEvent(self, a0: QEvent)
childAt(self, p: QPoint) QWidget
childAt(self, ax: int, ay: int) QWidget
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
childrenRect(self) QRect
childrenRegion(self) QRegion
clearFocus(self)
clearMask(self)
close(self) bool
closeEvent(event)

Ensures proper handling of OK, Cancel, and [X] button clicks

colorCount(self) int
connectNotify(self, signal: QMetaMethod)
contentsMargins(self) QMargins
contentsRect(self) QRect
contextMenuEvent(self, a0: QContextMenuEvent)
contextMenuPolicy(self) Qt.ContextMenuPolicy
create(self, window: PyQt6.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
createWindowContainer(window: QWindow, parent: typing.Optional[QWidget] = None, flags: Qt.WindowType = Qt.WindowFlags()) QWidget
cursor(self) QCursor
customContextMenuRequested

customContextMenuRequested(self, pos: QPoint) [signal]

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

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

devType(self) int
devicePixelRatio(self) float
devicePixelRatioF(self) float
devicePixelRatioFScale() float
disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
done(self, a0: int)
dragEnterEvent(self, a0: QDragEnterEvent)
dragLeaveEvent(self, a0: QDragLeaveEvent)
dragMoveEvent(self, a0: QDragMoveEvent)
dropEvent(self, a0: QDropEvent)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
effectiveWinId(self) PyQt6.sip.voidptr
ensurePolished(self)
enterEvent(self, event: QEnterEvent)
error(*args, **kwargs)

Shows a popup error message box. For parameter documentation see messagebox.MessageBox.

event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
exec(self) int
find(a0: PyQt6.sip.voidptr) QWidget
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
finished

finished(self, result: int) [signal]

focusInEvent(self, a0: QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, next: bool) bool
focusOutEvent(self, a0: 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
forgetMessageBoxResponse(key)

Forgets any previously saved response that was stored via a save_response_key.

Parameters

key – the key for the response to forget

frameGeometry(self) QRect
frameSize(self) QSize
geometry(self) QRect
grab(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(- 1, - 1))) QPixmap
grabGesture(self, type: Qt.GestureType, flags: Qt.GestureFlag = Qt.GestureFlags())
grabKeyboard(self)
grabMouse(self)
grabMouse(self, a0: Union[QCursor, Qt.CursorShape]) None
grabShortcut(self, key: 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, a0: int) int
heightMM(self) int
hide(self)
hideEvent(self, a0: QHideEvent)
info(*args, **kwargs)

Shows a popup information message box. For parameter documentation see messagebox.MessageBox.

inherits(self, classname: str) bool
initFinalize()

Suggested subclass use: perform any remaining initialization.

initLayOut()

Create a vertical layout for the widget (widget_layout) and populate it with two vertical sub-layouts: main_layout and bottom_layout.

If the user has specified the ui data member, insert the resultant ui_widget into main_layout.

If the widget already has a layout defined, this method will produce a warning (but not a traceback). main_layout and bottom_layout will be inserted into the existing widget layout, which will not be the same as widget_layout. It is therefore recommended that this mixin is used only with widgets that do not already have a layout.

Suggested subclass use: create, initialize, and populate layouts.

initPainter(self, painter: QPainter)
initSetDefaults()

Set widget to its default state. If the widget uses a model/mapper, it’s preferable to reset the widget state by resetting the model.

initSetUp()

Creates widget from ui and stores it ui_widget.

Suggested subclass use: create and initialize subwidgets, and connect signals.

inputMethodEvent(self, a0: QInputMethodEvent)
inputMethodHints(self) Qt.InputMethodHint
inputMethodQuery(self, a0: Qt.InputMethodQuery) Any
insertAction(self, before: QAction, action: QAction)
insertActions(self, before: QAction, actions: Iterable[QAction])
installEventFilter(self, a0: QObject)
isActiveWindow(self) bool
isAncestorOf(self, child: QWidget) bool
isEnabled(self) bool
isEnabledTo(self, a0: 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, signal: QMetaMethod) bool
isSizeGripEnabled(self) bool
isVisible(self) bool
isVisibleTo(self, a0: QWidget) bool
isWidgetType(self) bool
isWindow(self) bool
isWindowModified(self) bool
isWindowType(self) bool
keyPressEvent(self, a0: QKeyEvent)
keyReleaseEvent(self, a0: QKeyEvent)
keyboardGrabber() QWidget
killTimer(self, id: int)
layout(self) QLayout
layoutDirection(self) Qt.LayoutDirection
leaveEvent(self, a0: QEvent)
locale(self) QLocale
logicalDpiX(self) int
logicalDpiY(self) int
lower(self)
mapFrom(self, a0: QWidget, a1: QPoint) QPoint
mapFrom(self, a0: QWidget, a1: QPointF) QPointF
mapFromGlobal(self, a0: QPoint) QPoint
mapFromGlobal(self, a0: QPointF) QPointF
mapFromParent(self, a0: QPoint) QPoint
mapFromParent(self, a0: QPointF) QPointF
mapTo(self, a0: QWidget, a1: QPoint) QPoint
mapTo(self, a0: QWidget, a1: QPointF) QPointF
mapToGlobal(self, a0: QPoint) QPoint
mapToGlobal(self, a0: QPointF) QPointF
mapToParent(self, a0: QPoint) QPoint
mapToParent(self, a0: QPointF) QPointF
mask(self) QRegion
maximumHeight(self) int
maximumSize(self) QSize
maximumWidth(self) int
metaObject(self) QMetaObject
metric(self, a0: QPaintDevice.PaintDeviceMetric) int
minimumHeight(self) int
minimumSize(self) QSize
minimumSizeHint(self) QSize
minimumWidth(self) int
mouseDoubleClickEvent(self, a0: QMouseEvent)
mouseGrabber() QWidget
mouseMoveEvent(self, a0: QMouseEvent)
mousePressEvent(self, a0: QMouseEvent)
mouseReleaseEvent(self, a0: QMouseEvent)
move(self, a0: QPoint)
move(self, ax: int, ay: int) None
moveEvent(self, a0: QMoveEvent)
moveToThread(self, thread: QThread)
nativeEvent(self, eventType: QByteArray, message: PyQt6.sip.voidptr) Tuple[bool, PyQt6.sip.voidptr]
nativeParentWidget(self) QWidget
nextInFocusChain(self) QWidget
normalGeometry(self) QRect
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

open(self)
overrideWindowFlags(self, type: Qt.WindowType)
overrideWindowState(self, state: Qt.WindowState)
paintEngine(self) QPaintEngine
paintEvent(self, a0: 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, name: 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.

question(*args, **kwargs)

Shows a popup question message box. For parameter documentation see messagebox.QuestionMessageBox.

raise_(self)
receivers(self, signal: PYQT_SIGNAL) int
rect(self) QRect
reject(self)
rejected

rejected(self) [signal]

releaseKeyboard(self)
releaseMouse(self)
releaseShortcut(self, id: int)
removeAction(self, action: QAction)
removeEventFilter(self, a0: QObject)
render(self, target: QPaintDevice, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: QWidget.RenderFlag = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren))
render(self, painter: QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: QWidget.RenderFlag = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren)) None
repaint(self)
repaint(self, x: int, y: int, w: int, h: int) None
repaint(self, a0: QRect) None
repaint(self, a0: QRegion) None
reportValidation(results)

Present validation messages to the user. This is an implmentation of the ValidationMixin interface and does not need to be called directly.

This method assumes that error and question methods have been defined in the subclass, as in e.g. widget_mixins.MessageBoxMixin.

Parameters

results (validation.ValidationResults) – Set of validation results generated by validate

Returns

if True, there were no validation errors and the user decided to continue despite any warnings. If False, there was at least one validation error or the user decided to abort when faced with a warning.

resize(self, a0: QSize)
resize(self, w: int, h: int) None
resizeEvent(self, a0: QResizeEvent)
restoreGeometry(self, geometry: QByteArray) bool
result(self) int
run(blocking=False, modal=False, finished_callback=None)

Show this widget, while optionally blocking, making the widget window modal, and registering a callback for when the widget is closed again.

Parameters
  • blocking (bool) – if True, block progress in the calling method until the widget is closed again.

  • modal (bool) – if True, open this widget as window modal. Otherwise, open this widget as nonmodal.

  • finished_callback (a callable object) – an object that will be called with no arguments when this widget is closed.

runValidation(silent=False, validate_children=True, stop_on_fail=True)

Runs validation and reports the results (unless run silently).

Parameters
  • silent (bool) – run without any reporting (i.e. error messages to the user). This is useful if we want to programmatically test validity. Changes return value of this method from ValidationResults to a boolean.

  • validate_children (bool) – run validation on all child objects. See _validateChildren for documentation on what this entails.

  • stop_on_fail (bool) – stop validation when first failure is encountered

Returns

if silent is False, returns the validation results. If silent is True, returns a boolean generated by reportValidation.

Return type

ValidationResults or bool

saveGeometry(self) QByteArray
screen(self) QScreen
scroll(self, dx: int, dy: int)
scroll(self, dx: int, dy: int, a2: QRect) None
sender(self) QObject
senderSignalIndex(self) int
setAcceptDrops(self, on: bool)
setAccessibleDescription(self, description: str)
setAccessibleName(self, name: str)
setAttribute(self, attribute: Qt.WidgetAttribute, on: bool = True)
setAutoFillBackground(self, enabled: bool)
setBackgroundRole(self, a0: QPalette.ColorRole)
setBaseSize(self, basew: int, baseh: int)
setBaseSize(self, s: QSize) None
setContentsMargins(self, left: int, top: int, right: int, bottom: int)
setContentsMargins(self, margins: QMargins) None
setContextMenuPolicy(self, policy: Qt.ContextMenuPolicy)
setCursor(self, a0: Union[QCursor, Qt.CursorShape])
setDisabled(self, a0: bool)
setEnabled(self, a0: bool)
setFixedHeight(self, h: int)
setFixedSize(self, a0: QSize)
setFixedSize(self, w: int, h: int) None
setFixedWidth(self, w: int)
setFocus(self)
setFocus(self, reason: Qt.FocusReason) None
setFocusPolicy(self, policy: Qt.FocusPolicy)
setFocusProxy(self, a0: QWidget)
setFont(self, a0: QFont)
setForegroundRole(self, a0: QPalette.ColorRole)
setGeometry(self, a0: QRect)
setGeometry(self, ax: int, ay: int, aw: int, ah: int) None
setGraphicsEffect(self, effect: QGraphicsEffect)
setHidden(self, hidden: bool)
setInputMethodHints(self, hints: Qt.InputMethodHint)
setLayout(self, a0: QLayout)
setLayoutDirection(self, direction: Qt.LayoutDirection)
setLocale(self, locale: QLocale)
setMask(self, a0: QBitmap)
setMask(self, a0: QRegion) None
setMaximumHeight(self, maxh: int)
setMaximumSize(self, maxw: int, maxh: int)
setMaximumSize(self, s: QSize) None
setMaximumWidth(self, maxw: int)
setMinimumHeight(self, minh: int)
setMinimumSize(self, minw: int, minh: int)
setMinimumSize(self, s: QSize) None
setMinimumWidth(self, minw: int)
setModal(self, modal: bool)
setMouseTracking(self, enable: bool)
setObjectName(self, name: str)
setPalette(self, a0: QPalette)
setParent(self, parent: QWidget)
setParent(self, parent: QWidget, f: Qt.WindowType) None
setProperty(self, name: str, value: Any) bool
setResult(self, r: int)
setScreen(self, a0: QScreen)
setShortcutAutoRepeat(self, id: int, enabled: bool = True)
setShortcutEnabled(self, id: int, enabled: bool = True)
setSizeGripEnabled(self, a0: bool)
setSizeIncrement(self, w: int, h: int)
setSizeIncrement(self, s: QSize) None
setSizePolicy(self, a0: QSizePolicy)
setSizePolicy(self, hor: QSizePolicy.Policy, ver: QSizePolicy.Policy) None
setStatusTip(self, a0: str)
setStyle(self, a0: QStyle)
setStyleSheet(self, styleSheet: str)
setTabOrder(a0: QWidget, a1: QWidget)
setTabletTracking(self, enable: bool)
setToolTip(self, a0: str)
setToolTipDuration(self, msec: int)
setUpdatesEnabled(self, enable: bool)
setVisible(self, visible: bool)
setWhatsThis(self, a0: str)
setWidgetLayout()

Set the widget layout

setWindowFilePath(self, filePath: str)
setWindowFlag(self, a0: Qt.WindowType, on: bool = True)
setWindowFlags(self, type: Qt.WindowType)
setWindowFlagsForRun()
setWindowIcon(self, icon: QIcon)
setWindowIconText(self, a0: str)
setWindowModality(self, windowModality: Qt.WindowModality)
setWindowModified(self, a0: bool)
setWindowOpacity(self, level: float)
setWindowRole(self, a0: str)
setWindowState(self, state: Qt.WindowState)
setWindowTitle(self, a0: str)
sharedPainter(self) QPainter
show()

Override the show method to clear and previous value of self.accepted

showEvent(self, a0: QShowEvent)
showFullScreen(self)
showMaximized(self)
showMessageBox(*args, **kwargs)

Shows a popup message box. For parameter documentation see messagebox.MessageBox.

showMinimized(self)
showNormal(self)
signalsBlocked(self) bool
size(self) QSize
sizeHint(self) QSize
sizeIncrement(self) QSize
sizePolicy(self) QSizePolicy
stackUnder(self, a0: QWidget)
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
statusTip(self) str
style(self) QStyle
styleSheet(self) str
tabletEvent(self, a0: QTabletEvent)
testAttribute(self, attribute: Qt.WidgetAttribute) bool
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toolTip(self) str
toolTipDuration(self) int
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
ui_module = None
underMouse(self) bool
ungrabGesture(self, type: Qt.GestureType)
unsetCursor(self)
unsetLayoutDirection(self)
unsetLocale(self)
update(self)
update(self, a0: QRect) None
update(self, a0: QRegion) None
update(self, ax: int, ay: int, aw: int, ah: int) None
updateGeometry(self)
updateMicroFocus(self, query: Qt.InputMethodQuery = Qt.ImQueryAll)
updatesEnabled(self) bool
visibleRegion(self) QRegion
warning(*args, **kwargs)

Shows a popup warning message box. For parameter documentation see messagebox.MessageBox.

whatsThis(self) str
wheelEvent(self, a0: QWheelEvent)
width(self) int
widthMM(self) int
winId(self) PyQt6.sip.voidptr
window(self) QWidget
windowFilePath(self) str
windowFlags(self) Qt.WindowType
windowHandle(self) QWindow
windowIcon(self) QIcon
windowIconChanged

windowIconChanged(self, icon: QIcon) [signal]

windowIconText(self) str
windowIconTextChanged

windowIconTextChanged(self, iconText: str) [signal]

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

windowTitleChanged(self, title: str) [signal]

windowType(self) Qt.WindowType
x(self) int
y(self) int
class schrodinger.ui.two_d_viewer.ZoomWidget(parent=None)

Bases: PyQt6.QtWidgets.QWidget

__init__(parent=None)
paintEvent(self, a0: QPaintEvent)
DrawChildren = 2
DrawWindowBackground = 1
IgnoreMask = 4
class PaintDeviceMetric(value)

Bases: enum.Enum

An enumeration.

PdmWidth = 1
PdmHeight = 2
PdmWidthMM = 3
PdmHeightMM = 4
PdmNumColors = 5
PdmDepth = 6
PdmDpiX = 7
PdmDpiY = 8
PdmPhysicalDpiX = 9
PdmPhysicalDpiY = 10
PdmDevicePixelRatio = 11
PdmDevicePixelRatioScaled = 12
PdmDepth = 6
PdmDevicePixelRatio = 11
PdmDevicePixelRatioScaled = 12
PdmDpiX = 7
PdmDpiY = 8
PdmHeight = 2
PdmHeightMM = 4
PdmNumColors = 5
PdmPhysicalDpiX = 9
PdmPhysicalDpiY = 10
PdmWidth = 1
PdmWidthMM = 3
class RenderFlag(value)

Bases: enum.Flag

An enumeration.

DrawWindowBackground = 1
DrawChildren = 2
IgnoreMask = 4
acceptDrops(self) bool
accessibleDescription(self) str
accessibleName(self) str
actionEvent(self, a0: QActionEvent)
actions(self) List[QAction]
activateWindow(self)
addAction(self, action: QAction)
addActions(self, actions: Iterable[QAction])
adjustSize(self)
autoFillBackground(self) bool
backgroundRole(self) QPalette.ColorRole
baseSize(self) QSize
blockSignals(self, b: bool) bool
changeEvent(self, a0: QEvent)
childAt(self, p: QPoint) QWidget
childAt(self, ax: int, ay: int) QWidget
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
childrenRect(self) QRect
childrenRegion(self) QRegion
clearFocus(self)
clearMask(self)
close(self) bool
closeEvent(self, a0: QCloseEvent)
colorCount(self) int
connectNotify(self, signal: QMetaMethod)
contentsMargins(self) QMargins
contentsRect(self) QRect
contextMenuEvent(self, a0: QContextMenuEvent)
contextMenuPolicy(self) Qt.ContextMenuPolicy
create(self, window: PyQt6.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
createWindowContainer(window: QWindow, parent: typing.Optional[QWidget] = None, flags: Qt.WindowType = Qt.WindowFlags()) QWidget
cursor(self) QCursor
customContextMenuRequested

customContextMenuRequested(self, pos: QPoint) [signal]

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

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

devType(self) int
devicePixelRatio(self) float
devicePixelRatioF(self) float
devicePixelRatioFScale() float
disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dragEnterEvent(self, a0: QDragEnterEvent)
dragLeaveEvent(self, a0: QDragLeaveEvent)
dragMoveEvent(self, a0: QDragMoveEvent)
dropEvent(self, a0: QDropEvent)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
effectiveWinId(self) PyQt6.sip.voidptr
ensurePolished(self)
enterEvent(self, event: QEnterEvent)
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
find(a0: PyQt6.sip.voidptr) QWidget
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
focusInEvent(self, a0: QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, next: bool) bool
focusOutEvent(self, a0: 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
frameSize(self) QSize
geometry(self) QRect
grab(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(- 1, - 1))) QPixmap
grabGesture(self, type: Qt.GestureType, flags: Qt.GestureFlag = Qt.GestureFlags())
grabKeyboard(self)
grabMouse(self)
grabMouse(self, a0: Union[QCursor, Qt.CursorShape]) None
grabShortcut(self, key: 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, a0: int) int
heightMM(self) int
hide(self)
hideEvent(self, a0: QHideEvent)
inherits(self, classname: str) bool
initPainter(self, painter: QPainter)
inputMethodEvent(self, a0: QInputMethodEvent)
inputMethodHints(self) Qt.InputMethodHint
inputMethodQuery(self, a0: Qt.InputMethodQuery) Any
insertAction(self, before: QAction, action: QAction)
insertActions(self, before: QAction, actions: Iterable[QAction])
installEventFilter(self, a0: QObject)
isActiveWindow(self) bool
isAncestorOf(self, child: QWidget) bool
isEnabled(self) bool
isEnabledTo(self, a0: 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, signal: QMetaMethod) bool
isVisible(self) bool
isVisibleTo(self, a0: QWidget) bool
isWidgetType(self) bool
isWindow(self) bool
isWindowModified(self) bool
isWindowType(self) bool
keyPressEvent(self, a0: QKeyEvent)
keyReleaseEvent(self, a0: QKeyEvent)
keyboardGrabber() QWidget
killTimer(self, id: int)
layout(self) QLayout
layoutDirection(self) Qt.LayoutDirection
leaveEvent(self, a0: QEvent)
locale(self) QLocale
logicalDpiX(self) int
logicalDpiY(self) int
lower(self)
mapFrom(self, a0: QWidget, a1: QPoint) QPoint
mapFrom(self, a0: QWidget, a1: QPointF) QPointF
mapFromGlobal(self, a0: QPoint) QPoint
mapFromGlobal(self, a0: QPointF) QPointF
mapFromParent(self, a0: QPoint) QPoint
mapFromParent(self, a0: QPointF) QPointF
mapTo(self, a0: QWidget, a1: QPoint) QPoint
mapTo(self, a0: QWidget, a1: QPointF) QPointF
mapToGlobal(self, a0: QPoint) QPoint
mapToGlobal(self, a0: QPointF) QPointF
mapToParent(self, a0: QPoint) QPoint
mapToParent(self, a0: QPointF) QPointF
mask(self) QRegion
maximumHeight(self) int
maximumSize(self) QSize
maximumWidth(self) int
metaObject(self) QMetaObject
metric(self, a0: QPaintDevice.PaintDeviceMetric) int
minimumHeight(self) int
minimumSize(self) QSize
minimumSizeHint(self) QSize
minimumWidth(self) int
mouseDoubleClickEvent(self, a0: QMouseEvent)
mouseGrabber() QWidget
mouseMoveEvent(self, a0: QMouseEvent)
mousePressEvent(self, a0: QMouseEvent)
mouseReleaseEvent(self, a0: QMouseEvent)
move(self, a0: QPoint)
move(self, ax: int, ay: int) None
moveEvent(self, a0: QMoveEvent)
moveToThread(self, thread: QThread)
nativeEvent(self, eventType: QByteArray, message: PyQt6.sip.voidptr) Tuple[bool, PyQt6.sip.voidptr]
nativeParentWidget(self) QWidget
nextInFocusChain(self) QWidget
normalGeometry(self) QRect
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

overrideWindowFlags(self, type: Qt.WindowType)
overrideWindowState(self, state: Qt.WindowState)
paintEngine(self) QPaintEngine
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, name: 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, signal: PYQT_SIGNAL) int
rect(self) QRect
releaseKeyboard(self)
releaseMouse(self)
releaseShortcut(self, id: int)
removeAction(self, action: QAction)
removeEventFilter(self, a0: QObject)
render(self, target: QPaintDevice, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: QWidget.RenderFlag = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren))
render(self, painter: QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: QWidget.RenderFlag = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren)) None
repaint(self)
repaint(self, x: int, y: int, w: int, h: int) None
repaint(self, a0: QRect) None
repaint(self, a0: QRegion) None
resize(self, a0: QSize)
resize(self, w: int, h: int) None
resizeEvent(self, a0: QResizeEvent)
restoreGeometry(self, geometry: QByteArray) bool
saveGeometry(self) QByteArray
screen(self) QScreen
scroll(self, dx: int, dy: int)
scroll(self, dx: int, dy: int, a2: QRect) None
sender(self) QObject
senderSignalIndex(self) int
setAcceptDrops(self, on: bool)
setAccessibleDescription(self, description: str)
setAccessibleName(self, name: str)
setAttribute(self, attribute: Qt.WidgetAttribute, on: bool = True)
setAutoFillBackground(self, enabled: bool)
setBackgroundRole(self, a0: QPalette.ColorRole)
setBaseSize(self, basew: int, baseh: int)
setBaseSize(self, s: QSize) None
setContentsMargins(self, left: int, top: int, right: int, bottom: int)
setContentsMargins(self, margins: QMargins) None
setContextMenuPolicy(self, policy: Qt.ContextMenuPolicy)
setCursor(self, a0: Union[QCursor, Qt.CursorShape])
setDisabled(self, a0: bool)
setEnabled(self, a0: bool)
setFixedHeight(self, h: int)
setFixedSize(self, a0: QSize)
setFixedSize(self, w: int, h: int) None
setFixedWidth(self, w: int)
setFocus(self)
setFocus(self, reason: Qt.FocusReason) None
setFocusPolicy(self, policy: Qt.FocusPolicy)
setFocusProxy(self, a0: QWidget)
setFont(self, a0: QFont)
setForegroundRole(self, a0: QPalette.ColorRole)
setGeometry(self, a0: QRect)
setGeometry(self, ax: int, ay: int, aw: int, ah: int) None
setGraphicsEffect(self, effect: QGraphicsEffect)
setHidden(self, hidden: bool)
setInputMethodHints(self, hints: Qt.InputMethodHint)
setLayout(self, a0: QLayout)
setLayoutDirection(self, direction: Qt.LayoutDirection)
setLocale(self, locale: QLocale)
setMask(self, a0: QBitmap)
setMask(self, a0: QRegion) None
setMaximumHeight(self, maxh: int)
setMaximumSize(self, maxw: int, maxh: int)
setMaximumSize(self, s: QSize) None
setMaximumWidth(self, maxw: int)
setMinimumHeight(self, minh: int)
setMinimumSize(self, minw: int, minh: int)
setMinimumSize(self, s: QSize) None
setMinimumWidth(self, minw: int)
setMouseTracking(self, enable: bool)
setObjectName(self, name: str)
setPalette(self, a0: QPalette)
setParent(self, parent: QWidget)
setParent(self, parent: QWidget, f: Qt.WindowType) None
setProperty(self, name: str, value: Any) bool
setScreen(self, a0: QScreen)
setShortcutAutoRepeat(self, id: int, enabled: bool = True)
setShortcutEnabled(self, id: int, enabled: bool = True)
setSizeIncrement(self, w: int, h: int)
setSizeIncrement(self, s: QSize) None
setSizePolicy(self, a0: QSizePolicy)
setSizePolicy(self, hor: QSizePolicy.Policy, ver: QSizePolicy.Policy) None
setStatusTip(self, a0: str)
setStyle(self, a0: QStyle)
setStyleSheet(self, styleSheet: str)
setTabOrder(a0: QWidget, a1: QWidget)
setTabletTracking(self, enable: bool)
setToolTip(self, a0: str)
setToolTipDuration(self, msec: int)
setUpdatesEnabled(self, enable: bool)
setVisible(self, visible: bool)
setWhatsThis(self, a0: str)
setWindowFilePath(self, filePath: str)
setWindowFlag(self, a0: Qt.WindowType, on: bool = True)
setWindowFlags(self, type: Qt.WindowType)
setWindowIcon(self, icon: QIcon)
setWindowIconText(self, a0: str)
setWindowModality(self, windowModality: Qt.WindowModality)
setWindowModified(self, a0: bool)
setWindowOpacity(self, level: float)
setWindowRole(self, a0: str)
setWindowState(self, state: Qt.WindowState)
setWindowTitle(self, a0: str)
sharedPainter(self) QPainter
show(self)
showEvent(self, a0: 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, a0: QWidget)
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
statusTip(self) str
style(self) QStyle
styleSheet(self) str
tabletEvent(self, a0: QTabletEvent)
testAttribute(self, attribute: Qt.WidgetAttribute) bool
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toolTip(self) str
toolTipDuration(self) int
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
underMouse(self) bool
ungrabGesture(self, type: Qt.GestureType)
unsetCursor(self)
unsetLayoutDirection(self)
unsetLocale(self)
update(self)
update(self, a0: QRect) None
update(self, a0: QRegion) None
update(self, ax: int, ay: int, aw: int, ah: int) None
updateGeometry(self)
updateMicroFocus(self, query: Qt.InputMethodQuery = Qt.ImQueryAll)
updatesEnabled(self) bool
visibleRegion(self) QRegion
whatsThis(self) str
wheelEvent(self, a0: QWheelEvent)
width(self) int
widthMM(self) int
winId(self) PyQt6.sip.voidptr
window(self) QWidget
windowFilePath(self) str
windowFlags(self) Qt.WindowType
windowHandle(self) QWindow
windowIcon(self) QIcon
windowIconChanged

windowIconChanged(self, icon: QIcon) [signal]

windowIconText(self) str
windowIconTextChanged

windowIconTextChanged(self, iconText: str) [signal]

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

windowTitleChanged(self, title: str) [signal]

windowType(self) Qt.WindowType
x(self) int
y(self) int
class schrodinger.ui.two_d_viewer.Cell(st, has_protein, entry_id)

Bases: object

The idea is to dynamically generate an instance whenever the model requests this data.

__init__(st, has_protein, entry_id)
Parameters
  • st (structure.Structure) – Structure to show in the cell (ligand only, no protein)

  • has_protein (bool) – Whether to show the “protein” icon in the cell.

  • entry_id (int) – Entry ID (when in Maestro) or Structure handle.

getProjectRow()

Return the ProjectRow instance for this entry. Returns None if the entry is no longer in the Project Table.

isIncluded()
getIncludedState()

Will return one of the following: NOT_IN_WORKSPACE, IN_WORKSPACE, LOCKED_IN_WORKSPACE

clearAlignment()
clearTransformations()
copyTransformations(cell)

Copies the transformations from the given cell to this cell

generateNeutralStateIfNeeded(uncharger)

Generate the neutral state of the structure, if one is still missing.

class schrodinger.ui.two_d_viewer.TwoDTableModel(parent, *args)

Bases: schrodinger.ui.qt.table.ViewerModel

Custom model for 2D Viewer table The idea is for this model to dynamically change as the project table changes.

__init__(parent, *args)
removeReference()
clearReferenceHighlighting()

Clears reference ligand highlighting. Note: cells are still aligned to previous alignment, if any

setReferenceToIndex(ref_i)
alignCellsToReference(ref_i)

Set MCS/alignment reference to the given cell index, and align all cells to it.

rowCount(parent=None)

Returns number of rows needed to display the data

getRowColumnFromI(i)
getIndexFromI(i)
columnCount(self, parent: QModelIndex = QModelIndex()) int
flags(self, index: QModelIndex) Qt.ItemFlag
data(index, role=ItemDataRole.DisplayRole)

Use getCellFromIndex() instead

numCells()
getCellFromI(i)
getIFromCell(cell)
setCells(cells)

Set the internal data list to the specified list of Cell objects.

getEntryIds()

Return a list of entry IDs that are currently in the table.

getTitles()

Return a list of titles, for all structures. Each title is prepended with the row number of this entry (if in Maestro) or structure index (if outside of Maestro).

removeAllRows()
setColumns(new_num_cols)
removeIsFromTable(remove_is)

Remove cells with specified i’s (cell index ints) from the table.

moveCell(old_index, new_index)

Move the given cell from old index (x,y position) to new index.

handleInclusonToggled(index)

Called when inclusion toggle within a cell is clicked.

Parameters

index (QModelIndex) – Index of the clicked cell

handleShiftClick(index)
Parameters

index (QModelIndex) – Index of the clicked cell

class CheckIndexOption(value)

Bases: enum.Flag

An enumeration.

NoOption = 0
IndexIsValid = 1
DoNotUseParent = 2
ParentIsInvalid = 4
HorizontalSortHint = 2
class LayoutChangeHint(value)

Bases: enum.Enum

An enumeration.

NoLayoutChangeHint = 0
VerticalSortHint = 1
HorizontalSortHint = 2
NoLayoutChangeHint = 0
VerticalSortHint = 1
appendStruct(struct)
beginInsertColumns(self, parent: QModelIndex, first: int, last: int)
beginInsertRows(self, parent: QModelIndex, first: int, last: int)
beginMoveColumns(self, sourceParent: QModelIndex, sourceFirst: int, sourceLast: int, destinationParent: QModelIndex, destinationColumn: int) bool
beginMoveRows(self, sourceParent: QModelIndex, sourceFirst: int, sourceLast: int, destinationParent: QModelIndex, destinationRow: int) bool
beginRemoveColumns(self, parent: QModelIndex, first: int, last: int)
beginRemoveRows(self, parent: QModelIndex, first: int, last: int)
beginResetModel(self)
blockSignals(self, b: bool) bool
buddy(self, index: QModelIndex) QModelIndex
canDropMimeData(self, data: QMimeData, action: Qt.DropAction, row: int, column: int, parent: QModelIndex) bool
canFetchMore(self, parent: QModelIndex) bool
changePersistentIndex(self, from_: QModelIndex, to: QModelIndex)
changePersistentIndexList(self, from_: Iterable[QModelIndex], to: Iterable[QModelIndex])
checkIndex(self, index: QModelIndex, options: QAbstractItemModel.CheckIndexOption = QAbstractItemModel.CheckIndexOption.NoOption) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
clearItemData(self, index: QModelIndex) bool
clearStructs()
columnsAboutToBeInserted

columnsAboutToBeInserted(self, parent: QModelIndex, first: int, last: int) [signal]

columnsAboutToBeMoved

columnsAboutToBeMoved(self, sourceParent: QModelIndex, sourceStart: int, sourceEnd: int, destinationParent: QModelIndex, destinationColumn: int) [signal]

columnsAboutToBeRemoved

columnsAboutToBeRemoved(self, parent: QModelIndex, first: int, last: int) [signal]

columnsInserted

columnsInserted(self, parent: QModelIndex, first: int, last: int) [signal]

columnsMoved

columnsMoved(self, parent: QModelIndex, start: int, end: int, destination: QModelIndex, column: int) [signal]

columnsRemoved

columnsRemoved(self, parent: QModelIndex, first: int, last: int) [signal]

connectNotify(self, signal: QMetaMethod)
createIndex(self, row: int, column: int, object: object = 0) QModelIndex
customEvent(self, a0: QEvent)
dataChanged

dataChanged(self, topLeft: QModelIndex, bottomRight: QModelIndex, roles: Iterable[int] = []) [signal]

decodeData(self, row: int, column: int, parent: QModelIndex, stream: QDataStream) bool
deleteLater(self)
destroyed

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

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dropMimeData(self, data: QMimeData, action: Qt.DropAction, row: int, column: int, parent: QModelIndex) bool
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
encodeData(self, indexes: Iterable[QModelIndex], stream: QDataStream)
endInsertColumns(self)
endInsertRows(self)
endMoveColumns(self)
endMoveRows(self)
endRemoveColumns(self)
endRemoveRows(self)
endResetModel(self)
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
fetchMore(self, parent: QModelIndex)
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
getStruct(index)
hasChildren(self, parent: QModelIndex = QModelIndex()) bool
hasIndex(self, row: int, column: int, parent: QModelIndex = QModelIndex()) bool
headerData(self, section: int, orientation: Qt.Orientation, role: int = Qt.DisplayRole) Any
headerDataChanged

headerDataChanged(self, orientation: Qt.Orientation, first: int, last: int) [signal]

index(self, row: int, column: int, parent: QModelIndex = QModelIndex()) QModelIndex
inherits(self, classname: str) bool
insertColumn(self, column: int, parent: QModelIndex = QModelIndex()) bool
insertColumns(self, column: int, count: int, parent: QModelIndex = QModelIndex()) bool
insertRow(self, row: int, parent: QModelIndex = QModelIndex()) bool
insertRows(self, row: int, count: int, parent: QModelIndex = QModelIndex()) bool
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
itemData(self, index: QModelIndex) Dict[int, Any]
killTimer(self, id: int)
layoutAboutToBeChanged

layoutAboutToBeChanged(self, parents: Iterable[QPersistentModelIndex] = [], hint: QAbstractItemModel.LayoutChangeHint = QAbstractItemModel.NoLayoutChangeHint) [signal]

layoutChanged

layoutChanged(self, parents: Iterable[QPersistentModelIndex] = [], hint: QAbstractItemModel.LayoutChangeHint = QAbstractItemModel.NoLayoutChangeHint) [signal]

match(self, start: QModelIndex, role: int, value: Any, hits: int = 1, flags: Qt.MatchFlag = Qt.MatchFlags(Qt.MatchStartsWith | Qt.MatchWrap)) List[QModelIndex]
metaObject(self) QMetaObject
mimeData(self, indexes: Iterable[QModelIndex]) QMimeData
mimeTypes(self) List[str]
modelAboutToBeReset

modelAboutToBeReset(self) [signal]

modelReset

modelReset(self) [signal]

moveColumn(self, sourceParent: QModelIndex, sourceColumn: int, destinationParent: QModelIndex, destinationChild: int) bool
moveColumns(self, sourceParent: QModelIndex, sourceColumn: int, count: int, destinationParent: QModelIndex, destinationChild: int) bool
moveRow(self, sourceParent: QModelIndex, sourceRow: int, destinationParent: QModelIndex, destinationChild: int) bool
moveRows(self, sourceParent: QModelIndex, sourceRow: int, count: int, destinationParent: QModelIndex, destinationChild: int) bool
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

parent(self) QObject
persistentIndexList(self) List[QModelIndex]
property(self, name: 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, signal: PYQT_SIGNAL) int
removeColumn(self, column: int, parent: QModelIndex = QModelIndex()) bool
removeColumns(self, column: int, count: int, parent: QModelIndex = QModelIndex()) bool
removeEventFilter(self, a0: QObject)
removeRow(self, row: int, parent: QModelIndex = QModelIndex()) bool
removeRows(self, row: int, count: int, parent: QModelIndex = QModelIndex()) bool
removeStruct(row, column)
reset()

PANEL-8852: Method added to prevent QtUpgradeError. This preserves backwards compatibility with QtCore.QAbstractTableModel.reset() but does not reset anything.

resetInternalData(self)
resize(row, column)
resizeColumns(cols)
resizeRows(row)
revert(self)
roleNames(self) Dict[int, QByteArray]
rowsAboutToBeInserted

rowsAboutToBeInserted(self, parent: QModelIndex, first: int, last: int) [signal]

rowsAboutToBeMoved

rowsAboutToBeMoved(self, sourceParent: QModelIndex, sourceStart: int, sourceEnd: int, destinationParent: QModelIndex, destinationRow: int) [signal]

rowsAboutToBeRemoved

rowsAboutToBeRemoved(self, parent: QModelIndex, first: int, last: int) [signal]

rowsInserted

rowsInserted(self, parent: QModelIndex, first: int, last: int) [signal]

rowsMoved

rowsMoved(self, parent: QModelIndex, start: int, end: int, destination: QModelIndex, row: int) [signal]

rowsRemoved

rowsRemoved(self, parent: QModelIndex, first: int, last: int) [signal]

sender(self) QObject
senderSignalIndex(self) int
setData(self, index: QModelIndex, value: Any, role: int = Qt.EditRole) bool
setHeaderData(self, section: int, orientation: Qt.Orientation, value: Any, role: int = Qt.EditRole) bool
setItemData(self, index: QModelIndex, roles: Dict[int, Any]) bool
setObjectName(self, name: str)
setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
setStruct(index, struct)

Given the index, replace the structure with the new value. If the _unique flag is true and the new value already exists in table, it is not added.

Returns

Return whether the new structure was successfully set at the specified index.

Return type

bool

setTable(view)
sibling(self, row: int, column: int, idx: QModelIndex) QModelIndex
signalsBlocked(self) bool
sizeChanged
sort(self, column: int, order: Qt.SortOrder = Qt.AscendingOrder)
span(self, index: QModelIndex) QSize
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
structCount()
submit(self) bool
supportedDragActions(self) Qt.DropAction
supportedDropActions(self) Qt.DropAction
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
class schrodinger.ui.two_d_viewer.TwoDTableView(model, parent)

Bases: schrodinger.ui.qt.table.DataViewerTable

__init__(model, parent)
Parameters
  • model (QAbstractTableModel) – The model for this table. The typical class to use with this table is the StructureDataViewerModel class

  • parent (QWidget) – The widget that owns this table widget

  • aspect_ratio (bool) – if True (default) keeps the cell height & width aspect ratio locked at the ratio indicated by cell_height and cell width. Note that True implies gang=”both”. If aspect_ratio is true, fill can be “rows” OR “columns”, but NOT “both”.

  • fill ("rows", "columns", "both" or "none") – The specified table feature will expand or contract to exactly fit within the table’s viewport.

  • “none”: means neither rows or columns will expand

  • “rows”: means rows will expand (default)

  • “columns”: means columns will expand

  • “both”: means both rows and columns will expand

fill cannot be “both” if aspect_ratio is True.

Setting a feature to fill will turn off the corresponding scrollbar.

Parameters

gang ("rows", "columns", "both" or "none") – Controls whether rows and/or columns can be independently resized.

  • “none” - rows and columns can be independently resized

  • “rows” - rows are ganged so that changing the size of one row will change all the rows

  • “columns” - columns are ganged so that changing the size of one column will change all the columns

  • “both” - both rows and columns are ganged (default)

Parameters
  • universal_row_gang_setting (bool) – If true, then the gang setting applies to ALL rows and a subset of rows may not be ganged. If False (the default), either a subset or all rows may be ganged. It is never necessary to set this option, however setting it does allow for a slight improvement in memory usage for very large tables. Note that this setting applies whether the rows are all ganged or all not ganged. Note that this setting in combination with ganging rows will prevent actions such as hiding the row that change the row size.

  • universal_column_gang_setting (bool) – If true, then the gang setting applies to ALL columns and a subset of columns may not be ganged. If False (the default), either a subset or all columns may be ganged. It is never necessary to set this option, however setting it does allow for a slight improvement in memory usage for very large tables. Note that this setting applies whether the columns are all ganged or all not ganged. Note that this setting in combination with ganging columns will prevent actions such as hiding the column that change the column size.

  • resizable ("rows", "columns", "both" or "none") – the table features that can be resized by the user.

  • “none” - neither rows nor columns can be resized by the user

  • “rows” - rows can be resized by the user

  • “columns” - columns can be resized by the user

  • “both” - both rows and columns can be resized by the user (default)

Note - a feature that has fill turned on cannot be resized by the user, and if fill is turned on and aspect_ratio is True, neither rows nor columns can be resized by the user.

Parameters

fit_view ("rows", "columns", "both" or "none") – the table features that determine the size of the table’s viewport (the part visible to the user).

When this is turned on for a feature, the visible part of the table resizes dynamically to exactly fit that feature. For instance, if fit_view=’rows’, the visible part of the table will resize to exactly fit all the rows any time the size of a row changes.

  • “none” - neither rows nor columns determine the viewport size

  • “rows” - rows determine the viewport height

  • “columns” - columns determine the viewport width

  • “both” - both rows and columns determine the viewport size

Note - a feature that has fill turned on cannot have viewport_fit turned on. fill uses the size of the viewport to determine the size of the cells, while fit_view uses the sie of the cells to determine the size of the viewport.

Note 2 - Setting a feature to fit_view will turn off the corresponding scrollbar.

Note 3 - User resizing of rows with both gang and fit_view=’rows’ or ‘both’ tends to be a bit wonky because the amount the row resizes depends on the placement of the mouse relative to the table, and the table moves as it resizes to the rows, so you tend to get very large changes rapidly.

Parameters

vscrollbar ("on", "off" or "default") – Vertical scrollbar setting - “on” - always on - “off” - always off - “default” - (default) on as needed

If either fit_view or fill = “rows” or “both”, the vertical scrollbar is turned off

Parameters

hscrollbar ("on", "off" or "default") – Horizontal scrollbar setting - “on” - always on - “off” - always off - “default” - (default) on as needed

If either fit_view for fill =”columns” or “both”, the horizontal scrollbar is turned off

Parameters
  • cell_width (int) – default width of cells in pixels

  • cell_height (int) – default height of cells in pixels

  • enable_copy (bool) – True if data in the table can be copied to the clipboard. Cells with structures copy the title of the structure to the clipboard, else the string conversion of the structure to the clipboard.

columnWidth(self, column: int) int
rowHeight(rownum)

Returns the height of the specified row (same for all rows). This method is used by the view.

keyPressEvent(event)

Will get called when a key is pressed

resizeEvent(event)

Called when the viewport changes size. Resizes the rows to keep images square. Uses view’s rowHeight() method.

dragEnterEvent(self, e: QDragEnterEvent)
dropEvent(event)

Don’t allow drops to the right of the right-most column. See Qt documentation for additional method documentation.

AboveItem = 1
AdjustIgnored = 0
AdjustToContents = 2
AdjustToContentsOnFirstShow = 1
AllEditTriggers = 31
AnimatingState = 6
AnyKeyPressed = 16
BelowItem = 2
Box = 1
CollapsingState = 5
ContiguousSelection = 4
CurrentChanged = 1
class CursorAction(value)

Bases: enum.Enum

An enumeration.

MoveUp = 0
MoveDown = 1
MoveLeft = 2
MoveRight = 3
MoveHome = 4
MoveEnd = 5
MovePageUp = 6
MovePageDown = 7
MoveNext = 8
MovePrevious = 9
DoubleClicked = 2
DragDrop = 3
class DragDropMode(value)

Bases: enum.Enum

An enumeration.

NoDragDrop = 0
DragOnly = 1
DropOnly = 2
DragDrop = 3
InternalMove = 4
DragOnly = 1
DragSelectingState = 2
DraggingState = 1
DrawChildren = 2
DrawWindowBackground = 1
class DropIndicatorPosition(value)

Bases: enum.Enum

An enumeration.

OnItem = 0
AboveItem = 1
BelowItem = 2
OnViewport = 3
DropOnly = 2
EditKeyPressed = 8
class EditTrigger(value)

Bases: enum.Flag

An enumeration.

NoEditTriggers = 0
CurrentChanged = 1
DoubleClicked = 2
SelectedClicked = 4
EditKeyPressed = 8
AnyKeyPressed = 16
AllEditTriggers = 31
EditingState = 3
EnsureVisible = 0
ExpandingState = 4
ExtendedSelection = 3
HLine = 4
IgnoreMask = 4
InternalMove = 4
MoveDown = 1
MoveEnd = 5
MoveHome = 4
MoveLeft = 2
MoveNext = 8
MovePageDown = 7
MovePageUp = 6
MovePrevious = 9
MoveRight = 3
MoveUp = 0
MultiSelection = 2
NoDragDrop = 0
NoEditTriggers = 0
NoFrame = 0
NoSelection = 0
NoState = 0
OnItem = 0
OnViewport = 3
class PaintDeviceMetric(value)

Bases: enum.Enum

An enumeration.

PdmWidth = 1
PdmHeight = 2
PdmWidthMM = 3
PdmHeightMM = 4
PdmNumColors = 5
PdmDepth = 6
PdmDpiX = 7
PdmDpiY = 8
PdmPhysicalDpiX = 9
PdmPhysicalDpiY = 10
PdmDevicePixelRatio = 11
PdmDevicePixelRatioScaled = 12
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
PositionAtBottom = 2
PositionAtCenter = 3
PositionAtTop = 1
Raised = 32
class RenderFlag(value)

Bases: enum.Flag

An enumeration.

DrawWindowBackground = 1
DrawChildren = 2
IgnoreMask = 4
class ScrollHint(value)

Bases: enum.Enum

An enumeration.

EnsureVisible = 0
PositionAtTop = 1
PositionAtBottom = 2
PositionAtCenter = 3
class ScrollMode(value)

Bases: enum.Enum

An enumeration.

ScrollPerItem = 0
ScrollPerPixel = 1
ScrollPerItem = 0
ScrollPerPixel = 1
SelectColumns = 2
SelectItems = 0
SelectRows = 1
SelectedClicked = 4
class SelectionBehavior(value)

Bases: enum.Enum

An enumeration.

SelectItems = 0
SelectRows = 1
SelectColumns = 2
class SelectionMode(value)

Bases: enum.Enum

An enumeration.

NoSelection = 0
SingleSelection = 1
MultiSelection = 2
ExtendedSelection = 3
ContiguousSelection = 4
class Shadow(value)

Bases: enum.IntEnum

An enumeration.

Plain = 16
Raised = 32
Sunken = 48
Shadow_Mask = 240
class Shape(value)

Bases: enum.IntEnum

An enumeration.

NoFrame = 0
Box = 1
Panel = 2
WinPanel = 3
HLine = 4
VLine = 5
StyledPanel = 6
Shape_Mask = 15
SingleSelection = 1
class SizeAdjustPolicy(value)

Bases: enum.Enum

An enumeration.

AdjustIgnored = 0
AdjustToContentsOnFirstShow = 1
AdjustToContents = 2
class State(value)

Bases: enum.Enum

An enumeration.

NoState = 0
DraggingState = 1
DragSelectingState = 2
EditingState = 3
ExpandingState = 4
CollapsingState = 5
AnimatingState = 6
class StyleMask(value)

Bases: enum.Enum

An enumeration.

Shadow_Mask = 240
Shape_Mask = 15
StyledPanel = 6
Sunken = 48
VLine = 5
WinPanel = 3
acceptDrops(self) bool
accessibleDescription(self) str
accessibleName(self) str
actionEvent(self, a0: QActionEvent)
actions(self) List[QAction]
activateWindow(self)
activated

activated(self, index: QModelIndex) [signal]

addAction(self, action: QAction)
addActions(self, actions: Iterable[QAction])
addScrollBarWidget(self, widget: QWidget, alignment: Qt.AlignmentFlag)
adjustSize(self)
alternatingRowColors(self) bool
autoFillBackground(self) bool
autoScrollMargin(self) int
averageGangedColumnWidth()

This routine has been changed to return the MOST COMMON non-zero width of all the ganged columns

Return type

int

Returns

the most common integer average column width, or the default width if there are no non-zero ganged columns

averageGangedRowHeight()

This routine has been changed to return the MOST COMMON non-zero height of all the ganged rows

Return type

int

Returns

the most common integer average row height, or the default height if there are no non-zero ganged rows

backgroundRole(self) QPalette.ColorRole
baseSize(self) QSize
blockSignals(self, b: bool) bool
changeEvent(self, a0: QEvent)
checkSizingPolicies()

Raises a ValueError if we have conflicting sizing policies

childAt(self, p: QPoint) QWidget
childAt(self, ax: int, ay: int) QWidget
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
childrenRect(self) QRect
childrenRegion(self) QRegion
clearFocus(self)
clearMask(self)
clearSelection(self)
clearSpans(self)
clicked

clicked(self, index: QModelIndex) [signal]

close(self) bool
closeEditor(self, editor: QWidget, hint: QAbstractItemDelegate.EndEditHint)
closeEvent(self, a0: QCloseEvent)
closePersistentEditor(self, index: QModelIndex)
colorCount(self) int
columnAt(self, x: int) int
columnCountChanged(old_count, new_count)

Called when a column is added or deleted, and sets the columns to their initial size.

Parameters
  • old_count (int) – the old number of columns

  • new_count (int) – the num number of columns

columnMoved(self, column: int, oldIndex: int, newIndex: int)
columnResized(column, old_size, new_size, manual=False)

Resizes any cells that need to be resized when a column size is changed

Parameters
  • column (int) – the column number that changed

  • old_size (int) – the old size of the column

  • new_size (int) – the new size of the column

  • manual (bool) – True if this a manual resize being called by a script. If True, this forces the method to execute even if AutoResizing has been set to false.

columnSpan(self, row: int, column: int) int
columnViewportPosition(self, column: int) int
columnsInserted(index, start, end)

Slot that receives a signal when columns are inserted in the model. Make sure our column_is_ganged list stays current.

Parameters
  • index (QModelIndex) – unused

  • start (int) – The starting index of the columns inserted

  • end (int) – The ending index of the columns inserted (inclusive)

columnsMoved(index1, start, end, index2, place)

Slot that receives a signal when columns are moved in the model. Make sure our column_is_ganged list stays current.

Parameters
  • index1 (QModelIndex) – unused

  • start (int) – The starting index of the columns moved

  • end (int) – The ending index of the columns moved (inclusive)

  • index2 (QModelIndex) – unused

  • place (int) – The new starting index of the moved columns

columnsRemoved(index, start, end)

Slot that receives a signal when columns are removed in the model. Make sure our column_is_ganged list stays current.

Parameters
  • index (QModelIndex) – unused

  • start (int) – The starting index of the columns removed

  • end (int) – The ending index of the columns removed (inclusive)

commitData(self, editor: QWidget)
connectNotify(self, signal: QMetaMethod)
contentsMargins(self) QMargins
contentsRect(self) QRect
contextMenuEvent(self, a0: QContextMenuEvent)
contextMenuPolicy(self) Qt.ContextMenuPolicy
copyImageToClipboard()

Copy an image of the table to the clipboard

cornerWidget(self) QWidget
create(self, window: PyQt6.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
createWindowContainer(window: QWindow, parent: typing.Optional[QWidget] = None, flags: Qt.WindowType = Qt.WindowFlags()) QWidget
currentChanged(self, current: QModelIndex, previous: QModelIndex)
currentIndex(self) QModelIndex
cursor(self) QCursor
customContextMenuRequested

customContextMenuRequested(self, pos: QPoint) [signal]

customEvent(self, a0: QEvent)
dataChanged(self, topLeft: QModelIndex, bottomRight: QModelIndex, roles: Iterable[int] = [])
defaultDropAction(self) Qt.DropAction
deleteLater(self)
depth(self) int
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
destroyed

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

devType(self) int
devicePixelRatio(self) float
devicePixelRatioF(self) float
devicePixelRatioFScale() float
dirtyRegionOffset(self) QPoint
disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
doubleClicked

doubleClicked(self, index: QModelIndex) [signal]

dragDropMode(self) QAbstractItemView.DragDropMode
dragDropOverwriteMode(self) bool
dragEnabled(self) bool
dragLeaveEvent(self, e: QDragLeaveEvent)
dragMoveEvent(self, e: QDragMoveEvent)
drawFrame(self, a0: QPainter)
dropIndicatorPosition(self) QAbstractItemView.DropIndicatorPosition
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
edit(self, index: QModelIndex)
edit(self, index: QModelIndex, trigger: QAbstractItemView.EditTrigger, event: QEvent) bool
editTriggers(self) QAbstractItemView.EditTrigger
editorDestroyed(self, editor: QObject)
effectiveWinId(self) PyQt6.sip.voidptr
enforceScrollBarPolicies()

Sets the scrollbar policies as required by the sizing policies

ensurePolished(self)
enterEvent(self, event: QEnterEvent)
entered

entered(self, index: QModelIndex) [signal]

event(self, event: QEvent) bool
eventFilter(self, object: QObject, event: QEvent) bool
executeDelayedItemsLayout(self)
find(a0: PyQt6.sip.voidptr) QWidget
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
fitCellsToData(include_column_header=False)

Resizes rows and columns to fit the data they contain using the sizeHint from the delegate

Parameters

include_column_header (bool) – True if the column header should be included when figuring the column width, False if not

fitColumnToData(column, include_header=False)

Resizes column to the largest sizeHint of any of its cells. Uses the sizeHint of the delegate.

Parameters
  • column (int) – the column of interest

  • include_header (bool) – True if the header should be included in the calculation of column width, False if not

fitColumnsToData(include_header=False)

Resizes all the columns to fit the data they contain using the sizeHint from the delegate.

Parameters

include_header (bool) – True if the header should be included in the calculation of column width, False if not

fitRowToData(row)

Resizes row to the largest sizeHint of any of its cells. Uses the sizeHint of the delegate.

Parameters

row (int) – the row of interest

fitRowsToData()

Resizes all the rows to fit the data they contain using the sizeHint from the delegate.

fitToColumns()

Fits the viewport to exactly show all the columns

fitToRows()

Fits the viewport to exactly show all the rows

fixSize(manual=False)

Resize everything as the user and program desires

Parameters

manual (bool) – True if this a manual resize being called by a script. If True, this forces the method to execute even if AutoResizing has been set to false.

focusInEvent(self, e: QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, next: bool) bool
focusOutEvent(self, e: 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
grab(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(- 1, - 1))) QPixmap
grabGesture(self, type: Qt.GestureType, flags: Qt.GestureFlag = Qt.GestureFlags())
grabKeyboard(self)
grabMouse(self)
grabMouse(self, a0: Union[QCursor, Qt.CursorShape]) None
grabShortcut(self, key: Union[QKeySequence, QKeySequence.StandardKey, str, int], context: Qt.ShortcutContext = Qt.WindowShortcut) int
graphicsEffect(self) QGraphicsEffect
graphicsProxyWidget(self) QGraphicsProxyWidget
gridStyle(self) Qt.PenStyle
hasAutoScroll(self) bool
hasFocus(self) bool
hasHeightForWidth(self) bool
hasMouseTracking(self) bool
hasTabletTracking(self) bool
headerClicked(col)
height(self) int
heightForWidth(self, a0: int) int
heightMM(self) int
hide(self)
hideColumn(self, column: int)
hideEvent(self, a0: QHideEvent)
hideRow(self, row: int)
horizontalHeader(self) QHeaderView
horizontalOffset(self) int
horizontalScrollBar(self) QScrollBar
horizontalScrollBarPolicy(self) Qt.ScrollBarPolicy
horizontalScrollMode(self) QAbstractItemView.ScrollMode
horizontalScrollbarAction(self, action: int)
horizontalScrollbarValueChanged(self, value: int)
iconSize(self) QSize
iconSizeChanged

iconSizeChanged(self, size: QSize) [signal]

indexAt(self, p: QPoint) QModelIndex
indexWidget(self, index: QModelIndex) QWidget
inherits(self, classname: str) bool
initPainter(self, painter: QPainter)
initStyleOption(self, option: QStyleOptionFrame)
initViewItemOption(self, option: QStyleOptionViewItem)
initiateCellSizes(rows=True, columns=True)

Sets all the cells to their intial default size

Parameters
  • rows (bool) – whether to set the rows to their default height

  • columns (bool) – whether to set the columns to their default width

inputMethodEvent(self, event: QInputMethodEvent)
inputMethodHints(self) Qt.InputMethodHint
inputMethodQuery(self, query: Qt.InputMethodQuery) Any
insertAction(self, before: QAction, action: QAction)
insertActions(self, before: QAction, actions: Iterable[QAction])
installEventFilter(self, a0: QObject)
isActiveWindow(self) bool
isActivelyScrolling()
isAncestorOf(self, child: QWidget) bool
isColumnGanged(column)

Returns True if column is ganged, False if not

Parameters

column (int) – the column to check for ganging

isColumnHidden(self, column: int) bool
isCornerButtonEnabled(self) bool
isEnabled(self) bool
isEnabledTo(self, a0: QWidget) bool
isFullScreen(self) bool
isHidden(self) bool
isIndexHidden(self, index: QModelIndex) bool
isLeftToRight(self) bool
isMaximized(self) bool
isMinimized(self) bool
isModal(self) bool
isPersistentEditorOpen(self, index: QModelIndex) bool
isRightToLeft(self) bool
isRowGanged(row)

Returns True if row is ganged, False if not

Parameters

row (int) – the row to check for ganging

isRowHidden(self, row: int) bool
isScrolling()
isSignalConnected(self, signal: QMetaMethod) bool
isSortingEnabled(self) bool
isVisible(self) bool
isVisibleTo(self, a0: QWidget) bool
isWidgetType(self) bool
isWindow(self) bool
isWindowModified(self) bool
isWindowType(self) bool
itemDelegate(self) QAbstractItemDelegate
itemDelegateForColumn(self, column: int) QAbstractItemDelegate
itemDelegateForIndex(self, index: QModelIndex) QAbstractItemDelegate
itemDelegateForRow(self, row: int) QAbstractItemDelegate
keyReleaseEvent(self, a0: QKeyEvent)
keyboardGrabber() QWidget
keyboardSearch(self, search: str)
killTimer(self, id: int)
layout(self) QLayout
layoutDirection(self) Qt.LayoutDirection
leaveEvent(self, a0: QEvent)
lineWidth(self) int
locale(self) QLocale
logicalDpiX(self) int
logicalDpiY(self) int
lower(self)
mapFrom(self, a0: QWidget, a1: QPoint) QPoint
mapFrom(self, a0: QWidget, a1: QPointF) QPointF
mapFromGlobal(self, a0: QPoint) QPoint
mapFromGlobal(self, a0: QPointF) QPointF
mapFromParent(self, a0: QPoint) QPoint
mapFromParent(self, a0: QPointF) QPointF
mapTo(self, a0: QWidget, a1: QPoint) QPoint
mapTo(self, a0: QWidget, a1: QPointF) QPointF
mapToGlobal(self, a0: QPoint) QPoint
mapToGlobal(self, a0: QPointF) QPointF
mapToParent(self, a0: QPoint) QPoint
mapToParent(self, a0: QPointF) QPointF
mask(self) QRegion
maximumHeight(self) int
maximumSize(self) QSize
maximumViewportSize(self) QSize
maximumWidth(self) int
metaObject(self) QMetaObject
metric(self, a0: QPaintDevice.PaintDeviceMetric) int
midLineWidth(self) int
minimumHeight(self) int
minimumSize(self) QSize
minimumSizeHint(self) QSize
minimumWidth(self) int
model(self) QAbstractItemModel
mouseDoubleClickEvent(self, e: QMouseEvent)
mouseGrabber() QWidget
mouseMoveEvent(self, e: QMouseEvent)
mousePressEvent(self, e: QMouseEvent)
mouseReleaseEvent(self, e: QMouseEvent)
move(self, a0: QPoint)
move(self, ax: int, ay: int) None
moveCursor(self, cursorAction: QAbstractItemView.CursorAction, modifiers: Qt.KeyboardModifier) QModelIndex
moveEvent(self, a0: QMoveEvent)
moveToThread(self, thread: QThread)
nativeEvent(self, eventType: QByteArray, message: PyQt6.sip.voidptr) Tuple[bool, PyQt6.sip.voidptr]
nativeParentWidget(self) QWidget
nextInFocusChain(self) QWidget
normalGeometry(self) QRect
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

openPersistentEditor(self, index: QModelIndex)
overrideWindowFlags(self, type: Qt.WindowType)
overrideWindowState(self, state: Qt.WindowState)
paintEngine(self) QPaintEngine
paintEvent(self, e: QPaintEvent)
paintingActive(self) bool
palette(self) QPalette
parent(self) QObject
parentWidget(self) QWidget
physicalDpiX(self) int
physicalDpiY(self) int
pos(self) QPoint
pressed

pressed(self, index: QModelIndex) [signal]

previousInFocusChain(self) QWidget
property(self, name: 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)
reEnableColumnResize()
receivers(self, signal: PYQT_SIGNAL) int
rect(self) QRect
releaseKeyboard(self)
releaseMouse(self)
releaseShortcut(self, id: int)
removeAction(self, action: QAction)
removeEventFilter(self, a0: QObject)
render(self, target: QPaintDevice, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: QWidget.RenderFlag = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren))
render(self, painter: QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: QWidget.RenderFlag = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren)) None
repaint(self)
repaint(self, x: int, y: int, w: int, h: int) None
repaint(self, a0: QRect) None
repaint(self, a0: QRegion) None
reset(self)
resetHorizontalScrollMode(self)
resetVerticalScrollMode(self)
resize(self, a0: QSize)
resize(self, w: int, h: int) None
resizeColumnToContents(self, column: int)
resizeColumnsToContents()

Resizes all the columns according to all the resize properties

resizeRowToContents(self, row: int)
resizeRowsToContents()

Resizes all the rows according to all the resize properties

restoreGeometry(self, geometry: QByteArray) bool
rootIndex(self) QModelIndex
rowAt(self, y: int) int
rowCountChanged(old_count, new_count)

Called when a row is added or deleted, and sets the rows to their initial size.

Parameters
  • old_count (int) – the old number of rows

  • new_count (int) – the num number of rows

rowMoved(self, row: int, oldIndex: int, newIndex: int)
rowResized(row, old_size, new_size, manual=False)

Resizes any cells that need to be resized when a row size is changed

Parameters
  • row (int) – the row number that changed

  • old_size (int) – the old size of the row

  • new_size (int) – the new size of the row

  • manual (bool) – True if this a manual resize being called by a script. If True, this forces the method to execute even if AutoResizing has been set to false.

rowSpan(self, row: int, column: int) int
rowViewportPosition(self, row: int) int
rowsAboutToBeRemoved(self, parent: QModelIndex, start: int, end: int)
rowsInserted(index, start, end)

Slot that receives a signal when rows are inserted in the model. Make sure our row_is_ganged list stays current.

Parameters
  • index (QModelIndex) – unused

  • start (int) – The starting index of the rows inserted

  • end (int) – The ending index of the rows inserted (inclusive)

rowsMoved(index1, start, end, index2, place)

Slot that receives a signal when rows are moved in the model. Make sure our row_is_ganged list stays current.

Parameters
  • index1 (QModelIndex) – unused

  • start (int) – The starting index of the rows moved

  • end (int) – The ending index of the rows moved (inclusive)

  • index2 (QModelIndex) – unused

  • place (int) – The new starting index of the moved rows

rowsRemoved(index, start, end)

Slot that receives a signal when rows are removed in the model. Make sure our row_is_ganged list stays current.

Parameters
  • index (QModelIndex) – unused

  • start (int) – The starting index of the rows removed

  • end (int) – The ending index of the rows removed (inclusive)

saveGeometry(self) QByteArray
scheduleDelayedItemsLayout(self)
screen(self) QScreen
scroll(self, dx: int, dy: int)
scroll(self, dx: int, dy: int, a2: QRect) None
scrollBarChanged(orientation)

A scrollbar has changed appearance, make sure we have the proper size

scrollBarWidgets(self, alignment: Qt.AlignmentFlag) List[QWidget]
scrollContentsBy(self, dx: int, dy: int)
scrollDirtyRegion(self, dx: int, dy: int)
scrollTo(self, index: QModelIndex, hint: QAbstractItemView.ScrollHint = QAbstractItemView.EnsureVisible)
scrollToBottom(self)
scrollToTop(self)
selectAll(self)
selectColumn(self, column: int)
selectRow(self, row: int)
selectedIndexes(self) List[QModelIndex]
selectionBehavior(self) QAbstractItemView.SelectionBehavior
selectionChanged(self, selected: QItemSelection, deselected: QItemSelection)
selectionCommand(self, index: QModelIndex, event: typing.Optional[QEvent] = None) QItemSelectionModel.SelectionFlag
selectionMode(self) QAbstractItemView.SelectionMode
selectionModel(self) QItemSelectionModel
sender(self) QObject
senderSignalIndex(self) int
setAcceptDrops(self, on: bool)
setAccessibleDescription(self, description: str)
setAccessibleName(self, name: str)
setAlternatingRowColors(self, enable: bool)
setAspectRatioPolicy(fixed, resize=True, policy_check=True)

Sets whether the cell aspect ratio is locked or not

Parameters
  • fixed (bool) – If True, cell aspect ratio is locked. If False, it is not

  • resize (bool) – Whether to resize the table

  • policy_check (bool) – Whether to check for conflicting sizing policies.

setAttribute(self, attribute: Qt.WidgetAttribute, on: bool = True)
setAutoFillBackground(self, enabled: bool)
setAutoScroll(self, enable: bool)
setAutoScrollMargin(self, margin: int)
setAutoSizing(state)

Turn the auto resizing of rows and column on or off. Normally this should be on (default), however, if multiple changes will be made and no resizing needs to be done until all changes are complete, then setting AutoSizing to False will save considerable time for large tables. Be sure to setAutoSizing(True) when finished so the table can adjust to the changes made.

Parameters

state (bool) – True if rows and columns should be resized automatically in response to table changes, False if not

setBackgroundRole(self, a0: QPalette.ColorRole)
setBaseSize(self, basew: int, baseh: int)
setBaseSize(self, s: QSize) None
setColumnHidden(self, column: int, hide: bool)
setColumnIsGanged(column, is_ganged)

Sets a flag on column to indicate whether its size is ganged with other columns or not. Note that this has no effect if columns are not already ganged. This function should not be called if universal_column_gang_setting was set to True.

Parameters
  • column (int) – the column number this applies to

  • is_ganged (bool) – True if the column should be ganged, False if not

setColumnWidth(self, column: int, width: int)
setContentsMargins(self, left: int, top: int, right: int, bottom: int)
setContentsMargins(self, margins: QMargins) None
setContextMenuPolicy(self, policy: Qt.ContextMenuPolicy)
setCornerButtonEnabled(self, enable: bool)
setCornerWidget(self, widget: QWidget)
setCurrentIndex(self, index: QModelIndex)
setCursor(self, a0: Union[QCursor, Qt.CursorShape])
setDefaultDropAction(self, dropAction: Qt.DropAction)
setDelegate(delegate)

Set the delegate for this table

Parameters

delegate (StructureDataViewerDelegate) – delegate that draws the data for this table

setDirtyRegion(self, region: QRegion)
setDisabled(self, a0: bool)
setDragDropMode(self, behavior: QAbstractItemView.DragDropMode)
setDragDropOverwriteMode(self, overwrite: bool)
setDragEnabled(self, enable: bool)
setDropIndicatorShown(self, enable: bool)
setEditTriggers(self, triggers: QAbstractItemView.EditTrigger)
setEnabled(self, a0: bool)
setFillPolicy(fill, resize=True, policy_check=True, enforce_scroll_bars=True)

Sets whether columns or rows should fill the viewport or not

Parameters
  • fill ("rows", "columns", "both" or "none") – The specified table feature will expand or contract to exactly fit within the table’s viewport. “both” means both rows and columns will expand, and “none” means neither will. fill cannot be “both” if aspect_ratio is True. Setting a feature to fill will turn off the corresponding scrollbar.

  • resize (bool) – Whether to resize the table

  • policy_check (bool) – Whether to check for conflicting sizing policies.

  • enforce_scroll_bars (bool) – Whether to enforce the default scrollbar policy for fill settings

setFitViewPolicy(fit_view, resize=True, policy_check=True, enforce_scroll_bars=True)

Sets whether the viewport should be resized to the rows/columns or not

Parameters

fit_view ("rows", "columns", "both" or "none") – the table features that determine the size of the table’s viewport (the part visible to the user).

When this is turned on for a feature, the visible part of the table resizes dynamically to exactly fit that feature. For instance, if fit_view=’rows’, the visible part of the table will resize to exactly fit all the rows any time the size of a row changes.

  • “none” - neither rows nor columns determine the viewport size

  • “rows” - rows determine the viewport height

  • “columns” - columns determine the viewport width

  • “both” - both rows and columns determine the viewport size

Note - a feature that has fill turned on cannot have viewport_fit turned on. fill uses the size of the viewport to determine the size of the cells, while fit_view uses the sie of the cells to determine the size of the viewport.

Note 2 - Setting a feature to fit_view will turn off the corresponding scrollbar.

Note 3 - User resizing of rows with both gang and fit_view=’rows’ or ‘both’ tends to be a bit wonky because the amount the row resizes depends on the placement of the mouse relative to the table, and the table moves as it resizes to the rows, so you tend to get very large changes rapidly.

Parameters
  • resize (bool) – Whether to resize the table

  • policy_check (bool) – Whether to check for conflicting sizing policies.

  • enforce_scroll_bars (bool) – Whether to enforce the default scrollbar policy for fit view settings

setFixedHeight(self, h: int)
setFixedSize(self, a0: QSize)
setFixedSize(self, w: int, h: int) None
setFixedWidth(self, w: int)
setFocus(self)
setFocus(self, reason: Qt.FocusReason) None
setFocusPolicy(self, policy: Qt.FocusPolicy)
setFocusProxy(self, a0: QWidget)
setFont(self, a0: QFont)
setForegroundRole(self, a0: QPalette.ColorRole)
setFrameRect(self, a0: QRect)
setFrameShadow(self, a0: QFrame.Shadow)
setFrameShape(self, a0: QFrame.Shape)
setFrameStyle(self, a0: int)
setGangPolicy(gang, resize=True, policy_check=True)

Sets whether the rows or columns are ganged or not

Parameters

gang ("rows", "columns", "both" or "none") – Controls whether rows and/or columns can be independently resized.

  • “none”: rows and columns can be independently resized

  • “rows”: rows are ganged so that changing the size of one row will change all the rows

  • “columns”: columns are ganged so that changing the size of one column will change all the columns

  • “both” - both rows and columns are ganged (default)

Parameters
  • resize (bool) – Whether to resize the table

  • policy_check (bool) – Whether to check for conflicting sizing policies. Not used for this routine, but kept for consistency with other sizing policy routines

setGeometry(self, a0: QRect)
setGeometry(self, ax: int, ay: int, aw: int, ah: int) None
setGraphicsEffect(self, effect: QGraphicsEffect)
setGridStyle(self, style: Qt.PenStyle)
setHidden(self, hidden: bool)
setHorizontalHeader(self, header: QHeaderView)
setHorizontalScrollBar(self, scrollbar: QScrollBar)
setHorizontalScrollBarPolicy(self, a0: Qt.ScrollBarPolicy)
setHorizontalScrollMode(self, mode: QAbstractItemView.ScrollMode)
setIconSize(self, size: QSize)
setIndexWidget(self, index: QModelIndex, widget: QWidget)
setInputMethodHints(self, hints: Qt.InputMethodHint)
setItemDelegate(delegate)

Set the delegate for this table

Parameters

delegate (StructureDataViewerDelegate) – delegate that draws the data for this table

setItemDelegateForColumn(self, column: int, delegate: QAbstractItemDelegate)
setItemDelegateForRow(self, row: int, delegate: QAbstractItemDelegate)
setLayout(self, a0: QLayout)
setLayoutDirection(self, direction: Qt.LayoutDirection)
setLineWidth(self, a0: int)
setLocale(self, locale: QLocale)
setMask(self, a0: QBitmap)
setMask(self, a0: QRegion) None
setMaximumHeight(self, maxh: int)
setMaximumSize(self, maxw: int, maxh: int)
setMaximumSize(self, s: QSize) None
setMaximumWidth(self, maxw: int)
setMidLineWidth(self, a0: int)
setMinimumHeight(self, minh: int)
setMinimumSize(self, minw: int, minh: int)
setMinimumSize(self, s: QSize) None
setMinimumWidth(self, minw: int)
setModel(self, model: QAbstractItemModel)
setMouseTracking(self, enable: bool)
setObjectName(self, name: str)
setPalette(self, a0: QPalette)
setParent(self, parent: QWidget)
setParent(self, parent: QWidget, f: Qt.WindowType) None
setProperty(self, name: str, value: Any) bool
setResizablePolicy(resizable, resize=True, policy_check=True)

Sets whether the rows/columns can be resized by the user

Parameters

resizable ("rows", "columns", "both" or "none") – the table features that can be resized by the user.

  • “none” - neither rows nor columns can be resized by the user

  • “rows” - rows can be resized by the user

  • “columns” - columns can be resized by the user

  • “both” - both rows and columns can be resized by the user (default)

Note - a feature that has fill turned on cannot be resized by the user, and if fill is turned on and aspect_ratio is True, neither rows nor columns can be resized by the user.

Parameters
  • resize (bool) – Whether to resize the table

  • policy_check (bool) – Whether to check for conflicting sizing policies.

setRootIndex(self, index: QModelIndex)
setRowHeight(self, row: int, height: int)
setRowHidden(self, row: int, hide: bool)
setRowIsGanged(row, is_ganged)

Sets a flag on row to indicate whether its size is ganged with other rows or not. Note that this has no effect if rows are not already ganged. This function should not be called if universal_row_gang_settings was set to True.

Parameters
  • row (int) – the row number this applies to

  • is_ganged (bool) – True if the row should be ganged, False if not

setScreen(self, a0: QScreen)
setSelection(self, rect: QRect, command: QItemSelectionModel.SelectionFlag)
setSelectionBehavior(self, behavior: QAbstractItemView.SelectionBehavior)
setSelectionMode(self, mode: QAbstractItemView.SelectionMode)
setSelectionModel(self, selectionModel: QItemSelectionModel)
setShortcutAutoRepeat(self, id: int, enabled: bool = True)
setShortcutEnabled(self, id: int, enabled: bool = True)
setShowGrid(self, show: bool)
setSizeAdjustPolicy(self, policy: QAbstractScrollArea.SizeAdjustPolicy)
setSizeIncrement(self, w: int, h: int)
setSizeIncrement(self, s: QSize) None
setSizePolicy(self, a0: QSizePolicy)
setSizePolicy(self, hor: QSizePolicy.Policy, ver: QSizePolicy.Policy) None
setSortingEnabled(sorting)

Sets sorting enabled

Parameters

sorting (bool) – If True, sorting is enabled

setSpan(self, row: int, column: int, rowSpan: int, columnSpan: int)
setState(self, state: QAbstractItemView.State)
setStatusTip(self, a0: str)
setStyle(self, a0: QStyle)
setStyleSheet(self, styleSheet: str)
setTabKeyNavigation(self, enable: bool)
setTabOrder(a0: QWidget, a1: QWidget)
setTabletTracking(self, enable: bool)
setTextElideMode(self, mode: Qt.TextElideMode)
setToolTip(self, a0: str)
setToolTipDuration(self, msec: int)
setToolTipSize(width, height)
Parameters
  • width (int) – width in pixels of tooltip

  • height (int) – height in pixels of tooltip

setUpdatesEnabled(self, enable: bool)
setVerticalHeader(self, header: QHeaderView)
setVerticalScrollBar(self, scrollbar: QScrollBar)
setVerticalScrollBarPolicy(self, a0: Qt.ScrollBarPolicy)
setVerticalScrollMode(self, mode: QAbstractItemView.ScrollMode)
setViewport(self, widget: QWidget)
setViewportMargins(self, left: int, top: int, right: int, bottom: int)
setViewportMargins(self, margins: QMargins) None
setVisible(self, visible: bool)
setWhatsThis(self, a0: str)
setWindowFilePath(self, filePath: str)
setWindowFlag(self, a0: Qt.WindowType, on: bool = True)
setWindowFlags(self, type: Qt.WindowType)
setWindowIcon(self, icon: QIcon)
setWindowIconText(self, a0: str)
setWindowModality(self, windowModality: Qt.WindowModality)
setWindowModified(self, a0: bool)
setWindowOpacity(self, level: float)
setWindowRole(self, a0: str)
setWindowState(self, state: Qt.WindowState)
setWindowTitle(self, a0: str)
setWordWrap(self, on: bool)
setupViewport(self, viewport: QWidget)
sharedPainter(self) QPainter
show(self)
showColumn(self, column: int)
showDropIndicator(self) bool
showEvent(self, a0: QShowEvent)
showFullScreen(self)
showGrid(self) bool
showMaximized(self)
showMinimized(self)
showNormal(self)
showRow(self, row: int)
signalsBlocked(self) bool
size(self) QSize
sizeAdjustPolicy(self) QAbstractScrollArea.SizeAdjustPolicy
sizeHint(self) QSize
sizeHintForColumn(column)

This method gives the size hints for columns - its existance means that the resizeColumnsToContents() method uses this hint rather than hints from the delegate.

Parameters

column (int) – the column we want a size hint for

Return type

int

Returns

the size hint for column

sizeHintForIndex(self, index: QModelIndex) QSize
sizeHintForRow(row)

This method gives the size hints for rows - its existance means that the resizeRowsToContents() method uses this hint rather than hints from the delegate.

Parameters

row (int) – the row we want a size hint for

Return type

int

Returns

the size hint for row

sizeIncrement(self) QSize
sizePolicy(self) QSizePolicy
sortByColumn(self, column: int, order: Qt.SortOrder)
stackUnder(self, a0: QWidget)
startDrag(self, supportedActions: Qt.DropAction)
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
state(self) QAbstractItemView.State
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
statusTip(self) str
style(self) QStyle
styleSheet(self) str
tabKeyNavigation(self) bool
tabletEvent(self, a0: QTabletEvent)
testAttribute(self, attribute: Qt.WidgetAttribute) bool
textElideMode(self) Qt.TextElideMode
thread(self) QThread
timerEvent(self, event: QTimerEvent)
toolTip(self) str
toolTipDuration(self) int
totalColumnWidth()

The sum of the widths of all the columns

Return type

int

Returns

the sum of all the column widths

totalRowHeight()

The sum of the heights of all the rows

Return type

int

Returns

the sum of all the row heights

tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
underMouse(self) bool
ungrabGesture(self, type: Qt.GestureType)
unsetCursor(self)
unsetLayoutDirection(self)
unsetLocale(self)
update(self)
update(self, index: QModelIndex) None
updateEditorData(self)
updateEditorGeometries(self)
updateGeometries(self)
updateGeometry(self)
updateMicroFocus(self, query: Qt.InputMethodQuery = Qt.ImQueryAll)
updatesEnabled(self) bool
verticalHeader(self) QHeaderView
verticalOffset(self) int
verticalScrollBar(self) QScrollBar
verticalScrollBarPolicy(self) Qt.ScrollBarPolicy
verticalScrollMode(self) QAbstractItemView.ScrollMode
verticalScrollbarAction(self, action: int)
verticalScrollbarValueChanged(self, value: int)
viewport(self) QWidget
viewportEntered

viewportEntered(self) [signal]

viewportEvent(self, e: QEvent) bool
viewportMargins(self) QMargins
viewportSizeHint(self) QSize
visibleRegion(self) QRegion
visualRect(self, index: QModelIndex) QRect
visualRegionForSelection(self, selection: QItemSelection) QRegion
whatsThis(self) str
wheelEvent(self, a0: QWheelEvent)
width(self) int
widthMM(self) int
winId(self) PyQt6.sip.voidptr
window(self) QWidget
windowFilePath(self) str
windowFlags(self) Qt.WindowType
windowHandle(self) QWindow
windowIcon(self) QIcon
windowIconChanged

windowIconChanged(self, icon: QIcon) [signal]

windowIconText(self) str
windowIconTextChanged

windowIconTextChanged(self, iconText: str) [signal]

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

windowTitleChanged(self, title: str) [signal]

windowType(self) Qt.WindowType
wordWrap(self) bool
x(self) int
y(self) int
auto_size

Whether the table should automatically resize in response to changes

class schrodinger.ui.two_d_viewer.CellContextualMenu(viewer, cell, row)

Bases: PyQt6.QtWidgets.QMenu

__init__(viewer, cell, row)
show(pos)

Show contextual menu for the given 2D cell, at the current position of the mouse cursor.

updateView()
includeEntries()

Include selected cells in the Workspace.

excludeEntries()

Exclude all selected cells from the Workspace.

excludeOtherEntries()

Exclude all entries from the Workspace, except those for selected 2D viewer cells.

selectEntries()

Select in PT those entries that are selected in 2D viewer.

deselectOtherEntries()

Deselect everything from PT except cells that are selected in 2D Viewer

deselectEntries()

Deselect in PT those cells that are selected in 2D Viewer.

copyToClipboard()
setAsReference()
removeAlignments()

Remove alignments to reference for selected cells.

DrawChildren = 2
DrawWindowBackground = 1
IgnoreMask = 4
class PaintDeviceMetric(value)

Bases: enum.Enum

An enumeration.

PdmWidth = 1
PdmHeight = 2
PdmWidthMM = 3
PdmHeightMM = 4
PdmNumColors = 5
PdmDepth = 6
PdmDpiX = 7
PdmDpiY = 8
PdmPhysicalDpiX = 9
PdmPhysicalDpiY = 10
PdmDevicePixelRatio = 11
PdmDevicePixelRatioScaled = 12
PdmDepth = 6
PdmDevicePixelRatio = 11
PdmDevicePixelRatioScaled = 12
PdmDpiX = 7
PdmDpiY = 8
PdmHeight = 2
PdmHeightMM = 4
PdmNumColors = 5
PdmPhysicalDpiX = 9
PdmPhysicalDpiY = 10
PdmWidth = 1
PdmWidthMM = 3
class RenderFlag(value)

Bases: enum.Flag

An enumeration.

DrawWindowBackground = 1
DrawChildren = 2
IgnoreMask = 4
aboutToHide

aboutToHide(self) [signal]

aboutToShow

aboutToShow(self) [signal]

acceptDrops(self) bool
accessibleDescription(self) str
accessibleName(self) str
actionAt(self, a0: QPoint) QAction
actionEvent(self, a0: QActionEvent)
actionGeometry(self, a0: QAction) QRect
actions(self) List[QAction]
activateWindow(self)
activeAction(self) QAction
addAction(self, a0: QAction)
addAction(self, text: str) QAction
addAction(self, text: str, slot: PYQT_SLOT, shortcut: Union[QKeySequence, QKeySequence.StandardKey, str, int] = 0) QAction
addAction(self, icon: QIcon, text: str) QAction
addAction(self, icon: QIcon, text: str, slot: PYQT_SLOT, shortcut: Union[QKeySequence, QKeySequence.StandardKey, str, int] = 0) QAction
addActions(self, actions: Iterable[QAction])
addMenu(self, menu: QMenu) QAction
addMenu(self, title: str) QMenu
addMenu(self, icon: QIcon, title: str) QMenu
addSection(self, text: str) QAction
addSection(self, icon: QIcon, text: str) QAction
addSeparator(self) QAction
adjustSize(self)
autoFillBackground(self) bool
backgroundRole(self) QPalette.ColorRole
baseSize(self) QSize
blockSignals(self, b: bool) bool
changeEvent(self, a0: QEvent)
childAt(self, p: QPoint) QWidget
childAt(self, ax: int, ay: int) QWidget
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
childrenRect(self) QRect
childrenRegion(self) QRegion
clear(self)
clearFocus(self)
clearMask(self)
close(self) bool
closeEvent(self, a0: QCloseEvent)
colorCount(self) int
columnCount(self) int
connectNotify(self, signal: QMetaMethod)
contentsMargins(self) QMargins
contentsRect(self) QRect
contextMenuEvent(self, a0: QContextMenuEvent)
contextMenuPolicy(self) Qt.ContextMenuPolicy
create(self, window: PyQt6.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
createWindowContainer(window: QWindow, parent: typing.Optional[QWidget] = None, flags: Qt.WindowType = Qt.WindowFlags()) QWidget
cursor(self) QCursor
customContextMenuRequested

customContextMenuRequested(self, pos: QPoint) [signal]

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

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

devType(self) int
devicePixelRatio(self) float
devicePixelRatioF(self) float
devicePixelRatioFScale() float
disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dragEnterEvent(self, a0: QDragEnterEvent)
dragLeaveEvent(self, a0: QDragLeaveEvent)
dragMoveEvent(self, a0: QDragMoveEvent)
dropEvent(self, a0: QDropEvent)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
effectiveWinId(self) PyQt6.sip.voidptr
ensurePolished(self)
enterEvent(self, a0: QEnterEvent)
event(self, a0: QEvent) bool
eventFilter(self, a0: QObject, a1: QEvent) bool
exec(self) QAction
exec(self, p: QPoint, action: typing.Optional[QAction] = None) QAction
exec(actions: Iterable[QAction], pos: QPoint, at: typing.Optional[QAction] = None, parent: typing.Optional[QWidget] = None) QAction
find(a0: PyQt6.sip.voidptr) QWidget
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
focusInEvent(self, a0: QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, next: bool) bool
focusOutEvent(self, a0: 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
frameSize(self) QSize
geometry(self) QRect
grab(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(- 1, - 1))) QPixmap
grabGesture(self, type: Qt.GestureType, flags: Qt.GestureFlag = Qt.GestureFlags())
grabKeyboard(self)
grabMouse(self)
grabMouse(self, a0: Union[QCursor, Qt.CursorShape]) None
grabShortcut(self, key: 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, a0: int) int
heightMM(self) int
hide(self)
hideEvent(self, a0: QHideEvent)
hideTearOffMenu(self)
hovered

hovered(self, action: QAction) [signal]

icon(self) QIcon
inherits(self, classname: str) bool
initPainter(self, painter: QPainter)
initStyleOption(self, option: QStyleOptionMenuItem, action: QAction)
inputMethodEvent(self, a0: QInputMethodEvent)
inputMethodHints(self) Qt.InputMethodHint
inputMethodQuery(self, a0: Qt.InputMethodQuery) Any
insertAction(self, before: QAction, action: QAction)
insertActions(self, before: QAction, actions: Iterable[QAction])
insertMenu(self, before: QAction, menu: QMenu) QAction
insertSection(self, before: QAction, text: str) QAction
insertSection(self, before: QAction, icon: QIcon, text: str) QAction
insertSeparator(self, before: QAction) QAction
installEventFilter(self, a0: QObject)
isActiveWindow(self) bool
isAncestorOf(self, child: QWidget) bool
isEmpty(self) bool
isEnabled(self) bool
isEnabledTo(self, a0: 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, signal: QMetaMethod) bool
isTearOffEnabled(self) bool
isTearOffMenuVisible(self) bool
isVisible(self) bool
isVisibleTo(self, a0: QWidget) bool
isWidgetType(self) bool
isWindow(self) bool
isWindowModified(self) bool
isWindowType(self) bool
keyPressEvent(self, a0: QKeyEvent)
keyReleaseEvent(self, a0: QKeyEvent)
keyboardGrabber() QWidget
killTimer(self, id: int)
layout(self) QLayout
layoutDirection(self) Qt.LayoutDirection
leaveEvent(self, a0: QEvent)
locale(self) QLocale
logicalDpiX(self) int
logicalDpiY(self) int
lower(self)
mapFrom(self, a0: QWidget, a1: QPoint) QPoint
mapFrom(self, a0: QWidget, a1: QPointF) QPointF
mapFromGlobal(self, a0: QPoint) QPoint
mapFromGlobal(self, a0: QPointF) QPointF
mapFromParent(self, a0: QPoint) QPoint
mapFromParent(self, a0: QPointF) QPointF
mapTo(self, a0: QWidget, a1: QPoint) QPoint
mapTo(self, a0: QWidget, a1: QPointF) QPointF
mapToGlobal(self, a0: QPoint) QPoint
mapToGlobal(self, a0: QPointF) QPointF
mapToParent(self, a0: QPoint) QPoint
mapToParent(self, a0: QPointF) QPointF
mask(self) QRegion
maximumHeight(self) int
maximumSize(self) QSize
maximumWidth(self) int
menuAction(self) QAction
metaObject(self) QMetaObject
metric(self, a0: QPaintDevice.PaintDeviceMetric) int
minimumHeight(self) int
minimumSize(self) QSize
minimumSizeHint(self) QSize
minimumWidth(self) int
mouseDoubleClickEvent(self, a0: QMouseEvent)
mouseGrabber() QWidget
mouseMoveEvent(self, a0: QMouseEvent)
mousePressEvent(self, a0: QMouseEvent)
mouseReleaseEvent(self, a0: QMouseEvent)
move(self, a0: QPoint)
move(self, ax: int, ay: int) None
moveEvent(self, a0: QMoveEvent)
moveToThread(self, thread: QThread)
nativeEvent(self, eventType: QByteArray, message: PyQt6.sip.voidptr) Tuple[bool, PyQt6.sip.voidptr]
nativeParentWidget(self) QWidget
nextInFocusChain(self) QWidget
normalGeometry(self) QRect
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

overrideWindowFlags(self, type: Qt.WindowType)
overrideWindowState(self, state: Qt.WindowState)
paintEngine(self) QPaintEngine
paintEvent(self, a0: QPaintEvent)
paintingActive(self) bool
palette(self) QPalette
parent(self) QObject
parentWidget(self) QWidget
physicalDpiX(self) int
physicalDpiY(self) int
popup(self, p: QPoint, action: typing.Optional[QAction] = None)
pos(self) QPoint
previousInFocusChain(self) QWidget
property(self, name: 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, signal: PYQT_SIGNAL) int
rect(self) QRect
releaseKeyboard(self)
releaseMouse(self)
releaseShortcut(self, id: int)
removeAction(self, action: QAction)
removeEventFilter(self, a0: QObject)
render(self, target: QPaintDevice, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: QWidget.RenderFlag = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren))
render(self, painter: QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: QWidget.RenderFlag = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren)) None
repaint(self)
repaint(self, x: int, y: int, w: int, h: int) None
repaint(self, a0: QRect) None
repaint(self, a0: QRegion) None
resize(self, a0: QSize)
resize(self, w: int, h: int) None
resizeEvent(self, a0: QResizeEvent)
restoreGeometry(self, geometry: QByteArray) bool
saveGeometry(self) QByteArray
screen(self) QScreen
scroll(self, dx: int, dy: int)
scroll(self, dx: int, dy: int, a2: QRect) None
sender(self) QObject
senderSignalIndex(self) int
separatorsCollapsible(self) bool
setAcceptDrops(self, on: bool)
setAccessibleDescription(self, description: str)
setAccessibleName(self, name: str)
setActiveAction(self, act: QAction)
setAttribute(self, attribute: Qt.WidgetAttribute, on: bool = True)
setAutoFillBackground(self, enabled: bool)
setBackgroundRole(self, a0: QPalette.ColorRole)
setBaseSize(self, basew: int, baseh: int)
setBaseSize(self, s: QSize) None
setContentsMargins(self, left: int, top: int, right: int, bottom: int)
setContentsMargins(self, margins: QMargins) None
setContextMenuPolicy(self, policy: Qt.ContextMenuPolicy)
setCursor(self, a0: Union[QCursor, Qt.CursorShape])
setDefaultAction(self, a0: QAction)
setDisabled(self, a0: bool)
setEnabled(self, a0: bool)
setFixedHeight(self, h: int)
setFixedSize(self, a0: QSize)
setFixedSize(self, w: int, h: int) None
setFixedWidth(self, w: int)
setFocus(self)
setFocus(self, reason: Qt.FocusReason) None
setFocusPolicy(self, policy: Qt.FocusPolicy)
setFocusProxy(self, a0: QWidget)
setFont(self, a0: QFont)
setForegroundRole(self, a0: QPalette.ColorRole)
setGeometry(self, a0: QRect)
setGeometry(self, ax: int, ay: int, aw: int, ah: int) None
setGraphicsEffect(self, effect: QGraphicsEffect)
setHidden(self, hidden: bool)
setIcon(self, icon: QIcon)
setInputMethodHints(self, hints: Qt.InputMethodHint)
setLayout(self, a0: QLayout)
setLayoutDirection(self, direction: Qt.LayoutDirection)
setLocale(self, locale: QLocale)
setMask(self, a0: QBitmap)
setMask(self, a0: QRegion) None
setMaximumHeight(self, maxh: int)
setMaximumSize(self, maxw: int, maxh: int)
setMaximumSize(self, s: QSize) None
setMaximumWidth(self, maxw: int)
setMinimumHeight(self, minh: int)
setMinimumSize(self, minw: int, minh: int)
setMinimumSize(self, s: QSize) None
setMinimumWidth(self, minw: int)
setMouseTracking(self, enable: bool)
setNoReplayFor(self, widget: QWidget)
setObjectName(self, name: str)
setPalette(self, a0: QPalette)
setParent(self, parent: QWidget)
setParent(self, parent: QWidget, f: Qt.WindowType) None
setProperty(self, name: str, value: Any) bool
setScreen(self, a0: QScreen)
setSeparatorsCollapsible(self, collapse: bool)
setShortcutAutoRepeat(self, id: int, enabled: bool = True)
setShortcutEnabled(self, id: int, enabled: bool = True)
setSizeIncrement(self, w: int, h: int)
setSizeIncrement(self, s: QSize) None
setSizePolicy(self, a0: QSizePolicy)
setSizePolicy(self, hor: QSizePolicy.Policy, ver: QSizePolicy.Policy) None
setStatusTip(self, a0: str)
setStyle(self, a0: QStyle)
setStyleSheet(self, styleSheet: str)
setTabOrder(a0: QWidget, a1: QWidget)
setTabletTracking(self, enable: bool)
setTearOffEnabled(self, a0: bool)
setTitle(self, title: str)
setToolTip(self, a0: str)
setToolTipDuration(self, msec: int)
setToolTipsVisible(self, visible: bool)
setUpdatesEnabled(self, enable: bool)
setVisible(self, visible: bool)
setWhatsThis(self, a0: str)
setWindowFilePath(self, filePath: str)
setWindowFlag(self, a0: Qt.WindowType, on: bool = True)
setWindowFlags(self, type: Qt.WindowType)
setWindowIcon(self, icon: QIcon)
setWindowIconText(self, a0: str)
setWindowModality(self, windowModality: Qt.WindowModality)
setWindowModified(self, a0: bool)
setWindowOpacity(self, level: float)
setWindowRole(self, a0: str)
setWindowState(self, state: Qt.WindowState)
setWindowTitle(self, a0: str)
sharedPainter(self) QPainter
showEvent(self, a0: QShowEvent)
showFullScreen(self)
showMaximized(self)
showMinimized(self)
showNormal(self)
showTearOffMenu(self)
showTearOffMenu(self, pos: QPoint) None
signalsBlocked(self) bool
size(self) QSize
sizeHint(self) QSize
sizeIncrement(self) QSize
sizePolicy(self) QSizePolicy
stackUnder(self, a0: QWidget)
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
statusTip(self) str
style(self) QStyle
styleSheet(self) str
tabletEvent(self, a0: QTabletEvent)
testAttribute(self, attribute: Qt.WidgetAttribute) bool
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
title(self) str
toolTip(self) str
toolTipDuration(self) int
toolTipsVisible(self) bool
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
triggered

triggered(self, action: QAction) [signal]

underMouse(self) bool
ungrabGesture(self, type: Qt.GestureType)
unsetCursor(self)
unsetLayoutDirection(self)
unsetLocale(self)
update(self)
update(self, a0: QRect) None
update(self, a0: QRegion) None
update(self, ax: int, ay: int, aw: int, ah: int) None
updateGeometry(self)
updateMicroFocus(self, query: Qt.InputMethodQuery = Qt.ImQueryAll)
updatesEnabled(self) bool
visibleRegion(self) QRegion
whatsThis(self) str
wheelEvent(self, a0: QWheelEvent)
width(self) int
widthMM(self) int
winId(self) PyQt6.sip.voidptr
window(self) QWidget
windowFilePath(self) str
windowFlags(self) Qt.WindowType
windowHandle(self) QWindow
windowIcon(self) QIcon
windowIconChanged

windowIconChanged(self, icon: QIcon) [signal]

windowIconText(self) str
windowIconTextChanged

windowIconTextChanged(self, iconText: str) [signal]

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

windowTitleChanged(self, title: str) [signal]

windowType(self) Qt.WindowType
x(self) int
y(self) int
class schrodinger.ui.two_d_viewer.TwoDTableDelegate(viewer, tableview, tablemodel)

Bases: schrodinger.ui.qt.table.GenericViewerDelegate

__init__(viewer, tableview, tablemodel)
Parameters
  • tableview (ViewerTable) – Table this delegate paints to

  • tablemodel (StructureDataViewerModel) – DEPRECATED Model containing the data this delegate paints This parameter should not be used, because a delegate should only get information from a QModelIndex, not a model directly

paint(painter, option, index)

This handles the logic behind painting/not-painting when the scrollbar is being dragged.

hideStructureTooltip()
EditNextItem = 1
EditPreviousItem = 2
class EndEditHint(value)

Bases: enum.Enum

An enumeration.

NoHint = 0
EditNextItem = 1
EditPreviousItem = 2
SubmitModelCache = 3
RevertModelCache = 4
NoHint = 0
RevertModelCache = 4
SubmitModelCache = 3
blockSignals(self, b: bool) bool
childEvent(self, a0: QChildEvent)
children(self) List[QObject]
closeEditor

closeEditor(self, editor: QWidget, hint: QAbstractItemDelegate.EndEditHint = QAbstractItemDelegate.NoHint) [signal]

commitData

commitData(self, editor: QWidget) [signal]

connectNotify(self, signal: QMetaMethod)
createEditor(self, parent: QWidget, option: QStyleOptionViewItem, index: QModelIndex) QWidget
customEvent(self, a0: QEvent)
deleteLater(self)
destroyEditor(self, editor: QWidget, index: QModelIndex)
destroyed

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

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
drawBackground(self, painter: QPainter, option: QStyleOptionViewItem, index: QModelIndex)
drawCheck(self, painter: QPainter, option: QStyleOptionViewItem, rect: QRect, state: Qt.CheckState)
drawDecoration(self, painter: QPainter, option: QStyleOptionViewItem, rect: QRect, pixmap: QPixmap)
drawDisplay(self, painter: QPainter, option: QStyleOptionViewItem, rect: QRect, text: str)
drawFocus(self, painter: QPainter, option: QStyleOptionViewItem, rect: QRect)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
editorEvent(self, event: QEvent, model: QAbstractItemModel, option: QStyleOptionViewItem, index: QModelIndex) bool
event(self, a0: QEvent) bool
eventFilter(self, object: QObject, event: QEvent) bool
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
hasClipping(self) bool
helpEvent(self, event: QHelpEvent, view: QAbstractItemView, option: QStyleOptionViewItem, index: QModelIndex) bool
inherits(self, classname: str) bool
installEventFilter(self, a0: QObject)
isSignalConnected(self, signal: QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
itemEditorFactory(self) QItemEditorFactory
killTimer(self, id: int)
metaObject(self) QMetaObject
moveToThread(self, thread: QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

paintWait()

Returns if we are drawing during while the scrollbar is dragged.

parent(self) QObject
property(self, name: 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, signal: PYQT_SIGNAL) int
removeEventFilter(self, a0: QObject)
sender(self) QObject
senderSignalIndex(self) int
setClipping(self, clip: bool)
setEditorData(self, editor: QWidget, index: QModelIndex)
setItemEditorFactory(self, factory: QItemEditorFactory)
setModelData(self, editor: QWidget, model: QAbstractItemModel, index: QModelIndex)
setObjectName(self, name: str)
setPaintWait(val)

Use this function to turn on/off delaying drawing of cells until the scrollbar is not being used. This may be useful in CPU intensive cell-drawing delegates.

setParent(self, a0: QObject)
setProperty(self, name: str, value: Any) bool
signalsBlocked(self) bool
sizeHint(self, option: QStyleOptionViewItem, index: QModelIndex) QSize
sizeHintChanged

sizeHintChanged(self, a0: QModelIndex) [signal]

startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
updateEditorGeometry(self, editor: QWidget, option: QStyleOptionViewItem, index: QModelIndex)
class schrodinger.ui.two_d_viewer.TwoDViewer(parent=None)

Bases: PyQt6.QtWidgets.QFrame

Embeddable 2D Viewer, that contains:

  1. Main table, with a vertical scroll bar

  2. “Change view” pull-down menu

  3. Text “Drag cells to reorder. Right-click for more options.”

  4. Reference pull-down menu with “Align All” button

  5. Transformation options

  6. Generate report options

Variables

enable_maestro_features (bool) – Enables maestro connected features, inclusion in project table and import functionality

enable_maestro_features: bool = False
PROGRESS_STRUCT_COUNT = 1000
__init__(parent=None)
onShowHideActionsToggled(checked)

Show or hide the actions section.

populateSaveExportMenu()
populateViewMenu()
neutralizeToggled(on)

Called when the “Show Neutral Form” menu item is toggled.

generateNeutralizedStates()

For each loaded structure, generate the neuralized form, if not already present.

linkSelectionAndInclusionToggled(on)
displayPropsDialog()

Open CT properties dialog box.

showPropNames(selected_props, show_names, title_caps)
getPropertiesToShow()

Return a list of (property data name, whether to include property name) for each property that should be rendered below the 2D image.

atomPropDialog()

Open atom annotation dialog box.

atomPropChanged(prop)
openDisplayPreferences()

Open the Maestro’s preference dialog, to the image display tab.

columnActionSelected(item_action)
synchronizePreferencesFromMaestro()

Update the 2D Viewer’s preferences to the Maestro’s preferences.

info(text, preferences=None, key='')
warning(text, preferences=None, key='')
setWaitCursor()
restoreCursor()
status(text='')

Set the status label to the specified text.

commandCallback(command)

Called by Maestro when a command is issued, and is used to update the 2D Viewer preferences when Maestro’s preferences change.

workspaceChanged(what_changed)
copyToClipboard(cell)
setupPanel()

Setup the GUI

eventFilter(self, a0: QObject, a1: QEvent) bool
updatePreviousAndNextButtons()

Enable or disable “<” and “>” buttons as needed.

getIncludeToggleOffset()
paintOneCell(painter, cell, pic, cell_rect, exporting)

Paint the given QPicture of the 2D structure, plus properties and inclusion icon to the specified painter.

NOTE: For large structures, pic will contain rendering of text “Too many atoms to display: X” instead of the 2D image. If the structure failed to render, the pic will contain only white background (as of 9/11/19).

getPropsToShowForCell(cell)

Return a list of (property name, value) for properties to be reported for the given cell.

calculatePropertiesCoordinates(cell, rect)

Returns a list of (propname, value, top_y, bottom_y) for all properties that are to be displayed to the cell. This information is then used for drawing properties and for displaying tool tips. # Ev:91560

keyPressEvent(event)

Will get called when a key is pressed

mark(ignored=None)
setNumColumns(new_num_cols)
cellDoubleClicked(item)
toggleZoomView()
previousStructure()
nextStructure()
rotateLeft()
rotateRight()
flipHorizontal()
flipVertical()
selectOnlyCellIndex(index)

Select only the cell with the given index

selectOnlyCellI(i)
showZoomCellStatus()

Show the group info in the status field.

enterZoomView()
exitZoomView()
zoomContextMenuRequested(pos)
inZoomMode()

Return True if currently in zoom (single structure) mode.

getZoomCell()

Return the Cell object for the currently zoomed cell.

gridContextMenuRequested(pos)

Handle the display of contextual menu when the user right-clicks on a row in the table.

showContextMenu(cell)

Show contextual menu for the given 2D cell, at the current position of the mouse cursor.

tableSelectionChanged(selected, deselected)

Called by Qt when table selection is changed

includeSelectedCellsEntries()

Include all selected cell’s entries in the Workspace, and exclude any other entries.

updateReferenceMenu()
updateInfoLabel()

Update the label that shows how many structure are loaded, and how many are selected.

showEntryIds(entry_ids_to_show)

Populate the table with the given entry IDs.

populateTableWithProgress(st_iter, count, dialog_text, disable_auto=False)

Populate the table with the structure iterator and launch a progress if there is a certain amount of structures.

Parameters
  • st_iter (Iterator[Structure, int]) – generator of structures and entry id

  • count (int) – total count of structures

  • dialog_text (str) – progress text displayed in dialog

  • disable_auto (bool) – whether to disable the auto update checkbox when user cancels import

calculatePropertyPrecisions()
populateTableFromStructures(st_iterator)
generateCellForEntry(eid, st)

Update the cell for the specified entry (if loaded) to the latest structure present in the PT.

alignAllToReference()
referenceChanged(i)
setCellAsReference(cell)

Called when “Set Structure as Reference” is selected from contextual menu.

refreshTable()

Redraw the table (if in grid view) or the zoom widget (if in single structure view).

propsChanged()
synchFromFile(infile)

Initializes the 2D viewer from the input file.

readStructsFromFile(infile)

Generate structures from the input file.

Parameters

infile – input file

quitPanel()

It gets called when panel quits (not just gets hidden)

clearTable()
setDefaults()

Reset the GUI

getSelectedCell()

Returns the selected cell. Should only be used when only one is selected Raises an ValueError if no cells are selected.

iterateOverSelectedIs()

One by one, return index (to the model) of selected cells.

iterateOverSelectedCells()

Iterator for all selected cells (sorted)

getSelectedEntryIds()

Return a list of entry IDs for selected cells.

getNumCells()

Return the number of cells that is currently loaded into the panel.

getAllCells()

Return the list of Cell objects stored in the model.

getStructToRender(cell)

Return the Structure object for this cell. Protein atoms will be excluded.

removeSelectedFromTable()

Remove selected cells from the 2D Viewer table.

cellClicked(index, x, y)

Called for mouse clicks in the cell

exportImages()
exportStructures()
exportToPdfFile(outfile)
exportToHtml(outfile)
exportToPngFile(outfile)

Export all structures to one or several PNG files. Derive base name from given file name.

exportTo2dSdFile(outfile)

Export all structures to a 2D SD file.

exportTo3dSdWithSmilesFile(outfile)

Export all structures to the given 3D SD file, with SMILES string set as a property.

numSelectedCells()

Returns number of selected cells. This method is optimized for speed.

getKplsData(st)

Calculate list of color for KPLS annotations, atomic factors, and predicted value. Returns empty lists if 2D Viewer was not opened via AutoQSAR panel.

Parameters

st (structure.Structure) – Structure to process

Returns

List of atom colors, List of factors, predicted activity

Return type

(list, list, float or None)

getPropertyLabels(st)

Calculate list of strings for property annotations. Returns empty list if there’s nothing to display

loadRendererForCell(cell)

Return sketcher.Renderer class, populated with structure from the given cell. Returns None if structure has too many atoms.

generatePicFromCell(cell)

Generate QPicture of the 2D structure of the cell. If structure has too many atoms, “Too many atoms to display: X” will be drawn.

getPictureForCell(cell)

Return a QPicture object for the given cell. Cached picture is used if present - if not, new QPicture is generated and cached in the delegate.

generate2dCoords(cell, st, include_hs)

Generate 2D coordinates for the given cell. If it’s a reference, or no alignment to reference is done, coordinates are based on the cell entry’s 3D coordinates. If there is a reference present, and cell is aligned to it, the reference 3D structure is used as template.

Parameters

include_hs (bool) – Whether to include explicit hydrogens

getImageFromPic(pic, dimensions=None, transparent=False)

Generates a QImage from the given QPicture.

Parameters
  • pic (QtGui.QPicture) – QPicture to render

  • dimensions ((int, int)) – Width and height of the image to produce. if None, QPicture’s bounding rect will be used for sizing, and image size will depend on size of the structure - larger structures will take up more pixels. Also aspect ratio will NOT be the same for all images.

  • transparent (bool) – Whether to use transparent background instead of white.

generateHtml(outfile)

Generates the HTML file from the saved images

generatePdf(outfile)

Generates the PDF file from the saved images.

Parameters

outfile (str) – Path to the PDF file to generate.

clearAutQsarModel()

Clear AutQSAR model.

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

Bases: enum.Enum

An enumeration.

PdmWidth = 1
PdmHeight = 2
PdmWidthMM = 3
PdmHeightMM = 4
PdmNumColors = 5
PdmDepth = 6
PdmDpiX = 7
PdmDpiY = 8
PdmPhysicalDpiX = 9
PdmPhysicalDpiY = 10
PdmDevicePixelRatio = 11
PdmDevicePixelRatioScaled = 12
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(value)

Bases: enum.Flag

An enumeration.

DrawWindowBackground = 1
DrawChildren = 2
IgnoreMask = 4
class Shadow(value)

Bases: enum.IntEnum

An enumeration.

Plain = 16
Raised = 32
Sunken = 48
Shadow_Mask = 240
class Shape(value)

Bases: enum.IntEnum

An enumeration.

NoFrame = 0
Box = 1
Panel = 2
WinPanel = 3
HLine = 4
VLine = 5
StyledPanel = 6
Shape_Mask = 15
class StyleMask(value)

Bases: enum.Enum

An enumeration.

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

customContextMenuRequested(self, pos: QPoint) [signal]

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

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

devType(self) int
devicePixelRatio(self) float
devicePixelRatioF(self) float
devicePixelRatioFScale() float
disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dragEnterEvent(self, a0: QDragEnterEvent)
dragLeaveEvent(self, a0: QDragLeaveEvent)
dragMoveEvent(self, a0: QDragMoveEvent)
drawFrame(self, a0: QPainter)
dropEvent(self, a0: QDropEvent)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
effectiveWinId(self) PyQt6.sip.voidptr
ensurePolished(self)
enterEvent(self, event: QEnterEvent)
event(self, e: QEvent) bool
find(a0: PyQt6.sip.voidptr) QWidget
findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
focusInEvent(self, a0: QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, next: bool) bool
focusOutEvent(self, a0: 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
grab(self, rectangle: QRect = QRect(QPoint(0, 0), QSize(- 1, - 1))) QPixmap
grabGesture(self, type: Qt.GestureType, flags: Qt.GestureFlag = Qt.GestureFlags())
grabKeyboard(self)
grabMouse(self)
grabMouse(self, a0: Union[QCursor, Qt.CursorShape]) None
grabShortcut(self, key: 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, a0: int) int
heightMM(self) int
hide(self)
hideEvent(self, a0: QHideEvent)
inherits(self, classname: str) bool
initPainter(self, painter: QPainter)
initStyleOption(self, option: QStyleOptionFrame)
inputMethodEvent(self, a0: QInputMethodEvent)
inputMethodHints(self) Qt.InputMethodHint
inputMethodQuery(self, a0: Qt.InputMethodQuery) Any
insertAction(self, before: QAction, action: QAction)
insertActions(self, before: QAction, actions: Iterable[QAction])
installEventFilter(self, a0: QObject)
isActiveWindow(self) bool
isAncestorOf(self, child: QWidget) bool
isEnabled(self) bool
isEnabledTo(self, a0: 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, signal: QMetaMethod) bool
isVisible(self) bool
isVisibleTo(self, a0: QWidget) bool
isWidgetType(self) bool
isWindow(self) bool
isWindowModified(self) bool
isWindowType(self) bool
keyReleaseEvent(self, a0: QKeyEvent)
keyboardGrabber() QWidget
killTimer(self, id: int)
layout(self) QLayout
layoutDirection(self) Qt.LayoutDirection
leaveEvent(self, a0: QEvent)
lineWidth(self) int
locale(self) QLocale
logicalDpiX(self) int
logicalDpiY(self) int
lower(self)
mapFrom(self, a0: QWidget, a1: QPoint) QPoint
mapFrom(self, a0: QWidget, a1: QPointF) QPointF
mapFromGlobal(self, a0: QPoint) QPoint
mapFromGlobal(self, a0: QPointF) QPointF
mapFromParent(self, a0: QPoint) QPoint
mapFromParent(self, a0: QPointF) QPointF
mapTo(self, a0: QWidget, a1: QPoint) QPoint
mapTo(self, a0: QWidget, a1: QPointF) QPointF
mapToGlobal(self, a0: QPoint) QPoint
mapToGlobal(self, a0: QPointF) QPointF
mapToParent(self, a0: QPoint) QPoint
mapToParent(self, a0: QPointF) QPointF
mask(self) QRegion
maximumHeight(self) int
maximumSize(self) QSize
maximumWidth(self) int
metaObject(self) QMetaObject
metric(self, a0: QPaintDevice.PaintDeviceMetric) int
midLineWidth(self) int
minimumHeight(self) int
minimumSize(self) QSize
minimumSizeHint(self) QSize
minimumWidth(self) int
mouseDoubleClickEvent(self, a0: QMouseEvent)
mouseGrabber() QWidget
mouseMoveEvent(self, a0: QMouseEvent)
mousePressEvent(self, a0: QMouseEvent)
mouseReleaseEvent(self, a0: QMouseEvent)
move(self, a0: QPoint)
move(self, ax: int, ay: int) None
moveEvent(self, a0: QMoveEvent)
moveToThread(self, thread: QThread)
nativeEvent(self, eventType: QByteArray, message: PyQt6.sip.voidptr) Tuple[bool, PyQt6.sip.voidptr]
nativeParentWidget(self) QWidget
nextInFocusChain(self) QWidget
normalGeometry(self) QRect
objectName(self) str
objectNameChanged

objectNameChanged(self, objectName: str) [signal]

overrideWindowFlags(self, type: Qt.WindowType)
overrideWindowState(self, state: Qt.WindowState)
paintEngine(self) QPaintEngine
paintEvent(self, a0: 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, name: 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, signal: PYQT_SIGNAL) int
rect(self) QRect
releaseKeyboard(self)
releaseMouse(self)
releaseShortcut(self, id: int)
removeAction(self, action: QAction)
removeEventFilter(self, a0: QObject)
render(self, target: QPaintDevice, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: QWidget.RenderFlag = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren))
render(self, painter: QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: QWidget.RenderFlag = QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren)) None
repaint(self)
repaint(self, x: int, y: int, w: int, h: int) None
repaint(self, a0: QRect) None
repaint(self, a0: QRegion) None
resize(self, a0: QSize)
resize(self, w: int, h: int) None
resizeEvent(self, a0: QResizeEvent)
restoreGeometry(self, geometry: QByteArray) bool
saveGeometry(self) QByteArray
screen(self) QScreen
scroll(self, dx: int, dy: int)
scroll(self, dx: int, dy: int, a2: QRect) None
sender(self) QObject
senderSignalIndex(self) int
setAcceptDrops(self, on: bool)
setAccessibleDescription(self, description: str)
setAccessibleName(self, name: str)
setAttribute(self, attribute: Qt.WidgetAttribute, on: bool = True)
setAutoFillBackground(self, enabled: bool)
setAutoQsarModel(kpls_file, model_id, fit_prop)

Set the KPLS model to be used for visualization. If set to (None, None) clear the KPLS visualization model. :param kpls_file: filename for kpls.tar.gz file from model :type kpls_file: str :param model_id: current model name or factor index :type model_id: str or int :param fit_prop: The name of the predicted (y) property. :type fit_prop: str

setBackgroundRole(self, a0: QPalette.ColorRole)
setBaseSize(self, basew: int, baseh: int)
setBaseSize(self, s: QSize) None
setContentsMargins(self, left: int, top: int, right: int, bottom: int)
setContentsMargins(self, margins: QMargins) None
setContextMenuPolicy(self, policy: Qt.ContextMenuPolicy)
setCursor(self, a0: Union[QCursor, Qt.CursorShape])
setDisabled(self, a0: bool)
setEnabled(self, a0: bool)
setFixedHeight(self, h: int)
setFixedSize(self, a0: QSize)
setFixedSize(self, w: int, h: int) None
setFixedWidth(self, w: int)
setFocus(self)
setFocus(self, reason: Qt.FocusReason) None
setFocusPolicy(self, policy: Qt.FocusPolicy)
setFocusProxy(self, a0: QWidget)
setFont(self, a0: QFont)
setForegroundRole(self, a0: QPalette.ColorRole)
setFrameRect(self, a0: QRect)
setFrameShadow(self, a0: QFrame.Shadow)
setFrameShape(self, a0: QFrame.Shape)
setFrameStyle(self, a0: int)
setGeometry(self, a0: QRect)
setGeometry(self, ax: int, ay: int, aw: int, ah: int) None
setGraphicsEffect(self, effect: QGraphicsEffect)
setHidden(self, hidden: bool)
setInputMethodHints(self, hints: Qt.InputMethodHint)
setLayout(self, a0: QLayout)
setLayoutDirection(self, direction: Qt.LayoutDirection)
setLineWidth(self, a0: int)
setLocale(self, locale: QLocale)
setMask(self, a0: QBitmap)
setMask(self, a0: QRegion) None
setMaximumHeight(self, maxh: int)
setMaximumSize(self, maxw: int, maxh: int)
setMaximumSize(self, s: QSize) None
setMaximumWidth(self, maxw: int)
setMidLineWidth(self, a0: int)
setMinimumHeight(self, minh: int)
setMinimumSize(self, minw: int, minh: int)
setMinimumSize(self, s: QSize) None
setMinimumWidth(self, minw: int)
setMouseTracking(self, enable: bool)
setObjectName(self, name: str)
setPalette(self, a0: QPalette)
setParent(self, parent: QWidget)
setParent(self, parent: QWidget, f: Qt.WindowType) None
setProperty(self, name: str, value: Any) bool
setScreen(self, a0: QScreen)
setShortcutAutoRepeat(self, id: int, enabled: bool = True)
setShortcutEnabled(self, id: int, enabled: bool = True)
setSizeIncrement(self, w: int, h: int)
setSizeIncrement(self, s: QSize) None
setSizePolicy(self, a0: QSizePolicy)
setSizePolicy(self, hor: QSizePolicy.Policy, ver: QSizePolicy.Policy) None
setStatusTip(self, a0: str)
setStyle(self, a0: QStyle)
setStyleSheet(self, styleSheet: str)
setTabOrder(a0: QWidget, a1: QWidget)
setTabletTracking(self, enable: bool)
setToolTip(self, a0: str)
setToolTipDuration(self, msec: int)
setUpdatesEnabled(self, enable: bool)
setVisible(self, visible: bool)
setWhatsThis(self, a0: str)
setWindowFilePath(self, filePath: str)
setWindowFlag(self, a0: Qt.WindowType, on: bool = True)
setWindowFlags(self, type: Qt.WindowType)
setWindowIcon(self, icon: QIcon)
setWindowIconText(self, a0: str)
setWindowModality(self, windowModality: Qt.WindowModality)
setWindowModified(self, a0: bool)
setWindowOpacity(self, level: float)
setWindowRole(self, a0: str)
setWindowState(self, state: Qt.WindowState)
setWindowTitle(self, a0: str)
sharedPainter(self) QPainter
show(self)
showEvent(self, a0: 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, a0: QWidget)
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
statusTip(self) str
style(self) QStyle
styleSheet(self) str
tabletEvent(self, a0: QTabletEvent)
testAttribute(self, attribute: Qt.WidgetAttribute) bool
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toolTip(self) str
toolTipDuration(self) int
tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str
underMouse(self) bool
ungrabGesture(self, type: Qt.GestureType)
unsetCursor(self)
unsetLayoutDirection(self)
unsetLocale(self)
update(self)
update(self, a0: QRect) None
update(self, a0: QRegion) None
update(self, ax: int, ay: int, aw: int, ah: int) None
updateGeometry(self)
updateMicroFocus(self, query: Qt.InputMethodQuery = Qt.ImQueryAll)
updatesEnabled(self) bool
visibleRegion(self) QRegion
whatsThis(self) str
wheelEvent(self, a0: QWheelEvent)
width(self) int
widthMM(self) int
winId(self) PyQt6.sip.voidptr
window(self) QWidget
windowFilePath(self) str
windowFlags(self) Qt.WindowType
windowHandle(self) QWindow
windowIcon(self) QIcon
windowIconChanged

windowIconChanged(self, icon: QIcon) [signal]

windowIconText(self) str
windowIconTextChanged

windowIconTextChanged(self, iconText: str) [signal]

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

windowTitleChanged(self, title: str) [signal]

windowType(self) Qt.WindowType
x(self) int
y(self) int