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/2018-3/NB/build-149/internal/lib/python3.6/site-packages/schrodinger/application/jaguar/gui/ui/reaction_tab_ui.py'>,)
reactionParticipantAdded
reactionParticipantRemoved
reactionParticipantStructChanged
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

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:
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 default schrodinger.application.jaguar.input.JaguarInput object. This function should only be defined in subclasses if there are any settings that cannot be reset via loadSettings.

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 cause getMmJagKeywords to raise a JaguarSettingError. Any tab setting that allows mmjag keywords to be successfully generated but will result in a job failure should cause a validate 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: PyQt5.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
regeneratePicture()

This regenerates the 2D picture if the underlying structure has been edited inside the workspace.

pt_entry_id
addToWorkspace()

Convenience wrapper

getStructure()

Get the structure for this participant

Returns:The structure
Return type:schrodinger.structure.Structure
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
deleteParticipant
error
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