schrodinger.trajectory.trajectory_gui_dir.ramachandran_plots module

class schrodinger.trajectory.trajectory_gui_dir.ramachandran_plots.RamaPlot(*args, **kwargs)

Bases: schrodinger.ui.qt.rama.RamaContourMixin, PyQt6.QtCore.QObject

Ramachandran Plot. Has functionality for creating regions and plotting points.

Variables
  • pointClicked – Emitted with a clicked point’s frame number

  • mouseRightButtonClicked – Emitted when mouse right click button pressed on plot

pointClicked

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.

mouseRightButtonClicked

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.

DEFAULT_POINT_HEX = '#000000'
START_TIME_RGB = (221, 221, 221)
END_TIME_RGB = (0, 0, 0)
TICK_SPACING = 45
TEXT_SIZING = 'medium'
__init__(*args, **kwargs)
loadResults(labels=None, results=None, trajectories=None, residue_type=None)

Loads results from task and populate graph

Parameters
  • labels – List of residue labels

  • results (list(tuple(float, float))) – List of (phi, psi) angles

  • trajectories – list(Frame)

  • residue_type – rama.RamaResidueType

findClosestFrame(x: float, y: float)

Finds closest frame to the x and y coordinates given

setColorByTimeMode(color_by_time)
calculateColor(frame: int)

Calculates the color needed for a point on the plot for the given frame

class schrodinger.trajectory.trajectory_gui_dir.ramachandran_plots.RamachandranPlotModel(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

color_by_time: bool

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
end_time: str

Base class for all Param classes. A Param is a descriptor for storing data, which means that a single Param instance will manage the data values for multiple instances of the class that owns it. Example:

class Coord(CompoundParam):
    x: int
    y: int

An instance of the Coord class can be created normally, and Params can be accessed as normal attributes:

coord = Coord()
coord.x = 4

When a Param value is set, the valueChanged signal is emitted. Params can be serialized and deserialized to and from JSON. Params can also be nested:

class Atom(CompoundParam):
    coord: Coord
    element: str
color_by_timeChanged

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.

color_by_timeReplaced

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.

end_timeChanged

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.

end_timeReplaced

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.

class schrodinger.trajectory.trajectory_gui_dir.ramachandran_plots.RamachandranPlotPanel(plot_manager, parent=None)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.BaseAdvancedPlotPanel

Panel containing clickable Ramachandran Plot

model_class

alias of schrodinger.trajectory.trajectory_gui_dir.ramachandran_plots.RamachandranPlotModel

ui_module = <module 'schrodinger.trajectory.trajectory_gui_dir.rama_plot_panel_ui' from '/scr/buildbot/savedbuilds/2024-2/NB/build-134/internal/lib/python3.11/site-packages/schrodinger/trajectory/trajectory_gui_dir/rama_plot_panel_ui.py'>
SHORTCUT_PREFIX = 'Phi-Psi'
__init__(plot_manager, parent=None)
initSetUp()

Creates widget from ui and stores it ui_widget.

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

initLayOut()

@overrides: widgetmixins.InitMixin

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)]
updateSimulationTime(sim_time)
setResTypeLabel(res_type: schrodinger.ui.qt.rama.RamaResidueType)
mousePressEvent(self, a0: QMouseEvent)
class schrodinger.trajectory.trajectory_gui_dir.ramachandran_plots.RamachandranPlotManager(panel, res_asl, residue_type)

Bases: schrodinger.trajectory.trajectory_gui_dir.plots.AbstractAdvancedTrajectoryPlotManager

PANEL_CLASS

alias of schrodinger.trajectory.trajectory_gui_dir.ramachandran_plots.RamachandranPlotPanel

__init__(panel, res_asl, residue_type)
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

onPlotClicked(frame)
getInitialPlotTitleAndTooltip(shortcut_title: str)

Return the plot title and tooltip for this plot.

Returns

Plot title, Plot tooltip.

Return type

(str, str or None)

configureTask(task, res_asl, residue_type)

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

getPlotType()

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

loadFromTask(task)

Load in results from the given task.

Parameters

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

getDataForExport()

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

Returns

Data to be exported

Return type

list(list)

saveImage()

Save a .png file of the plot