schrodinger.maestro_utils.surface_manager.surface_table module

class schrodinger.maestro_utils.surface_manager.surface_table.SurfaceTable(parent=None)

Bases: TreeViewWithoutFilter

Sub-class of maestro_ui.maestro.TreeViewWithoutFilter. We have 4 columns in the table: 1. Checkbox column 2. Entry / Surface Name column 3. Type column 4. Volume column

We can have two types of rows in the table: 1. EntryNodeItem (parent nodes) 2. SurfaceNodeItem (child nodes)

Variables:
  • displayedSurfacesUpdated (QtCore.pyqtSignal) – Signal emitted when the displayed surfaces are updated.

  • notifyToChangeDisplay (QtCore.pyqtSignal) – Signal to notify client to change display.

  • notifyToModifyVolume (QtCore.pyqtSignal) – Signal to notify client to modify volume.

  • notifyToViewInfo (QtCore.pyqtSignal) – Signal to notify client to view info.

displayedSurfacesUpdated

A pyqtSignal emitted by instances of the class.

notifyToChangeDisplay

A pyqtSignal emitted by instances of the class.

notifyToModifyVolume

A pyqtSignal emitted by instances of the class.

notifyToViewInfo

A pyqtSignal emitted by instances of the class.

__init__(parent=None)

Constructor for SurfaceTable.

Parameters:

parent – The parent widget.

setupConnections()

Setup the connections.

reorderHeader()

Reorders the header.

refresh()

Refresh the surface table. This will repopulate the model with the current project data.

showEvent(event)

Overridden showEvent method. See Qt documentation for more information. Populates the surface table.

Parameters:

event – The event.

setCheckedOnNodes(indices: list[PyQt6.QtCore.QModelIndex], value: CheckState)

Set the checked state on the nodes.

Parameters:
  • indices – The indices of the items.

  • value – The value to set.

removeRowsAndDeleteSurfaces(indices: list[PyQt6.QtCore.QModelIndex])

Remove the rows from the model and delete the corresponding surfaces. We delete the rows in following order: 1. Surface nodes are deleted first 2. Surface nodes belonging to different entry nodes are deleted based on descending order of their parent entry node row number. 3. Surface nodes belonging to the same entry node are deleted based on descending order of their row number.

Parameters:

indices – The indices of the items.

deleteAllSurfacesAndRows()

Remove all rows from the model. This will delete all the underlying surfaces and remove their rows from the table.

getSelectedSurfaceInfos() list[SurfaceInfo]

Get the SurfaceInfo objects for selected surfaces.

Returns:

The SurfaceInfo objects for selected surfaces.

haveNonEmptySelection() bool

Check if there is a non-empty selection in the surface table.

Returns:

True if there is a non-empty selection, False otherwise.

exportAllData()

Exports all surface data.

selectEntries(entry_ids: list[int])

Selects the given entry_ids in the workspace surfaces table.

Parameters:

entry_ids – List of entry IDs to select.