schrodinger.ui.picking module

class schrodinger.ui.picking.PickAtomToggle(checkbox, pick_function, pick_text='Pick an atom', enable_lasso=False)

Bases: schrodinger.ui.picking._PickToggle

Class meant to replicate Maestro atom pick toggles. Takes an argument ‘checkbox’ that represents the checkbox for the picking toggle.

__init__(checkbox, pick_function, pick_text='Pick an atom', enable_lasso=False)

The following options are supported:

Parameters
  • checkbox (QCheckBox instance.) – Checkbox to hook up the class to.

  • pick_function (callable) – will be called when an atom is picked. Must be a callable function that accepts one argument (atom number, or ASL, if enable_lasso is True).

  • pick_text (str) – Text that will be displayed in Maestro’s status area (default “Pick an atom”).

  • enable_lasso (bool) – Whether to allow multiple atoms to be selected simultaneously via lasso.

fullCommand(toggled)

Gets called when the checkbutton is toggled. Manages settings of all pick toggles, and then calls the user-specified command (if it exists).

Parameters

toggled (bool) – indicates whether check box is toggled on or off

on()
start()
stop()
class schrodinger.ui.picking.PickBondToggle(checkbox, pick_function, pick_text='Pick a bond')

Bases: schrodinger.ui.picking._PickToggle

Class meant to replicate Maestro bond pick toggles.

The argument ‘checkbox’ represents the QCheckBox object for the picking toggle

The following options are supported:
pick_function - will be called when a bond is picked. Must be a callable

function that accepts two arguments (atom numbers)

pick_text - text that will be displayed in Maestro’s status area

(default “Pick a bond”)

__init__(checkbox, pick_function, pick_text='Pick a bond')
fullCommand(toggled)

Gets called when the checkbutton is toggled. Manages settings of all pick toggles, and then calls the user-specified command (if it exists).

Parameters

toggled (bool) – indicates whether check box is toggled on or off

on()
start()
stop()
class schrodinger.ui.picking.PickMixedToggle(checkbox, pick_atom_function, pick_bond_function, pick_atom_text='Pick an atom', pick_bond_text='Pick a bond', enable_lasso=False)

Bases: schrodinger.ui.picking._PickToggle

Class allowing to pick atom or bond depending on internal state.

__init__(checkbox, pick_atom_function, pick_bond_function, pick_atom_text='Pick an atom', pick_bond_text='Pick a bond', enable_lasso=False)

Initialize picker class.

Parameters
  • checkbox (QtWidgets.QCheckBox) – pick toggle

  • pick_atom_function (function) – this function is called when atom is picked. Must be a callable function that accepts one arguments (atom number, or ASL if enable_lasso is True).

  • pick_bond_function – this function is called when bond is picked. Must be a callable function that accepts two arguments (bond atoms).

  • pick_atom_text (str) – atom pick text that will be displayed in Maestro’s status area (default “Pick an atom”).

  • pick_bond_text (str) – bond pick text that will be displayed in Maestro’s status area (default “Pick an atom”).

  • enable_lasso (param) – Whether to allow multiple atoms to be selected simultaneously via lasso.

property enable_lasso
setPickAtom(state)

Turn pick atom mode on and off. If it’s off bonds will be picked instead.

Parameters

state (bool) – True or False, if True atoms will be picked. Otherwise bonds will be picked.

setPickBond(state)

Convenience function to turn pick atom mode on and off. If its off bonds will be picked instead.

Parameters

state (bool) – True or False, if True bonds will be picked. Otherwise atoms will be picked.

fullCommand(toggled)

Gets called when the checkbutton is toggled. Manages settings of all pick toggles, and then calls the user-specified command (if it exists).

Parameters

toggled (bool) – indicates whether check box is toggled on or off

on()
start()
stop()
class schrodinger.ui.picking.PickCategoryToggle(checkbox, pick_function, pick_category)

Bases: schrodinger.ui.picking._PickToggle

Class to pick graphics objects using pick categories

__init__(checkbox, pick_function, pick_category)
Parameters
  • checkbox (QtWidgets.QCheckBox) – The checkbox instance to control picking

  • pick_function (callable) – Module-level function that takes one argument (the pick_id attribute of the picked graphics object). Must be a module-level function because maestro will call it by name, rather than by reference.

  • pick_category (str) – The pick_category attribute of the graphics objects to pick. Must be defined in mm_graphicspick.cxx

fullCommand(toggled)

Gets called when the checkbutton is toggled. Manages settings of all pick toggles, and then calls the user-specified command (if it exists).

Parameters

toggled (bool) – indicates whether check box is toggled on or off

on()
start()
stop()
class schrodinger.ui.picking.PickAslToggle(checkbox, pick_function, picking_mode, pick_text='Pick atoms to define a group', allow_locked_entries=False)

Bases: schrodinger.ui.picking._PickGroupToggleBase

The pick toggle makes use of maestro’s picking_asl_start which allows a custom pick state to be chosen (residue, molecule, chain, etc.) These pick states are defined as constants in maestro.py. The pick function that is passed as an argument must take a string as an argument, this string will be a valid asl statement

__init__(checkbox, pick_function, picking_mode, pick_text='Pick atoms to define a group', allow_locked_entries=False)

See parent class for argument documentation.

Parameters

picking_mode (int) – The mode to set Maestro’s picker feature to. These are defined in schrodinger.maestro.maestro

callPickFunction()

Call the pick function with the current selection

fullCommand(toggled)

Gets called when the checkbutton is toggled. Manages settings of all pick toggles, and then calls the user-specified command (if it exists).

Parameters

toggled (bool) – indicates whether check box is toggled on or off

on()
reset()

Unpick all atoms and update markers

setPickText(new_text)

Set’s the text that is shown in the workspace banner

Parameters

new_text (str) – The text to show in the banner

start()
stop()
class schrodinger.ui.picking.PickAtomsToggle(checkbox, natoms, pick_function, pick_text='Pick atoms to define a group', allow_locked_entries=False)

Bases: schrodinger.ui.picking._PickGroupToggleBase

This pick toggle allows you to select multiple atoms at once, each individually. Clicking on an already selected atom will unselect it. The pick_function should expect a list of integers (which correspond to atom indices) as an argument

__init__(checkbox, natoms, pick_function, pick_text='Pick atoms to define a group', allow_locked_entries=False)

See parent class for argument documentation.

Parameters

natoms (int or None) – the number of atoms in the group or None to allow any number of picks

property workspace_ct

Get a copy of the workspace structure

(lazily and cached)

reset()

Unpick all atoms and update markers

callPickFunction()

Call the pick function with the current selection

fullCommand(toggled)

Gets called when the checkbutton is toggled. Manages settings of all pick toggles, and then calls the user-specified command (if it exists).

Parameters

toggled (bool) – indicates whether check box is toggled on or off

on()
setPickText(new_text)

Set’s the text that is shown in the workspace banner

Parameters

new_text (str) – The text to show in the banner

start()
stop()
class schrodinger.ui.picking.PickAtomsLassoToggle(checkbox, pick_function, pick_text='Pick atoms to define a group', allow_locked_entries=False)

Bases: schrodinger.ui.picking.PickAtomsToggle

Class for creating a PickAtomsToggle that allows the user to pick atoms using marquee selection

__init__(checkbox, pick_function, pick_text='Pick atoms to define a group', allow_locked_entries=False)

See parent class for argument documentation.

Parameters

natoms (int or None) – the number of atoms in the group or None to allow any number of picks

callPickFunction()

Call the pick function with the current selection

fullCommand(toggled)

Gets called when the checkbutton is toggled. Manages settings of all pick toggles, and then calls the user-specified command (if it exists).

Parameters

toggled (bool) – indicates whether check box is toggled on or off

on()
reset()

Unpick all atoms and update markers

setPickText(new_text)

Set’s the text that is shown in the workspace banner

Parameters

new_text (str) – The text to show in the banner

start()
stop()
property workspace_ct

Get a copy of the workspace structure

(lazily and cached)

class schrodinger.ui.picking.PickResiduesToggle(checkbox, pick_function, pick_text='Pick residues', allow_locked_entries=False)

Bases: schrodinger.ui.picking.PickAtomsToggle

Class for creating a PickAtomsToggle that allows the user to pick and unpick residues by clicking on any of their atoms

__init__(checkbox, pick_function, pick_text='Pick residues', allow_locked_entries=False)

See parent class for argument documentation.

Parameters

natoms (int or None) – the number of atoms in the group or None to allow any number of picks

callPickFunction()

Call the pick function with the current selection

fullCommand(toggled)

Gets called when the checkbutton is toggled. Manages settings of all pick toggles, and then calls the user-specified command (if it exists).

Parameters

toggled (bool) – indicates whether check box is toggled on or off

on()
reset()

Unpick all atoms and update markers

setPickText(new_text)

Set’s the text that is shown in the workspace banner

Parameters

new_text (str) – The text to show in the banner

start()
stop()
property workspace_ct

Get a copy of the workspace structure

(lazily and cached)

class schrodinger.ui.picking.PickPairToggle(checkbox, pick_function, pick_text='Pick 2 atoms to define a pair', allow_locked_entries=False)

Bases: schrodinger.ui.picking.PickAtomsToggle

Class for creating a picker that allows the user to define a pair of atoms by sequentially picking 2 atoms.

__init__(checkbox, pick_function, pick_text='Pick 2 atoms to define a pair', allow_locked_entries=False)

See parent class for argument documentation.

Parameters

natoms (int or None) – the number of atoms in the group or None to allow any number of picks

callPickFunction()

Call the pick function with the current selection

fullCommand(toggled)

Gets called when the checkbutton is toggled. Manages settings of all pick toggles, and then calls the user-specified command (if it exists).

Parameters

toggled (bool) – indicates whether check box is toggled on or off

on()
reset()

Unpick all atoms and update markers

setPickText(new_text)

Set’s the text that is shown in the workspace banner

Parameters

new_text (str) – The text to show in the banner

start()
stop()
property workspace_ct

Get a copy of the workspace structure

(lazily and cached)

class schrodinger.ui.picking.PickTorsionToggle(checkbox, pick_function, pick_text='Pick 4 atoms to define a torsion', allow_locked_entries=False)

Bases: schrodinger.ui.picking.PickAtomsToggle

Class for creating a picker that allows the user to define a torsion by sequentually picking 4 atoms.

__init__(checkbox, pick_function, pick_text='Pick 4 atoms to define a torsion', allow_locked_entries=False)

See parent class for argument documentation.

Parameters

natoms (int or None) – the number of atoms in the group or None to allow any number of picks

callPickFunction()

Call the pick function with the current selection

fullCommand(toggled)

Gets called when the checkbutton is toggled. Manages settings of all pick toggles, and then calls the user-specified command (if it exists).

Parameters

toggled (bool) – indicates whether check box is toggled on or off

on()
reset()

Unpick all atoms and update markers

setPickText(new_text)

Set’s the text that is shown in the workspace banner

Parameters

new_text (str) – The text to show in the banner

start()
stop()
property workspace_ct

Get a copy of the workspace structure

(lazily and cached)

class schrodinger.ui.picking.Pick3DObjectToggle(checkbox, pick_function, pick_category, pick_text='Pick an object')

Bases: schrodinger.ui.picking._PickToggle

Class meant to replicate a Maestro pick toggle. This object allows you to pick objects from the schrodinger.graphics3d module. This picker allows you to pick any object assigned to the picking category argument ‘pick_category’

Parameters
  • checkbox – The QCheckBox object for the picking toggle

  • pick_function – Will be called when a bond is picked. Must be a callable function that accepts two arguments (atom numbers)

  • pick_category – The category of objects to pick. Strings must be defined in mm_graphicspick.cxx string_pick_map. This will allow picking of 3D objects with the corresponding pick_category attribute.

  • pick_text – text that will be displayed in Maestro’s status area (default “Pick an object”)

__init__(checkbox, pick_function, pick_category, pick_text='Pick an object')
fullCommand(toggled)

Gets called when the checkbutton is toggled. Manages settings of all pick toggles, and then calls the user-specified command (if it exists).

Parameters

toggled (bool) – indicates whether check box is toggled on or off

on()
start()
stop()
class schrodinger.ui.picking.MaestrolessLigandListModel(st, parent=None)

Bases: schrodinger.ui.qt.table_helper.RowBasedListModel

Model for ligand lists that can be used outside of Maestro.

__init__(st, parent=None)
Parameters
CHECKABLE_COLS = ()
COLUMN = None
class CheckIndexOption(value)

Bases: enum.Flag

An enumeration.

NoOption = 0
IndexIsValid = 1
DoNotUseParent = 2
ParentIsInvalid = 4
Column = None
EDITABLE_COLS = <object object>
HorizontalSortHint = 2
class LayoutChangeHint(value)

Bases: enum.Enum

An enumeration.

NoLayoutChangeHint = 0
VerticalSortHint = 1
HorizontalSortHint = 2
NO_DATA_CHANGED = <object object>
NoLayoutChangeHint = 0
ROW_CLASS = None
ROW_LIST_OFFSET = 0
SHOW_ROW_NUMBERS = False
UNEDITABLE_COLS = <object object>
VerticalSortHint = 1
af2SettingsGetValue()

This function adds support for the settings mixin. It allows to save table cell values in case this table is included in the settings panel. Returns list of rows if table model is of RowBasedTableModel class type.

Returns

list of rows in tbe table’s model.

Return type

list or None

af2SettingsSetValue(value)

This function adds support for the settings mixin. It allows to set table cell values when this table is included in the settings panel.

Parameters

value (list) – settings value, which is a list of row data here.

appendRow(*args, **kwargs)

Add a row to the table. All arguments are passed to ROW_CLASS initialization.

Returns

The row number of the new row

Return type

int

appendRowObject(row)

Add a row to the table.

Parameters

row (ROW_CLASS) – Row object to add to the table.

Returns

The row number of the new row

Return type

int

appendRowObjects(rows)

Add rows to the table.

Parameters

rows (ROW_CLASS) – Row objects to add to the table.

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
columnChanged(col_number)

Call this method when a specific column object has been modified. Will cause the view to redraw that column.

Parameters

col_number (int) – 0-indexed column number in the model.

columnCount(self, parent: QModelIndex = QModelIndex()) int
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)
data(index, role=ItemDataRole.DisplayRole)

Provide data for the specified index and role. Classes should not redefine this method. Instead, new methods should be created and decorated with data_method.

See Qt documentation for an explanation of arguments and return value

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]
flags(index)

See Qt documentation for an method documentation.

formatFloat(value, role, digits, fmt='')

Format floating point values for display or sorting. If role is Qt.DisplayRole, then value will be returned as a string with the specified formatting. All other role values are assumed to be a sorting role and value will be returned unchanged.

Parameters
  • value (float) – The floating point value to format

  • role (int) – The Qt data role

  • digits (int) – The number of digits to include after the decimal point for Qt.DisplayRole

  • fmt (str) – Additional floating point formatting options

Returns

The formatted or unmodified value

Return type

str or float

hasChildren(self, parent: QModelIndex = QModelIndex()) bool
hasIndex(self, row: int, column: int, parent: QModelIndex = QModelIndex()) bool
headerData(section, orientation, role=ItemDataRole.DisplayRole)

Provide column headers, and optionally column tooltips and row numbers.

See Qt documentation for an explanation of arguments and return value

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]

loadData(rows)

Load data into the table and replace all existing data.

Parameters

rows (list) – A list of ROW_CLASS objects

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]

modelResetContext()

A context manager for resetting the model. See model_reset_method for a decorator version of this.

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
removeRowsByIndices(indices)

Remove all rows from the model specified by the given QModelIndex items.

removeRowsByRowNumbers(rows)

Remove the given rows from the model, specified by row number, 0-indexed.

replaceRows(new_rows)

Replace the contents of the model with the contents of the given list. The change will be presented to the view as a series of row insertions and deletions rather than as a model reset. This allows the view to properly update table selections and scroll bar position. This method may only be used if:

  • the ROW_CLASS objects can be compared using < and ==

  • the contents of the model (i.e. self._rows) are sorted in ascending order

  • the contents of new_rows are sorted in ascending order

This method is primarily intended for use when the table contains rows based on project table rows. On every project change, the project table can be reread and used to generate new_list and this method can then properly update the model.

Parameters

new_rows (list) – A list of ROW_CLASS objects

reset()

Remove all data from the model

resetInternalData(self)
revert(self)
roleNames(self) Dict[int, QByteArray]
rowChanged(row_number)

Call this method when a specific row object has been modified. Will cause the view to redraw that row.

Parameters

row_number (int) – 0-indexed row number in the model. Corresponds to the index in the “.rows” iterator.

rowCount(self, parent: QModelIndex = QModelIndex()) int
property rows

Iterate over all rows in the model. If any data is changed, call rowChanged() method with the row’s 0-indexed number to update the view.

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(index, value, role=ItemDataRole.EditRole)

Set data for the specified index and role. Whenever possible, sub- classes should redefine _setData rather than this method.

See Qt documentation for an explanation of arguments and return value.

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
sibling(self, row: int, column: int, idx: QModelIndex) QModelIndex
signalsBlocked(self) bool
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>
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.picking.MaestrolessPickLigandDialog(st, parent=None)

Bases: PyQt6.QtWidgets.QDialog

Dialog to allow users to pick ligands outside of Maestro. Used by ifd_gui.py and covalent_docking_gui.py

__init__(st, parent=None)
Parameters
accept()

Called when the user clicks OK button

Accepted = 1
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
acceptDrops(self) bool
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(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)
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)
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
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
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.

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
resize(self, a0: QSize)
resize(self, w: int, h: int) None
resizeEvent(self, a0: QResizeEvent)
restoreGeometry(self, geometry: QByteArray) bool
result(self) int
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)
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.picking.ResidueRow(res, markers_color=None)

Bases: schrodinger.ui.qt.appframework2.markers.MarkerMixin

Class representing a residue in the active site. Used by ResiduesModel and SelectResiduesDialog.

__init__(res, markers_color=None)
Parameters
  • res (schrodinger.structure.Residue) – Residue to be added as a row.

  • markers_color (3-tuple of floats, each between 0.0 and 1.0, or None) – Color to add workspace markers as for this residue. If None, no markers will be added.

findInStructure(st)
addJaguarMarker(atoms, color=None, icon=None, text='', alt_color=None, highlight=False)

Add a marker to the specified atom(s)

Parameters
  • atoms (list or schrodinger.structure._StructureAtom) – The atom or list of atoms to mark. A list may contain between one and four atoms (inclusive).

  • color (tuple, str, int, or schrodinger.structutils.color) – The color of the marker and icon. May be an RGB tuple, color name, color index, or schrodinger.structutils.color instance. If not given, white will be used.

  • icon (int) – The icon to draw next to the marker. Should be one the self.MARKER_ICONS constants. If not given, no icon will be drawn.

  • text (str) – The text to display next to the marker. If not given, no text will be displayed. Note that this argument will be ignored when marking a single atom.

  • alt_color (tuple, str, int, or schrodinger.structutils.color) – The alternate marker color. This color is always used for text, and is used for the marker and icon when highlight is True. If not given, color will be used.

  • highlight (bool) – Whether the marker should be highlighted. A highlighted marker is indicated with thicker lines and is colored using alt_color instead of color.

Returns

The newly created marker

Return type

schrodinger.maestro.markers._BaseMarker

Raises

ValueError – If a marker already exists for the specified atoms

Note

Either an icon or text may be displayed on a marker, but not both. If both are given, only the text will be shown.

addMarker(atoms, color=(1.0, 1.0, 1.0), group_name=None)

Generates a set of simple, dot-styled markers for a group of atoms.

Parameters
  • atoms (list or schrodinger.structure._StructureAtom) – List of atoms to be marked

  • color (tuple of 3 floats) – The amount of red, green and blue to use, each ranging from 0.0 to 1.0. Default is white (1., 1., 1.).

@group_name: Optional string to set as the name of this group of markers in Maestro. If not set, a unique identifier will be generated.

addMarkerFromAsl(asl, color=(1.0, 1.0, 1.0), group_name=None)

Generates a set of simple, dot-styled markers for group of Workspace atoms that match the given ASL. Same atoms continue to be marked even if the Workspace is later modified such that ASL matching changes.

Parameters
  • asl – ASL for the atoms to mark.

  • color (tuple of 3 floats) – The amount of red, green and blue to use, each ranging from 0.0 to 1.0. Default is white (1., 1., 1.).

@group_name: Optional string to set as the name of this group of markers in Maestro. If not set, a unique identifier will be generated.

Returns

Marker object

Return type

markers.Marker

closeEvent(event)

Hide all markers when the panel is closed.

getAllJaguarMarkers()

Get all markers._BaseMarker currently loaded into the panel

Returns

An iterator of markers._BaseMarker

Return type

iterator

getAllMarkers()

Get all markers.Marker loaded into the panel

Returns

list(markers.Marker)

Return type

list

getJaguarMarker(atoms)

Retrieve a marker for the specified atom(s)

Parameters

atoms (list or schrodinger.structure._StructureAtom) – The atom or list of atoms to retrieve the marker for. A list may contain between one and four atoms (inclusive).

Returns

The requested marker

Return type

schrodinger.maestro.markers._BaseMarker

Raises

ValueError – If no marker exists for the specified atoms

Note

As indicated by the return type, this function only returns schrodinger.maestro.markers._BaseMarker derived markers. Multi atom schrodinger.maestro.markers.Marker type markers are not accessible in this way.

hideAllJaguarMarkers()

Hide all schrodinger.maestro.markers._BaseMarker markers for this panel

hideAllMarkers()

Hide all schrodinger.maestro.markers.Marker markers for this panel.

hideEvent(event)
removeAllJaguarMarkers()

Remove all markers schrodinger.maestro.markers._BaseMarker markers from this panel

removeAllJaguarMarkersForEntry(eid)

Remove all markers for the specified entry id from this panel

Parameters

eid (str) – The entry id to remove markers for

removeAllMarkers()

Remove all schrodinger.maestro.markers.Marker markers from this panel.

removeJaguarMarker(marker)

Removes the specified marker

Parameters

marker (schrodinger.maestro.markers._BaseMarker) – The marker to remove

Raises

ValueError – If there is no marker on the specified atoms

removeJaguarMarkerForAtoms(atoms)

Removes the marker for specified atom(s)

Parameters

atoms (list or schrodinger.structure._StructureAtom) – The atom or list of atoms to retrieve the marker for. A list may contain between one and four atoms (inclusive).

Raises

ValueError – If no marker exists for the specified atoms

removeMarker(marker)

Remove the schrodinger.maestro.markers.Marker

Parameters

marker (schrodinger.maestro.markers.Marker) – Marker to remove

Raises

ValueError – If marker is the wrong type or is not associated with the panel.

show()

Re-show all panel markers when the panel is re-shown. This separate method is needed for QDialog instances.

showAllJaguarMarkers()

Show all schrodinger.maestro.markers._BaseMarker markers for which all marked atoms are in the workspace. Hide all other markers.

showAllMarkers()

Set all schrodinger.maestro.markers.Marker markers to be shown if the relevant atoms are in the workspace. These markers are hidden automatically by Maestro when atoms are excluded.

showEvent(event)

Re-show all panel markers when the panel is re-shown.

class schrodinger.ui.picking.PickResidueRow(res, distance=None)

Bases: schrodinger.ui.picking.ResidueRow

Base class for rows to be used in models inheriting _BaseMaestrolessPickModel.

__init__(res, distance=None)
Parameters
addJaguarMarker(atoms, color=None, icon=None, text='', alt_color=None, highlight=False)

Add a marker to the specified atom(s)

Parameters
  • atoms (list or schrodinger.structure._StructureAtom) – The atom or list of atoms to mark. A list may contain between one and four atoms (inclusive).

  • color (tuple, str, int, or schrodinger.structutils.color) – The color of the marker and icon. May be an RGB tuple, color name, color index, or schrodinger.structutils.color instance. If not given, white will be used.

  • icon (int) – The icon to draw next to the marker. Should be one the self.MARKER_ICONS constants. If not given, no icon will be drawn.

  • text (str) – The text to display next to the marker. If not given, no text will be displayed. Note that this argument will be ignored when marking a single atom.

  • alt_color (tuple, str, int, or schrodinger.structutils.color) – The alternate marker color. This color is always used for text, and is used for the marker and icon when highlight is True. If not given, color will be used.

  • highlight (bool) – Whether the marker should be highlighted. A highlighted marker is indicated with thicker lines and is colored using alt_color instead of color.

Returns

The newly created marker

Return type

schrodinger.maestro.markers._BaseMarker

Raises

ValueError – If a marker already exists for the specified atoms

Note

Either an icon or text may be displayed on a marker, but not both. If both are given, only the text will be shown.

addMarker(atoms, color=(1.0, 1.0, 1.0), group_name=None)

Generates a set of simple, dot-styled markers for a group of atoms.

Parameters
  • atoms (list or schrodinger.structure._StructureAtom) – List of atoms to be marked

  • color (tuple of 3 floats) – The amount of red, green and blue to use, each ranging from 0.0 to 1.0. Default is white (1., 1., 1.).

@group_name: Optional string to set as the name of this group of markers in Maestro. If not set, a unique identifier will be generated.

addMarkerFromAsl(asl, color=(1.0, 1.0, 1.0), group_name=None)

Generates a set of simple, dot-styled markers for group of Workspace atoms that match the given ASL. Same atoms continue to be marked even if the Workspace is later modified such that ASL matching changes.

Parameters
  • asl – ASL for the atoms to mark.

  • color (tuple of 3 floats) – The amount of red, green and blue to use, each ranging from 0.0 to 1.0. Default is white (1., 1., 1.).

@group_name: Optional string to set as the name of this group of markers in Maestro. If not set, a unique identifier will be generated.

Returns

Marker object

Return type

markers.Marker

closeEvent(event)

Hide all markers when the panel is closed.

findInStructure(st)
getAllJaguarMarkers()

Get all markers._BaseMarker currently loaded into the panel

Returns

An iterator of markers._BaseMarker

Return type

iterator

getAllMarkers()

Get all markers.Marker loaded into the panel

Returns

list(markers.Marker)

Return type

list

getJaguarMarker(atoms)

Retrieve a marker for the specified atom(s)

Parameters

atoms (list or schrodinger.structure._StructureAtom) – The atom or list of atoms to retrieve the marker for. A list may contain between one and four atoms (inclusive).

Returns

The requested marker

Return type

schrodinger.maestro.markers._BaseMarker

Raises

ValueError – If no marker exists for the specified atoms

Note

As indicated by the return type, this function only returns schrodinger.maestro.markers._BaseMarker derived markers. Multi atom schrodinger.maestro.markers.Marker type markers are not accessible in this way.

hideAllJaguarMarkers()

Hide all schrodinger.maestro.markers._BaseMarker markers for this panel

hideAllMarkers()

Hide all schrodinger.maestro.markers.Marker markers for this panel.

hideEvent(event)
removeAllJaguarMarkers()

Remove all markers schrodinger.maestro.markers._BaseMarker markers from this panel

removeAllJaguarMarkersForEntry(eid)

Remove all markers for the specified entry id from this panel

Parameters

eid (str) – The entry id to remove markers for

removeAllMarkers()

Remove all schrodinger.maestro.markers.Marker markers from this panel.

removeJaguarMarker(marker)

Removes the specified marker

Parameters

marker (schrodinger.maestro.markers._BaseMarker) – The marker to remove

Raises

ValueError – If there is no marker on the specified atoms

removeJaguarMarkerForAtoms(atoms)

Removes the marker for specified atom(s)

Parameters

atoms (list or schrodinger.structure._StructureAtom) – The atom or list of atoms to retrieve the marker for. A list may contain between one and four atoms (inclusive).

Raises

ValueError – If no marker exists for the specified atoms

removeMarker(marker)

Remove the schrodinger.maestro.markers.Marker

Parameters

marker (schrodinger.maestro.markers.Marker) – Marker to remove

Raises

ValueError – If marker is the wrong type or is not associated with the panel.

show()

Re-show all panel markers when the panel is re-shown. This separate method is needed for QDialog instances.

showAllJaguarMarkers()

Show all schrodinger.maestro.markers._BaseMarker markers for which all marked atoms are in the workspace. Hide all other markers.

showAllMarkers()

Set all schrodinger.maestro.markers.Marker markers to be shown if the relevant atoms are in the workspace. These markers are hidden automatically by Maestro when atoms are excluded.

showEvent(event)

Re-show all panel markers when the panel is re-shown.

class schrodinger.ui.picking.PickResiduesChangedMixin

Bases: object

Mixin to provide common signals for dialogs that allow users to pick residues.

residues_centroid_changed
residues_changed
getResiduesList(res_objs)

Return the list of residue strings (e.g. [‘A:217’, ‘A:231b’]) of the selected residues.

Parameters

res_objs (List of ResidueRow) – List of residue objects to get strings for

:return List of residue strings for each row. @rtyp: list of str

getResiduesCenter(res_objs)

Return the (x, y, z) tuple for the center of the selected residues. Will raise ValueError if no residues were picked.

@pram res_objs: Residue objects to get the center of :type res_objs: List of ResidueRow

Returns

Tuple of center x, y, z coordinates

Return type

tuple of (float, float, float)

class schrodinger.ui.picking.PickResidueModel(parent, multi_select=True)

Bases: schrodinger.ui.picking._BaseMaestrolessPickModel

Model for tables to allow picking residues from a structure outside of Maestro.

Column

alias of <unknown>.PickResidueColumns

ROW_CLASS

alias of schrodinger.ui.picking.PickResidueRow

CHECKABLE_COLS = ()
COLUMN = None
class CheckIndexOption(value)

Bases: enum.Flag

An enumeration.

NoOption = 0
IndexIsValid = 1
DoNotUseParent = 2
ParentIsInvalid = 4
EDITABLE_COLS = <object object>
HorizontalSortHint = 2
class LayoutChangeHint(value)

Bases: enum.Enum

An enumeration.

NoLayoutChangeHint = 0
VerticalSortHint = 1
HorizontalSortHint = 2
NO_DATA_CHANGED = <object object>
NoLayoutChangeHint = 0
ROW_LIST_OFFSET = 0
SHOW_ROW_NUMBERS = False
UNEDITABLE_COLS = <object object>
VerticalSortHint = 1
__init__(parent, multi_select=True)
af2SettingsGetValue()

This function adds support for the settings mixin. It allows to save table cell values in case this table is included in the settings panel. Returns list of rows if table model is of RowBasedTableModel class type.

Returns

list of rows in tbe table’s model.

Return type

list or None

af2SettingsSetValue(value)

This function adds support for the settings mixin. It allows to set table cell values when this table is included in the settings panel.

Parameters

value (list) – settings value, which is a list of row data here.

appendRow(*args, **kwargs)

Add a row to the table. All arguments are passed to ROW_CLASS initialization.

Returns

The row number of the new row

Return type

int

appendRowObject(row)

Add a row to the table.

Parameters

row (ROW_CLASS) – Row object to add to the table.

Returns

The row number of the new row

Return type

int

appendRowObjects(rows)

Add rows to the table.

Parameters

rows (ROW_CLASS) – Row objects to add to the table.

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
columnChanged(col_number)

Call this method when a specific column object has been modified. Will cause the view to redraw that column.

Parameters

col_number (int) – 0-indexed column number in the model.

columnCount(self, parent: QModelIndex = QModelIndex()) int
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)
data(index, role=ItemDataRole.DisplayRole)

Provide data for the specified index and role. Classes should not redefine this method. Instead, new methods should be created and decorated with data_method.

See Qt documentation for an explanation of arguments and return value

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]
flags(index)

See Qt documentation for an method documentation.

formatFloat(value, role, digits, fmt='')

Format floating point values for display or sorting. If role is Qt.DisplayRole, then value will be returned as a string with the specified formatting. All other role values are assumed to be a sorting role and value will be returned unchanged.

Parameters
  • value (float) – The floating point value to format

  • role (int) – The Qt data role

  • digits (int) – The number of digits to include after the decimal point for Qt.DisplayRole

  • fmt (str) – Additional floating point formatting options

Returns

The formatted or unmodified value

Return type

str or float

hasChildren(self, parent: QModelIndex = QModelIndex()) bool
hasIndex(self, row: int, column: int, parent: QModelIndex = QModelIndex()) bool
headerData(section, orientation, role=ItemDataRole.DisplayRole)

Provide column headers, and optionally column tooltips and row numbers.

See Qt documentation for an explanation of arguments and return value

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]

loadData(rows)

Load data into the table and replace all existing data.

Parameters

rows (list) – A list of ROW_CLASS objects

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]

modelResetContext()

A context manager for resetting the model. See model_reset_method for a decorator version of this.

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
removeRowsByIndices(indices)

Remove all rows from the model specified by the given QModelIndex items.

removeRowsByRowNumbers(rows)

Remove the given rows from the model, specified by row number, 0-indexed.

replaceRows(new_rows)

Replace the contents of the model with the contents of the given list. The change will be presented to the view as a series of row insertions and deletions rather than as a model reset. This allows the view to properly update table selections and scroll bar position. This method may only be used if:

  • the ROW_CLASS objects can be compared using < and ==

  • the contents of the model (i.e. self._rows) are sorted in ascending order

  • the contents of new_rows are sorted in ascending order

This method is primarily intended for use when the table contains rows based on project table rows. On every project change, the project table can be reread and used to generate new_list and this method can then properly update the model.

Parameters

new_rows (list) – A list of ROW_CLASS objects

reset()

Remove all data from the model

resetInternalData(self)
revert(self)
roleNames(self) Dict[int, QByteArray]
rowChanged(row_number)

Call this method when a specific row object has been modified. Will cause the view to redraw that row.

Parameters

row_number (int) – 0-indexed row number in the model. Corresponds to the index in the “.rows” iterator.

rowCount(self, parent: QModelIndex = QModelIndex()) int
property rows

Iterate over all rows in the model. If any data is changed, call rowChanged() method with the row’s 0-indexed number to update the view.

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(index, value, role=ItemDataRole.EditRole)

Set data for the specified index and role. Whenever possible, sub- classes should redefine _setData rather than this method.

See Qt documentation for an explanation of arguments and return value.

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
sibling(self, row: int, column: int, idx: QModelIndex) QModelIndex
signalsBlocked(self) bool
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>
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.picking.MaestrolessPickResidueDialog(st, lig_st=None, find_ws_lig=False, multi_select=True, parent=None)

Bases: schrodinger.ui.picking._BaseMaestrolessPickResDialog

Class for picking residues outside of Maestro.

PickModelClass

alias of schrodinger.ui.picking.PickResidueModel

ALL_RESIDUES = 'All residues'
NEAR_RESIDUES = 'Residues near ligand (within 5A)'
__init__(st, lig_st=None, find_ws_lig=False, multi_select=True, parent=None)
Parameters
  • st (schrodinger.structure.Structure) – Structure containing the residues

  • lig_st (schrodinger.structure.Structure or None) – Ligand structure to check distances of residues against. Cannot be specified if find_ws_lig is set to True. If not specified and find_ws_lig is False, distance filtering will not be enabled.

  • find_ws_lig (bool) – Whether to search self.st for a single ligand. If more than one ligand is identified, none will be used. Cannot be True if a ligand is specified via ligand_st.

  • multi_select (bool) – Whether to allow selection of multiple residues, vs a single residue only. Default is True.

  • parent (QtWidgets.QWidget) – Parent widget to the dialog

af2SettingsGetValue()

Used with schrodinger.ui.qt.appframework2.settings.SettingsMixin to save the dialog state to JSON.

Returns

List of panel attributes to serialize

Return type

list

Accepted = 1
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
accept()

Called when the OK button is clicked on the dialog.

acceptDrops(self) bool
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)
af2SettingsSetValue(value)

Used with schrodinger.ui.qt.appframework2.settings.SettingsMixin to reload the dialog state from JSON.

Parameters

value (list) – Values to set for the panel

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

Unpick all rows in the model.

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

Show the panel

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)
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
frameGeometry(self) QRect
frameSize(self) QSize
geometry(self) QRect
getResiduesAndDistances()

Return a list of 2-tuples containing the residues and their distance from a ligand, if specified.

Returns

Tuple of each residue in the structure and the residue distance from the specified ligand, or None if no ligand is specified.

Return type

list of (schrodinger.structure._Residue, float) or (schrodinger.structure._Residue, None)

getResiduesCenter(res_objs)

Return the (x, y, z) tuple for the center of the selected residues. Will raise ValueError if no residues were picked.

@pram res_objs: Residue objects to get the center of :type res_objs: List of ResidueRow

Returns

Tuple of center x, y, z coordinates

Return type

tuple of (float, float, float)

getResiduesList(res_objs)

Return the list of residue strings (e.g. [‘A:217’, ‘A:231b’]) of the selected residues.

Parameters

res_objs (List of ResidueRow) – List of residue objects to get strings for

:return List of residue strings for each row. @rtyp: list of str

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
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.

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
residues_centroid_changed
residues_changed
resize(self, a0: QSize)
resize(self, w: int, h: int) None
resizeEvent(self, a0: QResizeEvent)
restoreGeometry(self, geometry: QByteArray) bool
result(self) int
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)
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
onShowComboIndexChanged()

Called when the index of the Show combo box is changed. Updates the available residues based on the selected option.

updateNumPickedResiduesLabel()

Update the label for number of picked residues.