schrodinger.trajectory.trajectory_gui_dir.rmsd_plots module

File containing RMSD plot code used in the Trajectory Plots GUI

class schrodinger.trajectory.trajectory_gui_dir.rmsd_plots.RmsfPlotPanel(plot, parent=None)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.BaseAdvancedPlotPanel

Advanced plots are for time-series data (e.x. RMSF)

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

alias of schrodinger.trajectory.trajectory_gui_dir.traj_plot_models.RmsfPlotModel

SHORTCUT_PREFIX = 'RMSF'
__init__(plot, parent=None)
initSetUp()

Creates widget from ui and stores it ui_widget.

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

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

mousePressEvent(self, a0: QMouseEvent)
class schrodinger.trajectory.trajectory_gui_dir.rmsd_plots.BaseRmsfPlotManager(panel, ref_st, aids, fit_aids, fit_ref_pos)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.AbstractAdvancedQtPlotManager

Class containing RMSD plot related methods.

ANALYSIS_MODE = None
__init__(panel, ref_st, aids, fit_aids, fit_ref_pos)
getSettingsHash()
configureTask(task, mode, ref_st, aids, fit_aids, fit_ref_pos)

Configure the given task based on specified settings.

Parameters
  • task (TrajectoryAnalysisSubprocTask) – Task to configure.

  • mode (traj_plot_models.AnalysisMode) – Analysis mode

  • ref_st (structure.Structure) – Reference structure (usually a frame CT)

  • aids (list(int)) – AIDs for the selected Workspace atoms.

  • fit_aids (list(int)) – AIDS for atoms to use for superposition (by default it is same as <aids>).

  • fit_ref_pos (list((float, float, float))) – Coordinates for the reference atoms.

initializeCallouts()

Initializes the plot to accept events

enableSeriesTracking()
generateCalloutText(pos)
onHover(pos, enter)
getPlotType()

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

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.rmsd_plots.RmsdByFramePlotManager(panel, ref_st, aids, fit_aids, fit_ref_pos)

Bases: schrodinger.trajectory.trajectory_gui_dir.rmsd_plots.BaseRmsfPlotManager, schrodinger.trajectory.trajectory_gui_dir.plots.TrajectoryAnalysisPlotManager

ANALYSIS_MODE = 13
PANEL_CLASS = None

RMSD calculation where x-axis shows the frames. Inherits from TrajectoryAnalysisPlotManager for the getDataForExport() method

formatPlotAxes()

Formats axes tick numbers and spacing depending on result data.

class schrodinger.trajectory.trajectory_gui_dir.rmsd_plots.AtomRmsfPlotManager(panel, ref_st, aids, fit_aids, fit_ref_pos)

Bases: schrodinger.trajectory.trajectory_gui_dir.rmsd_plots.BaseRmsfPlotManager

RMSD calculation where x-axis of the plot has atom numbers.

PANEL_CLASS

alias of schrodinger.trajectory.trajectory_gui_dir.rmsd_plots.RmsfPlotPanel

ANALYSIS_MODE = 14
getDataForExport()

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

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)

formatPlotAxes()

Formats axes tick numbers and spacing depending on result data.

onPlotClicked(value)

Fire a signal to show ASL of selection on left click

class schrodinger.trajectory.trajectory_gui_dir.rmsd_plots.ResidueRmsfPlotManager(panel, ref_st, aids, fit_aids, fit_ref_pos)

Bases: schrodinger.trajectory.trajectory_gui_dir.rmsd_plots.BaseRmsfPlotManager

RMSD calculation where x-axis of the plot has residue numbers.

PANEL_CLASS

alias of schrodinger.trajectory.trajectory_gui_dir.rmsd_plots.RmsfPlotPanel

ANALYSIS_MODE = 15
getDataForExport()

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

Returns

Data to be exported

Return type

list(list)

formatPlotAxes()

Formats the axes and colors series on a residue plot.

getInitialPlotTitleAndTooltip()

Return the plot title and tooltip for this plot.

Returns

Plot title, Plot tooltip.

Return type

(str, str or None)

onPlotClicked(value)

Fire a signal to show ASL of selection on left click

class schrodinger.trajectory.trajectory_gui_dir.rmsd_plots.RMSDDialog(*args, **kwargs)

Bases: schrodinger.ui.qt.basewidgets.BaseWidget

RMSD/RMSF Dialog for specifying reference frame or structure for the trajectory plot gui.

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

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.

initSetOptions()

Suggested subclass use: set instance variables, excluding layouts and subwidgets. Also use here to (optionally) apply the legacy stylesheet spacing settings (PANEL-19101).

initSetUp()

Creates widget from ui and stores it ui_widget.

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

getSuperimposeAsl()

Get the superimpose asl string in the dialog

getFrameNumber()
getSelectedAsl()
reset()

Resets the RMSD settings to taking data from frame 1

class schrodinger.trajectory.trajectory_gui_dir.rmsd_plots.WorkspaceGradient

Bases: PyQt6.QtWidgets.QWidget

Small gradient widget to display color range for workspace coloring by RMSF

paintEvent(self, a0: QPaintEvent)
sizeHint(self) QSize