schrodinger.trajectory.trajectory_gui_dir.plots module

File containing plot related code used in the Trajectory Plots GUI

class schrodinger.trajectory.trajectory_gui_dir.plots.TrajectoryPlotType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: enum.Enum

Enum of plot types to generate

MEASUREMENT_WORKSPACE = 1
MEASUREMENT_ADD = 2
MEASUREMENT_PLANAR_ANGLE = 3
MEASUREMENT_CENTROID = 4
INTERACTIONS_ALL = 5
INTERACTIONS_HYDROGEN_BONDS = 6
INTERACTIONS_HALOGEN_BONDS = 7
INTERACTIONS_SALT_BRIDGE = 8
INTERACTIONS_PI_PI = 9
INTERACTIONS_CAT_PI = 10
DESCRIPTORS_RMSD = 11
DESCRIPTORS_ATOM_RMSF = 12
DESCRIPTORS_RES_RMSF = 13
DESCRIPTORS_RADIUS_GYRATION = 14
DESCRIPTORS_PSA = 15
DESCRIPTORS_SASA = 16
DESCRIPTORS_MOLECULAR_SA = 17
ENERGY_ALL_GROUPED = 18
ENERGY_ALL_INDIVIDUAL = 19
ENERGY_INDIVIDUAL_MOLECULES = 20
ENERGY_CUSTOM_SUBSTRUCTURE_SETS = 21
ENERGY_CUSTOM_ASL_SETS = 22
RAMACHANDRAN_PLOT = 23
CONFORMATION_WHEEL = 24
RDF_SELECTED_INDIVIDUAL_ATOMS = 25
RDF_SELECTED_RESIDUE_COM = 26
RDF_SELECTED_MOLECULE_COM = 27
RDF_OTHER = 28
class schrodinger.trajectory.trajectory_gui_dir.plots.PlotDataType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: enum.Enum

Broader type of data each plot task represents

TRAJECTORY = 1
RMSF = 2
ENERGY = 3
RAMACHANDRAN = 4
CONFORMATION = 5
RDF = 6
schrodinger.trajectory.trajectory_gui_dir.plots.unwrap_angles(dihedrals)

Re-wrap the given list of angles, adding or subtracting 360 degrees to an angle at wrap points - to avoid data from “wrapping” across the plot (top to bottom or bottom to top).

schrodinger.trajectory.trajectory_gui_dir.plots.handle_chart_legend(chart, is_multiseries_interactions)

Sets the chart legend depending on the type of the chart

Parameters
  • chart (QtCharts.QChart) – Chart containing legend

  • is_multiseries_interactions (bool) – is this a multiseries interaction plot

schrodinger.trajectory.trajectory_gui_dir.plots.setupFloatAxis(data, axis, axis_min=None, axis_max=None)

Sets the range, ticks, and tick formatting for axis based on float-valued data.

Parameters
  • data (Sequence) – Data for series on axis

  • axis (QValueAxis) – Axis to set

  • axis_min (Optional[float]) – Optional; manually set axis min

  • axis_max (Optional[float]) – Optional; manually set axis max

schrodinger.trajectory.trajectory_gui_dir.plots.setupTimeAxis(chart: PyQt6.QtCharts.QChart, axis: PyQt6.QtCharts.QValueAxis)

Setup time axis to display time in ns and format tick labels.

schrodinger.trajectory.trajectory_gui_dir.plots.setupIntegerAxis(data, axis, axis_min=None, axis_max=None)

Sets the range, ticks, and tick formatting for axis based on data, where data is integer-valued.

Parameters
  • data (Sequence) – Data for series on axis

  • axis (QValueAxis) – Axis to set

  • axis_min (Optional[int]) – Optional; manually set axis min

  • axis_max (Optional[int]) – Optional; manually set axis max

schrodinger.trajectory.trajectory_gui_dir.plots.setupIndexXAxis(y_data, axis, axis_min=None, axis_max=None)

Sets the range, ticks, and tick formatting for axis as an index of the values in y_data.

Parameters
  • y_data (Sequence) – Data for series on axis

  • axis (QValueAxis) – Axis to set

  • axis_min (Optional[int]) – Optional; manually set axis min

  • axis_max (Optional[int]) – Optional; manually set axis max

class schrodinger.trajectory.trajectory_gui_dir.plots.AbstractTrajectoryChartView(*args, **kwargs)

Bases: PyQt6.QtCharts.QChartView

QChartView subclass shared by all trajectory plots.

plotClicked

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__(*args, **kwargs)
mousePressEvent(self, event: QMouseEvent)
mouseReleaseEvent(event)

Find the frame that the user’s left click selected. Display selection used in the task input.

class schrodinger.trajectory.trajectory_gui_dir.plots.AbstractTrajectoryPlotManager(panel)

Bases: PyQt6.QtCore.QObject

Base class for storing plot data for trajectory analysis data. Also holds a reference to the chart view.

Note that we cannot simply use QtCharts.QLineSeries.clicked for this because it does not appear to trigger on OS X.

Variables
  • displayAsl – Display the asl for the corresponding entry id Signal. args are (asl, entry_id)

  • displayFrameAndAsl – Change frame and show ASL for given entry id Signal args are (asl, entry_id, frame_number)

  • newDataAvailable – Emitted when plot has finished generating data.

  • showWarning – Emitted when plot requests parent panel to show a warning message.

  • createAndDisplayMeasurement – Create a new measurement from the given asl and entry ID

deletePlot

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.

displayAsl

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.

displayFrameAndAsl

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.

newDataAvailable

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.

showWarning

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.

createAndDisplayMeasurement

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.

colorEntryByScheme

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.

PANEL_CLASS = None
__init__(panel)
configureTask(task)

Configure the specified task by assigning it the analysis mode, and assigning inputs based on the currently selected trajectory. Task’s taskDone signal is connected to self._onTaskEnded().

start()
createPanel()

For advanced plots, creates an instance of a plot panel and returns it. For simple (panel-less) plots, returns None.

getPlotTitle()
isRunning()

Return True if the plot is still generating data.

getPlotType()

Returns what type of plot this class uses; used for grouping export data.

getDataForExport()

Return a list of row data to export to CSV or Excel. Subclasses must override.

Returns

Data to be exported

Return type

list(list)

getInitialPlotTitleAndTooltip()

Return the plot title and tooltip for this plot.

Returns

Plot title, Plot tooltip.

Return type

(str, str or None)

getSettingsHash()
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

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.

exportToCSV(parent=None)

Export plot data to a CSV file

exportToExcel(parent=None)

Export data to an .xls file

saveImage()

Save a .png file of the plot

showContextMenu(parent=None)
loadFromTask(task)

Load in results from the given task.

Parameters

task (tasks.AbstractTask) – Task to get result data from.

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

class schrodinger.trajectory.trajectory_gui_dir.plots.AbstractQtChartPlotManager(panel)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.AbstractTrajectoryPlotManager

Base class for storing a Qt Chart plot data for trajectory analysis data. Also holds a reference to the chart view.

__init__(panel)
setupView(fixed_height=250, multi_series=False)
createCollapsiblePlotWidget()
chart()
onPlotClicked(value)
saveImage()

Save a .png file of the plot

loadFromTask(task)

Load in results from the given task.

Parameters

task (tasks.AbstractTask) – Task to get result data from.

formatPlotAxes()

Formats axes tick numbers and spacing depending on result data.

class schrodinger.trajectory.trajectory_gui_dir.plots.TrajectoryAnalysisPlotManager(panel)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.AbstractQtChartPlotManager

Chart class used for graphs with an x-axis of frames

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.

getDataForExport()

Return a list of row data to export to CSV or Excel.

Returns

Data to be exported

Return type

list(list)

class schrodinger.trajectory.trajectory_gui_dir.plots.MeasurementPlotManager(panel, mode, aids)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.TrajectoryAnalysisPlotManager

Base class for measurements defined in Workspace.

__init__(panel, mode, aids)
Parameters
  • panel (QtWidgets.QWidget) – Parent panel

  • mode (AnalysisMode) – Analysis mode

  • aids (Sequence(int)) – List of atom numbers involved in the measurement.

configureTask(task, mode, aids_list)
Parameters
getSettingsHash()
class schrodinger.trajectory.trajectory_gui_dir.plots.RingMeasurementPlotManager(panel, mode, aids)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.MeasurementPlotManager

Base class for workspace measurements involving rings.

class schrodinger.trajectory.trajectory_gui_dir.plots.DistanceMeasurementPlotManager(panel, aids)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.MeasurementPlotManager

Manager for plotting the distance between two atoms over a trajectory, specified from a Workspace measurement.

__init__(panel, aids)
Parameters
  • panel (QtWidgets.QWidget) – Parent panel

  • aids (Sequence(int)) – List of the two atom IDs involved in the measurement.

configureTask(task, mode, aids)
Parameters
getInitialPlotTitleAndTooltip()

Return the plot title and tooltip for this plot.

Returns

Plot title, Plot tooltip.

Return type

(str, str or None)

class schrodinger.trajectory.trajectory_gui_dir.plots.AngleMeasurementPlotManager(panel, aids)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.MeasurementPlotManager

Manager for plotting a bond angle over a trajectory, specified from a Workspace measurement.

__init__(panel, aids)
Parameters
  • panel (QtWidgets.QWidget) – Parent panel

  • aids (Sequence(int)) – List of the three atom IDs involved in the measurement.

configureTask(task, mode, aids)
Parameters
getInitialPlotTitleAndTooltip()

Return the plot title and tooltip for this plot.

Returns

Plot title, Plot tooltip.

Return type

(str, str or None)

class schrodinger.trajectory.trajectory_gui_dir.plots.TorsionMeasurementPlotManager(panel, aids)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.MeasurementPlotManager

Manager for plotting a torsion/dihedral angle over a trajectory, specified from a Workspace measurement.

__init__(panel, aids)
Parameters
  • panel (QtWidgets.QWidget) – Parent panel

  • aids (Sequence(int)) – List of the four atom IDs involved in the measurement.

configureTask(task, mode, aids)
Parameters
getInitialPlotTitleAndTooltip()

Return the plot title and tooltip for this plot.

Returns

Plot title, Plot tooltip.

Return type

(str, str or None)

addSeriesFromTask(task)
class schrodinger.trajectory.trajectory_gui_dir.plots.RingAtomDistanceMeasurementPlotManager(panel, aids_list)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.RingMeasurementPlotManager

Manager for plotting the distance between a ring centroid and a separate atom over a trajectory, specified from a Workspace measurement.

__init__(panel, aids_list)
Parameters
  • panel (QtWidgets.QWidget) – Parent panel

  • aids_list (Sequence(Union[list, int])) – List of atom IDs involved in the measurement. First entry is a list of atom IDs in the ring, second is the ID for the atom we’re measuring the distance to.

configureTask(task, mode, aids_list)
Parameters
  • task (traj_plot_models.TrajectoryAnalysisTask) – Task to configure.

  • mode (AnalysisMode) – Analysis mode

  • aids_list (Sequence(Union[list, int])) – List of atom IDs involved in the measurement. First entry is a list of atom IDs in the ring, second is the ID for the atom we’re measuring the distance to.

getInitialPlotTitleAndTooltip()

Return the plot title and tooltip for this plot.

Returns

Plot title, Plot tooltip.

Return type

(str, str or None)

class schrodinger.trajectory.trajectory_gui_dir.plots.RingRingDistanceMeasurementPlotManager(panel, aids_list)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.RingMeasurementPlotManager

Manager for plotting the distance between two ring centroids over a trajectory, specified from a Workspace measurement.

__init__(panel, aids_list)
Parameters
  • panel (QtWidgets.QWidget) – Parent panel

  • aids_list (Sequence(list(int))) – List of two lists of atom IDs, one for each ring.

configureTask(task, mode, aids_list)
Parameters
getInitialPlotTitleAndTooltip()

Return the plot title and tooltip for this plot.

Returns

Plot title, Plot tooltip.

Return type

(str, str or None)

class schrodinger.trajectory.trajectory_gui_dir.plots.RingAngleMeasurementPlotManager(panel, aids_list)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.RingMeasurementPlotManager

Manager for plotting the angle between the best-fit planes defined by two rings, over a trajectory, specified from a Workspace measurement.

__init__(panel, aids_list)
Parameters
  • panel (QtWidgets.QWidget) – Parent panel

  • aids_list (Sequence(list(int))) – List of two lists of atom IDs, one for each ring.

configureTask(task, mode, aids_list)
Parameters
getInitialPlotTitleAndTooltip()

Return the plot title and tooltip for this plot.

Returns

Plot title, Plot tooltip.

Return type

(str, str or None)

class schrodinger.trajectory.trajectory_gui_dir.plots.CentroidDistancePlotManager(panel, atom_sets)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.TrajectoryAnalysisPlotManager

__init__(panel, atom_sets)

Create a plot for measuring distance between centroids of atom groups. :param atom_sets: List of tuples of atom IDs, per atom set. :type atom_sets: list(tuple(int)) NOTE: Disabled as of PANEL-20518

configureTask(task, atom_sets)

Configure the plot task.

Parameters
getInitialPlotTitleAndTooltip()

Return the plot title and tooltip for this plot.

Returns

Plot title, Plot tooltip.

Return type

(str, str or None)

class schrodinger.trajectory.trajectory_gui_dir.plots.AslPlotManager(panel, analysis_mode, asl, aids)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.TrajectoryAnalysisPlotManager

__init__(panel, analysis_mode, asl, aids)
configureTask(task, analysis_mode, asl, aids)

Configure the specified task by assigning it the analysis mode, and assigning inputs based on the currently selected trajectory. Task’s taskDone signal is connected to self._onTaskEnded().

getInitialPlotTitleAndTooltip()

Return the plot title and tooltip for this plot.

Returns

Plot title, Plot tooltip.

Return type

(str, str or None)

class schrodinger.trajectory.trajectory_gui_dir.plots.AbstractAdvancedTrajectoryPlotManager(panel)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.AbstractTrajectoryPlotManager

Plot Manager for Advanced Plots (RMSF, Energy). These plots are stored as shortcuts at the bottom of the panel.

createShortcutWidget(plot_panel)

Create and store reference to a shortcut widget for a given Advanced Plot

Parameters

plot_panel (BaseAdvancedPlotPanel) – Plot panel that shortcut will launch

Returns

Shortcut for the Advanced Plot

Return type

AdvancedPlotShortcut

class schrodinger.trajectory.trajectory_gui_dir.plots.AbstractAdvancedQtPlotManager(panel)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.AbstractQtChartPlotManager, schrodinger.trajectory.trajectory_gui_dir.plots.AbstractAdvancedTrajectoryPlotManager

Plot Manager for Advanced Plots (RMSF, Energy). These plots are stored as shortcuts at the bottom of the panel.

createShortcutWidget(plot_panel)

Create and store reference to a shortcut widget for a given Advanced Plot

Parameters

plot_panel (BaseAdvancedPlotPanel) – Plot panel that shortcut will launch

Returns

Shortcut for the Advanced Plot

Return type

AdvancedPlotShortcut

class schrodinger.trajectory.trajectory_gui_dir.plots.CollapsiblePlot(parent=None, system_title='', plot_title='', plot=None, tooltip=None)

Bases: PyQt6.QtWidgets.QWidget

This class defines a collapsible plot. The widget has an area for title text, a ‘collapse’ button and a ‘close’ button.

__init__(parent=None, system_title='', plot_title='', plot=None, tooltip=None)
Parameters
  • system_title (str) – System title for the widget

  • plot_title (str) – Title to set for this title bar

  • plot (AbstractTrajectoryPlotManager) – Plot to set in the collapsible area

  • tooltip (str) – Optional tooltip for the title

onPlotTitleChanged()

For multi-interaction plots, title can change as new tasks are completed; update the title.

getPlotTitle()

Returns plot title.

Returns

plot title

Return type

str

onCollapseButtonClicked()

Collapse or expand the plot depending on its current state.

mousePressEvent(self, a0: QMouseEvent)
class schrodinger.trajectory.trajectory_gui_dir.plots.BaseAdvancedPlotPanel(*args, **kwargs)

Bases: schrodinger.ui.qt.basewidgets.Panel

Base class for plot panels that get opened via shortcuts in the “Advanced Plots” section of the main plots panel.

class schrodinger.trajectory.trajectory_gui_dir.plots.AdvancedPlotShortcut(plot_panel, shortcut_title='', window_title='', parent=None)

Bases: schrodinger.ui.qt.basewidgets.BaseWidget

Shortcut icon that opens an advanced plots (RMSF and Energy plots).

ui_module = <module 'schrodinger.trajectory.trajectory_gui_dir.shortcut_ui' from '/scr/buildbot/savedbuilds/2024-2/NB/build-134/internal/lib/python3.11/site-packages/schrodinger/trajectory/trajectory_gui_dir/shortcut_ui.py'>
__init__(plot_panel, shortcut_title='', window_title='', parent=None)
mousePressEvent(self, a0: QMouseEvent)
getPlotTitle()
close()

Close and remove this widget.

class schrodinger.trajectory.trajectory_gui_dir.plots.ShortcutRow(*args, **kwargs)

Bases: schrodinger.ui.qt.basewidgets.BaseWidget

This class represents a row of advanced plot shortcuts

DEFAULT_PADDING = 50
initLayOut()

Create a vertical layout for the widget (widget_layout) and populate it with two vertical sub-layouts: main_layout and bottom_layout.

If the user has specified the ui data member, insert the resultant ui_widget into main_layout.

If the widget already has a layout defined, this method will produce a warning (but not a traceback). main_layout and bottom_layout will be inserted into the existing widget layout, which will not be the same as widget_layout. It is therefore recommended that this mixin is used only with widgets that do not already have a layout.

Suggested subclass use: create, initialize, and populate layouts.

hasSpace(row_width)

Returns whether the shortcut row has space for another widget

addWidget(wdg)
widgetCount()
getShortcuts()

Returns the shortcut widgets featured in this row

class schrodinger.trajectory.trajectory_gui_dir.plots.OutputAxis

Bases: PyQt6.QtCharts.QValueAxis

class schrodinger.trajectory.trajectory_gui_dir.plots.BFactorAxis

Bases: PyQt6.QtCharts.QValueAxis

class schrodinger.trajectory.trajectory_gui_dir.plots.SecondaryStructureAxis

Bases: PyQt6.QtCharts.QValueAxis

class schrodinger.trajectory.trajectory_gui_dir.plots.OutputSeries

Bases: PyQt6.QtCharts.QLineSeries

class schrodinger.trajectory.trajectory_gui_dir.plots.BFactorSeries

Bases: PyQt6.QtCharts.QLineSeries

class schrodinger.trajectory.trajectory_gui_dir.plots.SecondaryStructureHelixSeries

Bases: PyQt6.QtCharts.QAreaSeries

class schrodinger.trajectory.trajectory_gui_dir.plots.SecondaryStructureStrandSeries

Bases: PyQt6.QtCharts.QAreaSeries

class schrodinger.trajectory.trajectory_gui_dir.plots.EnergyPlotPanel(plot_view, parent=None)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.BaseAdvancedPlotPanel

Plot for energy analysis.

ui_module = <module 'schrodinger.trajectory.trajectory_gui_dir.energy_plot_ui' from '/scr/buildbot/savedbuilds/2024-2/NB/build-134/internal/lib/python3.11/site-packages/schrodinger/trajectory/trajectory_gui_dir/energy_plot_ui.py'>
model_class

alias of schrodinger.trajectory.trajectory_gui_dir.traj_plot_models.EnergyPlotModel

SHORTCUT_PREFIX = 'Energy'
__init__(plot_view, parent=None)
initSetUp()

Creates widget from ui and stores it ui_widget.

Suggested subclass use: create and initialize subwidgets, and connect signals.

initFinalize()

Suggested subclass use: perform any remaining initialization.

defineMappings()

Override this in the subclass to define mappings. Should return a list of tuples [(<target>, <param>)]. Targets can be:

  1. a basic widget, like QLineEdit or QComboBox

  2. a custom object that inherits MapperMixin or TargetMixin

  3. a TargetSpec instance

  4. a slot

For common widgets, standard signals and getter/setter methods will be used, as defined in mappers._get_default_access_names().

For more fine-grained custom control, instantiate a TargetSpec object, which allows custom setters, getters, and signals to be specified.

Supplying a slot as the first element of the tuple is equivalent to providing TargetSpec(slot=my_slot).

Note that all target slots are triggered on setModel() as well as in response to the specified signal.

The param is an abstract param reference, e.g. MyModel.my_param.

Example:

def defineMappings(self):
    combo = self.style_combo
    return [(self.name_le, MyModel.name),
            (TargetSpec(combo,
                    getter=combo.currentText,
                    setter=combo.setCurrentText), MyModel.style),
            (self.coord_widget, MyModel.coord),
            (self._onASLTextChanged, MyModel.asl_text)]
getSignalsAndSlots(model)

Override this method to specify signal and slot pairs that need to be connected/disconnected whenever the model instance is switched using setModel. The model instance is provided as an argument so that instance-specific signals can be used, but any pairs of signals and slots may be returned from this method.

Returns

a list of 2-tuples where each tuple is a signal, slot pair

updatePlotValues()

Slot for updating the chart based on current UI selection.

getEnergyValues()

Return the energy values based on the current panel settings. :return:

class schrodinger.trajectory.trajectory_gui_dir.plots.EnergyPlotManager(panel, cfg_file, sets)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.AbstractAdvancedQtPlotManager

Chart class for energy matrix data. The plot data will be populated by the EnergyPlotPanel.

PANEL_CLASS

alias of schrodinger.trajectory.trajectory_gui_dir.plots.EnergyPlotPanel

__init__(panel, cfg_file, sets)

Initialize the energy plot.

Parameters
  • panel (QtWidgets.QWidget.) – Parent panel

  • cfg_file (str) – Path to the cfg file.

  • sets (dict) – Dict of sets where keys are set names and values are ASLs.

configureTask(task, cfg_file, sets)

Configure the energy task.

Parameters
getPlotType()

Returns what type of plot this class uses; used for grouping export data.

enableSeriesTracking()
loadFromTask(task)

Load in results from the given task.

Parameters

task (traj_plot_models.TrajectoryEnergyJobTask) – Task to get result data from.

setPlotData(energies)

Set self.energies array to the given data, and re-draw the chart.

getDataForExport()

Return a list of row data to export to Excel or CSV. Used by the export menu in the plot sub-window.

getExportData()

Return a list of row data to export to Excel. Used by the “Export Results…” button of the parent plots panels.

Returns

Data to be exported

Return type

list(list)

getInitialPlotTitleAndTooltip()

Return the plot title and tooltip for this plot.

Returns

Plot title, Plot tooltip.

Return type

(str, str or None)

getSettingsHash()
class schrodinger.trajectory.trajectory_gui_dir.plots.PlanarAngleAnalysisPlot(panel, alist)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.TrajectoryAnalysisPlotManager

__init__(panel, alist)
configureTask(task, alist)

Configure the specified task by assigning it the analysis mode, and assigning inputs based on the currently selected trajectory. Task’s taskDone signal is connected to self._onTaskEnded().

getInitialPlotTitleAndTooltip()

Return the plot title and tooltip for this plot.

Returns

Plot title, Plot tooltip.

Return type

(str, str or None)

getSettingsHash()