schrodinger.application.jaguar.gui.tabs.reaction_tab module¶
- class schrodinger.application.jaguar.gui.tabs.reaction_tab.ReactionTab(parent, input_selector=None)¶
Bases:
schrodinger.application.jaguar.gui.tabs.base_tab.ProvidesStructuresMixin
,schrodinger.application.jaguar.gui.tabs.base_tab.BaseTab
- NAME = 'Reaction'¶
- HELP_TOPIC = 'JAGUAR_REACTION_TAB'¶
- UI_MODULES = (<module 'schrodinger.application.jaguar.gui.ui.reaction_tab_ui' from '/scr/buildbot/savedbuilds/2024-3/NB/build-133/internal/lib/python3.11/site-packages/schrodinger/application/jaguar/gui/ui/reaction_tab_ui.py'>,)¶
- reactionParticipantAdded¶
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.
- reactionParticipantRemoved¶
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.
- reactionParticipantStructChanged¶
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.
- setup()¶
Perform tab specific initialization. This function should be defined in subclasses if initialization is needed.
- addReactant()¶
- addProduct()¶
- removeParticipant(participant)¶
This removes a participant from the GUI
- property participants¶
- tileParticipants()¶
This places all current participants in the workspace in tiles
- workspaceChanged(change, pt)¶
This function is called when changes are made to the workspace.
- Parameters
change (str) – what changed in workspace
pt (
schrodinger.project.Project
) – currently active project table
- projectClosed()¶
This function is called when the project is closed. In this case we reset tab since we don’t know whether participants came from the project table or were imported from file.
- error(err)¶
Display an error dialog with the specified message
- Parameters
msg (str) – The message to include in the error dialog
- reset()¶
Reset the tab to its original state. Note that this function is only necessary for settings that are not stored in the mmjag handle. For mmjag settings, reset will be carried out using
loadSettings
with a defaultschrodinger.application.jaguar.input.JaguarInput
object. This function should only be defined in subclasses if there are any settings that cannot be reset vialoadSettings
.
- validate()¶
Make sure that the tab settings will allow a job to be run successfully. Note that this validation should not be redundant with that performed in
getMmJagKeywords
. Any tab setting that prevents valid mmjag keywords from being generated should causegetMmJagKeywords
to raise a JaguarSettingError. Any tab setting that allows mmjag keywords to be successfully generated but will result in a job failure should cause avalidate
fail. This function should be defined in subclasses if validation is needed.- Returns
If the validation passes, None is returned. If the validation fails, a string that describes the error is returned.
- Return type
str or NoneType
- getStructureTitleForJobname()¶
Get the structure title to be used in the job name. If the tab includes multiple structures, then
MULTIPLE_STRUC_JOB_TITLE
should be returned. If no structures have been specified yet, then None should be returned.- Returns
The structure title
- Return type
str or NoneType
- class schrodinger.application.jaguar.gui.tabs.reaction_tab.ReactionParticipant(parent, name, plus_item=None)¶
Bases:
PyQt6.QtCore.QObject
This class holds all the information for each participant in the reaction, be it reactant or product. It also contains the drawing objects.
- structureChanged¶
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, name, plus_item=None)¶
- regeneratePicture()¶
This regenerates the 2D picture if the underlying structure has been edited inside the workspace.
- property pt_entry_id¶
- addToWorkspace()¶
Convenience wrapper
- getStructure()¶
Get the structure for this participant
- Returns
The structure
- Return type
- class schrodinger.application.jaguar.gui.tabs.reaction_tab.ParticipantView(parent, scene, item)¶
Bases:
schrodinger.ui.qt.structure2d.structure_view
This class is a subclass of a QGraphicsView that holds a single structure_item, to display a single 2D structure. This handles all interactions with the widget displayed in the panel.
- PT_IMPORT_TXT = 'Import from Project Table...'¶
- FILE_IMPORT_TXT = 'Import from file...'¶
- DRAW_TXT = 'Sketch...'¶
- DELETE_TXT = 'Delete structure'¶
- structureChanged¶
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.
- deleteParticipant¶
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.
- error¶
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, scene, item)¶
- mousePressEvent(event)¶
Override default Qt function to show context menu
- addToWorkspace()¶
This includes the entry for this participant, leaving other current entries in the workspace as well (used with tiling).
- setAsWorkspace()¶
This replaces the current workspace with only the entry for this participant.
- processContextAction(action)¶
This loads data from the context menu, if requested
- Parameters
action (QAction) – The action clicked on from the menu