schrodinger.trajectory.trajectory_gui_dir.interaction_plots module¶
Plot Manager for interaction plots (e.g. H-Bonds, Pi-Pi Stacking)
- class schrodinger.trajectory.trajectory_gui_dir.interaction_plots.InteractionsPlotManager(panel, mode, use_visible_atoms: bool, include_empty_datasets: bool)¶
Bases:
schrodinger.trajectory.trajectory_gui_dir.plots.TrajectoryAnalysisPlotManager
Class responsible for setting up and running an interactions plot task.
- __init__(panel, mode, use_visible_atoms: bool, include_empty_datasets: bool)¶
- Parameters
panel (QtWidget.QWidget) – Parent panel
mode (AnalysisMode) – Analysis mode
use_visible_atoms – Whether to only show interactions between visible atoms.
include_empty_datasets – Whether to include datasets with no interaction counts for any frame in the plot.
- configureTask(task, analysis_mode, ws_st)¶
Configure the analysis task analyze Workspace interactions of given type.
- Parameters
task (tasks.AbstractTask) – Task to configure
analysis_mode (traj_plot_models.AnalysisMode) – Interactions analysis mode for this task
ws_st (structure.Structure) – Workspace structure containing the system.
- Returns
Configured analysis task
- Return type
traj_plot_model.TrajectoryAnalysisSubprocTask
- getMaestroHBondKwargs()¶
Attempt to get parameters needed for hydrogen bond identification from Maestro. Return empty dict if not available.
- getTitleAndTooltipForTask(task, *, prefix: str) Tuple[str, str] ¶
Get the title, and, optionally, a tooltip for the plot task :param task: A trajectory analysis task :param prefix: the interaction category to use as the first part of the title :return: the title text and tooltip (if any) to use for the plot
- getInitialPlotTitleAndTooltip()¶
Derive the interaction plot title based on the settings stored in task.
See base method for documentation of return value.
- formatPlotAxes()¶
Formats axes tick numbers and spacing depending on result data.
- PANEL_CLASS = None¶
- blockSignals(self, b: bool) bool ¶
- chart()¶
- childEvent(self, a0: QChildEvent)¶
- children(self) List[QObject] ¶
- connectNotify(self, signal: QMetaMethod)¶
- createAndDisplayMeasurement¶
- createCollapsiblePlotWidget()¶
- createPanel()¶
For advanced plots, creates an instance of a plot panel and returns it. For simple (panel-less) plots, returns None.
- customEvent(self, a0: QEvent)¶
- deleteLater(self)¶
- deletePlot¶
- destroyed¶
destroyed(self, object: typing.Optional[QObject] = None) [signal]
- disconnect(a0: QMetaObject.Connection) bool ¶
- disconnect(self) None
- disconnectNotify(self, signal: QMetaMethod)¶
- displayAsl¶
- displayFrameAndAsl¶
- dumpObjectInfo(self)¶
- dumpObjectTree(self)¶
- dynamicPropertyNames(self) List[QByteArray] ¶
- event(self, a0: QEvent) bool ¶
- eventFilter(self, a0: QObject, a1: QEvent) bool ¶
- exportToCSV(parent=None)¶
Export plot data to a CSV file
- exportToExcel(parent=None)¶
Export data to an .xls file
- findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject ¶
- findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
- findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject] ¶
- findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
- findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
- findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
- generateASL(aids)¶
Generates an ASL string selecting given atom IDs.
- Parameters
aids (Union[int, list(int)]) – Single atom id OR list of atom ids
- Returns
ASL which selects given atoms.
- Return type
str
- generateSettingsHash(settings_list)¶
Return a tuple that uniquely identifies this plot.
- Parameters
settings_list (list) – List of settings that can uniquely identify the plot. In addition to these, the plot class name and trajectory path will be added.
- Returns
Unique identifier for the plot.
- Return type
tuple
- getDataForExport()¶
Return a list of row data to export to CSV or Excel.
- Returns
Data to be exported
- Return type
list(list)
- getExportData()¶
Most panels export the same data whether export was selected from the plot panel or the main panel. Override this method to export different type of data when exporting from the parent panel, via the “Export Results…” button.
- getPlotTitle()¶
- getPlotType()¶
Returns what type of plot this class uses; used for grouping export data. For TRAJECTORY grouping, each plot’s data is added as a column in the same Excel sheet.
- getSettingsHash()¶
- inherits(self, classname: str) bool ¶
- installEventFilter(self, a0: QObject)¶
- isRunning()¶
Return True if the plot is still generating data.
- isSignalConnected(self, signal: QMetaMethod) bool ¶
- isWidgetType(self) bool ¶
- isWindowType(self) bool ¶
- killTimer(self, id: int)¶
- loadFromTask(task)¶
Load in results from the given task.
- Parameters
task (tasks.AbstractTask) – Task to get result data from.
- metaObject(self) QMetaObject ¶
- moveToThread(self, thread: QThread)¶
- newDataAvailable¶
- objectName(self) str ¶
- objectNameChanged¶
objectNameChanged(self, objectName: str) [signal]
- onPlotClicked(value)¶
- parent(self) QObject ¶
- property(self, name: str) Any ¶
- pyqtConfigure(...)¶
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
- receivers(self, signal: PYQT_SIGNAL) int ¶
- removeEventFilter(self, a0: QObject)¶
- saveImage()¶
Save a .png file of the plot
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setObjectName(self, name: str)¶
- setParent(self, a0: QObject)¶
- setProperty(self, name: str, value: Any) bool ¶
- setupView(fixed_height=250, multi_series=False)¶
- showContextMenu(parent=None)¶
- showWarning¶
- signalsBlocked(self) bool ¶
- start()¶
- startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt6.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, a0: QTimerEvent)¶
- tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str ¶
- class schrodinger.trajectory.trajectory_gui_dir.interaction_plots.MultiSeriesPlotManager(panel, use_visible_atoms: bool, include_empty_datasets: bool)¶
Bases:
schrodinger.trajectory.trajectory_gui_dir.interaction_plots.InteractionsPlotManager
Plot manager that contains multiple interaction series, on a single plot. Raises RuntimeError if plot could not be created.
- newDataAvailable¶
- showWarning¶
- __init__(panel, use_visible_atoms: bool, include_empty_datasets: bool)¶
- Parameters
panel (QtWidget.QWidget) – Parent panel
mode (AnalysisMode) – Analysis mode
use_visible_atoms – Whether to only show interactions between visible atoms.
include_empty_datasets – Whether to include datasets with no interaction counts for any frame in the plot.
- createBatchQueue()¶
Get a configured task queue for running a batch of tasks.
- Returns
Configured task queue
- Return type
- start()¶
- getSettingsHash()¶
Generates a key for use in the interactions map
- Returns
key for interaction map
- Return type
str, tuple(AnalysisMode), tuple(str)
- createCollapsiblePlotWidget()¶
- validateTaskQueue(task_queue)¶
Validate task queue for multi-interaction plot. On error, return error message text, otherwise return None.
- getInitialPlotTitleAndTooltip()¶
For multi-series plots, title will be updated when all tasks complete via if multiple ASL sets are used.
- getTasks()¶
Return all tasks that are managed by this plot manager.
- isRunning()¶
Return True if the plot is still generating data.
- formatPlotAxes()¶
Formats axes tick numbers and spacing depending on result data.
- onPlotClicked(value)¶
There is no click handler for multi-series interactions plots.
- PANEL_CLASS = None¶
- blockSignals(self, b: bool) bool ¶
- chart()¶
- childEvent(self, a0: QChildEvent)¶
- children(self) List[QObject] ¶
- configureTask(task, analysis_mode, ws_st)¶
Configure the analysis task analyze Workspace interactions of given type.
- Parameters
task (tasks.AbstractTask) – Task to configure
analysis_mode (traj_plot_models.AnalysisMode) – Interactions analysis mode for this task
ws_st (structure.Structure) – Workspace structure containing the system.
- Returns
Configured analysis task
- Return type
traj_plot_model.TrajectoryAnalysisSubprocTask
- connectNotify(self, signal: QMetaMethod)¶
- createAndDisplayMeasurement¶
- createPanel()¶
For advanced plots, creates an instance of a plot panel and returns it. For simple (panel-less) plots, returns None.
- customEvent(self, a0: QEvent)¶
- deleteLater(self)¶
- deletePlot¶
- destroyed¶
destroyed(self, object: typing.Optional[QObject] = None) [signal]
- disconnect(a0: QMetaObject.Connection) bool ¶
- disconnect(self) None
- disconnectNotify(self, signal: QMetaMethod)¶
- displayAsl¶
- displayFrameAndAsl¶
- dumpObjectInfo(self)¶
- dumpObjectTree(self)¶
- dynamicPropertyNames(self) List[QByteArray] ¶
- event(self, a0: QEvent) bool ¶
- eventFilter(self, a0: QObject, a1: QEvent) bool ¶
- exportToCSV(parent=None)¶
Export plot data to a CSV file
- exportToExcel(parent=None)¶
Export data to an .xls file
- findChild(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject ¶
- findChild(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) QObject
- findChildren(self, type: type, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject] ¶
- findChildren(self, types: Tuple, name: str = '', options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
- findChildren(self, type: type, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
- findChildren(self, types: Tuple, re: QRegularExpression, options: Qt.FindChildOption = Qt.FindChildrenRecursively) List[QObject]
- generateASL(aids)¶
Generates an ASL string selecting given atom IDs.
- Parameters
aids (Union[int, list(int)]) – Single atom id OR list of atom ids
- Returns
ASL which selects given atoms.
- Return type
str
- generateSettingsHash(settings_list)¶
Return a tuple that uniquely identifies this plot.
- Parameters
settings_list (list) – List of settings that can uniquely identify the plot. In addition to these, the plot class name and trajectory path will be added.
- Returns
Unique identifier for the plot.
- Return type
tuple
- getDataForExport()¶
Return a list of row data to export to CSV or Excel.
- Returns
Data to be exported
- Return type
list(list)
- getExportData()¶
Most panels export the same data whether export was selected from the plot panel or the main panel. Override this method to export different type of data when exporting from the parent panel, via the “Export Results…” button.
- getMaestroHBondKwargs()¶
Attempt to get parameters needed for hydrogen bond identification from Maestro. Return empty dict if not available.
- getPlotTitle()¶
- getPlotType()¶
Returns what type of plot this class uses; used for grouping export data. For TRAJECTORY grouping, each plot’s data is added as a column in the same Excel sheet.
- getTitleAndTooltipForTask(task, *, prefix: str) Tuple[str, str] ¶
Get the title, and, optionally, a tooltip for the plot task :param task: A trajectory analysis task :param prefix: the interaction category to use as the first part of the title :return: the title text and tooltip (if any) to use for the plot
- inherits(self, classname: str) bool ¶
- installEventFilter(self, a0: QObject)¶
- isSignalConnected(self, signal: QMetaMethod) bool ¶
- isWidgetType(self) bool ¶
- isWindowType(self) bool ¶
- killTimer(self, id: int)¶
- loadFromTask(task)¶
Load in results from the given task.
- Parameters
task (tasks.AbstractTask) – Task to get result data from.
- metaObject(self) QMetaObject ¶
- moveToThread(self, thread: QThread)¶
- objectName(self) str ¶
- objectNameChanged¶
objectNameChanged(self, objectName: str) [signal]
- parent(self) QObject ¶
- property(self, name: str) Any ¶
- pyqtConfigure(...)¶
Each keyword argument is either the name of a Qt property or a Qt signal. For properties the property is set to the given value which should be of an appropriate type. For signals the signal is connected to the given value which should be a callable.
- receivers(self, signal: PYQT_SIGNAL) int ¶
- removeEventFilter(self, a0: QObject)¶
- saveImage()¶
Save a .png file of the plot
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setObjectName(self, name: str)¶
- setParent(self, a0: QObject)¶
- setProperty(self, name: str, value: Any) bool ¶
- setupView(fixed_height=250, multi_series=False)¶
- showContextMenu(parent=None)¶
- signalsBlocked(self) bool ¶
- startTimer(self, interval: int, timerType: Qt.TimerType = Qt.CoarseTimer) int ¶
- staticMetaObject = <PyQt6.QtCore.QMetaObject object>¶
- thread(self) QThread ¶
- timerEvent(self, a0: QTimerEvent)¶
- tr(sourceText: str, disambiguation: typing.Optional[str] = None, n: int = - 1) str ¶