schrodinger.ui.qt.rama module

A Ramachandran Plot widget, along with some tools for manipulating structures/points.

Usage:

Rama(parent)

Schrodinger L.L.C.

class schrodinger.ui.qt.rama.RamaFigure(width=5, height=4, dpi=100, toolbar=True, layout=None, expanding=True, **kwargs)

Bases: schrodinger.ui.qt.smatplotlib.SmatplotlibCanvas

sizeHint(self) QSize
miniumSizeHint()
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
__init__(width=5, height=4, dpi=100, toolbar=True, layout=None, expanding=True, **kwargs)
Parameters
  • width (number) – width of the plot Figure in inches

  • height (number) – height of the plot Figure in inches

  • dpi (int) – resolution of the plot

  • toolbar (boolean) – True if the toolbar should be created, but the parent parameter must be supplied in this case

  • layout (QLayout object) – If layout is supplied, the toolbar and canvas will be placed in it.

Extra keyword arguments are passed to the toolbar function

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
blit(bbox=None)

Blit the canvas in bbox (default entire canvas).

blockSignals(self, b: bool) bool
buffer_rgba()

Get the image as a memoryview to the renderer’s buffer.

draw must be called at least once before this function will work and to update the renderer for any subsequent changes to the Figure.

property button_pick_id
button_press_event(x, y, button, dblclick=False, guiEvent=None)

Callback processing for mouse button press events.

Backend derived classes should call this function on any mouse button press. (x, y) are the canvas coords ((0, 0) is lower left). button and key are as defined in MouseEvent.

This method will call all functions connected to the ‘button_press_event’ with a MouseEvent instance.

button_release_event(x, y, button, guiEvent=None)

Callback processing for mouse button release events.

Backend derived classes should call this function on any mouse button release.

This method will call all functions connected to the ‘button_release_event’ with a MouseEvent instance.

xfloat

The canvas coordinates where 0=left.

yfloat

The canvas coordinates where 0=bottom.

guiEvent

The native UI event that generated the Matplotlib event.

buttond = {<MouseButton.LeftButton: 1>: <MouseButton.LEFT: 1>, <MouseButton.RightButton: 2>: <MouseButton.RIGHT: 3>, <MouseButton.MiddleButton: 4>: <MouseButton.MIDDLE: 2>, <MouseButton.XButton1: 8>: <MouseButton.BACK: 8>, <MouseButton.XButton2: 16>: <MouseButton.FORWARD: 9>}
property callbacks
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)
close_event(guiEvent=None)

Pass a CloseEvent to all functions connected to close_event.

colorCount(self) int
connectNotify(self, signal: QMetaMethod)
contentsMargins(self) QMargins
contentsRect(self) QRect
contextMenuEvent(self, a0: QContextMenuEvent)
contextMenuPolicy(self) Qt.ContextMenuPolicy
copy_from_bbox(bbox)
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
property device_pixel_ratio

The ratio of physical to logical pixels used for the canvas on screen.

By default, this is 1, meaning physical and logical pixels are the same size. Subclasses that support High DPI screens may set this property to indicate that said ratio is different. All Matplotlib interaction, unless working directly with the canvas, remains in logical pixels.

disconnect(a0: QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, signal: QMetaMethod)
dragEnterEvent(self, a0: QDragEnterEvent)
dragLeaveEvent(self, a0: QDragLeaveEvent)
dragMoveEvent(self, a0: QDragMoveEvent)
draw()

Render the figure, and queue a request for a Qt draw.

drawAndUpdate(tight_layout=True)

Update canvas and toolbar after plotting.

Parameters

tight_layout (bool) – Whether to apply tight layout after plotting

drawRectangle(rect)
draw_event(renderer)

Pass a DrawEvent to all functions connected to draw_event.

draw_idle()

Queue redraw of the Agg buffer and request Qt paintEvent.

dropEvent(self, a0: QDropEvent)
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
effectiveWinId(self) PyQt6.sip.voidptr
ensurePolished(self)
enterEvent(self, event: QEnterEvent)
enter_notify_event(guiEvent=None, xy=None)

Callback processing for the mouse cursor entering the canvas.

Backend derived classes should call this function when entering canvas.

guiEvent

The native UI event that generated the Matplotlib event.

xy(float, float)

The coordinate location of the pointer when the canvas is entered.

event(self, a0: QEvent) bool
eventFilter(obj, event)

The canvas needs to grab keyboard input in order to reliably tell when a modifier key (shift or control) is down when a mouse button is pressed/released.

Some environments have trouble with passing the control key in events - a control-left-click is often mapped to a right-click. Therefore we do our best to capture on our own when the control key is down. Note that even this breaks for multiple control-clicks on Linux running under VMWare Fusion on Macs, because VMWare by default “lifts” the control key after the first click.

Parameters
  • obj (not used) – not used

  • event (QEvent) – the event object

events = ['resize_event', 'draw_event', 'key_press_event', 'key_release_event', 'button_press_event', 'button_release_event', 'scroll_event', 'motion_notify_event', 'pick_event', 'figure_enter_event', 'figure_leave_event', 'axes_enter_event', 'axes_leave_event', 'close_event']
filetypes = {'eps': 'Encapsulated Postscript', 'jpeg': 'Joint Photographic Experts Group', 'jpg': 'Joint Photographic Experts Group', 'pdf': 'Portable Document Format', 'pgf': 'PGF code for LaTeX', 'png': 'Portable Network Graphics', 'ps': 'Postscript', 'raw': 'Raw RGBA bitmap', 'rgba': 'Raw RGBA bitmap', 'svg': 'Scalable Vector Graphics', 'svgz': 'Scalable Vector Graphics', 'tif': 'Tagged Image File Format', 'tiff': 'Tagged Image File Format'}
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]
fixed_dpi = None
flush_events()

Flush the GUI events for the figure.

Interactive backends need to reimplement this method.

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
get_default_filename()

Return a string, which includes extension, suitable for use as a default filename.

classmethod get_default_filetype()

Return the default savefig file format as specified in :rc:`savefig.format`.

The returned string does not include a period. This method is overridden in backends that only support a single file type.

get_renderer(cleared=False)
classmethod get_supported_filetypes()

Return dict of savefig file formats supported by this backend.

classmethod get_supported_filetypes_grouped()

Return a dict of savefig file formats supported by this backend, where the keys are a file type name, such as ‘Joint Photographic Experts Group’, and the values are a list of filename extensions used for that filetype, such as [‘jpg’, ‘jpeg’].

get_width_height(*, physical=False)

Return the figure width and height in integral points or pixels.

When the figure is used on High DPI screens (and the backend supports it), the truncation to integers occurs after scaling by the device pixel ratio.

physicalbool, default: False

Whether to return true physical pixels or logical pixels. Physical pixels may be used by backends that support HiDPI, but still configure the canvas using its actual size.

width, heightint

The size of the figure, in points or pixels, depending on the backend.

get_window_title()

[Deprecated] Return the title text of the window containing the figure, or None if there is no window (e.g., a PS backend).

Deprecated since version 3.4: Use FigureManagerBase.get_window_title or GUI-specific methods instead.

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
grab_mouse(ax)

Set the child Axes which is grabbing the mouse events.

Usually called by the widgets themselves. It is an error to call this if the mouse is already grabbed by another axes.

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)
inaxes(xy)

Return the topmost visible Axes containing the point xy.

xy(float, float)

(x, y) pixel positions from left/bottom of the canvas.

Axes or None

The topmost visible axes containing the point, or None if no axes.

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
is_saving()

Return whether the renderer is in the process of saving to a file, rather than rendering for an on-screen buffer.

keyPressEvent(self, a0: QKeyEvent)
keyReleaseEvent(self, a0: QKeyEvent)
key_press_event(key, guiEvent=None)

Pass a KeyEvent to all functions connected to key_press_event.

key_release_event(key, guiEvent=None)

Pass a KeyEvent to all functions connected to key_release_event.

keyboardGrabber() QWidget
killTimer(self, id: int)
layout(self) QLayout
layoutDirection(self) Qt.LayoutDirection
leaveEvent(self, a0: QEvent)
leave_notify_event(guiEvent=None)

Callback processing for the mouse cursor leaving the canvas.

Backend derived classes should call this function when leaving canvas.

guiEvent

The native UI event that generated the Matplotlib event.

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
minumumSizeHint()
motion_notify_event(x, y, guiEvent=None)

Callback processing for mouse movement events.

Backend derived classes should call this function on any motion-notify-event.

This method will call all functions connected to the ‘motion_notify_event’ with a MouseEvent instance.

xfloat

The canvas coordinates where 0=left.

yfloat

The canvas coordinates where 0=bottom.

guiEvent

The native UI event that generated the Matplotlib event.

mouseDoubleClickEvent(self, a0: QMouseEvent)
mouseEventCoords(pos)

Calculate mouse coordinates in physical pixels.

Qt uses logical pixels, but the figure is scaled to physical pixels for rendering. Transform to physical pixels so that all of the down-stream transforms work as expected.

Also, the origin is different and needs to be corrected.

mouseGrabber() QWidget
mouseMoveEvent(self, a0: QMouseEvent)
mousePressEvent(event)

Add in the control modifier key to the button_press_event

Parameters

event (QMouseEvent) – the QMouseEvent that triggered this handler

self._key is matplotlib’s way of storing the modifier keys

mouseReleaseEvent(event)

Add in the control modifier key to the button_release_event

Parameters

event (QMouseEvent) – the QMouseEvent that triggered this handler

self._key is matplotlib’s way of storing the modifier keys

move(self, a0: QPoint)
move(self, ax: int, ay: int) None
moveEvent(self, a0: QMoveEvent)
moveToThread(self, thread: QThread)
mpl_connect(s, func)

Bind function func to event s.

sstr

One of the following events ids:

  • ‘button_press_event’

  • ‘button_release_event’

  • ‘draw_event’

  • ‘key_press_event’

  • ‘key_release_event’

  • ‘motion_notify_event’

  • ‘pick_event’

  • ‘resize_event’

  • ‘scroll_event’

  • ‘figure_enter_event’,

  • ‘figure_leave_event’,

  • ‘axes_enter_event’,

  • ‘axes_leave_event’

  • ‘close_event’.

funccallable

The callback function to be executed, which must have the signature:

def func(event: Event) -> Any

For the location events (button and key press/release), if the mouse is over the axes, the inaxes attribute of the event will be set to the Axes the event occurs is over, and additionally, the variables xdata and ydata attributes will be set to the mouse location in data coordinates. See KeyEvent and MouseEvent for more info.

cid

A connection id that can be used with FigureCanvasBase.mpl_disconnect.

def on_press(event):
    print('you pressed', event.button, event.xdata, event.ydata)

cid = canvas.mpl_connect('button_press_event', on_press)
mpl_disconnect(cid)

Disconnect the callback with id cid.

cid = canvas.mpl_connect('button_press_event', on_press)
# ... later
canvas.mpl_disconnect(cid)
nativeEvent(self, eventType: QByteArray, message: PyQt6.sip.voidptr) Tuple[bool, PyQt6.sip.voidptr]
nativeParentWidget(self) QWidget
new_timer(interval=None, callbacks=None)

Create a new backend-specific subclass of Timer.

This is useful for getting periodic events through the backend’s native event loop. Implemented only for backends with GUIs.

intervalint

Timer interval in milliseconds.

callbackslist[tuple[callable, tuple, dict]]

Sequence of (func, args, kwargs) where func(*args, **kwargs) will be executed by the timer every interval.

Callbacks which return False or 0 will be removed from the timer.

>>> timer = fig.canvas.new_timer(callbacks=[(f1, (1,), {'a': 3})])
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(event)

Copy the image from the Agg canvas to the qt.drawable.

In Qt, all drawing should be done inside of here when a widget is shown onscreen.

paintingActive(self) bool
palette(self) QPalette
parent(self) QObject
parentWidget(self) QWidget
physicalDpiX(self) int
physicalDpiY(self) int
pick(mouseevent)
pick_event(mouseevent, artist, **kwargs)

Callback processing for pick events.

This method will be called by artists who are picked and will fire off PickEvent callbacks registered listeners.

Note that artists are not pickable by default (see Artist.set_picker).

pos(self) QPoint
previousInFocusChain(self) QWidget
print_figure(*args, **kwargs)

Render the figure to hardcopy. Set the figure patch face and edge colors. This is useful because some of the GUIs have a gray figure face color background and you’ll probably want to override this on hardcopy.

filenamestr or path-like or file-like

The file where the figure is saved.

dpifloat, default: :rc:`savefig.dpi`

The dots per inch to save the figure in.

facecolorcolor or ‘auto’, default: :rc:`savefig.facecolor`

The facecolor of the figure. If ‘auto’, use the current figure facecolor.

edgecolorcolor or ‘auto’, default: :rc:`savefig.edgecolor`

The edgecolor of the figure. If ‘auto’, use the current figure edgecolor.

orientation{‘landscape’, ‘portrait’}, default: ‘portrait’

Only currently applies to PostScript printing.

formatstr, optional

Force a specific file format. If not given, the format is inferred from the filename extension, and if that fails from :rc:`savefig.format`.

bbox_inches‘tight’ or Bbox, default: :rc:`savefig.bbox`

Bounding box in inches: only the given portion of the figure is saved. If ‘tight’, try to figure out the tight bbox of the figure.

pad_inchesfloat, default: :rc:`savefig.pad_inches`

Amount of padding around the figure when bbox_inches is ‘tight’.

bbox_extra_artistslist of Artist, optional

A list of extra artists that will be considered when the tight bbox is calculated.

backendstr, optional

Use a non-default backend to render the file, e.g. to render a png file with the “cairo” backend rather than the default “agg”, or a pdf file with the “pgf” backend rather than the default “pdf”. Note that the default backend is normally sufficient. See the-builtin-backends for a list of valid backends for each file format. Custom backends can be referenced as “module://…”.

print_jpeg(filename_or_obj, *args, pil_kwargs=None, **kwargs)

Write the figure to a JPEG file.

filename_or_objstr or path-like or file-like

The file to write to.

pil_kwargsdict, optional

Additional keyword arguments that are passed to PIL.Image.Image.save when saving the figure.

print_jpg(filename_or_obj, *args, pil_kwargs=None, **kwargs)

Write the figure to a JPEG file.

filename_or_objstr or path-like or file-like

The file to write to.

pil_kwargsdict, optional

Additional keyword arguments that are passed to PIL.Image.Image.save when saving the figure.

print_png(filename_or_obj, *args, metadata=None, pil_kwargs=None)

Write the figure to a PNG file.

filename_or_objstr or path-like or file-like

The file to write to.

metadatadict, optional

Metadata in the PNG file as key-value pairs of bytes or latin-1 encodable strings. According to the PNG specification, keys must be shorter than 79 chars.

The PNG specification defines some common keywords that may be used as appropriate:

  • Title: Short (one line) title or caption for image.

  • Author: Name of image’s creator.

  • Description: Description of image (possibly long).

  • Copyright: Copyright notice.

  • Creation Time: Time of original image creation (usually RFC 1123 format).

  • Software: Software used to create the image.

  • Disclaimer: Legal disclaimer.

  • Warning: Warning of nature of content.

  • Source: Device used to create the image.

  • Comment: Miscellaneous comment; conversion from other image format.

Other keywords may be invented for other purposes.

If ‘Software’ is not given, an autogenerated value for Matplotlib will be used. This can be removed by setting it to None.

For more details see the PNG specification.

pil_kwargsdict, optional

Keyword arguments passed to PIL.Image.Image.save.

If the ‘pnginfo’ key is present, it completely overrides metadata, including the default ‘Software’ key.

print_raw(filename_or_obj, *args)
print_rgba(filename_or_obj, *args)
print_tif(filename_or_obj, *, pil_kwargs=None)
print_tiff(filename_or_obj, *, pil_kwargs=None)
print_to_buffer()
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)
release_mouse(ax)

Release the mouse grab held by the Axes ax.

Usually called by the widgets. It is ok to call this even if ax doesn’t have the mouse grab currently.

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
required_interactive_framework = 'qt'
resize(self, a0: QSize)
resize(self, w: int, h: int) None
resizeEvent(self, a0: QResizeEvent)
resize_event()

Pass a ResizeEvent to all functions connected to resize_event.

restoreGeometry(self, geometry: QByteArray) bool
restore_region(region, bbox=None, xy=None)
saveGeometry(self) QByteArray
screen(self) QScreen
scroll(self, dx: int, dy: int)
scroll(self, dx: int, dy: int, a2: QRect) None
scroll_event(x, y, step, guiEvent=None)

Callback processing for scroll events.

Backend derived classes should call this function on any scroll wheel event. (x, y) are the canvas coords ((0, 0) is lower left). button and key are as defined in MouseEvent.

This method will call all functions connected to the ‘scroll_event’ with a MouseEvent instance.

property scroll_pick_id
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)
set_cursor(cursor)

Set the current cursor.

This may have no effect if the backend does not display anything.

If required by the backend, this method should trigger an update in the backend event loop after the cursor is set, as this method may be called e.g. before a long-running task during which the GUI is not updated.

cursorCursors

The cursor to display over the canvas. Note: some backends may change the cursor for the entire window.

set_window_title(title)

[Deprecated] Set the title text of the window containing the figure. Note that this has no effect if there is no window (e.g., a PS backend).

Deprecated since version 3.4: Use FigureManagerBase.set_window_title or GUI-specific methods instead.

sharedPainter(self) QPainter
show(self)
showEvent(self, a0: QShowEvent)
showFullScreen(self)
showMaximized(self)
showMinimized(self)
showNormal(self)
signalsBlocked(self) bool
size(self) QSize
sizeIncrement(self) QSize
sizePolicy(self) QSizePolicy
stackUnder(self, a0: QWidget)
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
start_event_loop(timeout=0)

Start a blocking event loop.

Such an event loop is used by interactive functions, such as ginput and waitforbuttonpress, to wait for events.

The event loop blocks until a callback function triggers stop_event_loop, or timeout is reached.

If timeout is 0 or negative, never timeout.

Only interactive backends need to reimplement this method and it relies on flush_events being properly implemented.

Interactive backends should implement this in a more native way.

staticMetaObject = <PyQt6.QtCore.QMetaObject object>
statusTip(self) str
stop_event_loop(event=None)

Stop the current blocking event loop.

Interactive backends need to reimplement this to match start_event_loop

style(self) QStyle
styleSheet(self) str
supports_blit = True
switch_backends(FigureCanvasClass)

Instantiate an instance of FigureCanvasClass

This is used for backend switching, e.g., to instantiate a FigureCanvasPS from a FigureCanvasGTK. Note, deep copying is not done, so any changes to one of the instances (e.g., setting figure size or line props), will be reflected in the other

tabletEvent(self, a0: QTabletEvent)
testAttribute(self, attribute: Qt.WidgetAttribute) bool
thread(self) QThread
timerEvent(self, a0: QTimerEvent)
toolTip(self) str
toolTipDuration(self) int
tostring_argb()

Get the image as ARGB bytes.

draw must be called at least once before this function will work and to update the renderer for any subsequent changes to the Figure.

tostring_rgb()

Get the image as RGB bytes.

draw must be called at least once before this function will work and to update the renderer for any subsequent changes to the Figure.

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.qt.rama.DihedralSpinBox(layout, command, dtype)

Bases: PyQt6.QtWidgets.QDoubleSpinBox

A DoulbeSpinBox with min/max = -180/180, step=0.1, and takes a layout argument that it places itself in, and a command to call when its value changes.

__init__(layout, command, dtype)
AdaptiveDecimalStepType = 1
class ButtonSymbols(value)

Bases: enum.Enum

An enumeration.

UpDownArrows = 0
PlusMinus = 1
NoButtons = 2
CorrectToNearestValue = 1
CorrectToPreviousValue = 0
class CorrectionMode(value)

Bases: enum.Enum

An enumeration.

CorrectToPreviousValue = 0
CorrectToNearestValue = 1
DefaultStepType = 0
DrawChildren = 2
DrawWindowBackground = 1
IgnoreMask = 4
NoButtons = 2
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
PlusMinus = 1
class RenderFlag(value)

Bases: enum.Flag

An enumeration.

DrawWindowBackground = 1
DrawChildren = 2
IgnoreMask = 4
StepDownEnabled = 2
class StepEnabledFlag(value)

Bases: enum.Flag

An enumeration.

StepNone = 0
StepUpEnabled = 1
StepDownEnabled = 2
StepNone = 0
class StepType(value)

Bases: enum.Enum

An enumeration.

DefaultStepType = 0
AdaptiveDecimalStepType = 1
StepUpEnabled = 1
UpDownArrows = 0
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)
alignment(self) Qt.AlignmentFlag
autoFillBackground(self) bool
backgroundRole(self) QPalette.ColorRole
baseSize(self) QSize
blockSignals(self, b: bool) bool
buttonSymbols(self) QAbstractSpinBox.ButtonSymbols
changeEvent(self, e: 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
cleanText(self) str
clear(self)
clearFocus(self)
clearMask(self)
close(self) bool
closeEvent(self, e: QCloseEvent)
colorCount(self) int
connectNotify(self, signal: QMetaMethod)
contentsMargins(self) QMargins
contentsRect(self) QRect
contextMenuEvent(self, e: QContextMenuEvent)
contextMenuPolicy(self) Qt.ContextMenuPolicy
correctionMode(self) QAbstractSpinBox.CorrectionMode
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)
decimals(self) int
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]
editingFinished

editingFinished(self) [signal]

effectiveWinId(self) PyQt6.sip.voidptr
ensurePolished(self)
enterEvent(self, event: QEnterEvent)
event(self, event: 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]
fixup(self, str: str) str
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
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
hasAcceptableInput(self) bool
hasFocus(self) bool
hasFrame(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, e: QHideEvent)
inherits(self, classname: str) bool
initPainter(self, painter: QPainter)
initStyleOption(self, option: QStyleOptionSpinBox)
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)
interpretText(self)
isAccelerated(self) bool
isActiveWindow(self) bool
isAncestorOf(self, child: QWidget) bool
isEnabled(self) bool
isEnabledTo(self, a0: QWidget) bool
isFullScreen(self) bool
isGroupSeparatorShown(self) bool
isHidden(self) bool
isLeftToRight(self) bool
isMaximized(self) bool
isMinimized(self) bool
isModal(self) bool
isReadOnly(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, e: QKeyEvent)
keyReleaseEvent(self, e: QKeyEvent)
keyboardGrabber() QWidget
keyboardTracking(self) bool
killTimer(self, id: int)
layout(self) QLayout
layoutDirection(self) Qt.LayoutDirection
leaveEvent(self, a0: QEvent)
lineEdit(self) QLineEdit
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
maximum(self) float
maximumHeight(self) int
maximumSize(self) QSize
maximumWidth(self) int
metaObject(self) QMetaObject
metric(self, a0: QPaintDevice.PaintDeviceMetric) int
minimum(self) float
minimumHeight(self) int
minimumSize(self) QSize
minimumSizeHint(self) QSize
minimumWidth(self) int
mouseDoubleClickEvent(self, a0: 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
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, e: QPaintEvent)
paintingActive(self) bool
palette(self) QPalette
parent(self) QObject
parentWidget(self) QWidget
physicalDpiX(self) int
physicalDpiY(self) int
pos(self) QPoint
prefix(self) str
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, e: 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
selectAll(self)
sender(self) QObject
senderSignalIndex(self) int
setAccelerated(self, on: bool)
setAcceptDrops(self, on: bool)
setAccessibleDescription(self, description: str)
setAccessibleName(self, name: str)
setAlignment(self, flag: Qt.AlignmentFlag)
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
setButtonSymbols(self, bs: QAbstractSpinBox.ButtonSymbols)
setContentsMargins(self, left: int, top: int, right: int, bottom: int)
setContentsMargins(self, margins: QMargins) None
setContextMenuPolicy(self, policy: Qt.ContextMenuPolicy)
setCorrectionMode(self, cm: QAbstractSpinBox.CorrectionMode)
setCursor(self, a0: Union[QCursor, Qt.CursorShape])
setDecimals(self, prec: int)
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)
setFrame(self, a0: bool)
setGeometry(self, a0: QRect)
setGeometry(self, ax: int, ay: int, aw: int, ah: int) None
setGraphicsEffect(self, effect: QGraphicsEffect)
setGroupSeparatorShown(self, shown: bool)
setHidden(self, hidden: bool)
setInputMethodHints(self, hints: Qt.InputMethodHint)
setKeyboardTracking(self, kt: bool)
setLayout(self, a0: QLayout)
setLayoutDirection(self, direction: Qt.LayoutDirection)
setLineEdit(self, e: QLineEdit)
setLocale(self, locale: QLocale)
setMask(self, a0: QBitmap)
setMask(self, a0: QRegion) None
setMaximum(self, max: float)
setMaximumHeight(self, maxh: int)
setMaximumSize(self, maxw: int, maxh: int)
setMaximumSize(self, s: QSize) None
setMaximumWidth(self, maxw: int)
setMinimum(self, min: float)
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
setPrefix(self, p: str)
setProperty(self, name: str, value: Any) bool
setRange(self, min: float, max: float)
setReadOnly(self, r: bool)
setScreen(self, a0: QScreen)
setShortcutAutoRepeat(self, id: int, enabled: bool = True)
setShortcutEnabled(self, id: int, enabled: bool = True)
setSingleStep(self, val: float)
setSizeIncrement(self, w: int, h: int)
setSizeIncrement(self, s: QSize) None
setSizePolicy(self, a0: QSizePolicy)
setSizePolicy(self, hor: QSizePolicy.Policy, ver: QSizePolicy.Policy) None
setSpecialValueText(self, s: str)
setStatusTip(self, a0: str)
setStepType(self, stepType: QAbstractSpinBox.StepType)
setStyle(self, a0: QStyle)
setStyleSheet(self, styleSheet: str)
setSuffix(self, s: str)
setTabOrder(a0: QWidget, a1: QWidget)
setTabletTracking(self, enable: bool)
setToolTip(self, a0: str)
setToolTipDuration(self, msec: int)
setUpdatesEnabled(self, enable: bool)
setValue(self, val: float)
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)
setWrapping(self, w: bool)
sharedPainter(self) QPainter
show(self)
showEvent(self, e: QShowEvent)
showFullScreen(self)
showMaximized(self)
showMinimized(self)
showNormal(self)
signalsBlocked(self) bool
singleStep(self) float
size(self) QSize
sizeHint(self) QSize
sizeIncrement(self) QSize
sizePolicy(self) QSizePolicy
specialValueText(self) str
stackUnder(self, a0: QWidget)
startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt6.QtCore.QMetaObject object>
statusTip(self) str
stepBy(self, steps: int)
stepDown(self)
stepEnabled(self) QAbstractSpinBox.StepEnabledFlag
stepType(self) QAbstractSpinBox.StepType
stepUp(self)
style(self) QStyle
styleSheet(self) str
suffix(self) str
tabletEvent(self, a0: QTabletEvent)
testAttribute(self, attribute: Qt.WidgetAttribute) bool
text(self) str
textChanged

textChanged(self, a0: str) [signal]

textFromValue(self, v: float) str
thread(self) QThread
timerEvent(self, e: 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
validate(self, input: str, pos: int) Tuple[QValidator.State, str, int]
value(self) float
valueChanged

valueChanged(self, a0: float) [signal]

valueFromText(self, text: str) float
visibleRegion(self) QRegion
whatsThis(self) str
wheelEvent(self, e: 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
wrapping(self) bool
x(self) int
y(self) int
class schrodinger.ui.qt.rama.RamaContourMixin

Bases: object

Mixin for creating Ramachandran contours

FAVORABLE_COLOR = '#f20000'
ALLOWED_COLOR = '#ffff00'
TICK_SPACING = 30
TEXT_SIZING = 'xx-small'
draw_regions(filename='rama500-general.data')
class schrodinger.ui.qt.rama.Rama(widget, layout, size=450, ticks=30, show_status=True, show_counters=False, zoom_on_pick=True, dpi=100, multiselect=False)

Bases: schrodinger.ui.qt.rama.RamaContourMixin

A class showing a matplotlib plot of the Phi and Psi angles in a helix

DEFAULT_CURSOR = 'crosshair'
DEFAULT_SYMBOL_SIZE = 1
DEF_COLOR = 'black'
GLY_COLOR = 'black'
PRO_COLOR = 'black'
ZOOMSTEP = 10.0
SYMBOL_SCALING_FACTOR = 2
ESC_KEY = 27
class backbone_dihedral

Bases: object

__init__()
__init__(widget, layout, size=450, ticks=30, show_status=True, show_counters=False, zoom_on_pick=True, dpi=100, multiselect=False)

Create a Rama object

Parameters
  • widget (QWidget) – the PyQt widget that ‘owns’ this plot

  • layout (QLayout) – the layout to place the plot into

  • size (int) – size of square plot in pixels, (default=450).

  • dpi (int) – dots per inch resolution of plot (default=100).

  • size – unused, kept for backward compatibility

  • show_status (bool) – If True, cursor location feedback is given in the matplotlib toolbar

  • show_counters (bool) – If True, show controls for changing the Phi and Psi values of the selected dihedral. Only one of multiselect and show_counters can be True.

  • zoom_on_pick (bool) – If True, zoom the Maestro workspace to the dihedral picked

  • multiselect (bool) – If True, the user can pick multiple points with shift/cntl-click. If False (default), only one point can be picked at a time. Only one of multiselect and show_counters can be True.

find_connected_atom(ct, iatom, atname)

Return the atom index with PDB atom type atname attached to iatom in ct, or -1 if no connection is found.

get_connected_pair(ct, iatom, at1name, at2name)

Return a pair of atom indexes, where at1name is attached to iatom and at2name is attached to at1name.

get_weight_symbol(weight)
update_point_faces(indexes)

Update the face colors for points on the plot - faster than doing a complete replot.

Parameters

indexes (list) – List of indexes to recolor. Should be the index of the point in the self.dihedral_list list

update_point_xval(index, xval)

Update the x-value of a point on the plot

Parameters

index (int) – The index of the point in the self.dihedral_list list

update_point_yval(index, yval)

Update the y-value of a point

Parameters

index (int) – The index of the point in the self.dihedral_list list

update_display()
display_structure(ct, CA_list=[])
save()

Store the current phi & psi values of the current point.

This method only makes sense with multiselect == False

revert_to_original()

Set the current point to its original phi & psi values

This method only makes sense with multiselect == False

revert_to_saved()

Set the current point to its previously saved phi & psi values

This method only makes sense with multiselect == False

display_residue(which='all')

Select residues in the workspace corresponding to the given points

Parameters

which (int, None or 'all') – If None, all residues are deselected. If an integer, that integer is taken as the index in the dihedral list to select. If ‘all’, residues for all selected points are selected.

adjust_phi(value)

React to changed value of the Phi spinbox

The method only makes sense with multiselect == False

Parameters

value (float) – new value of the spinbox

adjust_psi(value)

React to changed value of the Psi spinbox

The method only makes sense with multiselect == False

Parameters

value (float) – new value of the spinbox

apply_dihedral(idihedral)

Change the value of a dihedral

Parameters

idihedral (int) – The index of the dihedral to change

minus(event)
plus(event)
clear_selection(event)

Clear the selected points

Parameters

event (event or None) – The event that generated this call, or None if not being called as a response to an event. This parameter is unused.

drag(event)

As the user moves the mouse over a point, display information for that point in the toolbar and select the corresponding residue in the workspace.

Parameters

event (matplotlib MouseEvent) – The event that generated the call to this method.

change_current_pick(new_pick, multi=False)
find_closest_point(event)

Find the plot point that is closest to the event

Parameters

event (MouseEvent) – The matplotlib mouse event that generates this call

pick_by_point(event)
pick_by_atom(iatom)
get_picked()

Get the backbone_dihedral object for the selected dihedral that was most recently selected.

Return type

backbone_dihedral object or None

Returns

The backbone_dihedral object for the selected dihedral that was most recently selected, or None if there are no selected dihedrals.

set_viewport(min_x=- 180.0, max_x=180.0, min_y=- 180.0, max_y=180.0)
write_file(filename)
set_symbol_size(value)
adjust_symbol_size(value)
options_quit()
clearGraph()

Gets called when project is closed

ALLOWED_COLOR = '#ffff00'
FAVORABLE_COLOR = '#f20000'
TEXT_SIZING = 'xx-small'
TICK_SPACING = 30
draw_regions(filename='rama500-general.data')