schrodinger.application.jaguar.gui.tabs.reaction_tab module¶
- class schrodinger.application.jaguar.gui.tabs.reaction_tab.ReactionTab(parent, input_selector=None)¶
Bases:
ProvidesStructuresMixin,BaseTab- NAME = 'Reaction'¶
- HELP_TOPIC = 'JAGUAR_%s_PANEL_REACTION_TAB'¶
- UI_MODULES = (<module 'schrodinger.application.jaguar.gui.ui.reaction_tab_ui' from '/scr/buildbot/builds/build/internal/lib/python3.11/site-packages/schrodinger/application/jaguar/gui/ui/reaction_tab_ui.py'>,)¶
- reactionParticipantAdded¶
A
pyqtSignalemitted by instances of the class.
- reactionParticipantRemoved¶
A
pyqtSignalemitted by instances of the class.
- reactionParticipantStructChanged¶
A
pyqtSignalemitted by instances of the class.
- 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
loadSettingswith a defaultschrodinger.application.jaguar.input.JaguarInputobject. 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 causegetMmJagKeywordsto raise a JaguarSettingError. Any tab setting that allows mmjag keywords to be successfully generated but will result in a job failure should cause avalidatefail. 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_TITLEshould 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:
QObjectThis class holds all the information for each participant in the reaction, be it reactant or product. It also contains the drawing objects.
- structureChanged¶
A
pyqtSignalemitted by instances of the class.
- __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:
structure_viewThis 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¶
A
pyqtSignalemitted by instances of the class.
- deleteParticipant¶
A
pyqtSignalemitted by instances of the class.
- error¶
A
pyqtSignalemitted by instances of the class.
- __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