schrodinger.trajectory.trajectory_gui_dir.conformation_wheel_plots module¶
- class schrodinger.trajectory.trajectory_gui_dir.conformation_wheel_plots.FreqInfo(freq, count)¶
Bases:
tuple
- count¶
Alias for field number 1
- freq¶
Alias for field number 0
- class schrodinger.trajectory.trajectory_gui_dir.conformation_wheel_plots.ConfWheelFigure(width=5, height=4, dpi=100, toolbar=True, layout=None, expanding=True, toolbar_class=None, **kwargs)¶
Bases:
schrodinger.ui.qt.smatplotlib.SmatplotlibCanvas
- sizeHint(self) QSize ¶
- miniumSizeHint()¶
- class schrodinger.trajectory.trajectory_gui_dir.conformation_wheel_plots.ConfWheelPlot(*args, bin_size=0.2617993877991494, **kwargs)¶
Bases:
schrodinger.ui.qt.radial_plot.RadialRingHistogram
- COLOR_LOW = '#89ec08'¶
- COLOR_HIGH = '#0002df'¶
- DEFAULT_BIN_SIZE = 0.2617993877991494¶
- DEFAULT_PLOT_COLORBAR = True¶
- DEFAULT_COLOR_HIGH_FREQ = None¶
- TICK_PADDING = 6¶
- COLORBAR_PADDING = 0.2¶
- COLORBAR_SHRINK = 0.75¶
- dihedralAslSelected¶
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, bin_size=0.2617993877991494, **kwargs)¶
Initialize the histogram
- Parameters
figure (smatplotlib.SmatplotlibCanvas) – the canvas to plot the figure on
- drawPlot(plot_colorbar=True, color_high_freq=None)¶
Clear the current figure and plot the radial ring histogram using the torsion angle data set in setRingData
- Parameters
plot_colorbar (bool) – whether to plot the colorbar alongside the plot
color_high_freq (Union[None, float]) – the frequency to correspond to the strongest color on the color map, if given as None this will be dynamically set to the largest frequency in the given data
- drawTicks()¶
Set the y-tick labels on the polar plot to the ring_types set from setRingData
- getSectorAnnotation(sector)¶
Get the text that should be displayed as the annotation for the given sector
- Parameters
sector (Sector) – the sector in questions
- Returns
the annotation
- Return type
str
- shouldShowSectorAnnotation(sector)¶
Whether the given sector should show an annotation
- Parameters
sector (Sector) – the sector in question
- Returns
whether to display the annotation
- Return type
bool
- populatePlot(labels, result_by_ring, dihedral_asls)¶
Populates plot with data, saves reference to dihedral aids and ring data, and finally plot the data on the figure.
- onSectorClicked(sector)¶
- class schrodinger.trajectory.trajectory_gui_dir.conformation_wheel_plots.ColorFreqRange(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
enum.Enum
- MAX_FROM_DATA = 1¶
- HALF = 2¶
- FULL = 3¶
- static getMaxColorFreq(color_freq)¶
Get the associated frequency value :param color_freq: the ColorFreqRange enum value :type color_freq: ColorFreqRange
- Returns
the associated frequency
- Return type
float
- class schrodinger.trajectory.trajectory_gui_dir.conformation_wheel_plots.ConfWheelPlotModel(*args, _param_type=<object object>, **kwargs)¶
Bases:
schrodinger.models.parameters.CompoundParam
- show_color_scale: 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
- color_freq_range¶
- color_freq_rangeChanged¶
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_freq_rangeReplaced¶
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.
- show_color_scaleChanged¶
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.
- show_color_scaleReplaced¶
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.conformation_wheel_plots.ConfWheelPlotPanel(plot_manager, parent=None)¶
Bases:
schrodinger.trajectory.trajectory_gui_dir.plots.BaseAdvancedPlotPanel
- SHORTCUT_PREFIX = 'Wheel'¶
- ui_module = <module 'schrodinger.trajectory.trajectory_gui_dir.conf_wheel_plot_panel_ui' from '/scr/buildbot/savedbuilds/2024-2/NB/build-134/internal/lib/python3.11/site-packages/schrodinger/trajectory/trajectory_gui_dir/conf_wheel_plot_panel_ui.py'>¶
- model_class¶
alias of
schrodinger.trajectory.trajectory_gui_dir.conformation_wheel_plots.ConfWheelPlotModel
- __init__(plot_manager, parent=None)¶
- initSetUp()¶
Creates widget from
ui
and stores itui_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:
a basic widget, like
QLineEdit
orQComboBox
a custom object that inherits
MapperMixin
orTargetMixin
a
TargetSpec
instancea 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
- setDisplayLabel(graph_type)¶
- mousePressEvent(self, a0: QMouseEvent)¶
- onPlotSettingsChanged()¶
- class schrodinger.trajectory.trajectory_gui_dir.conformation_wheel_plots.AbstractConfWheelPlotManager(panel, res_info)¶
Bases:
schrodinger.trajectory.trajectory_gui_dir.plots.AbstractAdvancedTrajectoryPlotManager
- PANEL_CLASS¶
alias of
schrodinger.trajectory.trajectory_gui_dir.conformation_wheel_plots.ConfWheelPlotPanel
- ABBREVIATION_TYPE = ''¶
- ANALYSIS_TYPE = None¶
- __init__(panel, res_info)¶
- 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
- configureTask(task, st_asl)¶
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.
- getInitialPlotTitleAndTooltip(shortcut_title)¶
Return the plot title and tooltip for this plot.
- Returns
Plot title, Plot tooltip.
- Return type
(str, str or None)
- 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)
- onDihedralAslSelected(dihedral_asl)¶
- saveImage()¶
Save a .png file of the plot
- drawPlot(plot_colorbar=True, color_high_freq=None)¶
Clear the data on the figure and plot based on the given settings
- Parameters
plot_colorbar (bool) – plot the colorbar alongside the wheel
color_high_freq (Union[None, float]) – the frequency to correspond to the strongest color on the color map
- class schrodinger.trajectory.trajectory_gui_dir.conformation_wheel_plots.ConfSmallMoleculePlotManager(panel, res_info)¶
Bases:
schrodinger.trajectory.trajectory_gui_dir.conformation_wheel_plots.AbstractConfWheelPlotManager
- ANALYSIS_TYPE = 24¶
- ABBREVIATION_TYPE = 'molecule'¶
- class schrodinger.trajectory.trajectory_gui_dir.conformation_wheel_plots.ConfResiduePlotManager(panel, res_info)¶
Bases:
schrodinger.trajectory.trajectory_gui_dir.conformation_wheel_plots.AbstractConfWheelPlotManager
- ANALYSIS_TYPE = 25¶
- ABBREVIATION_TYPE = 'residue'¶
- class schrodinger.trajectory.trajectory_gui_dir.conformation_wheel_plots.ConfNucleotidePlotManager(panel, res_info)¶
Bases:
schrodinger.trajectory.trajectory_gui_dir.conformation_wheel_plots.AbstractConfWheelPlotManager
- ANALYSIS_TYPE = 26¶
- ABBREVIATION_TYPE = 'nucleic acid'¶
- schrodinger.trajectory.trajectory_gui_dir.conformation_wheel_plots.get_color_gradient(name, hex_0, hex_1)¶
Create a LinearSegmentedColormap that is a gradient from hex_0 to hex_1
- Parameters
name (str) – the name of the new colormap
hex_0 (str) – the starting point of the colormap as a color hex
hex_1 (str) – the ending point of the colormap as a color hex
- Returns
colormap with a linear gradient from hex_0 to hex_1
- Return type
LinearSegmentedColormap
- schrodinger.trajectory.trajectory_gui_dir.conformation_wheel_plots.rad_to_deg_range(rad1, rad2)¶
Format the input radians in range 0 - 2pi to degree ranges that range from 0 - ±180. The numerically smaller degrees will always come first