schrodinger.application.jaguar.gui.tabs.input_sub_tabs.base_sub_tab module

class schrodinger.application.jaguar.gui.tabs.input_sub_tabs.base_sub_tab.BaseSubTab(parent=None)

Bases: schrodinger.ui.qt.appframework2.maestro_callback.MaestroCallbackWidgetMixin, PyQt6.QtWidgets.QWidget

A base-class for all Input tab sub-tabs. This class is not intended to be instantiated directly and should be subclassed. Subclasses must redefine NAME, UI_MODULE, TABLE_MODEL_CLASS, saveSettings, and loadSettings. Subclasses must include a schrodinger.application.jaguar.gui.tabs.tabs. sub_tab_widgets.base_widgets.SubTabTableView (or a subclass) instance accessible as self.ui.table_view. Subclasses will also likely need to redefine setup, activate, and deactivate.

Variables
  • NAME (str) – The name of the tab. This name will be shown in the tab bar.

  • UI_MODULE (module) – A module containing a Ui_Form for the sub tab

  • TABLE_MODEL_CLASS (type) – The class of the table model. An instance of this class will be made available at self._table_model. This variable must be redefined in BaseSubTab subclasses with a subclass of schrodinger.application.jaguar.gui.tabs.sub_tab_widgets.base_widgets. SubTabModel

  • PROXY_MODEL_CLASS (type) – The class of the proxy model. An instance of this class will be made available at self._proxy_model. This proxy model filters out rows related to entry ids that are no longer selected in the project table. This variable may be refined in BaseSubTab subclasses, but it is not required.

  • countChanged (PyQt5.QtCore.pyqtSignal) –

    A signal emitted when the number of rows in the table has changed. The input tab uses this to update the row count in the tab name. The signal is emitted with:

    • The sub tab instance (BaseSubTab

    • The row count (int)

  • addJaguarMarker (PyQt5.QtCore.pyqtSignal) –

    A signal emitted when a workspace marker should be added. Emitted with:

    • The list of atoms to add the marker for (list)

    • The marker settings (dict)

    • The name of the sub-tab (str)

  • removeJaguarMarker (PyQt5.QtCore.pyqtSignal) –

    A signal emitted when a workspace marker should be removed. Emitted with:

    • The list of atoms to remove the marker for (list)

    • The name of the sub-tab (str)

  • setMarkerHighlighting (PyQt5.QtCore.pyqtSignal) –

    A signal emitted when the highlighting of a workspace marker should be changed. Emitted with:

    • The list of atoms to change the highlighting for (list)

    • Whether the marker should be highlighted (True) or unhighlighted (False) (bool)

    • The name of the sub-tab (str)

NAME = ''
UI_MODULE = None
TABLE_MODEL_CLASS

alias of schrodinger.application.jaguar.gui.tabs.sub_tab_widgets.base_widgets.SubTabModel

PROXY_MODEL_CLASS

alias of schrodinger.application.jaguar.gui.tabs.sub_tab_widgets.base_widgets.SubTabProxyModel

countChanged

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

addJaguarMarker

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

removeJaguarMarker

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

setMarkerHighlighting

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

__init__(parent=None)
setup()

Sub-tab-specific initialization. This function may be redefined in subclasses.

validate()

Make sure that the sub-tab settings will allow a job to be run successfully.

Returns

If the validation passes, returns None. If the validation fails, returns a string that describes the error.

Return type

str or NoneType

saveSettings(jag_input, eid)

Save sub-tab settings for the specified entry into the given Jaguar handle. This function should be redefined in subclasses.

Parameters
loadSettings(jag_input, eid, title, struc)

Restore sub-tab settings from the Jaguar handle. This function should be redefined in subclasses. Note that existing settings for the given entry id should be cleared before the new settings are loaded.

Parameters
activate()

Activate the sub-tab, e.g., check the picking check box.

deactivate()

Deactivate the sub-tab, e.g., stop picking and/or uncheck the picking check box

setActive(activate)

Activate or deactivate the sub-tab

Parameters

activate (bool) – Whether to activate (True) or de-activate (False) the sub-tab

setDisplayedEids(eids)

Set the entry ids to display in the table. This should correspond to the entry ids currently selected in the project table.

Parameters

eids (list) – The entry ids to display

updateEntryTitles(eids_to_titles)

Update the entry titles in case they have changed in the project table

Parameters

eids_to_titles (dict) – A dictionary of {entry id: title}

emitCountChanged()

Emit the countChanged signal with the appropriate row count

reset()
emitAddMarker(atoms, settings)

Pass along the addJaguarMarker signal received from the table model after adding the sub-tab name.

Parameters
  • atoms (list) – A list of atoms to add the marker for

  • settings (dict) – The marker settings

emitRemoveMarker(atoms)

Pass along the removeJaguarMarker signal received from the table model after adding the sub-tab name to the signal.

Parameters

atoms (list) – A list of atoms to remove the marker for

emitSetMarkerHighlighting(atoms, highlight)

Pass along the setMarkerHighlighting signal received from the table view after adding the sub-tab name to the signal.

Parameters
  • atoms (list) – A list of atoms to change the highlighting for

  • highlight (bool) – Whether to highlight (True) or unhighlight (False) the specified marker

warning(msg)

Display a warning dialog with the specified message

Parameters

msg (str) – The message to include in the warning dialog

projectUpdated()