schrodinger.application.msv.gui.viewmodel module

class schrodinger.application.msv.gui.viewmodel.SeqSliceReplacement(new_residues: str, num_to_replace: int = 1)[source]

Bases: tuple

Data about replacing a portion of a sequence. Used to pass information from view.EditorDelegate.setModelData to SequenceAlignmentModel._setData.

Variables
  • new_residues – The residues to replace the sequence with.

  • num_to_replace – The number of residues to replace. Note that this is not necessarily equal to len(new_residues) since the replacement doesn’t have to be the same length as what its replacing.

new_residues: str

Alias for field number 0

num_to_replace: int

Alias for field number 1

__contains__(key, /)

Return key in self.

__len__()

Return len(self).

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

class schrodinger.application.msv.gui.viewmodel.CacheNamespace(**kwargs)[source]

Bases: types.SimpleNamespace

A SimpleNamespace for storing all the caches in SequenceAlignmentModel. This is so they can be easily cleared all at once.

__init__(**kwargs)[source]
clear()[source]
class schrodinger.application.msv.gui.viewmodel.SlotsInPythonMixin[source]

Bases: object

If a model connects a signal to a non-slot C++ method, then PyQt won’t be able to destroy the model until the main event loop runs. (ProcessEvents calls aren’t sufficient since they don’t process DeferredDelete events.) This will prevent models from being cleaned up during unit tests, which will prevent the panels and alignments from being cleaned up as well. This can lead to massive memory usage, especially for the performance tests and the Hypothesis stateful tests. To avoid this, we override all of the C++ methods commonly used as slots with Python methods.

beginInsertColumns(parent, first, last)[source]
beginInsertRows(parent, first, last)[source]
endInsertColumns()[source]
endInsertRows()[source]
beginRemoveColumns(parent, first, last)[source]
beginRemoveRows(parent, first, last)[source]
endRemoveColumns()[source]
endRemoveRows()[source]
beginResetModel()[source]
endResetModel()[source]
class schrodinger.application.msv.gui.viewmodel.ModelMixin[source]

Bases: schrodinger.application.msv.gui.viewmodel.SlotsInPythonMixin

A mixin for methods shared by both the base model and all proxy models.

beginInsertColumns(parent, first, last)
beginInsertRows(parent, first, last)
beginRemoveColumns(parent, first, last)
beginRemoveRows(parent, first, last)
beginResetModel()
endInsertColumns()
endInsertRows()
endRemoveColumns()
endRemoveRows()
endResetModel()
class schrodinger.application.msv.gui.viewmodel.SequenceAlignmentModel(parent=None)[source]

Bases: schrodinger.ui.qt.table_speed_up.MultipleRolesRoleModelMixin, schrodinger.application.msv.gui.viewmodel.ModelMixin, schrodinger.ui.qt.table_helper.RowBasedTableModel

A QTable model where each row corresponds to a sequence and each column corresponds to a residue position

Note

If the alignment contains only zero-length sequences, then this model creates a dummy column. Otherwise, we wouldn’t be able to generate any valid QModelIndex objects, which means we couldn’t create any parent indices for row insertion signals.

Variables
  • fixedColumnDataChanged (QtCore.pyqtSignal emitting a tuple of (enum.Enum, int)) – Signal emitted when the data in a fixed column is changed. Passes a tuple of the role and row index that are changing.

  • rowHeightChanged (QtCore.pyqtSignal) – Signal emitted when the height of a row is changed is changed.

  • seqExpansionChanged (QtCore.pyqtSignal) –

    A signal emitted when sequence expansion is changed. Emitted with:

    • A list of all indices to be expanded or collapsed.

    • True if the indices should be expanded. False if they should be collapsed.

domainsChanged
predictionsChanged
secondaryStructureChanged
residueFormatChanged
residueSelectionChanged
fixedColumnDataChanged
rowHeightChanged
sequencesReordered
textSizeChanged
alnSetChanged
kinaseFeaturesChanged
kinaseConservationChanged
hiddenSeqsChanged
seqExpansionChanged
sequenceStructureChanged
MIN_ALN_QUALITY_WEIGHT = 0.2
__init__(parent=None)[source]
Parameters

parent (QtCore.Object) – Parent of the row based table model.

setStructureModel(smodel)[source]
setPageModel(page_model)[source]

Set the page model, which contains the options model and is also responsible for switching between split-chain and combined-chain alignments.

Parameters

page_model (gui_models.PageModel) – The page model to set

setLightMode(enabled)[source]
rowData(row, cols, roles)[source]

Fetch data for multiple roles for multiple indices in the same row. Note that this method does minimal sanity checking of its input for performance reasons, as it is called during painting. The arguments are assumed to refer to valid indices. Use data instead if more sanity checking is required.

Parameters
  • row (int) – The row number to fetch data for.

  • cols (list(int)) – A list of columns to fetch data for.

  • roles (list(int)) – A list of roles to fetch data for.

Returns

{role: data} dictionaries for each requested column.

Return type

list(dict(int, object))

getResidueDisplayMode()[source]
Return type

ResidueFormat

Returns

The residue display mode in current use

setAlignment(aln)[source]

Set the alignment model to display data from

Parameters

aln (gui_alignment.GuiProteinAlignment) – The alignment model

onPairwiseConstraintsChanged()[source]
getAlignment()[source]

Return the underlying alignment object

Returns

The alignment

Return type

schrodinger.protein.alignment.BaseAlignment

sequenceCount()[source]
Return type

int

Returns

The number of sequences in the alignment

beginLayoutChange()[source]

Emit a layoutAboutToBeChanged signal. This helper makes disconnecting from the signal easier.

endLayoutChange()[source]

Finish a layout change operation by clearing all persistent indices and emitting layoutChanged.

columnCount(self, parent: QModelIndex = QModelIndex()) int[source]
rowCount(self, parent: QModelIndex = QModelIndex()) int[source]
headerData(section, orientation, role=0)[source]

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

See Qt documentation for an explanation of arguments and return value

getRowVisibilities()[source]

Get whether the sequences are visible in the MSV sequence list.

The actual filtering is done by SequenceFilterProxyModel.

getFont()[source]
Returns

The current font.

Return type

QtGui.QFont

flags(index)[source]

See Qt documentation for method documentation

annotationTypes()[source]

Get the current annotation types

Returns

A tuple of: - The global annotation enum - The sequence annotation enum

Return type

tuple

resetAnnotation(ann)[source]
strucTitles()[source]

Get all structure titles

Returns

A list containing all structure titles

Return type

list

onHomologyStatusChanged(seq)[source]
setResSelectionState(selection, selected, current=False)[source]

Mark the residues specified by selection as either selected or deselected.

Parameters
  • selection (QtCore.QItemSelection) – A selection containing the entries to update.

  • selected (bool) – Whether the residues should be selected (True) or deselected (False).

  • current (bool) – Whether this selection change should only affect the “current” selection. Note that “current” here means “the portion of the selection that’s in the process of being updated,” i.e., the selection that’s from the mouse click (or click and drag) that we’re currently in the middle of. This is equivalent to passing the QItemSelectionModel::Current | QItemSelectionModel::Clear flags to QItemSelectionModel::select.

setResRangeSelectionState(from_index, to_index, selected, columns, current=False)[source]

Mark all residues between from_index and to_index as either selected or deselected.

Parameters
  • from_index (QtCore.QModelIndex) – The first index to select or deselect.

  • to_index (QtCore.QModelIndex) – The last index to select or deselect.

  • selected (bool) – Whether the residues should be selected (True) or deselected (False).

  • columns (bool) – Whether all residues in the specified columns should be selected or deselected.

  • current (bool) – Whether these selection changes should only affect the “current” selection. Note that “current” here means “the portion of the selection that’s in the process of being updated,” i.e., the selection that’s from the mouse click (or click and drag) that we’re currently in the middle of. This is equivalent to passing the QItemSelectionModel::Current | QItemSelectionModel::Clear flags to QItemSelectionModel::select.

setSeqSelectionState(selection, selected)[source]
clearResSelection()[source]
handleBindingSitePick(index, ligand_idx)[source]
handleProximityPick(index)[source]
expandSelectionToAnnotationValues(anno, ann_index)[source]
getIndexForRes(res)[source]

Get the model index for the given residue.

Parameters

res (schrodinger.protein.residue.Residue) – A residue

Returns

The model index of the residue

Return type

QModelIndex

getSelectedResIndices()[source]

Get indices for all selected residues.

Return type

list[QtCore.QModelIndex]

isWorkspaceAln()[source]
Returns

Whether this model represents the workspace alignment.

Return type

bool

getResnumForColumn(seq, col_index)[source]

Get cached, filtered display resnum for column.

Parameters
Returns

Formatted resnum for display

Return type

str or None

updateColorScheme(row_type, scheme)[source]

Used to set the color scheme of a specific row type.

getSeqColorScheme()[source]
Returns

The sequence color scheme currently in use

Return type

color.AbstractRowColorScheme

updateResidueColors(key_to_color_map)[source]

Update the colors of residues in the sequence rows.

Parameters

key_to_color_map (dict(residue.ResidueKey, tuple(int, int, int))) – A map from residue keys to colors. Each color is represented by a tuple of (r, g, b) values.

getResidueColors()[source]

Get the color of residues in the sequence rows

Returns

The colors of each residue in the MSV. Each residue is represented by a residue.ResidueKey and each color is represented by a tuple of (r, g, b) values.

Rtype key_to_color_map

dict(residue.ResidueKey, tuple(int, int, int))

onResHighlightChanged()[source]
moveSelectionBelow(index)[source]

Move all selected sequences immediately below the specified index. Used for drag-and-drop.

Parameters

proxy_index (QtCore.QModelIndex) – The index to move selected sequences below.

getAdjacentIndexForEditing(index, direction)[source]

Return a new index next to the specified index in the given direction. An invalid index will be returned if:

- No such index exists (i.e. asking for a residue above the first
sequence in the alignment)
- The new index refers to a structured residue (and therefore isn't
editable)
- The new index refers to a position that's past the end of a
sequence (and therefore isn't editable)
Parameters
  • index (QtCore.QModelIndex) – The starting index

  • direction (Adjacent) – Which direction to go in

Returns

The new index

Return type

QtCore.QModelIndex

isSingleBlockSelected()[source]

Is a single block of residues (i.e. contiguous residues/gaps from one sequence or multiple adjacent sequences) selected? :rtype: bool

alnSetResSelected()[source]

Whether any selected residues are in sequences in an alignment set :rtype: bool

initializeCustomFonts()[source]

Initializes custom fonts used in the viewmodel

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

Bases: enum.IntEnum

An enumeration.

DoNotUseParent = 2
IndexIsValid = 1
NoOption = 0
ParentIsInvalid = 4
class CheckIndexOptions
class CheckIndexOptions(Union[QAbstractItemModel.CheckIndexOptions, QAbstractItemModel.CheckIndexOption]) None
class CheckIndexOptions(QAbstractItemModel.CheckIndexOptions) None

Bases: sip.simplewrapper

__init__(*args, **kwargs)
Column = None
EDITABLE_COLS = <object object>
HorizontalSortHint = 2
class LayoutChangeHint

Bases: int

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

SequenceAlignmentModel.beginInsertColumns(self, QModelIndex, int, int)
SequenceAlignmentModel.beginInsertRows(self, QModelIndex, int, int)
SequenceAlignmentModel.beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
SequenceAlignmentModel.beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
SequenceAlignmentModel.beginRemoveColumns(self, QModelIndex, int, int)
SequenceAlignmentModel.beginRemoveRows(self, QModelIndex, int, int)
beginResetModel(self)
blockSignals(self, bool) bool
buddy(self, QModelIndex) QModelIndex
canDropMimeData(self, QMimeData, Qt.DropAction, int, int, QModelIndex) bool
canFetchMore(self, QModelIndex) bool
SequenceAlignmentModel.changePersistentIndex(self, QModelIndex, QModelIndex)
changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])
checkIndex(self, QModelIndex, options: Union[QAbstractItemModel.CheckIndexOptions, QAbstractItemModel.CheckIndexOption] = QAbstractItemModel.CheckIndexOption.NoOption) bool
childEvent(self, QChildEvent)
children(self) List[QObject]
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.

columnsAboutToBeInserted

columnsAboutToBeInserted(self, QModelIndex, int, int) [signal]

columnsAboutToBeMoved

columnsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

columnsAboutToBeRemoved

columnsAboutToBeRemoved(self, QModelIndex, int, int) [signal]

columnsInserted

columnsInserted(self, QModelIndex, int, int) [signal]

columnsMoved

columnsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

columnsRemoved

columnsRemoved(self, QModelIndex, int, int) [signal]

connectNotify(self, QMetaMethod)
SequenceAlignmentModel.createIndex(self, int, int, object: object = 0) -> QModelIndex
customEvent(self, QEvent)
data(index, role=0, multiple_roles=None)

Provide data for the specified index and role. Subclasses normally do not need to redefine this method. Instead, new methods should be created and decorated with table_helper.data_method.

Parameters
  • index (QtCore.QModelIndex) – The index to return data for.

  • role (int) – The role to request data for.

  • multiple_roles (frozenset) – If role equals {MultipleRolesUserRolesEnum.MultipleRoles}, a set of roles to retrieve data for. Ignored otherwise.

Returns

The requested data. If role equals {MultipleRolesUserRolesEnum.MultipleRoles}, will be a dictionary of {role: value}. The dictionary not contain roles that are not provided by this model and may contain additional roles that were not explicitly requested.

Return type

object

dataChanged

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

SequenceAlignmentModel.decodeData(self, int, int, QModelIndex, QDataStream) -> bool
deleteLater(self)
destroyed

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

disconnect(QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, QMetaMethod)
dropMimeData(self, QMimeData, Qt.DropAction, int, int, QModelIndex) bool
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
encodeData(self, Iterable[QModelIndex], QDataStream)
endInsertColumns(self)
endInsertRows(self)
endMoveColumns(self)
endMoveRows(self)
endRemoveColumns(self)
endRemoveRows(self)
endResetModel(self)
event(self, QEvent) bool
eventFilter(self, QObject, QEvent) bool
fetchMore(self, QModelIndex)
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChild(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
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
SequenceAlignmentModel.hasIndex(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
headerDataChanged

headerDataChanged(self, Qt.Orientation, int, int) [signal]

SequenceAlignmentModel.index(self, int, int, parent: QModelIndex = QModelIndex()) -> QModelIndex
inherits(self, str) bool
insertColumn(self, int, parent: QModelIndex = QModelIndex()) bool
SequenceAlignmentModel.insertColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
insertRow(self, int, parent: QModelIndex = QModelIndex()) bool
SequenceAlignmentModel.insertRows(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
installEventFilter(self, QObject)
isSignalConnected(self, QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
itemData(self, QModelIndex) Dict[int, Any]
killTimer(self, 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, QModelIndex, int, Any, hits: int = 1, flags: Union[Qt.MatchFlags, Qt.MatchFlag] = Qt.MatchStartsWith | Qt.MatchWrap) List[QModelIndex]
metaObject(self) QMetaObject
mimeData(self, 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.

SequenceAlignmentModel.moveColumn(self, QModelIndex, int, QModelIndex, int) -> bool
SequenceAlignmentModel.moveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
SequenceAlignmentModel.moveRow(self, QModelIndex, int, QModelIndex, int) -> bool
SequenceAlignmentModel.moveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
moveToThread(self, QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, str) [signal]

parent(self) QObject
persistentIndexList(self) List[QModelIndex]
property(self, str) Any
pyqtConfigure(...)

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

receivers(self, PYQT_SIGNAL) int
removeColumn(self, int, parent: QModelIndex = QModelIndex()) bool
SequenceAlignmentModel.removeColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
removeEventFilter(self, QObject)
removeRow(self, int, parent: QModelIndex = QModelIndex()) bool
SequenceAlignmentModel.removeRows(self, int, 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.

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, QModelIndex, int, int) [signal]

rowsAboutToBeMoved

rowsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

rowsAboutToBeRemoved

rowsAboutToBeRemoved(self, QModelIndex, int, int) [signal]

rowsInserted

rowsInserted(self, QModelIndex, int, int) [signal]

rowsMoved

rowsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

rowsRemoved

rowsRemoved(self, QModelIndex, int, int) [signal]

sender(self) QObject
senderSignalIndex(self) int
setData(index, value, role=2)

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, int, Qt.Orientation, Any, role: int = Qt.ItemDataRole.EditRole) bool
setItemData(self, QModelIndex, Dict[int, Any]) bool
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) bool
SequenceAlignmentModel.sibling(self, int, int, QModelIndex) -> QModelIndex
signalsBlocked(self) bool
sort(self, int, order: Qt.SortOrder = Qt.AscendingOrder)
span(self, QModelIndex) QSize
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
submit(self) bool
supportedDragActions(self) Qt.DropActions
supportedDropActions(self) Qt.DropActions
thread(self) QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = - 1) str
class schrodinger.application.msv.gui.viewmodel.OptionsModelCache[source]

Bases: object

An object used to store display options that SequenceAlignmentModel needs access to. See SequenceAlignmentModel._setOptionsModel for additonal information. This class is required because we cannot set attributes on instances of object, as instances of that class do not have a __dict__ attribute. Subclasses of object don’t have that restriction.

class schrodinger.application.msv.gui.viewmodel.DropProxyMixin[source]

Bases: object

A mixin for proxies involved in drag-and-drop.

moveSelectionBelow(proxy_index)[source]

Move all selected sequences immediately below the specified index. Used for drag-and-drop.

Parameters

proxy_index (QtCore.QModelIndex) – The index to move selected sequences below.

class schrodinger.application.msv.gui.viewmodel.MouseOverPassthroughMixin[source]

Bases: object

A mixin for proxies involved in mouse-over state.

setMouseOverIndex(proxy_index)[source]
setContextOverIndex(proxy_index)[source]
isMouseOverIndex(proxy_index)[source]
class schrodinger.application.msv.gui.viewmodel.AnnotationSelectionPassthroughMixin[source]

Bases: object

setAnnSelectionState(proxy_index, selected)[source]
class schrodinger.application.msv.gui.viewmodel.GetAlignmentProxyMixin(*args, **kwargs)[source]

Bases: object

A mixin for proxies that fetches the alignment through their source model. This proxy also caches the source model in Python to avoid a C++ call when calling sourceModel(). Used in both the fixed and scrollable columns.

__init__(*args, **kwargs)[source]
setSourceModel(model)[source]
sourceModel()[source]
getAlignment()[source]

Return the underlying alignment

Returns

The alignment if the source model exists; else None

Return type

schrodinger.protein.alignment.BaseAlignment

class schrodinger.application.msv.gui.viewmodel.SeqExpansionProxyMixin[source]

Bases: object

A mixin for tree models that transmit sequence expansion information to their view. Used in both the fixed and scrollable columns.

seqExpansionChanged
setSourceModel(model)[source]
class schrodinger.application.msv.gui.viewmodel.ProxyMixin(*args, **kwargs)[source]

Bases: schrodinger.application.msv.gui.viewmodel.SeqExpansionProxyMixin, schrodinger.application.msv.gui.viewmodel.DropProxyMixin, schrodinger.application.msv.gui.viewmodel.GetAlignmentProxyMixin, schrodinger.ui.qt.table_speed_up.MultipleRolesRoleProxyPassthroughMixin

A mixin class that provides functionality common to all the annotation proxies (but not the fixed column proxies).

We also cache the sourceModel to avoid going through the C++ layer.

Note that this mixin should be listed first in the parents for the proxy classes that use it.

Variables

fixedColumnDataChanged (QtCore.pyqtSignal emitting a tuple of (enum.Enum, int)) – Signal emitted when the data in a fixed column is changed. Passes a tuple of the role and row index that are changing.

residueFormatChanged
residueSelectionChanged
fixedColumnDataChanged
rowHeightChanged
textSizeChanged
predictionsChanged
secondaryStructureChanged
domainsChanged
alnSetChanged
kinaseFeaturesChanged
kinaseConservationChanged
sequenceStructureChanged
getIndexForRes(res)[source]

Get the model index for the given residue.

Parameters

res (schrodinger.protein.residue.Residue) – A residue

Returns

The model index of the residue

Return type

QModelIndex

setResSelectionState(selection, selected, current=False)[source]

See SequenceAlignmentModel.setResSelectionState for method documentation.

setResRangeSelectionState(from_index, to_index, selected, columns, current=False)[source]

See SequenceAlignmentModel.setResRangeSelectionState for method documentation.

setSeqSelectionState(selection, selected)[source]

Mark the sequences specified by selection as either selected or deselected.

Parameters
  • selection (QtCore.QItemSelection) – A selection containing the entries to update.

  • selected (bool) – Whether the entries should be selected (True) or deselected (False).

clearResSelection()[source]
clearSeqSelection()[source]
getResSelection()[source]
getSelectedResIndices()[source]

Get indices for all selected residues.

Return type

list[QtCore.QModelIndex]

getSingleLetterCodeForSelectedResidues()[source]

Get the single letter code for all selected residues. This method assumes that a single block of residues from a single sequence is selected.

Return type

str

handlePick(proxy_index)[source]
expandSelectionToAnnotationValues(anno, ann_index)[source]
setSourceModel(model)[source]
getResidueDisplayMode()[source]

Return the current residue display mode setting.

Returns

The current residue display mode.

Return type

enum.Enum

isWorkspaceAln()[source]
Returns

Whether this model represents the workspace alignment.

Return type

bool

getFont()[source]
Returns

The current font.

Return type

QtGui.QFont

getAdjacentIndexForEditing(proxy_index, direction)[source]

See SequenceAlignmentModel.getAdjacentIndexForEditing for method documentation.

isSingleBlockSelected()[source]

Is a single block of residues (i.e. contiguous residues/gaps from one sequence or multiple adjacent sequences) selected? :rtype: bool

alnSetResSelected()[source]

Whether any selected residues are in sequences in an alignment set :rtype: bool

__init__(*args, **kwargs)
data(proxy_index, role, multiple_roles=None)
getAlignment()

Return the underlying alignment

Returns

The alignment if the source model exists; else None

Return type

schrodinger.protein.alignment.BaseAlignment

moveSelectionBelow(proxy_index)

Move all selected sequences immediately below the specified index. Used for drag-and-drop.

Parameters

proxy_index (QtCore.QModelIndex) – The index to move selected sequences below.

seqExpansionChanged
sourceModel()
class schrodinger.application.msv.gui.viewmodel.RowInsertionInfo(parent_row, parent_int_id, start, end)

Bases: tuple

__contains__(key, /)

Return key in self.

__len__()

Return len(self).

count(value, /)

Return number of occurrences of value.

end

Alias for field number 3

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

parent_int_id

Alias for field number 1

parent_row

Alias for field number 0

start

Alias for field number 2

class schrodinger.application.msv.gui.viewmodel.RowRemovalInfo(parent_row, parent_int_id, start, end)

Bases: tuple

__contains__(key, /)

Return key in self.

__len__()

Return len(self).

count(value, /)

Return number of occurrences of value.

end

Alias for field number 3

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

parent_int_id

Alias for field number 1

parent_row

Alias for field number 0

start

Alias for field number 2

class schrodinger.application.msv.gui.viewmodel.NestedProxy(parent=None)[source]

Bases: schrodinger.application.msv.gui.viewmodel.ModelMixin, PyQt5.QtCore.QAbstractProxyModel

A base class for proxy models that contain one level of nesting. The internal ID of indices will be either TOP_LEVEL or the row number of the parent row.

Note that QAbstractItemModel assumes that internal IDs are pointers to objects that represent the parent row. As such, it never updates internal IDs when updating persistent model indices. Because of this, this class reimplements beginInsertRows, endInsertRows, beginRemoveRows, and endRemoveRows to correctly update internal IDs. These methods aren’t virtual in QAbstractItemModel, but they’re only called from Python in all NestedProxy subclasses so our reimplementations get called instead of the QAbstractItemModel implementations.

This reimplementation follows the general pattern of the QAbstractItemModel implementation in order to minimize differences with QAbstractItemModel and hopefully avoid any potential issues caused by the change. As such, we update the persistent indices in endInsertRows/endRemoveRows instead of beginInsertRows/beginRemoveRows, and we keep a stack of row insertion/removal requests. In theory, this allows for nested row insertions and removals. In practice, Qt’s support for nested row insertions and removals is spotty. QSortFilterProxyModels don’t support them, and there’s no documentation on the various limitations and requirements when using other models and proxies. Properly handling nested row insertions and removals also tends to increase in complexity with the depth of the proxy stack, so we intentionally avoid them in all of the MSV viewmodels.

__init__(parent=None)[source]
NestedProxy.index(self, int, int, parent: QModelIndex = QModelIndex()) -> QModelIndex[source]
parent(self, QModelIndex) QModelIndex[source]
parent(self) QObject
hasChildren(self, parent: QModelIndex = QModelIndex()) bool[source]
buddy(self, QModelIndex) QModelIndex[source]
NestedProxy.beginInsertRows(self, QModelIndex, int, int)[source]
NestedProxy.beginRemoveRows(self, QModelIndex, int, int)[source]
endInsertRows(self)[source]
endRemoveRows(self)[source]
class CheckIndexOption(value)

Bases: enum.IntEnum

An enumeration.

DoNotUseParent = 2
IndexIsValid = 1
NoOption = 0
ParentIsInvalid = 4
class CheckIndexOptions
class CheckIndexOptions(Union[QAbstractItemModel.CheckIndexOptions, QAbstractItemModel.CheckIndexOption]) None
class CheckIndexOptions(QAbstractItemModel.CheckIndexOptions) None

Bases: sip.simplewrapper

__init__(*args, **kwargs)
HorizontalSortHint = 2
class LayoutChangeHint

Bases: int

NoLayoutChangeHint = 0
VerticalSortHint = 1
NestedProxy.beginInsertColumns(self, QModelIndex, int, int)
NestedProxy.beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
NestedProxy.beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
NestedProxy.beginRemoveColumns(self, QModelIndex, int, int)
beginResetModel(self)
blockSignals(self, bool) bool
canDropMimeData(self, QMimeData, Qt.DropAction, int, int, QModelIndex) bool
canFetchMore(self, QModelIndex) bool
NestedProxy.changePersistentIndex(self, QModelIndex, QModelIndex)
changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])
checkIndex(self, QModelIndex, options: Union[QAbstractItemModel.CheckIndexOptions, QAbstractItemModel.CheckIndexOption] = QAbstractItemModel.CheckIndexOption.NoOption) bool
childEvent(self, QChildEvent)
children(self) List[QObject]
columnCount(self, parent: QModelIndex = QModelIndex()) int
columnsAboutToBeInserted

columnsAboutToBeInserted(self, QModelIndex, int, int) [signal]

columnsAboutToBeMoved

columnsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

columnsAboutToBeRemoved

columnsAboutToBeRemoved(self, QModelIndex, int, int) [signal]

columnsInserted

columnsInserted(self, QModelIndex, int, int) [signal]

columnsMoved

columnsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

columnsRemoved

columnsRemoved(self, QModelIndex, int, int) [signal]

connectNotify(self, QMetaMethod)
NestedProxy.createIndex(self, int, int, object: object = 0) -> QModelIndex
customEvent(self, QEvent)
data(self, QModelIndex, role: int = Qt.DisplayRole) Any
dataChanged

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

NestedProxy.decodeData(self, int, int, QModelIndex, QDataStream) -> bool
deleteLater(self)
destroyed

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

disconnect(QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, QMetaMethod)
dropMimeData(self, QMimeData, Qt.DropAction, int, int, QModelIndex) bool
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
encodeData(self, Iterable[QModelIndex], QDataStream)
endInsertColumns(self)
endMoveColumns(self)
endMoveRows(self)
endRemoveColumns(self)
endResetModel(self)
event(self, QEvent) bool
eventFilter(self, QObject, QEvent) bool
fetchMore(self, QModelIndex)
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChild(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
flags(self, QModelIndex) Qt.ItemFlags
NestedProxy.hasIndex(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
headerData(self, int, Qt.Orientation, role: int = Qt.DisplayRole) Any
headerDataChanged

headerDataChanged(self, Qt.Orientation, int, int) [signal]

inherits(self, str) bool
insertColumn(self, int, parent: QModelIndex = QModelIndex()) bool
NestedProxy.insertColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
insertRow(self, int, parent: QModelIndex = QModelIndex()) bool
NestedProxy.insertRows(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
installEventFilter(self, QObject)
isSignalConnected(self, QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
itemData(self, QModelIndex) Dict[int, Any]
killTimer(self, 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]

mapFromSource(self, QModelIndex) QModelIndex
mapSelectionFromSource(self, QItemSelection) QItemSelection
mapSelectionToSource(self, QItemSelection) QItemSelection
mapToSource(self, QModelIndex) QModelIndex
match(self, QModelIndex, int, Any, hits: int = 1, flags: Union[Qt.MatchFlags, Qt.MatchFlag] = Qt.MatchStartsWith | Qt.MatchWrap) List[QModelIndex]
metaObject(self) QMetaObject
mimeData(self, Iterable[QModelIndex]) QMimeData
mimeTypes(self) List[str]
modelAboutToBeReset

modelAboutToBeReset(self) [signal]

modelReset

modelReset(self) [signal]

NestedProxy.moveColumn(self, QModelIndex, int, QModelIndex, int) -> bool
NestedProxy.moveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
NestedProxy.moveRow(self, QModelIndex, int, QModelIndex, int) -> bool
NestedProxy.moveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
moveToThread(self, QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, str) [signal]

persistentIndexList(self) List[QModelIndex]
property(self, str) Any
pyqtConfigure(...)

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

receivers(self, PYQT_SIGNAL) int
removeColumn(self, int, parent: QModelIndex = QModelIndex()) bool
NestedProxy.removeColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
removeEventFilter(self, QObject)
removeRow(self, int, parent: QModelIndex = QModelIndex()) bool
NestedProxy.removeRows(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
resetInternalData(self)
revert(self)
roleNames(self) Dict[int, QByteArray]
rowCount(self, parent: QModelIndex = QModelIndex()) int
rowsAboutToBeInserted

rowsAboutToBeInserted(self, QModelIndex, int, int) [signal]

rowsAboutToBeMoved

rowsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

rowsAboutToBeRemoved

rowsAboutToBeRemoved(self, QModelIndex, int, int) [signal]

rowsInserted

rowsInserted(self, QModelIndex, int, int) [signal]

rowsMoved

rowsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

rowsRemoved

rowsRemoved(self, QModelIndex, int, int) [signal]

sender(self) QObject
senderSignalIndex(self) int
setData(self, QModelIndex, Any, role: int = Qt.EditRole) bool
setHeaderData(self, int, Qt.Orientation, Any, role: int = Qt.EditRole) bool
setItemData(self, QModelIndex, Dict[int, Any]) bool
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) bool
setSourceModel(self, QAbstractItemModel)
NestedProxy.sibling(self, int, int, QModelIndex) -> QModelIndex
signalsBlocked(self) bool
sort(self, int, order: Qt.SortOrder = Qt.AscendingOrder)
sourceModel(self) QAbstractItemModel
sourceModelChanged

sourceModelChanged(self) [signal]

span(self, QModelIndex) QSize
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
submit(self) bool
supportedDragActions(self) Qt.DropActions
supportedDropActions(self) Qt.DropActions
thread(self) QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = - 1) str
class schrodinger.application.msv.gui.viewmodel.SequenceNums(all, structured_only)

Bases: tuple

__contains__(key, /)

Return key in self.

__len__()

Return len(self).

all

Alias for field number 0

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

structured_only

Alias for field number 1

class schrodinger.application.msv.gui.viewmodel.SequenceInfo(has_struc=None, anns=None)[source]

Bases: object

Information about a single sequence. Used in AnnotationProxyModel.

__init__(has_struc=None, anns=None)[source]
Parameters
  • has_struc (bool or NoneType) – Whether the sequence has an associated structure. May be None while the sequence is in the process of being added.

  • anns (list or NoneType) – A list of the currently shown sequence annotations for this sequence. Only populated when AnnotationProxyModel is grouping rows by sequence. Will be None if the rows are grouped by annotation.

class schrodinger.application.msv.gui.viewmodel.GroupByAnnotationInfo(ann, seq_numbers, ann_indexes=None)[source]

Bases: object

Information about a sequence annotation. Used in AnnotationProxyModel.

__init__(ann, seq_numbers, ann_indexes=None)[source]
Parameters
  • ann (enum.Enum) – The annotation type

  • seq_numbers (list) – A list of sequences (represented by an integer index) to display for this annotation.

  • ann_indexes (tuple[tuple[int]] or NoneType) – A tuple of tuples of annotation indexes for multi-value annotations (may have multiple rows per sequence) or None for standard annotations (one row per sequence).

property ann
property ann_indexes
__len__()[source]

Return the number of rows needed to display this annotation for all sequences. For standard annotations, equal to the number of sequences.

getSourceRowInfo(proxy_row)[source]

Map proxy_row to the correct source row and annotation index.

Returns

source row and multi-row annotation index. Annotation index will be None for standard annotations.

Return type

tuple(int, int or NoneType)

getProxyRowStart(source_row)[source]

Return the proxy row number representing the first row after any proxy rows corresponding to the given source row. This is used when a new source sequence is being inserted after source_row (which must already be present in self.seqs). This method will return the proxy index where insertion will start.

Return type

int

class schrodinger.application.msv.gui.viewmodel.PerRowFlagCacheProxyMixin(*args, **kwargs)[source]

Bases: schrodinger.ui.qt.table_speed_up.AbstractFlagCacheProxyMixin

A mixin to cache flags on a per-row basis instead of per-cell (which is what table_speed_up.FlagCacheProxyMixin does) since flags are the same across rows here.

Note

This mixin assumes that all indices in the same row have the same internal ID. This is true for any NestedProxy subclasses, but is not generally true for Qt tree models.

flags(index)[source]
__init__(*args, **kwargs)
setSourceModel(model)

When this class is mixed in to a proxy model, connect signals so that the cache is cleared whenever it contains stale data. This needs to be done before anything else, so we connect these signals before calling the super-class setSourceModel().

See QAbstractItemProxyModel documentation for additional method documentation.

class schrodinger.application.msv.gui.viewmodel.SequenceFilterProxyModel(parent=None)[source]

Bases: schrodinger.application.msv.gui.viewmodel.PerRowFlagCacheProxyMixin, schrodinger.application.msv.gui.viewmodel.ProxyMixin, schrodinger.application.msv.gui.viewmodel.NestedProxy

A mixin to cache flags on a per-row basis instead of per-cell (which is what table_speed_up.FlagCacheProxyMixin does) since flags are the same across rows here.

Note

This mixin assumes that all indices in the same row have the same internal ID. This is true for any NestedProxy subclasses, but is not generally true for Qt tree models.

__init__(parent=None)[source]
setActive(active)[source]
setSourceModel(model)[source]

When this class is mixed in to a proxy model, connect signals so that the cache is cleared whenever it contains stale data. This needs to be done before anything else, so we connect these signals before calling the super-class setSourceModel().

See QAbstractItemProxyModel documentation for additional method documentation.

mapFromSource(self, QModelIndex) QModelIndex[source]
mapToSource(self, QModelIndex) QModelIndex[source]
columnCount(self, parent: QModelIndex = QModelIndex()) int[source]
rowCount(self, parent: QModelIndex = QModelIndex()) int[source]
rowData(proxy_row, cols, roles)[source]
endInsertColumns(self)[source]
endRemoveColumns(self)[source]
class CheckIndexOption(value)

Bases: enum.IntEnum

An enumeration.

DoNotUseParent = 2
IndexIsValid = 1
NoOption = 0
ParentIsInvalid = 4
class CheckIndexOptions
class CheckIndexOptions(Union[QAbstractItemModel.CheckIndexOptions, QAbstractItemModel.CheckIndexOption]) None
class CheckIndexOptions(QAbstractItemModel.CheckIndexOptions) None

Bases: sip.simplewrapper

__init__(*args, **kwargs)
HorizontalSortHint = 2
class LayoutChangeHint

Bases: int

NoLayoutChangeHint = 0
VerticalSortHint = 1
alnSetChanged
alnSetResSelected()

Whether any selected residues are in sequences in an alignment set :rtype: bool

SequenceFilterProxyModel.beginInsertColumns(self, QModelIndex, int, int)
SequenceFilterProxyModel.beginInsertRows(self, QModelIndex, int, int)
SequenceFilterProxyModel.beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
SequenceFilterProxyModel.beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
SequenceFilterProxyModel.beginRemoveColumns(self, QModelIndex, int, int)
SequenceFilterProxyModel.beginRemoveRows(self, QModelIndex, int, int)
beginResetModel(self)
blockSignals(self, bool) bool
buddy(self, QModelIndex) QModelIndex
canDropMimeData(self, QMimeData, Qt.DropAction, int, int, QModelIndex) bool
canFetchMore(self, QModelIndex) bool
SequenceFilterProxyModel.changePersistentIndex(self, QModelIndex, QModelIndex)
changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])
checkIndex(self, QModelIndex, options: Union[QAbstractItemModel.CheckIndexOptions, QAbstractItemModel.CheckIndexOption] = QAbstractItemModel.CheckIndexOption.NoOption) bool
childEvent(self, QChildEvent)
children(self) List[QObject]
clearResSelection()
clearSeqSelection()
columnsAboutToBeInserted

columnsAboutToBeInserted(self, QModelIndex, int, int) [signal]

columnsAboutToBeMoved

columnsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

columnsAboutToBeRemoved

columnsAboutToBeRemoved(self, QModelIndex, int, int) [signal]

columnsInserted

columnsInserted(self, QModelIndex, int, int) [signal]

columnsMoved

columnsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

columnsRemoved

columnsRemoved(self, QModelIndex, int, int) [signal]

connectNotify(self, QMetaMethod)
SequenceFilterProxyModel.createIndex(self, int, int, object: object = 0) -> QModelIndex
customEvent(self, QEvent)
data(self, QModelIndex, role: int = Qt.DisplayRole) Any
dataChanged

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

SequenceFilterProxyModel.decodeData(self, int, int, QModelIndex, QDataStream) -> bool
deleteLater(self)
destroyed

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

disconnect(QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, QMetaMethod)
domainsChanged
dropMimeData(self, QMimeData, Qt.DropAction, int, int, QModelIndex) bool
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
encodeData(self, Iterable[QModelIndex], QDataStream)
endInsertRows(self)
endMoveColumns(self)
endMoveRows(self)
endRemoveRows(self)
endResetModel(self)
event(self, QEvent) bool
eventFilter(self, QObject, QEvent) bool
expandSelectionToAnnotationValues(anno, ann_index)
fetchMore(self, QModelIndex)
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChild(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
fixedColumnDataChanged
flags(self, QModelIndex) Qt.ItemFlags
getAdjacentIndexForEditing(proxy_index, direction)

See SequenceAlignmentModel.getAdjacentIndexForEditing for method documentation.

getAlignment()

Return the underlying alignment

Returns

The alignment if the source model exists; else None

Return type

schrodinger.protein.alignment.BaseAlignment

getFont()
Returns

The current font.

Return type

QtGui.QFont

getIndexForRes(res)

Get the model index for the given residue.

Parameters

res (schrodinger.protein.residue.Residue) – A residue

Returns

The model index of the residue

Return type

QModelIndex

getResSelection()
getResidueDisplayMode()

Return the current residue display mode setting.

Returns

The current residue display mode.

Return type

enum.Enum

getSelectedResIndices()

Get indices for all selected residues.

Return type

list[QtCore.QModelIndex]

getSingleLetterCodeForSelectedResidues()

Get the single letter code for all selected residues. This method assumes that a single block of residues from a single sequence is selected.

Return type

str

handlePick(proxy_index)
hasChildren(self, parent: QModelIndex = QModelIndex()) bool
SequenceFilterProxyModel.hasIndex(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
headerData(self, int, Qt.Orientation, role: int = Qt.DisplayRole) Any
headerDataChanged

headerDataChanged(self, Qt.Orientation, int, int) [signal]

SequenceFilterProxyModel.index(self, int, int, parent: QModelIndex = QModelIndex()) -> QModelIndex
inherits(self, str) bool
insertColumn(self, int, parent: QModelIndex = QModelIndex()) bool
SequenceFilterProxyModel.insertColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
insertRow(self, int, parent: QModelIndex = QModelIndex()) bool
SequenceFilterProxyModel.insertRows(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
installEventFilter(self, QObject)
isSignalConnected(self, QMetaMethod) bool
isSingleBlockSelected()

Is a single block of residues (i.e. contiguous residues/gaps from one sequence or multiple adjacent sequences) selected? :rtype: bool

isWidgetType(self) bool
isWindowType(self) bool
isWorkspaceAln()
Returns

Whether this model represents the workspace alignment.

Return type

bool

itemData(self, QModelIndex) Dict[int, Any]
killTimer(self, int)
kinaseConservationChanged
kinaseFeaturesChanged
layoutAboutToBeChanged

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

layoutChanged

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

mapSelectionFromSource(self, QItemSelection) QItemSelection
mapSelectionToSource(self, QItemSelection) QItemSelection
match(self, QModelIndex, int, Any, hits: int = 1, flags: Union[Qt.MatchFlags, Qt.MatchFlag] = Qt.MatchStartsWith | Qt.MatchWrap) List[QModelIndex]
metaObject(self) QMetaObject
mimeData(self, Iterable[QModelIndex]) QMimeData
mimeTypes(self) List[str]
modelAboutToBeReset

modelAboutToBeReset(self) [signal]

modelReset

modelReset(self) [signal]

SequenceFilterProxyModel.moveColumn(self, QModelIndex, int, QModelIndex, int) -> bool
SequenceFilterProxyModel.moveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
SequenceFilterProxyModel.moveRow(self, QModelIndex, int, QModelIndex, int) -> bool
SequenceFilterProxyModel.moveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
moveSelectionBelow(proxy_index)

Move all selected sequences immediately below the specified index. Used for drag-and-drop.

Parameters

proxy_index (QtCore.QModelIndex) – The index to move selected sequences below.

moveToThread(self, QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, str) [signal]

parent(self, QModelIndex) QModelIndex
parent(self) QObject
persistentIndexList(self) List[QModelIndex]
predictionsChanged
property(self, str) Any
pyqtConfigure(...)

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

receivers(self, PYQT_SIGNAL) int
removeColumn(self, int, parent: QModelIndex = QModelIndex()) bool
SequenceFilterProxyModel.removeColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
removeEventFilter(self, QObject)
removeRow(self, int, parent: QModelIndex = QModelIndex()) bool
SequenceFilterProxyModel.removeRows(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
resetInternalData(self)
residueFormatChanged
residueSelectionChanged
revert(self)
roleNames(self) Dict[int, QByteArray]
rowHeightChanged
rowsAboutToBeInserted

rowsAboutToBeInserted(self, QModelIndex, int, int) [signal]

rowsAboutToBeMoved

rowsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

rowsAboutToBeRemoved

rowsAboutToBeRemoved(self, QModelIndex, int, int) [signal]

rowsInserted

rowsInserted(self, QModelIndex, int, int) [signal]

rowsMoved

rowsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

rowsRemoved

rowsRemoved(self, QModelIndex, int, int) [signal]

secondaryStructureChanged
sender(self) QObject
senderSignalIndex(self) int
seqExpansionChanged
sequenceStructureChanged
setData(self, QModelIndex, Any, role: int = Qt.EditRole) bool
setHeaderData(self, int, Qt.Orientation, Any, role: int = Qt.EditRole) bool
setItemData(self, QModelIndex, Dict[int, Any]) bool
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) bool
setResRangeSelectionState(from_index, to_index, selected, columns, current=False)

See SequenceAlignmentModel.setResRangeSelectionState for method documentation.

setResSelectionState(selection, selected, current=False)

See SequenceAlignmentModel.setResSelectionState for method documentation.

setSeqSelectionState(selection, selected)

Mark the sequences specified by selection as either selected or deselected.

Parameters
  • selection (QtCore.QItemSelection) – A selection containing the entries to update.

  • selected (bool) – Whether the entries should be selected (True) or deselected (False).

SequenceFilterProxyModel.sibling(self, int, int, QModelIndex) -> QModelIndex
signalsBlocked(self) bool
sort(self, int, order: Qt.SortOrder = Qt.AscendingOrder)
sourceModel(self) QAbstractItemModel
sourceModelChanged

sourceModelChanged(self) [signal]

span(self, QModelIndex) QSize
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
submit(self) bool
supportedDragActions(self) Qt.DropActions
supportedDropActions(self) Qt.DropActions
textSizeChanged
thread(self) QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = - 1) str
class schrodinger.application.msv.gui.viewmodel.AnnotationProxyModel(parent=None)[source]

Bases: schrodinger.application.msv.gui.viewmodel.PerRowFlagCacheProxyMixin, schrodinger.ui.qt.table_speed_up.MultipleRolesRoleProxyMixin, schrodinger.application.msv.gui.viewmodel.ProxyMixin, schrodinger.application.msv.gui.viewmodel.NestedProxy

A mixin to cache flags on a per-row basis instead of per-cell (which is what table_speed_up.FlagCacheProxyMixin does) since flags are the same across rows here.

Note

This mixin assumes that all indices in the same row have the same internal ID. This is true for any NestedProxy subclasses, but is not generally true for Qt tree models.

groupByChanged
tableWidthChangedSignal
ROLE_MAPPINGS = {0: (0, <RoleBase.SeqAnnotation: 10256>, <RoleBase.GlobalAnnotation: 11256>), 3: (3, <RoleBase.SeqToolTip: 18256>, <RoleBase.GlobalToolTip: 19256>), 8: (8, <RoleBase.SeqBackground: 14256>, <RoleBase.GlobalBackground: 15256>), 9: (9, <RoleBase.SeqForeground: 16256>, <RoleBase.GlobalForeground: 17256>), CustomRole.DataRange: (None, <RoleBase.SeqAnnotationRange: 12256>, <RoleBase.GlobalAnnotationRange: 13256>)}
MULTI_ROW_ANN_BACKGROUND_ROLE_BASE = {<ANNOTATION_TYPES.binding_sites: 19>: <RoleBase.BindingSiteBackground: 23256>, <ANNOTATION_TYPES.kinase_conservation: 31>: <RoleBase.KinaseConservationBackground: 26256>, <ANNOTATION_TYPES.domains: 20>: <RoleBase.DomainBackground: 28256>}
MULTI_ROW_ANN_TOOLTIP_ROLE_BASE = {<ANNOTATION_TYPES.binding_sites: 19>: <RoleBase.BindingSiteToolTip: 25256>, <ANNOTATION_TYPES.kinase_conservation: 31>: <RoleBase.KinaseConservationToolTip: 27256>, <ANNOTATION_TYPES.domains: 20>: <RoleBase.DomainToolTip: 30256>}
ROW_HEIGHT_SCALE_ANNS = (<ANNOTATION_TYPES.alignment_set: 2>, <ANNOTATION_TYPES.binding_sites: 19>, <ANNOTATION_TYPES.kinase_conservation: 31>, <ANNOTATION_TYPES.domains: 20>, <ANNOTATION_TYPES.disulfide_bonds: 5>, <ANNOTATION_TYPES.antibody_cdr: 21>, <ANNOTATION_TYPES.kinase_features: 30>, <ANNOTATION_TYPES.pairwise_constraints: 1>, <ANNOTATION_TYPES.secondary_structure: 18>, <ANNOTATION_TYPES.pfam: 23>, <ANNOTATION_TYPES.pred_accessibility: 26>, <ANNOTATION_TYPES.pred_domain_arr: 28>, <ANNOTATION_TYPES.pred_disordered: 27>, <ANNOTATION_TYPES.pred_disulfide_bonds: 24>, <ANNOTATION_TYPES.pred_secondary_structure: 25>, <ANNOTATION_TYPES.proximity_constraints: 29>)
NO_GLOBAL_DATA_ROLES = {CustomRole.Seq, CustomRole.Included, CustomRole.EntryID, CustomRole.HasStructure, CustomRole.ResSelected}
__init__(parent=None)[source]
setOptionsModel(options_model)[source]

Set the options model for the model, which reports on various display options that the user can set through the GUI.

Accessing OptionsModel attributes is slow enough that it affects painting speed, so we instead use an OptionsModelCache in this class. Note that the OptionsModelCache instance is read-only and must not be used to change options.

Parameters

options_model (schrodinger.application.msv.gui.gui_models. OptionsModel) – The widget options.

setSourceModel(model)[source]

When this class is mixed in to a proxy model, connect signals so that the cache is cleared whenever it contains stale data. This needs to be done before anything else, so we connect these signals before calling the super-class setSourceModel().

See QAbstractItemProxyModel documentation for additional method documentation.

rowCount(self, parent: QModelIndex = QModelIndex()) int[source]
columnCount(self, parent: QModelIndex = QModelIndex()) int[source]
mapFromSource(self, QModelIndex) QModelIndex[source]
mapToSource(self, QModelIndex) QModelIndex[source]
setData(self, QModelIndex, Any, role: int = Qt.EditRole) bool[source]
data(proxy_index, role=0, multiple_roles=None)[source]

Provide data for the specified index and role. Subclasses normally do not need to redefine this method. Instead, new methods should be created and decorated with table_helper.data_method.

Parameters
  • index (QtCore.QModelIndex) – The index to return data for.

  • role (int) – The role to request data for.

  • multiple_roles (frozenset) – If role equals {MultipleRolesUserRolesEnum.MultipleRoles}, a set of roles to retrieve data for. Ignored otherwise.

Returns

The requested data. If role equals {MultipleRolesUserRolesEnum.MultipleRoles}, will be a dictionary of {role: value}. The dictionary not contain roles that are not provided by this model and may contain additional roles that were not explicitly requested.

Return type

object

rowData(proxy_row, cols, internal_id, roles)[source]

Fetch data for multiple roles for multiple indices in the same row. Note that this method does minimal sanity checking of its input for performance reasons, as it is called during painting. The arguments are assumed to refer to valid indices. Use data instead if more sanity checking is required.

Parameters
  • proxy_row (int) – The row number to fetch data for.

  • cols (list(int)) – A list of columns to fetch data for.

  • internal_id (int) – The parent row (or TOP_LEVEL for top-level rows) of the row to fetch data for.

  • roles (list(int)) – A list of roles to fetch data for.

Returns

{role: data} dictionaries for each requested column. Note that the keys of these dictionaries may not match roles. Data for additional roles may be included (e.g. if that data was required to calculate data for a requested role). Data for requested roles may not be included if those roles are not applicable to the specified row (e.g. spacer rows may not provide data beyond row type and row title).

Return type

list(dict(int, object))

setMouseOverIndex(proxy_index)[source]

Set the given index as having the mouse over it

Parameters

proxy_index (QtCore.QModelIndex or None) – The index the mouse is over, or None to clear the mouse over index

setContextOverIndex(proxy_index)[source]

Set the given index as having the context menu over it

Parameters

proxy_index (QtCore.QModelIndex) – The index the context menu is over

isMouseOverIndex(proxy_index)[source]
Returns

Whether the given index represents a row that has the mouse over it

setAnnSelectionState(proxy_index, selected)[source]
flags(self, QModelIndex) Qt.ItemFlags[source]
getGroupBy()[source]

Are the rows currently grouped by sequence or by annotation type?

Returns

The current setting

Return type

GroupBy

getShownRowTypes()[source]

Return a set of allowed annotation types

Returns

A set of annotation types. Note that the returned value is a copy of the attribute variable, so modifying it will not have any effect on this proxy.

Return type

set

getNumShownGlobalAnnotations()[source]

Return the number of shown global annotations

endInsertColumns(self)[source]
endRemoveColumns(self)[source]
tableWidthChanged(width)[source]

Emit the tableWidthChangedSignal with the specified width. The RowWrapProxyModel should receive this signal and adjust the wrapping as necessary.

Parameters

width (int) – The current number of columns in the table

rowWrapEnabled()[source]
Returns

Whether this model provides row-wrapped data.

Type

bool

Warning

You probably don’t want to use this method. Whenever possible, you should pass information to the model and have it respond as appropriate (i.e. tell, don’t ask). This method should only be used for view features that function differently depending on whether the model is row-wrapped or not (e.g. drag-and-drop auto-scrolling).

getPickingMode()[source]
Returns

The current picking mode

Warning

This method should only be used for view features that function differently depending on the pick mode (e.g. mouse clicks).

handlePick(index)[source]

Handle a pick event at the given proxy index.

Has no effect if the pick mode is not HMBindingSite or HMProximity.

class CheckIndexOption(value)

Bases: enum.IntEnum

An enumeration.

DoNotUseParent = 2
IndexIsValid = 1
NoOption = 0
ParentIsInvalid = 4
class CheckIndexOptions
class CheckIndexOptions(Union[QAbstractItemModel.CheckIndexOptions, QAbstractItemModel.CheckIndexOption]) None
class CheckIndexOptions(QAbstractItemModel.CheckIndexOptions) None

Bases: sip.simplewrapper

__init__(*args, **kwargs)
HorizontalSortHint = 2
class LayoutChangeHint

Bases: int

NoLayoutChangeHint = 0
VerticalSortHint = 1
alnSetChanged
alnSetResSelected()

Whether any selected residues are in sequences in an alignment set :rtype: bool

AnnotationProxyModel.beginInsertColumns(self, QModelIndex, int, int)
AnnotationProxyModel.beginInsertRows(self, QModelIndex, int, int)
AnnotationProxyModel.beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
AnnotationProxyModel.beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
AnnotationProxyModel.beginRemoveColumns(self, QModelIndex, int, int)
AnnotationProxyModel.beginRemoveRows(self, QModelIndex, int, int)
beginResetModel(self)
blockSignals(self, bool) bool
buddy(self, QModelIndex) QModelIndex
canDropMimeData(self, QMimeData, Qt.DropAction, int, int, QModelIndex) bool
canFetchMore(self, QModelIndex) bool
AnnotationProxyModel.changePersistentIndex(self, QModelIndex, QModelIndex)
changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])
checkIndex(self, QModelIndex, options: Union[QAbstractItemModel.CheckIndexOptions, QAbstractItemModel.CheckIndexOption] = QAbstractItemModel.CheckIndexOption.NoOption) bool
childEvent(self, QChildEvent)
children(self) List[QObject]
clearResSelection()
clearSeqSelection()
columnsAboutToBeInserted

columnsAboutToBeInserted(self, QModelIndex, int, int) [signal]

columnsAboutToBeMoved

columnsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

columnsAboutToBeRemoved

columnsAboutToBeRemoved(self, QModelIndex, int, int) [signal]

columnsInserted

columnsInserted(self, QModelIndex, int, int) [signal]

columnsMoved

columnsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

columnsRemoved

columnsRemoved(self, QModelIndex, int, int) [signal]

connectNotify(self, QMetaMethod)
AnnotationProxyModel.createIndex(self, int, int, object: object = 0) -> QModelIndex
customEvent(self, QEvent)
dataChanged

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

AnnotationProxyModel.decodeData(self, int, int, QModelIndex, QDataStream) -> bool
deleteLater(self)
destroyed

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

disconnect(QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, QMetaMethod)
domainsChanged
dropMimeData(self, QMimeData, Qt.DropAction, int, int, QModelIndex) bool
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
encodeData(self, Iterable[QModelIndex], QDataStream)
endInsertRows(self)
endMoveColumns(self)
endMoveRows(self)
endRemoveRows(self)
endResetModel(self)
event(self, QEvent) bool
eventFilter(self, QObject, QEvent) bool
expandSelectionToAnnotationValues(anno, ann_index)
fetchMore(self, QModelIndex)
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChild(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
fixedColumnDataChanged
getAdjacentIndexForEditing(proxy_index, direction)

See SequenceAlignmentModel.getAdjacentIndexForEditing for method documentation.

getAlignment()

Return the underlying alignment

Returns

The alignment if the source model exists; else None

Return type

schrodinger.protein.alignment.BaseAlignment

getFont()
Returns

The current font.

Return type

QtGui.QFont

getIndexForRes(res)

Get the model index for the given residue.

Parameters

res (schrodinger.protein.residue.Residue) – A residue

Returns

The model index of the residue

Return type

QModelIndex

getResSelection()
getResidueDisplayMode()

Return the current residue display mode setting.

Returns

The current residue display mode.

Return type

enum.Enum

getSelectedResIndices()

Get indices for all selected residues.

Return type

list[QtCore.QModelIndex]

getSingleLetterCodeForSelectedResidues()

Get the single letter code for all selected residues. This method assumes that a single block of residues from a single sequence is selected.

Return type

str

hasChildren(self, parent: QModelIndex = QModelIndex()) bool
AnnotationProxyModel.hasIndex(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
headerData(self, int, Qt.Orientation, role: int = Qt.DisplayRole) Any
headerDataChanged

headerDataChanged(self, Qt.Orientation, int, int) [signal]

AnnotationProxyModel.index(self, int, int, parent: QModelIndex = QModelIndex()) -> QModelIndex
inherits(self, str) bool
insertColumn(self, int, parent: QModelIndex = QModelIndex()) bool
AnnotationProxyModel.insertColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
insertRow(self, int, parent: QModelIndex = QModelIndex()) bool
AnnotationProxyModel.insertRows(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
installEventFilter(self, QObject)
isSignalConnected(self, QMetaMethod) bool
isSingleBlockSelected()

Is a single block of residues (i.e. contiguous residues/gaps from one sequence or multiple adjacent sequences) selected? :rtype: bool

isWidgetType(self) bool
isWindowType(self) bool
isWorkspaceAln()
Returns

Whether this model represents the workspace alignment.

Return type

bool

itemData(self, QModelIndex) Dict[int, Any]
killTimer(self, int)
kinaseConservationChanged
kinaseFeaturesChanged
layoutAboutToBeChanged

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

layoutChanged

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

mapSelectionFromSource(self, QItemSelection) QItemSelection
mapSelectionToSource(self, QItemSelection) QItemSelection
match(self, QModelIndex, int, Any, hits: int = 1, flags: Union[Qt.MatchFlags, Qt.MatchFlag] = Qt.MatchStartsWith | Qt.MatchWrap) List[QModelIndex]
metaObject(self) QMetaObject
mimeData(self, Iterable[QModelIndex]) QMimeData
mimeTypes(self) List[str]
modelAboutToBeReset

modelAboutToBeReset(self) [signal]

modelReset

modelReset(self) [signal]

AnnotationProxyModel.moveColumn(self, QModelIndex, int, QModelIndex, int) -> bool
AnnotationProxyModel.moveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
AnnotationProxyModel.moveRow(self, QModelIndex, int, QModelIndex, int) -> bool
AnnotationProxyModel.moveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
moveSelectionBelow(proxy_index)

Move all selected sequences immediately below the specified index. Used for drag-and-drop.

Parameters

proxy_index (QtCore.QModelIndex) – The index to move selected sequences below.

moveToThread(self, QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, str) [signal]

parent(self, QModelIndex) QModelIndex
parent(self) QObject
persistentIndexList(self) List[QModelIndex]
predictionsChanged
property(self, str) Any
pyqtConfigure(...)

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

receivers(self, PYQT_SIGNAL) int
removeColumn(self, int, parent: QModelIndex = QModelIndex()) bool
AnnotationProxyModel.removeColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
removeEventFilter(self, QObject)
removeRow(self, int, parent: QModelIndex = QModelIndex()) bool
AnnotationProxyModel.removeRows(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
resetInternalData(self)
residueFormatChanged
residueSelectionChanged
revert(self)
roleNames(self) Dict[int, QByteArray]
rowHeightChanged
rowsAboutToBeInserted

rowsAboutToBeInserted(self, QModelIndex, int, int) [signal]

rowsAboutToBeMoved

rowsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

rowsAboutToBeRemoved

rowsAboutToBeRemoved(self, QModelIndex, int, int) [signal]

rowsInserted

rowsInserted(self, QModelIndex, int, int) [signal]

rowsMoved

rowsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

rowsRemoved

rowsRemoved(self, QModelIndex, int, int) [signal]

secondaryStructureChanged
sender(self) QObject
senderSignalIndex(self) int
seqExpansionChanged
sequenceStructureChanged
setHeaderData(self, int, Qt.Orientation, Any, role: int = Qt.EditRole) bool
setItemData(self, QModelIndex, Dict[int, Any]) bool
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) bool
setResRangeSelectionState(from_index, to_index, selected, columns, current=False)

See SequenceAlignmentModel.setResRangeSelectionState for method documentation.

setResSelectionState(selection, selected, current=False)

See SequenceAlignmentModel.setResSelectionState for method documentation.

setSeqSelectionState(selection, selected)

Mark the sequences specified by selection as either selected or deselected.

Parameters
  • selection (QtCore.QItemSelection) – A selection containing the entries to update.

  • selected (bool) – Whether the entries should be selected (True) or deselected (False).

AnnotationProxyModel.sibling(self, int, int, QModelIndex) -> QModelIndex
signalsBlocked(self) bool
sort(self, int, order: Qt.SortOrder = Qt.AscendingOrder)
sourceModel(self) QAbstractItemModel
sourceModelChanged

sourceModelChanged(self) [signal]

span(self, QModelIndex) QSize
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
submit(self) bool
supportedDragActions(self) Qt.DropActions
supportedDropActions(self) Qt.DropActions
textSizeChanged
thread(self) QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = - 1) str
class schrodinger.application.msv.gui.viewmodel.GroupByProxyMixin[source]

Bases: object

groupByChanged
setSourceModel(model)[source]
getGroupBy()[source]
Returns

The current GroupBy setting.

Return type

viewconstants.GroupBy

class schrodinger.application.msv.gui.viewmodel.PostAnnotationProxyMixin(*args, **kwargs)[source]

Bases: schrodinger.application.msv.gui.viewmodel.GroupByProxyMixin, schrodinger.application.msv.gui.viewmodel.MouseOverPassthroughMixin, schrodinger.application.msv.gui.viewmodel.AnnotationSelectionPassthroughMixin, schrodinger.application.msv.gui.viewmodel.ProxyMixin

A mixin for all proxies that are used after the AnnotationProxyModel.

getShownRowTypes()[source]

See AnnotationProxyModel.getShownRowTypes for method documentation.

getNumShownGlobalAnnotations()[source]

See AnnotationProxyModel.getNumShownGlobalAnnotations for method documentation

rowWrapEnabled()[source]

See AnnotationProxyModel.rowWrapEnabled for method documentation

getPickingMode()[source]

See AnnotationProxyModel.getPickingMode for method documentation

__init__(*args, **kwargs)
alnSetChanged
alnSetResSelected()

Whether any selected residues are in sequences in an alignment set :rtype: bool

clearResSelection()
clearSeqSelection()
data(proxy_index, role, multiple_roles=None)
domainsChanged
expandSelectionToAnnotationValues(anno, ann_index)
fixedColumnDataChanged
getAdjacentIndexForEditing(proxy_index, direction)

See SequenceAlignmentModel.getAdjacentIndexForEditing for method documentation.

getAlignment()

Return the underlying alignment

Returns

The alignment if the source model exists; else None

Return type

schrodinger.protein.alignment.BaseAlignment

getFont()
Returns

The current font.

Return type

QtGui.QFont

getGroupBy()
Returns

The current GroupBy setting.

Return type

viewconstants.GroupBy

getIndexForRes(res)

Get the model index for the given residue.

Parameters

res (schrodinger.protein.residue.Residue) – A residue

Returns

The model index of the residue

Return type

QModelIndex

getResSelection()
getResidueDisplayMode()

Return the current residue display mode setting.

Returns

The current residue display mode.

Return type

enum.Enum

getSelectedResIndices()

Get indices for all selected residues.

Return type

list[QtCore.QModelIndex]

getSingleLetterCodeForSelectedResidues()

Get the single letter code for all selected residues. This method assumes that a single block of residues from a single sequence is selected.

Return type

str

groupByChanged
handlePick(proxy_index)
isMouseOverIndex(proxy_index)
isSingleBlockSelected()

Is a single block of residues (i.e. contiguous residues/gaps from one sequence or multiple adjacent sequences) selected? :rtype: bool

isWorkspaceAln()
Returns

Whether this model represents the workspace alignment.

Return type

bool

kinaseConservationChanged
kinaseFeaturesChanged
moveSelectionBelow(proxy_index)

Move all selected sequences immediately below the specified index. Used for drag-and-drop.

Parameters

proxy_index (QtCore.QModelIndex) – The index to move selected sequences below.

predictionsChanged
residueFormatChanged
residueSelectionChanged
rowHeightChanged
secondaryStructureChanged
seqExpansionChanged
sequenceStructureChanged
setAnnSelectionState(proxy_index, selected)
setContextOverIndex(proxy_index)
setMouseOverIndex(proxy_index)
setResRangeSelectionState(from_index, to_index, selected, columns, current=False)

See SequenceAlignmentModel.setResRangeSelectionState for method documentation.

setResSelectionState(selection, selected, current=False)

See SequenceAlignmentModel.setResSelectionState for method documentation.

setSeqSelectionState(selection, selected)

Mark the sequences specified by selection as either selected or deselected.

Parameters
  • selection (QtCore.QItemSelection) – A selection containing the entries to update.

  • selected (bool) – Whether the entries should be selected (True) or deselected (False).

setSourceModel(model)
sourceModel()
textSizeChanged
class schrodinger.application.msv.gui.viewmodel.RowWrapInsertingRows(old_source_row_count, new_source_row_count, source_start, source_end)[source]

Bases: object

An object to store RowWrapProxyModel bookkeeping for the insertion of top-level rows.

Variables
  • old_source_row_count (int) – The number of rows in the source model before the insertion.

  • new_source_row_count (int) – The number of rows in the source model after the insertion.

  • source_start (int) – The row number of the first row being inserted.

  • source_start – The row number of the last row being inserted.

  • num_new_rows (int) – The number of rows being inserted.

  • wrap (int) – The wrap of RowWrapProxyModel that rows were just inserted into - see RowWrapProxyModel._sourceRowsAboutToBeInserted.

  • update_row_num (int) – The row number of RowWrapProxyModel that was just updated; i.e., that just had child rows inserted into it - see RowWrapProxyModel._sourceRowsInserted.

__init__(old_source_row_count, new_source_row_count, source_start, source_end)[source]
class schrodinger.application.msv.gui.viewmodel.RowWrapRemovingRows(old_source_row_count, new_source_row_count, source_start, source_end)[source]

Bases: object

An object to store RowWrapProxyModel bookkeeping for the removal of top-level rows.

Variables
  • old_source_row_count (int) – The number of rows in the source model before the removal.

  • new_source_row_count (int) – The number of rows in the source model after the removal.

  • source_start (int) – The row number of the first row being removed.

  • source_start – The row number of the last row being removed.

  • num_rem_rows – The number of rows being removed.

  • wrap (int) – The wrap of RowWrapProxyModel that rows were just removed from - see RowWrapProxyModel._sourceRowsAboutToBeRemoved.

__init__(old_source_row_count, new_source_row_count, source_start, source_end)[source]
class schrodinger.application.msv.gui.viewmodel.RowWrapInsertingChildRows(source_parent_row, source_start, source_end)[source]

Bases: object

An object to store RowWrapProxyModel bookkeeping for the insertion of child rows.

Variables
  • source_parent_row (int) – The row number of the top-level row that the child rows are being inserted into.

  • source_start (int) – The row number of the first row being inserted.

  • source_start – The row number of the last row being inserted.

  • num_new_rows (int) – The number of rows being inserted.

  • wrap (int) – The wrap of RowWrapProxyModel that rows were just inserted into - see RowWrapProxyModel._sourceRowsAboutToBeInserted.

__init__(source_parent_row, source_start, source_end)[source]
class schrodinger.application.msv.gui.viewmodel.RowWrapRemovingChildRows(source_parent_row, source_start, source_end)[source]

Bases: object

An object to store RowWrapProxyModel bookkeeping for the removal of child rows.

Variables
  • source_parent_row (int) – The row number of the top-level row that the child rows are being removed from.

  • source_start (int) – The row number of the first row being removed.

  • source_start – The row number of the last row being removed.

  • num_rem_rows – The number of rows being removed.

  • wrap (int) – The wrap of RowWrapProxyModel that rows were just removed from - see RowWrapProxyModel._sourceRowsAboutToBeRemoved.

__init__(source_parent_row, source_start, source_end)[source]
class schrodinger.application.msv.gui.viewmodel.RowWrapProxyModel(parent=None)[source]

Bases: schrodinger.application.msv.gui.viewmodel.PerRowFlagCacheProxyMixin, schrodinger.application.msv.gui.viewmodel.PostAnnotationProxyMixin, schrodinger.application.msv.gui.viewmodel.NestedProxy

A mixin to cache flags on a per-row basis instead of per-cell (which is what table_speed_up.FlagCacheProxyMixin does) since flags are the same across rows here.

Note

This mixin assumes that all indices in the same row have the same internal ID. This is true for any NestedProxy subclasses, but is not generally true for Qt tree models.

__init__(parent=None)[source]
tableWidthChanged(width)[source]

Wrap the table to the specified number of columns.

Parameters

width (int) – The number of columns to wrap to.

setSourceModel(model)[source]

When this class is mixed in to a proxy model, connect signals so that the cache is cleared whenever it contains stale data. This needs to be done before anything else, so we connect these signals before calling the super-class setSourceModel().

See QAbstractItemProxyModel documentation for additional method documentation.

columnCount(self, parent: QModelIndex = QModelIndex()) int[source]
rowCount(self, parent: QModelIndex = QModelIndex()) int[source]
mapFromSource(self, QModelIndex) QModelIndex[source]
mapToSource(proxy_index, *, map_past_end_to_last_col=False)[source]

Map an index from this proxy to the source model.

Parameters
  • proxy_index (QtCore.QModelIndex) – The proxy index to map.

  • map_past_end_to_last_col (bool) – If False, indices in the last wrap that are past the end of the source model will be mapped to an invalid index. If True, these indices will be mapped to the last valid index in their row.

flags(self, QModelIndex) Qt.ItemFlags[source]
data(index, role=0, multiple_roles=None)[source]

Returns the data stored under the given role for the item referred to by index. If role is CustomRole.MultipleRoles, then data is returned for all roles specified in multiple_roles. See Qt documentation for additional information.

Parameters
  • index (QModelIndex) – The index to fetch data for.

  • role (int) – The role to fetch data for.

  • multiple_roles (list(int) or NoneType) – A list of roles to fetch data. Only applies if role is CustomRole.MultipleRoles.

Returns

The data specified by role for index, or a dictionary mapping roles to their values if multiple roles are requested.

Return type

object or dict(int, object)

rowData(proxy_row, proxy_cols, proxy_internal_id, roles)[source]

Fetch data for multiple roles for multiple indices in the same row. Note that this method does minimal sanity checking of its input for performance reasons, as it is called during painting. The arguments are assumed to refer to valid indices. Use data instead if more sanity checking is required.

Parameters
  • row (int) – The row number to fetch data for.

  • proxy_cols (list(int)) – A list of columns to fetch data for. Columns numbers must be sorted in ascending order.

  • proxy_internal_id (int) – The parent row (or TOP_LEVEL for top- level rows) of the row to fetch data for.

  • roles (list(int)) – A list of roles to fetch data for.

Returns

{role: data} dictionaries for each requested column. Note that the keys of these dictionaries may not match roles. Data for additional roles may be included (e.g. if that data was required to calculate data for a requested role). Data for requested roles may not be included if those roles are not applicable to the specified row (i.e. spacer rows do not provide data beyond row type and spacer type).

Return type

list(dict(int, object))

headerData(self, int, Qt.Orientation, role: int = Qt.DisplayRole) Any[source]
rowWrapEnabled()[source]
Returns

Whether this model provides row-wrapped data.

Type

bool

setResRangeSelectionState(from_index, to_index, selected, columns, current=False)[source]

See SequenceAlignmentModel.setResRangeSelectionState for method documentation.

class CheckIndexOption(value)

Bases: enum.IntEnum

An enumeration.

DoNotUseParent = 2
IndexIsValid = 1
NoOption = 0
ParentIsInvalid = 4
class CheckIndexOptions
class CheckIndexOptions(Union[QAbstractItemModel.CheckIndexOptions, QAbstractItemModel.CheckIndexOption]) None
class CheckIndexOptions(QAbstractItemModel.CheckIndexOptions) None

Bases: sip.simplewrapper

__init__(*args, **kwargs)
HorizontalSortHint = 2
class LayoutChangeHint

Bases: int

NoLayoutChangeHint = 0
VerticalSortHint = 1
alnSetChanged
alnSetResSelected()

Whether any selected residues are in sequences in an alignment set :rtype: bool

RowWrapProxyModel.beginInsertColumns(self, QModelIndex, int, int)
RowWrapProxyModel.beginInsertRows(self, QModelIndex, int, int)
RowWrapProxyModel.beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
RowWrapProxyModel.beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
RowWrapProxyModel.beginRemoveColumns(self, QModelIndex, int, int)
RowWrapProxyModel.beginRemoveRows(self, QModelIndex, int, int)
beginResetModel(self)
blockSignals(self, bool) bool
buddy(self, QModelIndex) QModelIndex
canDropMimeData(self, QMimeData, Qt.DropAction, int, int, QModelIndex) bool
canFetchMore(self, QModelIndex) bool
RowWrapProxyModel.changePersistentIndex(self, QModelIndex, QModelIndex)
changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])
checkIndex(self, QModelIndex, options: Union[QAbstractItemModel.CheckIndexOptions, QAbstractItemModel.CheckIndexOption] = QAbstractItemModel.CheckIndexOption.NoOption) bool
childEvent(self, QChildEvent)
children(self) List[QObject]
clearResSelection()
clearSeqSelection()
columnsAboutToBeInserted

columnsAboutToBeInserted(self, QModelIndex, int, int) [signal]

columnsAboutToBeMoved

columnsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

columnsAboutToBeRemoved

columnsAboutToBeRemoved(self, QModelIndex, int, int) [signal]

columnsInserted

columnsInserted(self, QModelIndex, int, int) [signal]

columnsMoved

columnsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

columnsRemoved

columnsRemoved(self, QModelIndex, int, int) [signal]

connectNotify(self, QMetaMethod)
RowWrapProxyModel.createIndex(self, int, int, object: object = 0) -> QModelIndex
customEvent(self, QEvent)
dataChanged

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

RowWrapProxyModel.decodeData(self, int, int, QModelIndex, QDataStream) -> bool
deleteLater(self)
destroyed

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

disconnect(QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, QMetaMethod)
domainsChanged
dropMimeData(self, QMimeData, Qt.DropAction, int, int, QModelIndex) bool
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
encodeData(self, Iterable[QModelIndex], QDataStream)
endInsertColumns(self)
endInsertRows(self)
endMoveColumns(self)
endMoveRows(self)
endRemoveColumns(self)
endRemoveRows(self)
endResetModel(self)
event(self, QEvent) bool
eventFilter(self, QObject, QEvent) bool
expandSelectionToAnnotationValues(anno, ann_index)
fetchMore(self, QModelIndex)
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChild(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
fixedColumnDataChanged
getAdjacentIndexForEditing(proxy_index, direction)

See SequenceAlignmentModel.getAdjacentIndexForEditing for method documentation.

getAlignment()

Return the underlying alignment

Returns

The alignment if the source model exists; else None

Return type

schrodinger.protein.alignment.BaseAlignment

getFont()
Returns

The current font.

Return type

QtGui.QFont

getGroupBy()
Returns

The current GroupBy setting.

Return type

viewconstants.GroupBy

getIndexForRes(res)

Get the model index for the given residue.

Parameters

res (schrodinger.protein.residue.Residue) – A residue

Returns

The model index of the residue

Return type

QModelIndex

getNumShownGlobalAnnotations()

See AnnotationProxyModel.getNumShownGlobalAnnotations for method documentation

getPickingMode()

See AnnotationProxyModel.getPickingMode for method documentation

getResSelection()
getResidueDisplayMode()

Return the current residue display mode setting.

Returns

The current residue display mode.

Return type

enum.Enum

getSelectedResIndices()

Get indices for all selected residues.

Return type

list[QtCore.QModelIndex]

getShownRowTypes()

See AnnotationProxyModel.getShownRowTypes for method documentation.

getSingleLetterCodeForSelectedResidues()

Get the single letter code for all selected residues. This method assumes that a single block of residues from a single sequence is selected.

Return type

str

groupByChanged
handlePick(proxy_index)
hasChildren(self, parent: QModelIndex = QModelIndex()) bool
RowWrapProxyModel.hasIndex(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
headerDataChanged

headerDataChanged(self, Qt.Orientation, int, int) [signal]

RowWrapProxyModel.index(self, int, int, parent: QModelIndex = QModelIndex()) -> QModelIndex
inherits(self, str) bool
insertColumn(self, int, parent: QModelIndex = QModelIndex()) bool
RowWrapProxyModel.insertColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
insertRow(self, int, parent: QModelIndex = QModelIndex()) bool
RowWrapProxyModel.insertRows(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
installEventFilter(self, QObject)
isMouseOverIndex(proxy_index)
isSignalConnected(self, QMetaMethod) bool
isSingleBlockSelected()

Is a single block of residues (i.e. contiguous residues/gaps from one sequence or multiple adjacent sequences) selected? :rtype: bool

isWidgetType(self) bool
isWindowType(self) bool
isWorkspaceAln()
Returns

Whether this model represents the workspace alignment.

Return type

bool

itemData(self, QModelIndex) Dict[int, Any]
killTimer(self, int)
kinaseConservationChanged
kinaseFeaturesChanged
layoutAboutToBeChanged

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

layoutChanged

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

mapSelectionFromSource(self, QItemSelection) QItemSelection
mapSelectionToSource(self, QItemSelection) QItemSelection
match(self, QModelIndex, int, Any, hits: int = 1, flags: Union[Qt.MatchFlags, Qt.MatchFlag] = Qt.MatchStartsWith | Qt.MatchWrap) List[QModelIndex]
metaObject(self) QMetaObject
mimeData(self, Iterable[QModelIndex]) QMimeData
mimeTypes(self) List[str]
modelAboutToBeReset

modelAboutToBeReset(self) [signal]

modelReset

modelReset(self) [signal]

RowWrapProxyModel.moveColumn(self, QModelIndex, int, QModelIndex, int) -> bool
RowWrapProxyModel.moveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
RowWrapProxyModel.moveRow(self, QModelIndex, int, QModelIndex, int) -> bool
RowWrapProxyModel.moveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
moveSelectionBelow(proxy_index)

Move all selected sequences immediately below the specified index. Used for drag-and-drop.

Parameters

proxy_index (QtCore.QModelIndex) – The index to move selected sequences below.

moveToThread(self, QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, str) [signal]

parent(self, QModelIndex) QModelIndex
parent(self) QObject
persistentIndexList(self) List[QModelIndex]
predictionsChanged
property(self, str) Any
pyqtConfigure(...)

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

receivers(self, PYQT_SIGNAL) int
removeColumn(self, int, parent: QModelIndex = QModelIndex()) bool
RowWrapProxyModel.removeColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
removeEventFilter(self, QObject)
removeRow(self, int, parent: QModelIndex = QModelIndex()) bool
RowWrapProxyModel.removeRows(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
resetInternalData(self)
residueFormatChanged
residueSelectionChanged
revert(self)
roleNames(self) Dict[int, QByteArray]
rowHeightChanged
rowsAboutToBeInserted

rowsAboutToBeInserted(self, QModelIndex, int, int) [signal]

rowsAboutToBeMoved

rowsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

rowsAboutToBeRemoved

rowsAboutToBeRemoved(self, QModelIndex, int, int) [signal]

rowsInserted

rowsInserted(self, QModelIndex, int, int) [signal]

rowsMoved

rowsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

rowsRemoved

rowsRemoved(self, QModelIndex, int, int) [signal]

secondaryStructureChanged
sender(self) QObject
senderSignalIndex(self) int
seqExpansionChanged
sequenceStructureChanged
setAnnSelectionState(proxy_index, selected)
setContextOverIndex(proxy_index)
setData(self, QModelIndex, Any, role: int = Qt.EditRole) bool
setHeaderData(self, int, Qt.Orientation, Any, role: int = Qt.EditRole) bool
setItemData(self, QModelIndex, Dict[int, Any]) bool
setMouseOverIndex(proxy_index)
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) bool
setResSelectionState(selection, selected, current=False)

See SequenceAlignmentModel.setResSelectionState for method documentation.

setSeqSelectionState(selection, selected)

Mark the sequences specified by selection as either selected or deselected.

Parameters
  • selection (QtCore.QItemSelection) – A selection containing the entries to update.

  • selected (bool) – Whether the entries should be selected (True) or deselected (False).

RowWrapProxyModel.sibling(self, int, int, QModelIndex) -> QModelIndex
signalsBlocked(self) bool
sort(self, int, order: Qt.SortOrder = Qt.AscendingOrder)
sourceModel(self) QAbstractItemModel
sourceModelChanged

sourceModelChanged(self) [signal]

span(self, QModelIndex) QSize
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
submit(self) bool
supportedDragActions(self) Qt.DropActions
supportedDropActions(self) Qt.DropActions
textSizeChanged
thread(self) QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = - 1) str
class schrodinger.application.msv.gui.viewmodel.ExportProxyModel(*args, **kwargs)[source]

Bases: schrodinger.application.msv.gui.viewmodel.PostAnnotationProxyMixin, PyQt5.QtCore.QIdentityProxyModel

A proxy for use when generating a static image of the table.

tableWidthChanged(*args, **kwargs)[source]

Ignore changes in the table size rather than trying to update row wrapping.

rowData(proxy_row, proxy_cols, proxy_internal_id, roles)[source]

See AnnotationProxyModel.rowData for method documentation.

class CheckIndexOption(value)

Bases: enum.IntEnum

An enumeration.

DoNotUseParent = 2
IndexIsValid = 1
NoOption = 0
ParentIsInvalid = 4
class CheckIndexOptions
class CheckIndexOptions(Union[QAbstractItemModel.CheckIndexOptions, QAbstractItemModel.CheckIndexOption]) None
class CheckIndexOptions(QAbstractItemModel.CheckIndexOptions) None

Bases: sip.simplewrapper

__init__(*args, **kwargs)
HorizontalSortHint = 2
class LayoutChangeHint

Bases: int

NoLayoutChangeHint = 0
VerticalSortHint = 1
__init__(*args, **kwargs)
alnSetChanged
alnSetResSelected()

Whether any selected residues are in sequences in an alignment set :rtype: bool

ExportProxyModel.beginInsertColumns(self, QModelIndex, int, int)
ExportProxyModel.beginInsertRows(self, QModelIndex, int, int)
ExportProxyModel.beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
ExportProxyModel.beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
ExportProxyModel.beginRemoveColumns(self, QModelIndex, int, int)
ExportProxyModel.beginRemoveRows(self, QModelIndex, int, int)
beginResetModel(self)
blockSignals(self, bool) bool
buddy(self, QModelIndex) QModelIndex
canDropMimeData(self, QMimeData, Qt.DropAction, int, int, QModelIndex) bool
canFetchMore(self, QModelIndex) bool
ExportProxyModel.changePersistentIndex(self, QModelIndex, QModelIndex)
changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])
checkIndex(self, QModelIndex, options: Union[QAbstractItemModel.CheckIndexOptions, QAbstractItemModel.CheckIndexOption] = QAbstractItemModel.CheckIndexOption.NoOption) bool
childEvent(self, QChildEvent)
children(self) List[QObject]
clearResSelection()
clearSeqSelection()
columnCount(self, parent: QModelIndex = QModelIndex()) int
columnsAboutToBeInserted

columnsAboutToBeInserted(self, QModelIndex, int, int) [signal]

columnsAboutToBeMoved

columnsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

columnsAboutToBeRemoved

columnsAboutToBeRemoved(self, QModelIndex, int, int) [signal]

columnsInserted

columnsInserted(self, QModelIndex, int, int) [signal]

columnsMoved

columnsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

columnsRemoved

columnsRemoved(self, QModelIndex, int, int) [signal]

connectNotify(self, QMetaMethod)
ExportProxyModel.createIndex(self, int, int, object: object = 0) -> QModelIndex
customEvent(self, QEvent)
data(self, QModelIndex, role: int = Qt.DisplayRole) Any
dataChanged

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

ExportProxyModel.decodeData(self, int, int, QModelIndex, QDataStream) -> bool
deleteLater(self)
destroyed

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

disconnect(QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, QMetaMethod)
domainsChanged
dropMimeData(self, QMimeData, Qt.DropAction, int, int, QModelIndex) bool
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
encodeData(self, Iterable[QModelIndex], QDataStream)
endInsertColumns(self)
endInsertRows(self)
endMoveColumns(self)
endMoveRows(self)
endRemoveColumns(self)
endRemoveRows(self)
endResetModel(self)
event(self, QEvent) bool
eventFilter(self, QObject, QEvent) bool
expandSelectionToAnnotationValues(anno, ann_index)
fetchMore(self, QModelIndex)
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChild(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
fixedColumnDataChanged
flags(self, QModelIndex) Qt.ItemFlags
getAdjacentIndexForEditing(proxy_index, direction)

See SequenceAlignmentModel.getAdjacentIndexForEditing for method documentation.

getAlignment()

Return the underlying alignment

Returns

The alignment if the source model exists; else None

Return type

schrodinger.protein.alignment.BaseAlignment

getFont()
Returns

The current font.

Return type

QtGui.QFont

getGroupBy()
Returns

The current GroupBy setting.

Return type

viewconstants.GroupBy

getIndexForRes(res)

Get the model index for the given residue.

Parameters

res (schrodinger.protein.residue.Residue) – A residue

Returns

The model index of the residue

Return type

QModelIndex

getNumShownGlobalAnnotations()

See AnnotationProxyModel.getNumShownGlobalAnnotations for method documentation

getPickingMode()

See AnnotationProxyModel.getPickingMode for method documentation

getResSelection()
getResidueDisplayMode()

Return the current residue display mode setting.

Returns

The current residue display mode.

Return type

enum.Enum

getSelectedResIndices()

Get indices for all selected residues.

Return type

list[QtCore.QModelIndex]

getShownRowTypes()

See AnnotationProxyModel.getShownRowTypes for method documentation.

getSingleLetterCodeForSelectedResidues()

Get the single letter code for all selected residues. This method assumes that a single block of residues from a single sequence is selected.

Return type

str

groupByChanged
handlePick(proxy_index)
hasChildren(self, parent: QModelIndex = QModelIndex()) bool
ExportProxyModel.hasIndex(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
headerData(self, int, Qt.Orientation, role: int = Qt.DisplayRole) Any
headerDataChanged

headerDataChanged(self, Qt.Orientation, int, int) [signal]

ExportProxyModel.index(self, int, int, parent: QModelIndex = QModelIndex()) -> QModelIndex
inherits(self, str) bool
insertColumn(self, int, parent: QModelIndex = QModelIndex()) bool
ExportProxyModel.insertColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
insertRow(self, int, parent: QModelIndex = QModelIndex()) bool
ExportProxyModel.insertRows(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
installEventFilter(self, QObject)
isMouseOverIndex(proxy_index)
isSignalConnected(self, QMetaMethod) bool
isSingleBlockSelected()

Is a single block of residues (i.e. contiguous residues/gaps from one sequence or multiple adjacent sequences) selected? :rtype: bool

isWidgetType(self) bool
isWindowType(self) bool
isWorkspaceAln()
Returns

Whether this model represents the workspace alignment.

Return type

bool

itemData(self, QModelIndex) Dict[int, Any]
killTimer(self, int)
kinaseConservationChanged
kinaseFeaturesChanged
layoutAboutToBeChanged

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

layoutChanged

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

mapFromSource(self, QModelIndex) QModelIndex
mapSelectionFromSource(self, QItemSelection) QItemSelection
mapSelectionToSource(self, QItemSelection) QItemSelection
mapToSource(self, QModelIndex) QModelIndex
match(self, QModelIndex, int, Any, hits: int = 1, flags: Union[Qt.MatchFlags, Qt.MatchFlag] = Qt.MatchStartsWith | Qt.MatchWrap) List[QModelIndex]
metaObject(self) QMetaObject
mimeData(self, Iterable[QModelIndex]) QMimeData
mimeTypes(self) List[str]
modelAboutToBeReset

modelAboutToBeReset(self) [signal]

modelReset

modelReset(self) [signal]

ExportProxyModel.moveColumn(self, QModelIndex, int, QModelIndex, int) -> bool
ExportProxyModel.moveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
ExportProxyModel.moveRow(self, QModelIndex, int, QModelIndex, int) -> bool
ExportProxyModel.moveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
moveSelectionBelow(proxy_index)

Move all selected sequences immediately below the specified index. Used for drag-and-drop.

Parameters

proxy_index (QtCore.QModelIndex) – The index to move selected sequences below.

moveToThread(self, QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, str) [signal]

parent(self, QModelIndex) QModelIndex
persistentIndexList(self) List[QModelIndex]
predictionsChanged
property(self, str) Any
pyqtConfigure(...)

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

receivers(self, PYQT_SIGNAL) int
removeColumn(self, int, parent: QModelIndex = QModelIndex()) bool
ExportProxyModel.removeColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
removeEventFilter(self, QObject)
removeRow(self, int, parent: QModelIndex = QModelIndex()) bool
ExportProxyModel.removeRows(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
resetInternalData(self)
residueFormatChanged
residueSelectionChanged
revert(self)
roleNames(self) Dict[int, QByteArray]
rowCount(self, parent: QModelIndex = QModelIndex()) int
rowHeightChanged
rowWrapEnabled()

See AnnotationProxyModel.rowWrapEnabled for method documentation

rowsAboutToBeInserted

rowsAboutToBeInserted(self, QModelIndex, int, int) [signal]

rowsAboutToBeMoved

rowsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

rowsAboutToBeRemoved

rowsAboutToBeRemoved(self, QModelIndex, int, int) [signal]

rowsInserted

rowsInserted(self, QModelIndex, int, int) [signal]

rowsMoved

rowsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

rowsRemoved

rowsRemoved(self, QModelIndex, int, int) [signal]

secondaryStructureChanged
sender(self) QObject
senderSignalIndex(self) int
seqExpansionChanged
sequenceStructureChanged
setAnnSelectionState(proxy_index, selected)
setContextOverIndex(proxy_index)
setData(self, QModelIndex, Any, role: int = Qt.EditRole) bool
setHeaderData(self, int, Qt.Orientation, Any, role: int = Qt.EditRole) bool
setItemData(self, QModelIndex, Dict[int, Any]) bool
setMouseOverIndex(proxy_index)
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) bool
setResRangeSelectionState(from_index, to_index, selected, columns, current=False)

See SequenceAlignmentModel.setResRangeSelectionState for method documentation.

setResSelectionState(selection, selected, current=False)

See SequenceAlignmentModel.setResSelectionState for method documentation.

setSeqSelectionState(selection, selected)

Mark the sequences specified by selection as either selected or deselected.

Parameters
  • selection (QtCore.QItemSelection) – A selection containing the entries to update.

  • selected (bool) – Whether the entries should be selected (True) or deselected (False).

setSourceModel(self, QAbstractItemModel)
ExportProxyModel.sibling(self, int, int, QModelIndex) -> QModelIndex
signalsBlocked(self) bool
sort(self, int, order: Qt.SortOrder = Qt.AscendingOrder)
sourceModel(self) QAbstractItemModel
sourceModelChanged

sourceModelChanged(self) [signal]

span(self, QModelIndex) QSize
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
submit(self) bool
supportedDragActions(self) Qt.DropActions
supportedDropActions(self) Qt.DropActions
textSizeChanged
thread(self) QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = - 1) str
class schrodinger.application.msv.gui.viewmodel.ExportLogoProxyModel(*args, **kwargs)[source]

Bases: schrodinger.application.msv.gui.viewmodel.PostAnnotationProxyMixin, PyQt5.QtCore.QSortFilterProxyModel

Sort proxy model which only accepts the ruler, spacer, and sequence logo rows. Used when exporting an image of just the sequence logo.

filterAcceptsRow(self, int, QModelIndex) bool[source]
tableWidthChanged(*args, **kwargs)[source]

Ignore changes in the table size rather than trying to update row wrapping.

rowData(proxy_index, proxy_cols, roles)[source]

This method differs from typical rowData methods in that it takes a proxy index instead of a row number, because it must first map that index to source. This is because the QSortFilterProxyModel uses a different indexing/internal id system than other proxy models in MSV.

class CheckIndexOption(value)

Bases: enum.IntEnum

An enumeration.

DoNotUseParent = 2
IndexIsValid = 1
NoOption = 0
ParentIsInvalid = 4
class CheckIndexOptions
class CheckIndexOptions(Union[QAbstractItemModel.CheckIndexOptions, QAbstractItemModel.CheckIndexOption]) None
class CheckIndexOptions(QAbstractItemModel.CheckIndexOptions) None

Bases: sip.simplewrapper

__init__(*args, **kwargs)
HorizontalSortHint = 2
class LayoutChangeHint

Bases: int

NoLayoutChangeHint = 0
VerticalSortHint = 1
__init__(*args, **kwargs)
alnSetChanged
alnSetResSelected()

Whether any selected residues are in sequences in an alignment set :rtype: bool

ExportLogoProxyModel.beginInsertColumns(self, QModelIndex, int, int)
ExportLogoProxyModel.beginInsertRows(self, QModelIndex, int, int)
ExportLogoProxyModel.beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
ExportLogoProxyModel.beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
ExportLogoProxyModel.beginRemoveColumns(self, QModelIndex, int, int)
ExportLogoProxyModel.beginRemoveRows(self, QModelIndex, int, int)
beginResetModel(self)
blockSignals(self, bool) bool
buddy(self, QModelIndex) QModelIndex
canDropMimeData(self, QMimeData, Qt.DropAction, int, int, QModelIndex) bool
canFetchMore(self, QModelIndex) bool
ExportLogoProxyModel.changePersistentIndex(self, QModelIndex, QModelIndex)
changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])
checkIndex(self, QModelIndex, options: Union[QAbstractItemModel.CheckIndexOptions, QAbstractItemModel.CheckIndexOption] = QAbstractItemModel.CheckIndexOption.NoOption) bool
childEvent(self, QChildEvent)
children(self) List[QObject]
clearResSelection()
clearSeqSelection()
columnCount(self, parent: QModelIndex = QModelIndex()) int
columnsAboutToBeInserted

columnsAboutToBeInserted(self, QModelIndex, int, int) [signal]

columnsAboutToBeMoved

columnsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

columnsAboutToBeRemoved

columnsAboutToBeRemoved(self, QModelIndex, int, int) [signal]

columnsInserted

columnsInserted(self, QModelIndex, int, int) [signal]

columnsMoved

columnsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

columnsRemoved

columnsRemoved(self, QModelIndex, int, int) [signal]

connectNotify(self, QMetaMethod)
ExportLogoProxyModel.createIndex(self, int, int, object: object = 0) -> QModelIndex
customEvent(self, QEvent)
data(self, QModelIndex, role: int = Qt.DisplayRole) Any
dataChanged

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

ExportLogoProxyModel.decodeData(self, int, int, QModelIndex, QDataStream) -> bool
deleteLater(self)
destroyed

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

disconnect(QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, QMetaMethod)
domainsChanged
dropMimeData(self, QMimeData, Qt.DropAction, int, int, QModelIndex) bool
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
dynamicSortFilter(self) bool
encodeData(self, Iterable[QModelIndex], QDataStream)
endInsertColumns(self)
endInsertRows(self)
endMoveColumns(self)
endMoveRows(self)
endRemoveColumns(self)
endRemoveRows(self)
endResetModel(self)
event(self, QEvent) bool
eventFilter(self, QObject, QEvent) bool
expandSelectionToAnnotationValues(anno, ann_index)
fetchMore(self, QModelIndex)
filterAcceptsColumn(self, int, QModelIndex) bool
filterCaseSensitivity(self) Qt.CaseSensitivity
filterKeyColumn(self) int
filterRegExp(self) QRegExp
filterRegularExpression(self) QRegularExpression
filterRole(self) int
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChild(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
fixedColumnDataChanged
flags(self, QModelIndex) Qt.ItemFlags
getAdjacentIndexForEditing(proxy_index, direction)

See SequenceAlignmentModel.getAdjacentIndexForEditing for method documentation.

getAlignment()

Return the underlying alignment

Returns

The alignment if the source model exists; else None

Return type

schrodinger.protein.alignment.BaseAlignment

getFont()
Returns

The current font.

Return type

QtGui.QFont

getGroupBy()
Returns

The current GroupBy setting.

Return type

viewconstants.GroupBy

getIndexForRes(res)

Get the model index for the given residue.

Parameters

res (schrodinger.protein.residue.Residue) – A residue

Returns

The model index of the residue

Return type

QModelIndex

getNumShownGlobalAnnotations()

See AnnotationProxyModel.getNumShownGlobalAnnotations for method documentation

getPickingMode()

See AnnotationProxyModel.getPickingMode for method documentation

getResSelection()
getResidueDisplayMode()

Return the current residue display mode setting.

Returns

The current residue display mode.

Return type

enum.Enum

getSelectedResIndices()

Get indices for all selected residues.

Return type

list[QtCore.QModelIndex]

getShownRowTypes()

See AnnotationProxyModel.getShownRowTypes for method documentation.

getSingleLetterCodeForSelectedResidues()

Get the single letter code for all selected residues. This method assumes that a single block of residues from a single sequence is selected.

Return type

str

groupByChanged
handlePick(proxy_index)
hasChildren(self, parent: QModelIndex = QModelIndex()) bool
ExportLogoProxyModel.hasIndex(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
headerData(self, int, Qt.Orientation, role: int = Qt.DisplayRole) Any
headerDataChanged

headerDataChanged(self, Qt.Orientation, int, int) [signal]

ExportLogoProxyModel.index(self, int, int, parent: QModelIndex = QModelIndex()) -> QModelIndex
inherits(self, str) bool
insertColumn(self, int, parent: QModelIndex = QModelIndex()) bool
ExportLogoProxyModel.insertColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
insertRow(self, int, parent: QModelIndex = QModelIndex()) bool
ExportLogoProxyModel.insertRows(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
installEventFilter(self, QObject)
invalidate(self)
invalidateFilter(self)
isMouseOverIndex(proxy_index)
isRecursiveFilteringEnabled(self) bool
isSignalConnected(self, QMetaMethod) bool
isSingleBlockSelected()

Is a single block of residues (i.e. contiguous residues/gaps from one sequence or multiple adjacent sequences) selected? :rtype: bool

isSortLocaleAware(self) bool
isWidgetType(self) bool
isWindowType(self) bool
isWorkspaceAln()
Returns

Whether this model represents the workspace alignment.

Return type

bool

itemData(self, QModelIndex) Dict[int, Any]
killTimer(self, int)
kinaseConservationChanged
kinaseFeaturesChanged
layoutAboutToBeChanged

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

layoutChanged

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

ExportLogoProxyModel.lessThan(self, QModelIndex, QModelIndex) -> bool
mapFromSource(self, QModelIndex) QModelIndex
mapSelectionFromSource(self, QItemSelection) QItemSelection
mapSelectionToSource(self, QItemSelection) QItemSelection
mapToSource(self, QModelIndex) QModelIndex
match(self, QModelIndex, int, Any, hits: int = 1, flags: Union[Qt.MatchFlags, Qt.MatchFlag] = Qt.MatchStartsWith | Qt.MatchWrap) List[QModelIndex]
metaObject(self) QMetaObject
mimeData(self, Iterable[QModelIndex]) QMimeData
mimeTypes(self) List[str]
modelAboutToBeReset

modelAboutToBeReset(self) [signal]

modelReset

modelReset(self) [signal]

ExportLogoProxyModel.moveColumn(self, QModelIndex, int, QModelIndex, int) -> bool
ExportLogoProxyModel.moveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
ExportLogoProxyModel.moveRow(self, QModelIndex, int, QModelIndex, int) -> bool
ExportLogoProxyModel.moveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
moveSelectionBelow(proxy_index)

Move all selected sequences immediately below the specified index. Used for drag-and-drop.

Parameters

proxy_index (QtCore.QModelIndex) – The index to move selected sequences below.

moveToThread(self, QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, str) [signal]

parent(self, QModelIndex) QModelIndex
parent(self) QObject
persistentIndexList(self) List[QModelIndex]
predictionsChanged
property(self, str) Any
pyqtConfigure(...)

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

receivers(self, PYQT_SIGNAL) int
removeColumn(self, int, parent: QModelIndex = QModelIndex()) bool
ExportLogoProxyModel.removeColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
removeEventFilter(self, QObject)
removeRow(self, int, parent: QModelIndex = QModelIndex()) bool
ExportLogoProxyModel.removeRows(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
resetInternalData(self)
residueFormatChanged
residueSelectionChanged
revert(self)
roleNames(self) Dict[int, QByteArray]
rowCount(self, parent: QModelIndex = QModelIndex()) int
rowHeightChanged
rowWrapEnabled()

See AnnotationProxyModel.rowWrapEnabled for method documentation

rowsAboutToBeInserted

rowsAboutToBeInserted(self, QModelIndex, int, int) [signal]

rowsAboutToBeMoved

rowsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

rowsAboutToBeRemoved

rowsAboutToBeRemoved(self, QModelIndex, int, int) [signal]

rowsInserted

rowsInserted(self, QModelIndex, int, int) [signal]

rowsMoved

rowsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

rowsRemoved

rowsRemoved(self, QModelIndex, int, int) [signal]

secondaryStructureChanged
sender(self) QObject
senderSignalIndex(self) int
seqExpansionChanged
sequenceStructureChanged
setAnnSelectionState(proxy_index, selected)
setContextOverIndex(proxy_index)
setData(self, QModelIndex, Any, role: int = Qt.EditRole) bool
setDynamicSortFilter(self, bool)
setFilterCaseSensitivity(self, Qt.CaseSensitivity)
setFilterFixedString(self, str)
setFilterKeyColumn(self, int)
setFilterRegExp(self, QRegExp)
setFilterRegExp(self, str) None
setFilterRegularExpression(self, QRegularExpression)
setFilterRegularExpression(self, str) None
setFilterRole(self, int)
setFilterWildcard(self, str)
setHeaderData(self, int, Qt.Orientation, Any, role: int = Qt.EditRole) bool
setItemData(self, QModelIndex, Dict[int, Any]) bool
setMouseOverIndex(proxy_index)
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) bool
setRecursiveFilteringEnabled(self, bool)
setResRangeSelectionState(from_index, to_index, selected, columns, current=False)

See SequenceAlignmentModel.setResRangeSelectionState for method documentation.

setResSelectionState(selection, selected, current=False)

See SequenceAlignmentModel.setResSelectionState for method documentation.

setSeqSelectionState(selection, selected)

Mark the sequences specified by selection as either selected or deselected.

Parameters
  • selection (QtCore.QItemSelection) – A selection containing the entries to update.

  • selected (bool) – Whether the entries should be selected (True) or deselected (False).

setSortCaseSensitivity(self, Qt.CaseSensitivity)
setSortLocaleAware(self, bool)
setSortRole(self, int)
setSourceModel(self, QAbstractItemModel)
ExportLogoProxyModel.sibling(self, int, int, QModelIndex) -> QModelIndex
signalsBlocked(self) bool
sort(self, int, order: Qt.SortOrder = Qt.AscendingOrder)
sortCaseSensitivity(self) Qt.CaseSensitivity
sortColumn(self) int
sortOrder(self) Qt.SortOrder
sortRole(self) int
sourceModel(self) QAbstractItemModel
sourceModelChanged

sourceModelChanged(self) [signal]

span(self, QModelIndex) QSize
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
submit(self) bool
supportedDragActions(self) Qt.DropActions
supportedDropActions(self) Qt.DropActions
textSizeChanged
thread(self) QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = - 1) str
class schrodinger.application.msv.gui.viewmodel.ViewModel(parent)[source]

Bases: PyQt5.QtCore.QObject

An abstraction layer for the various table models in this module

Variables
  • orderChanged (QtCore.pyqtSignal) – A signal emitted when the sorting or row reodering (due to drag-and-drop) has changed. Emitted with the new seq indices.

  • topModelChanged (QtCore.pyqtSignal) – A signal emitted when row wrapping is toggled. The view must change models whenever this signal is emitted. Emitted with the new model that the view should use.

orderChanged
topModelChanged
__init__(parent)[source]
setStructureModel(smodel)[source]
setLightMode(enabled)[source]

Set light mode on the info and metrics tables and appropriately change the color scheme for some annotations

setRowWrap(enabled)[source]

Enable or disable row wrapping.

Parameters

enabled (bool) – Whether rows should be wrapped.

rowWrap()[source]

Return the current row wrapping setting.

Returns

True if the rows are wrapped. False otherwise.

Return type

bool

setPageModel(page_model)[source]

Set the page model, which contains the options model and is also responsible for switching between split-chain and combined-chain alignments.

Parameters

page_model (gui_models.PageModel) – The page model to set

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

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

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

objectNameChanged(self, str) [signal]

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

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

receivers(self, PYQT_SIGNAL) int
removeEventFilter(self, QObject)
sender(self) QObject
senderSignalIndex(self) int
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) bool
signalsBlocked(self) bool
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
thread(self) QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = - 1) str
class schrodinger.application.msv.gui.viewmodel.FixedColumn(title, tooltip=None, role=None, percent=False, all_rows=False, align=132, selectable=False)[source]

Bases: schrodinger.ui.qt.table_helper.Column

A table column that is fixed on the left or right of the scrollable columns. This object is intended to be used in the table_helper.TableColumns enum.

__init__(title, tooltip=None, role=None, percent=False, all_rows=False, align=132, selectable=False)[source]
Parameters
  • title (basestring) – The title to display in the column header.

  • tooltip (str) – The tooltip to display when the user hovers over the column header.

  • role (int or NoneType) – The role that the column should display data from. May be None if no data is to be displayed in the column (e.g. the column that contains only group expansion arrows).

  • percent (bool) – Whether to format a value as a percentage (without ‘%’ sign)

  • all_rows (bool) – True if the column contains data for all rows. False if the column only contains data for sequence rows.

  • align (int) – The alignment for cells in the column. Note that only the horizontal component of the alignment is obeyed; cells are always vertically aligned to center.

  • selectable (bool) – Whether this column should be flagged as selectable (i.e. Qt.ItemIsSelectable).

class schrodinger.application.msv.gui.viewmodel.SequencePropertyColumn(seq_prop, role, *args, **kwargs)[source]

Bases: schrodinger.application.msv.gui.viewmodel.FixedColumn

__init__(seq_prop, role, *args, **kwargs)[source]
Parameters
  • title (basestring) – The title to display in the column header.

  • tooltip (str) – The tooltip to display when the user hovers over the column header.

  • role (int or NoneType) – The role that the column should display data from. May be None if no data is to be displayed in the column (e.g. the column that contains only group expansion arrows).

  • percent (bool) – Whether to format a value as a percentage (without ‘%’ sign)

  • all_rows (bool) – True if the column contains data for all rows. False if the column only contains data for sequence rows.

  • align (int) – The alignment for cells in the column. Note that only the horizontal component of the alignment is obeyed; cells are always vertically aligned to center.

  • selectable (bool) – Whether this column should be flagged as selectable (i.e. Qt.ItemIsSelectable).

getSeqProp()[source]
class schrodinger.application.msv.gui.viewmodel.BaseAdjacentAlignmentProxyModel(parent=None)[source]

Bases: schrodinger.ui.qt.table_speed_up.MultipleRolesRoleProxyMixin, schrodinger.application.msv.gui.viewmodel.SeqExpansionProxyMixin, schrodinger.application.msv.gui.viewmodel.GroupByProxyMixin, schrodinger.application.msv.gui.viewmodel.GetAlignmentProxyMixin, schrodinger.application.msv.gui.viewmodel.NestedProxy

A base proxy model to be subclassed by other proxy models that show data related to and synchronized with an alignment but in separate, adjacent views.

Variables

ROLES_FROM_SOURCE (set) – Set of data roles to query from the source model.

Column = None
FONT_SCALE = 1.25
textSizeChanged
rowHeightChanged
ROLES_FROM_SOURCE = {CustomRole.RowType, CustomRole.Seq, CustomRole.ReferenceSequence, CustomRole.RowHeightScale, CustomRole.SeqSelected}
ROLES_FROM_PROXY = {0, 3, 6, 7}
__init__(parent=None)[source]
setSourceModel(self, QAbstractItemModel)[source]
rowCount(self, parent: QModelIndex = QModelIndex()) int[source]
mapToSource(self, QModelIndex) QModelIndex[source]
mapFromSource(self, QModelIndex) QModelIndex[source]
data(proxy_index, role=0, multiple_roles=None)[source]

Provide data for the specified index and role. Subclasses normally do not need to redefine this method. Instead, new methods should be created and decorated with table_helper.data_method.

Parameters
  • index (QtCore.QModelIndex) – The index to return data for.

  • role (int) – The role to request data for.

  • multiple_roles (frozenset) – If role equals {MultipleRolesUserRolesEnum.MultipleRoles}, a set of roles to retrieve data for. Ignored otherwise.

Returns

The requested data. If role equals {MultipleRolesUserRolesEnum.MultipleRoles}, will be a dictionary of {role: value}. The dictionary not contain roles that are not provided by this model and may contain additional roles that were not explicitly requested.

Return type

object

rowData(proxy_row, cols, internal_id, roles)[source]

Fetch data for multiple roles for multiple indices in the same row. Note that this method does minimal sanity checking of its input for performance reasons, as it is called during painting. The arguments are assumed to refer to valid indices. Use data instead if more sanity checking is required.

Parameters
  • row (int) – The row number to fetch data for.

  • cols (list(int)) – A list of columns to fetch data for.

  • internal_id (int) – The parent row (or TOP_LEVEL for top-level rows) of the row to fetch data for.

  • roles (list(int)) – A list of roles to fetch data for.

Returns

{role: data} dictionaries for each requested column. Note that the keys of these dictionaries may not match roles. Data for additional roles may be included (e.g. if that data was required to calculate data for a requested role). Data for requested roles may not be included if those roles are not applicable to the specified row (e.g. many roles are not applicable to spacer rows).

Return type

list(dict(int, object))

columnCount(self, parent: QModelIndex = QModelIndex()) int[source]
endLayoutChange()[source]
updateData(role, source_row)[source]

Update a specified index when data changes.

Parameters
  • role (enum.Enum) – Role of the data that changed.

  • source_row (int) – Index of the source model index to update.

isWorkspaceAln()[source]
Returns

Whether this model represents the workspace alignment.

Return type

bool

selectableColumns()[source]

Return a list of all selectable columns (i.e. columns flagged with Qt.ItemIsSelectable). :rtype: list(int)

class CheckIndexOption(value)

Bases: enum.IntEnum

An enumeration.

DoNotUseParent = 2
IndexIsValid = 1
NoOption = 0
ParentIsInvalid = 4
class CheckIndexOptions
class CheckIndexOptions(Union[QAbstractItemModel.CheckIndexOptions, QAbstractItemModel.CheckIndexOption]) None
class CheckIndexOptions(QAbstractItemModel.CheckIndexOptions) None

Bases: sip.simplewrapper

__init__(*args, **kwargs)
HorizontalSortHint = 2
class LayoutChangeHint

Bases: int

NoLayoutChangeHint = 0
VerticalSortHint = 1
BaseAdjacentAlignmentProxyModel.beginInsertColumns(self, QModelIndex, int, int)
BaseAdjacentAlignmentProxyModel.beginInsertRows(self, QModelIndex, int, int)
BaseAdjacentAlignmentProxyModel.beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
BaseAdjacentAlignmentProxyModel.beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
BaseAdjacentAlignmentProxyModel.beginRemoveColumns(self, QModelIndex, int, int)
BaseAdjacentAlignmentProxyModel.beginRemoveRows(self, QModelIndex, int, int)
beginResetModel(self)
blockSignals(self, bool) bool
buddy(self, QModelIndex) QModelIndex
canDropMimeData(self, QMimeData, Qt.DropAction, int, int, QModelIndex) bool
canFetchMore(self, QModelIndex) bool
BaseAdjacentAlignmentProxyModel.changePersistentIndex(self, QModelIndex, QModelIndex)
changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])
checkIndex(self, QModelIndex, options: Union[QAbstractItemModel.CheckIndexOptions, QAbstractItemModel.CheckIndexOption] = QAbstractItemModel.CheckIndexOption.NoOption) bool
childEvent(self, QChildEvent)
children(self) List[QObject]
columnsAboutToBeInserted

columnsAboutToBeInserted(self, QModelIndex, int, int) [signal]

columnsAboutToBeMoved

columnsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

columnsAboutToBeRemoved

columnsAboutToBeRemoved(self, QModelIndex, int, int) [signal]

columnsInserted

columnsInserted(self, QModelIndex, int, int) [signal]

columnsMoved

columnsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

columnsRemoved

columnsRemoved(self, QModelIndex, int, int) [signal]

connectNotify(self, QMetaMethod)
BaseAdjacentAlignmentProxyModel.createIndex(self, int, int, object: object = 0) -> QModelIndex
customEvent(self, QEvent)
dataChanged

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

BaseAdjacentAlignmentProxyModel.decodeData(self, int, int, QModelIndex, QDataStream) -> bool
deleteLater(self)
destroyed

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

disconnect(QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, QMetaMethod)
dropMimeData(self, QMimeData, Qt.DropAction, int, int, QModelIndex) bool
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
encodeData(self, Iterable[QModelIndex], QDataStream)
endInsertColumns(self)
endInsertRows(self)
endMoveColumns(self)
endMoveRows(self)
endRemoveColumns(self)
endRemoveRows(self)
endResetModel(self)
event(self, QEvent) bool
eventFilter(self, QObject, QEvent) bool
fetchMore(self, QModelIndex)
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChild(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
flags(self, QModelIndex) Qt.ItemFlags
getAlignment()

Return the underlying alignment

Returns

The alignment if the source model exists; else None

Return type

schrodinger.protein.alignment.BaseAlignment

getGroupBy()
Returns

The current GroupBy setting.

Return type

viewconstants.GroupBy

groupByChanged
hasChildren(self, parent: QModelIndex = QModelIndex()) bool
BaseAdjacentAlignmentProxyModel.hasIndex(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
headerData(self, int, Qt.Orientation, role: int = Qt.DisplayRole) Any
headerDataChanged

headerDataChanged(self, Qt.Orientation, int, int) [signal]

BaseAdjacentAlignmentProxyModel.index(self, int, int, parent: QModelIndex = QModelIndex()) -> QModelIndex
inherits(self, str) bool
insertColumn(self, int, parent: QModelIndex = QModelIndex()) bool
BaseAdjacentAlignmentProxyModel.insertColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
insertRow(self, int, parent: QModelIndex = QModelIndex()) bool
BaseAdjacentAlignmentProxyModel.insertRows(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
installEventFilter(self, QObject)
isSignalConnected(self, QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
itemData(self, QModelIndex) Dict[int, Any]
killTimer(self, 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]

mapSelectionFromSource(self, QItemSelection) QItemSelection
mapSelectionToSource(self, QItemSelection) QItemSelection
match(self, QModelIndex, int, Any, hits: int = 1, flags: Union[Qt.MatchFlags, Qt.MatchFlag] = Qt.MatchStartsWith | Qt.MatchWrap) List[QModelIndex]
metaObject(self) QMetaObject
mimeData(self, Iterable[QModelIndex]) QMimeData
mimeTypes(self) List[str]
modelAboutToBeReset

modelAboutToBeReset(self) [signal]

modelReset

modelReset(self) [signal]

BaseAdjacentAlignmentProxyModel.moveColumn(self, QModelIndex, int, QModelIndex, int) -> bool
BaseAdjacentAlignmentProxyModel.moveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
BaseAdjacentAlignmentProxyModel.moveRow(self, QModelIndex, int, QModelIndex, int) -> bool
BaseAdjacentAlignmentProxyModel.moveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
moveToThread(self, QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, str) [signal]

parent(self, QModelIndex) QModelIndex
parent(self) QObject
persistentIndexList(self) List[QModelIndex]
property(self, str) Any
pyqtConfigure(...)

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

receivers(self, PYQT_SIGNAL) int
removeColumn(self, int, parent: QModelIndex = QModelIndex()) bool
BaseAdjacentAlignmentProxyModel.removeColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
removeEventFilter(self, QObject)
removeRow(self, int, parent: QModelIndex = QModelIndex()) bool
BaseAdjacentAlignmentProxyModel.removeRows(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
resetInternalData(self)
revert(self)
roleNames(self) Dict[int, QByteArray]
rowsAboutToBeInserted

rowsAboutToBeInserted(self, QModelIndex, int, int) [signal]

rowsAboutToBeMoved

rowsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

rowsAboutToBeRemoved

rowsAboutToBeRemoved(self, QModelIndex, int, int) [signal]

rowsInserted

rowsInserted(self, QModelIndex, int, int) [signal]

rowsMoved

rowsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

rowsRemoved

rowsRemoved(self, QModelIndex, int, int) [signal]

sender(self) QObject
senderSignalIndex(self) int
seqExpansionChanged
setData(self, QModelIndex, Any, role: int = Qt.EditRole) bool
setHeaderData(self, int, Qt.Orientation, Any, role: int = Qt.EditRole) bool
setItemData(self, QModelIndex, Dict[int, Any]) bool
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) bool
BaseAdjacentAlignmentProxyModel.sibling(self, int, int, QModelIndex) -> QModelIndex
signalsBlocked(self) bool
sort(self, int, order: Qt.SortOrder = Qt.AscendingOrder)
sourceModel(self) QAbstractItemModel
sourceModelChanged

sourceModelChanged(self) [signal]

span(self, QModelIndex) QSize
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
submit(self) bool
supportedDragActions(self) Qt.DropActions
supportedDropActions(self) Qt.DropActions
thread(self) QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = - 1) str
class schrodinger.application.msv.gui.viewmodel.AlignmentInfoProxyModel(parent=None)[source]

Bases: schrodinger.application.msv.gui.viewmodel.DropProxyMixin, schrodinger.application.msv.gui.viewmodel.MouseOverPassthroughMixin, schrodinger.application.msv.gui.viewmodel.AnnotationSelectionPassthroughMixin, schrodinger.application.msv.gui.viewmodel.BaseAdjacentAlignmentProxyModel

A proxy model that contains sequence info for an alignment.

Column

alias of <unknown>.AlignmentInfoColumns

ROLES_FROM_SOURCE = {CustomRole.RowType, CustomRole.Seq, CustomRole.ReferenceSequence, CustomRole.Included, CustomRole.EntryID, CustomRole.RowHeightScale, CustomRole.PfamName, CustomRole.SeqSelected, CustomRole.IncludeInDragImage, CustomRole.CanDropAbove, CustomRole.CanDropBelow, CustomRole.HomologyStatus, CustomRole.PreviousRowHidden, CustomRole.NextRowHidden, SeqInfo.Name, SeqInfo.Title, SeqInfo.Chain, SeqInfo.GaplessLength, SeqInfo.GapCount}
ROLES_FROM_PROXY = {0, 1, 3, 6, 7, 8, 9, CustomRole.InfoColumnType}
orderChanged
__init__(parent=None)[source]
setMouseOverIndex(proxy_index)[source]

Store whether the mouse is over the struct column and the mouse-over index

setContextOverIndex(proxy_index)[source]
isMouseOverStructCol()[source]

Return whether the mouse is over the Struct column

setLightMode(enabled)[source]

Set light mode for the info model. This changes the structure inclusion/exclusion icons as well as changing text and background color

getStructImage(included, light_mode)[source]

Get the image to be in the structure column

Parameters
  • included (bool) – Whether or not the structure is included in the workspace

  • light_mode (bool) – Whether or not to use the light mode icons

Returns

The structure column image

Return type

QtGui.QImage

setSeqSelectionState(selection, selected)[source]

Mark the residues specified by selection as either selected or deselected.

Parameters
  • selection (QtCore.QItemSelection) – A selection containing the entries to update.

  • selected (bool) – Whether the entries should be selected (True) or deselected (False).

clearSeqSelection()[source]
getMinimumWidth() int[source]

Return the minimum width of the view based on the title and chain title lengths.

Returns

The minimum length of the view

getTitleColumnWidth()[source]

Return the width of the longest title currently shown, including both sequence titles and annotation names

Return type

int

Returns

The length of the longest title currently shown

updateData(role, source_row)[source]

Update a specified index when data changes.

Parameters
  • role (enum.Enum) – Role of the data that changed.

  • source_row (int) – Index of the source model index to update.

getAlignment()[source]

Return the underlying alignment

Returns

The alignment if the source model exists; else None

Return type

schrodinger.protein.alignment.BaseAlignment

flags(self, QModelIndex) Qt.ItemFlags[source]
mimeData(indices)[source]

Return an object used to represent indices during a drag-and-drop operation. Since we only allow selected indices to be dragged, and since the selection is stored with the model rather than the view, we can safely ignore indices and just return an empty object. The selected sequences are then fetched during the drop instead.

See QAbstractItemModel documentation for additional method documentation.

class CheckIndexOption(value)

Bases: enum.IntEnum

An enumeration.

DoNotUseParent = 2
IndexIsValid = 1
NoOption = 0
ParentIsInvalid = 4
class CheckIndexOptions
class CheckIndexOptions(Union[QAbstractItemModel.CheckIndexOptions, QAbstractItemModel.CheckIndexOption]) None
class CheckIndexOptions(QAbstractItemModel.CheckIndexOptions) None

Bases: sip.simplewrapper

__init__(*args, **kwargs)
FONT_SCALE = 1.25
HorizontalSortHint = 2
class LayoutChangeHint

Bases: int

NoLayoutChangeHint = 0
VerticalSortHint = 1
AlignmentInfoProxyModel.beginInsertColumns(self, QModelIndex, int, int)
AlignmentInfoProxyModel.beginInsertRows(self, QModelIndex, int, int)
AlignmentInfoProxyModel.beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
AlignmentInfoProxyModel.beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
AlignmentInfoProxyModel.beginRemoveColumns(self, QModelIndex, int, int)
AlignmentInfoProxyModel.beginRemoveRows(self, QModelIndex, int, int)
beginResetModel(self)
blockSignals(self, bool) bool
buddy(self, QModelIndex) QModelIndex
canDropMimeData(self, QMimeData, Qt.DropAction, int, int, QModelIndex) bool
canFetchMore(self, QModelIndex) bool
AlignmentInfoProxyModel.changePersistentIndex(self, QModelIndex, QModelIndex)
changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])
checkIndex(self, QModelIndex, options: Union[QAbstractItemModel.CheckIndexOptions, QAbstractItemModel.CheckIndexOption] = QAbstractItemModel.CheckIndexOption.NoOption) bool
childEvent(self, QChildEvent)
children(self) List[QObject]
columnCount(self, parent: QModelIndex = QModelIndex()) int
columnsAboutToBeInserted

columnsAboutToBeInserted(self, QModelIndex, int, int) [signal]

columnsAboutToBeMoved

columnsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

columnsAboutToBeRemoved

columnsAboutToBeRemoved(self, QModelIndex, int, int) [signal]

columnsInserted

columnsInserted(self, QModelIndex, int, int) [signal]

columnsMoved

columnsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

columnsRemoved

columnsRemoved(self, QModelIndex, int, int) [signal]

connectNotify(self, QMetaMethod)
AlignmentInfoProxyModel.createIndex(self, int, int, object: object = 0) -> QModelIndex
customEvent(self, QEvent)
data(proxy_index, role=0, multiple_roles=None)

Provide data for the specified index and role. Subclasses normally do not need to redefine this method. Instead, new methods should be created and decorated with table_helper.data_method.

Parameters
  • index (QtCore.QModelIndex) – The index to return data for.

  • role (int) – The role to request data for.

  • multiple_roles (frozenset) – If role equals {MultipleRolesUserRolesEnum.MultipleRoles}, a set of roles to retrieve data for. Ignored otherwise.

Returns

The requested data. If role equals {MultipleRolesUserRolesEnum.MultipleRoles}, will be a dictionary of {role: value}. The dictionary not contain roles that are not provided by this model and may contain additional roles that were not explicitly requested.

Return type

object

dataChanged

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

AlignmentInfoProxyModel.decodeData(self, int, int, QModelIndex, QDataStream) -> bool
deleteLater(self)
destroyed

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

disconnect(QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, QMetaMethod)
dropMimeData(self, QMimeData, Qt.DropAction, int, int, QModelIndex) bool
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
encodeData(self, Iterable[QModelIndex], QDataStream)
endInsertColumns(self)
endInsertRows(self)
endLayoutChange()
endMoveColumns(self)
endMoveRows(self)
endRemoveColumns(self)
endRemoveRows(self)
endResetModel(self)
event(self, QEvent) bool
eventFilter(self, QObject, QEvent) bool
fetchMore(self, QModelIndex)
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChild(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
getGroupBy()
Returns

The current GroupBy setting.

Return type

viewconstants.GroupBy

groupByChanged
hasChildren(self, parent: QModelIndex = QModelIndex()) bool
AlignmentInfoProxyModel.hasIndex(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
headerData(self, int, Qt.Orientation, role: int = Qt.DisplayRole) Any
headerDataChanged

headerDataChanged(self, Qt.Orientation, int, int) [signal]

AlignmentInfoProxyModel.index(self, int, int, parent: QModelIndex = QModelIndex()) -> QModelIndex
inherits(self, str) bool
insertColumn(self, int, parent: QModelIndex = QModelIndex()) bool
AlignmentInfoProxyModel.insertColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
insertRow(self, int, parent: QModelIndex = QModelIndex()) bool
AlignmentInfoProxyModel.insertRows(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
installEventFilter(self, QObject)
isMouseOverIndex(proxy_index)
isSignalConnected(self, QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
isWorkspaceAln()
Returns

Whether this model represents the workspace alignment.

Return type

bool

itemData(self, QModelIndex) Dict[int, Any]
killTimer(self, 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]

mapFromSource(self, QModelIndex) QModelIndex
mapSelectionFromSource(self, QItemSelection) QItemSelection
mapSelectionToSource(self, QItemSelection) QItemSelection
mapToSource(self, QModelIndex) QModelIndex
match(self, QModelIndex, int, Any, hits: int = 1, flags: Union[Qt.MatchFlags, Qt.MatchFlag] = Qt.MatchStartsWith | Qt.MatchWrap) List[QModelIndex]
metaObject(self) QMetaObject
mimeTypes(self) List[str]
modelAboutToBeReset

modelAboutToBeReset(self) [signal]

modelReset

modelReset(self) [signal]

AlignmentInfoProxyModel.moveColumn(self, QModelIndex, int, QModelIndex, int) -> bool
AlignmentInfoProxyModel.moveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
AlignmentInfoProxyModel.moveRow(self, QModelIndex, int, QModelIndex, int) -> bool
AlignmentInfoProxyModel.moveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
moveSelectionBelow(proxy_index)

Move all selected sequences immediately below the specified index. Used for drag-and-drop.

Parameters

proxy_index (QtCore.QModelIndex) – The index to move selected sequences below.

moveToThread(self, QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, str) [signal]

parent(self, QModelIndex) QModelIndex
parent(self) QObject
persistentIndexList(self) List[QModelIndex]
property(self, str) Any
pyqtConfigure(...)

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

receivers(self, PYQT_SIGNAL) int
removeColumn(self, int, parent: QModelIndex = QModelIndex()) bool
AlignmentInfoProxyModel.removeColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
removeEventFilter(self, QObject)
removeRow(self, int, parent: QModelIndex = QModelIndex()) bool
AlignmentInfoProxyModel.removeRows(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
resetInternalData(self)
revert(self)
roleNames(self) Dict[int, QByteArray]
rowCount(self, parent: QModelIndex = QModelIndex()) int
rowData(proxy_row, cols, internal_id, roles)

Fetch data for multiple roles for multiple indices in the same row. Note that this method does minimal sanity checking of its input for performance reasons, as it is called during painting. The arguments are assumed to refer to valid indices. Use data instead if more sanity checking is required.

Parameters
  • row (int) – The row number to fetch data for.

  • cols (list(int)) – A list of columns to fetch data for.

  • internal_id (int) – The parent row (or TOP_LEVEL for top-level rows) of the row to fetch data for.

  • roles (list(int)) – A list of roles to fetch data for.

Returns

{role: data} dictionaries for each requested column. Note that the keys of these dictionaries may not match roles. Data for additional roles may be included (e.g. if that data was required to calculate data for a requested role). Data for requested roles may not be included if those roles are not applicable to the specified row (e.g. many roles are not applicable to spacer rows).

Return type

list(dict(int, object))

rowHeightChanged
rowsAboutToBeInserted

rowsAboutToBeInserted(self, QModelIndex, int, int) [signal]

rowsAboutToBeMoved

rowsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

rowsAboutToBeRemoved

rowsAboutToBeRemoved(self, QModelIndex, int, int) [signal]

rowsInserted

rowsInserted(self, QModelIndex, int, int) [signal]

rowsMoved

rowsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

rowsRemoved

rowsRemoved(self, QModelIndex, int, int) [signal]

selectableColumns()

Return a list of all selectable columns (i.e. columns flagged with Qt.ItemIsSelectable). :rtype: list(int)

sender(self) QObject
senderSignalIndex(self) int
seqExpansionChanged
setAnnSelectionState(proxy_index, selected)
setData(self, QModelIndex, Any, role: int = Qt.EditRole) bool
setHeaderData(self, int, Qt.Orientation, Any, role: int = Qt.EditRole) bool
setItemData(self, QModelIndex, Dict[int, Any]) bool
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) bool
setSourceModel(self, QAbstractItemModel)
AlignmentInfoProxyModel.sibling(self, int, int, QModelIndex) -> QModelIndex
signalsBlocked(self) bool
sort(self, int, order: Qt.SortOrder = Qt.AscendingOrder)
sourceModel(self) QAbstractItemModel
sourceModelChanged

sourceModelChanged(self) [signal]

span(self, QModelIndex) QSize
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
submit(self) bool
supportedDragActions(self) Qt.DropActions
supportedDropActions(self) Qt.DropActions
textSizeChanged
thread(self) QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = - 1) str
class schrodinger.application.msv.gui.viewmodel.AlignmentMetricsProxyModel(parent)[source]

Bases: schrodinger.application.msv.gui.viewmodel.BaseAdjacentAlignmentProxyModel

A proxy model that contains the alignment metrics, such as percentage of identity, similarity, homology and score to the reference sequence. Columns can be enabled or disabled via the options model.

Note

If all columns are disabled, then this model will be completely empty (i.e. zero rows in addition to zero columns). That’s because there’s no way to generate a valid QModelIndex object without any columns, so there would be no way to create a parent index when referring to a nested row. Instead, this model will ignore all row changes until a column is enabled, at which point it will emit modelAboutToBeReset and modelReset to resync the view.

Column

alias of <unknown>.AlignmentMetricsColumns

ROLES_FROM_SOURCE = {CustomRole.RowType, CustomRole.Seq, CustomRole.ReferenceSequence, CustomRole.RowHeightScale, CustomRole.SeqSelected, 21256, 21257, 21258, 21259, 21260, 21261, 21262, 21263, 21264, 21265, 21266, 21267, 21268, 21269, 21270, 21271, 21272, 21273, 21274, 21275, 21276, 21277, 21278, 21279, 21280, 21281, 21282, 21283, 21284, 21285, 21286, 21287, 21288, 21289, 21290, 21291, 21292, 21293, 21294, 21295, 21296, 21297, 21298, 21299, 21300, 21301, 21302, 21303, 21304, 21305, 21306, 21307, 21308, 21309, 21310, 21311, 21312, 21313, 21314, 21315, 21316, 21317, 21318, 21319, 21320, 21321, 21322, 21323, 21324, 21325, 21326, 21327, 21328, 21329, 21330, 21331, 21332, 21333, 21334, 21335, 21336, 21337, 21338, 21339, 21340, 21341, 21342, 21343, 21344, 21345, 21346, 21347, 21348, 21349, 21350, 21351, 21352, 21353, 21354, 21355, 21356, 21357, 21358, 21359, 21360, 21361, 21362, 21363, 21364, 21365, 21366, 21367, 21368, 21369, 21370, 21371, 21372, 21373, 21374, 21375, 21376, 21377, 21378, 21379, 21380, 21381, 21382, 21383, 21384, 21385, 21386, 21387, 21388, 21389, 21390, 21391, 21392, 21393, 21394, 21395, 21396, 21397, 21398, 21399, 21400, 21401, 21402, 21403, 21404, 21405, 21406, 21407, 21408, 21409, 21410, 21411, 21412, 21413, 21414, 21415, 21416, 21417, 21418, 21419, 21420, 21421, 21422, 21423, 21424, 21425, 21426, 21427, 21428, 21429, 21430, 21431, 21432, 21433, 21434, 21435, 21436, 21437, 21438, 21439, 21440, 21441, 21442, 21443, 21444, 21445, 21446, 21447, 21448, 21449, 21450, 21451, 21452, 21453, 21454, 21455, 21456, 21457, 21458, 21459, 21460, 21461, 21462, 21463, 21464, 21465, 21466, 21467, 21468, 21469, 21470, 21471, 21472, 21473, 21474, 21475, 21476, 21477, 21478, 21479, 21480, 21481, 21482, 21483, 21484, 21485, 21486, 21487, 21488, 21489, 21490, 21491, 21492, 21493, 21494, 21495, 21496, 21497, 21498, 21499, 21500, 21501, 21502, 21503, 21504, 21505, 21506, 21507, 21508, 21509, 21510, 21511, 21512, 21513, 21514, 21515, 21516, 21517, 21518, 21519, 21520, 21521, 21522, 21523, 21524, 21525, 21526, 21527, 21528, 21529, 21530, 21531, 21532, 21533, 21534, 21535, 21536, 21537, 21538, 21539, 21540, 21541, 21542, 21543, 21544, 21545, 21546, 21547, 21548, 21549, 21550, 21551, 21552, 21553, 21554, 21555, 21556, 21557, 21558, 21559, 21560, 21561, 21562, 21563, 21564, 21565, 21566, 21567, 21568, 21569, 21570, 21571, 21572, 21573, 21574, 21575, 21576, 21577, 21578, 21579, 21580, 21581, 21582, 21583, 21584, 21585, 21586, 21587, 21588, 21589, 21590, 21591, 21592, 21593, 21594, 21595, 21596, 21597, 21598, 21599, 21600, 21601, 21602, 21603, 21604, 21605, 21606, 21607, 21608, 21609, 21610, 21611, 21612, 21613, 21614, 21615, 21616, 21617, 21618, 21619, 21620, 21621, 21622, 21623, 21624, 21625, 21626, 21627, 21628, 21629, 21630, 21631, 21632, 21633, 21634, 21635, 21636, 21637, 21638, 21639, 21640, 21641, 21642, 21643, 21644, 21645, 21646, 21647, 21648, 21649, 21650, 21651, 21652, 21653, 21654, 21655, 21656, 21657, 21658, 21659, 21660, 21661, 21662, 21663, 21664, 21665, 21666, 21667, 21668, 21669, 21670, 21671, 21672, 21673, 21674, 21675, 21676, 21677, 21678, 21679, 21680, 21681, 21682, 21683, 21684, 21685, 21686, 21687, 21688, 21689, 21690, 21691, 21692, 21693, 21694, 21695, 21696, 21697, 21698, 21699, 21700, 21701, 21702, 21703, 21704, 21705, 21706, 21707, 21708, 21709, 21710, 21711, 21712, 21713, 21714, 21715, 21716, 21717, 21718, 21719, 21720, 21721, 21722, 21723, 21724, 21725, 21726, 21727, 21728, 21729, 21730, 21731, 21732, 21733, 21734, 21735, 21736, 21737, 21738, 21739, 21740, 21741, 21742, 21743, 21744, 21745, 21746, 21747, 21748, 21749, 21750, 21751, 21752, 21753, 21754, 21755}
ROLES_FROM_PROXY = {0, 3, 6, 7, 9, CustomRole.MetricsType}
__init__(parent)[source]
Parameters

parent (QtWidgets.QWidget) – The Qt parent widget

setLightMode(enabled)[source]

Set light mode for the alignment metrics table. This changes the font color that is used

setOptionsModel(options_model)[source]

Set the options model for the proxy, which are used for row filtering.

Parameters

options_model (schrodinger.application.msv.gui.gui_models. OptionsModel) – The widget options.

rowCount(self, parent: QModelIndex = QModelIndex()) int[source]
endInsertRows(self)[source]
endRemoveRows(self)[source]
flags(self, QModelIndex) Qt.ItemFlags[source]
class CheckIndexOption(value)

Bases: enum.IntEnum

An enumeration.

DoNotUseParent = 2
IndexIsValid = 1
NoOption = 0
ParentIsInvalid = 4
class CheckIndexOptions
class CheckIndexOptions(Union[QAbstractItemModel.CheckIndexOptions, QAbstractItemModel.CheckIndexOption]) None
class CheckIndexOptions(QAbstractItemModel.CheckIndexOptions) None

Bases: sip.simplewrapper

__init__(*args, **kwargs)
FONT_SCALE = 1.25
HorizontalSortHint = 2
class LayoutChangeHint

Bases: int

NoLayoutChangeHint = 0
VerticalSortHint = 1
AlignmentMetricsProxyModel.beginInsertColumns(self, QModelIndex, int, int)
AlignmentMetricsProxyModel.beginInsertRows(self, QModelIndex, int, int)
AlignmentMetricsProxyModel.beginMoveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
AlignmentMetricsProxyModel.beginMoveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
AlignmentMetricsProxyModel.beginRemoveColumns(self, QModelIndex, int, int)
AlignmentMetricsProxyModel.beginRemoveRows(self, QModelIndex, int, int)
beginResetModel(self)
blockSignals(self, bool) bool
buddy(self, QModelIndex) QModelIndex
canDropMimeData(self, QMimeData, Qt.DropAction, int, int, QModelIndex) bool
canFetchMore(self, QModelIndex) bool
AlignmentMetricsProxyModel.changePersistentIndex(self, QModelIndex, QModelIndex)
changePersistentIndexList(self, Iterable[QModelIndex], Iterable[QModelIndex])
checkIndex(self, QModelIndex, options: Union[QAbstractItemModel.CheckIndexOptions, QAbstractItemModel.CheckIndexOption] = QAbstractItemModel.CheckIndexOption.NoOption) bool
childEvent(self, QChildEvent)
children(self) List[QObject]
columnCount(self, parent: QModelIndex = QModelIndex()) int
columnsAboutToBeInserted

columnsAboutToBeInserted(self, QModelIndex, int, int) [signal]

columnsAboutToBeMoved

columnsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

columnsAboutToBeRemoved

columnsAboutToBeRemoved(self, QModelIndex, int, int) [signal]

columnsInserted

columnsInserted(self, QModelIndex, int, int) [signal]

columnsMoved

columnsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

columnsRemoved

columnsRemoved(self, QModelIndex, int, int) [signal]

connectNotify(self, QMetaMethod)
AlignmentMetricsProxyModel.createIndex(self, int, int, object: object = 0) -> QModelIndex
customEvent(self, QEvent)
data(proxy_index, role=0, multiple_roles=None)

Provide data for the specified index and role. Subclasses normally do not need to redefine this method. Instead, new methods should be created and decorated with table_helper.data_method.

Parameters
  • index (QtCore.QModelIndex) – The index to return data for.

  • role (int) – The role to request data for.

  • multiple_roles (frozenset) – If role equals {MultipleRolesUserRolesEnum.MultipleRoles}, a set of roles to retrieve data for. Ignored otherwise.

Returns

The requested data. If role equals {MultipleRolesUserRolesEnum.MultipleRoles}, will be a dictionary of {role: value}. The dictionary not contain roles that are not provided by this model and may contain additional roles that were not explicitly requested.

Return type

object

dataChanged

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

AlignmentMetricsProxyModel.decodeData(self, int, int, QModelIndex, QDataStream) -> bool
deleteLater(self)
destroyed

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

disconnect(QMetaObject.Connection) bool
disconnect(self) None
disconnectNotify(self, QMetaMethod)
dropMimeData(self, QMimeData, Qt.DropAction, int, int, QModelIndex) bool
dumpObjectInfo(self)
dumpObjectTree(self)
dynamicPropertyNames(self) List[QByteArray]
encodeData(self, Iterable[QModelIndex], QDataStream)
endInsertColumns(self)
endLayoutChange()
endMoveColumns(self)
endMoveRows(self)
endRemoveColumns(self)
endResetModel(self)
event(self, QEvent) bool
eventFilter(self, QObject, QEvent) bool
fetchMore(self, QModelIndex)
findChild(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChild(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) QObject
findChildren(self, type, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, name: str = '', options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) List[QObject]
getAlignment()

Return the underlying alignment

Returns

The alignment if the source model exists; else None

Return type

schrodinger.protein.alignment.BaseAlignment

getGroupBy()
Returns

The current GroupBy setting.

Return type

viewconstants.GroupBy

groupByChanged
hasChildren(self, parent: QModelIndex = QModelIndex()) bool
AlignmentMetricsProxyModel.hasIndex(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
headerData(self, int, Qt.Orientation, role: int = Qt.DisplayRole) Any
headerDataChanged

headerDataChanged(self, Qt.Orientation, int, int) [signal]

AlignmentMetricsProxyModel.index(self, int, int, parent: QModelIndex = QModelIndex()) -> QModelIndex
inherits(self, str) bool
insertColumn(self, int, parent: QModelIndex = QModelIndex()) bool
AlignmentMetricsProxyModel.insertColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
insertRow(self, int, parent: QModelIndex = QModelIndex()) bool
AlignmentMetricsProxyModel.insertRows(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
installEventFilter(self, QObject)
isSignalConnected(self, QMetaMethod) bool
isWidgetType(self) bool
isWindowType(self) bool
isWorkspaceAln()
Returns

Whether this model represents the workspace alignment.

Return type

bool

itemData(self, QModelIndex) Dict[int, Any]
killTimer(self, 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]

mapFromSource(self, QModelIndex) QModelIndex
mapSelectionFromSource(self, QItemSelection) QItemSelection
mapSelectionToSource(self, QItemSelection) QItemSelection
mapToSource(self, QModelIndex) QModelIndex
match(self, QModelIndex, int, Any, hits: int = 1, flags: Union[Qt.MatchFlags, Qt.MatchFlag] = Qt.MatchStartsWith | Qt.MatchWrap) List[QModelIndex]
metaObject(self) QMetaObject
mimeData(self, Iterable[QModelIndex]) QMimeData
mimeTypes(self) List[str]
modelAboutToBeReset

modelAboutToBeReset(self) [signal]

modelReset

modelReset(self) [signal]

AlignmentMetricsProxyModel.moveColumn(self, QModelIndex, int, QModelIndex, int) -> bool
AlignmentMetricsProxyModel.moveColumns(self, QModelIndex, int, int, QModelIndex, int) -> bool
AlignmentMetricsProxyModel.moveRow(self, QModelIndex, int, QModelIndex, int) -> bool
AlignmentMetricsProxyModel.moveRows(self, QModelIndex, int, int, QModelIndex, int) -> bool
moveToThread(self, QThread)
objectName(self) str
objectNameChanged

objectNameChanged(self, str) [signal]

parent(self, QModelIndex) QModelIndex
parent(self) QObject
persistentIndexList(self) List[QModelIndex]
property(self, str) Any
pyqtConfigure(...)

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

receivers(self, PYQT_SIGNAL) int
removeColumn(self, int, parent: QModelIndex = QModelIndex()) bool
AlignmentMetricsProxyModel.removeColumns(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
removeEventFilter(self, QObject)
removeRow(self, int, parent: QModelIndex = QModelIndex()) bool
AlignmentMetricsProxyModel.removeRows(self, int, int, parent: QModelIndex = QModelIndex()) -> bool
resetInternalData(self)
revert(self)
roleNames(self) Dict[int, QByteArray]
rowData(proxy_row, cols, internal_id, roles)

Fetch data for multiple roles for multiple indices in the same row. Note that this method does minimal sanity checking of its input for performance reasons, as it is called during painting. The arguments are assumed to refer to valid indices. Use data instead if more sanity checking is required.

Parameters
  • row (int) – The row number to fetch data for.

  • cols (list(int)) – A list of columns to fetch data for.

  • internal_id (int) – The parent row (or TOP_LEVEL for top-level rows) of the row to fetch data for.

  • roles (list(int)) – A list of roles to fetch data for.

Returns

{role: data} dictionaries for each requested column. Note that the keys of these dictionaries may not match roles. Data for additional roles may be included (e.g. if that data was required to calculate data for a requested role). Data for requested roles may not be included if those roles are not applicable to the specified row (e.g. many roles are not applicable to spacer rows).

Return type

list(dict(int, object))

rowHeightChanged
rowsAboutToBeInserted

rowsAboutToBeInserted(self, QModelIndex, int, int) [signal]

rowsAboutToBeMoved

rowsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

rowsAboutToBeRemoved

rowsAboutToBeRemoved(self, QModelIndex, int, int) [signal]

rowsInserted

rowsInserted(self, QModelIndex, int, int) [signal]

rowsMoved

rowsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal]

rowsRemoved

rowsRemoved(self, QModelIndex, int, int) [signal]

selectableColumns()

Return a list of all selectable columns (i.e. columns flagged with Qt.ItemIsSelectable). :rtype: list(int)

sender(self) QObject
senderSignalIndex(self) int
seqExpansionChanged
setData(self, QModelIndex, Any, role: int = Qt.EditRole) bool
setHeaderData(self, int, Qt.Orientation, Any, role: int = Qt.EditRole) bool
setItemData(self, QModelIndex, Dict[int, Any]) bool
setObjectName(self, str)
setParent(self, QObject)
setProperty(self, str, Any) bool
setSourceModel(self, QAbstractItemModel)
AlignmentMetricsProxyModel.sibling(self, int, int, QModelIndex) -> QModelIndex
signalsBlocked(self) bool
sort(self, int, order: Qt.SortOrder = Qt.AscendingOrder)
sourceModel(self) QAbstractItemModel
sourceModelChanged

sourceModelChanged(self) [signal]

span(self, QModelIndex) QSize
startTimer(self, int, timerType: Qt.TimerType = Qt.CoarseTimer) int
staticMetaObject = <PyQt5.QtCore.QMetaObject object>
submit(self) bool
supportedDragActions(self) Qt.DropActions
supportedDropActions(self) Qt.DropActions
textSizeChanged
thread(self) QThread
timerEvent(self, QTimerEvent)
tr(self, str, disambiguation: str = None, n: int = - 1) str
updateData(role, source_row)

Update a specified index when data changes.

Parameters
  • role (enum.Enum) – Role of the data that changed.

  • source_row (int) – Index of the source model index to update.