|
Rosetta
|
#include <SimplePoseDrawOpenGLWidget.h>

Public Types | |
| enum class | ColorMode { none , selection , input_domain , total_energy , score_term , list = score_term } |
| Enum for the different ways that the pose could be coloured. More... | |
| enum class | DragMode { rotate_and_zoom_viewport , list = rotate_and_zoom_viewport } |
Public Member Functions | |
| SimplePoseDrawOpenGLWidget (QWidget *parent=nullptr) | |
| Constructor. More... | |
| void | set_pose (core::pose::PoseCOP pose) |
| Set the pose that we'll be drawing. More... | |
| core::pose::PoseCOP | pose () const |
| Get currently assigned pose object. More... | |
| void | set_residue_selector (core::select::residue_selector::ResidueSelectorCOP selector_in) |
| Set the residue selector that we'll use for colouring the pose. More... | |
| void | set_color_mode (ColorMode mode) |
| Set the colour mode that we'll use for colouring the pose. More... | |
| void | set_energy_range (core::Real const &lower, core::Real const &upper) |
| Set the lower and upper ends of the energy range in the gradient of colour values used. More... | |
| void | set_score_type (core::scoring::ScoreType scoretype_in) |
| Set the score term to use if we're colouring by a single score type. More... | |
| void | update_pose_draw () |
| The pose has changed; redraw it. More... | |
| void | set_drag_mode (DragMode mode) |
| Set what happens when the user drags in the viewport. More... | |
Protected Member Functions | |
| void | initializeGL () override |
| Initialize the OpenGL rendering environment. More... | |
| void | resizeGL (int width, int height) override |
| What to do when the window has been resized. More... | |
| void | paintGL () override |
| How to actually draw a pose. More... | |
| void | mousePressEvent (QMouseEvent *event) override |
| What to do when the user clicks. More... | |
| void | mouseMoveEvent (QMouseEvent *event) override |
| What do do when the user drags. More... | |
| GLfloat const & | rotx () const |
| Read the x-rotation value. More... | |
| GLfloat const & | roty () const |
| Read the y-rotation value. More... | |
| GLfloat const & | rotz () const |
| Read the z-rotation value. More... | |
| QPoint const & | lastpos () const |
| The start of a mouse click-and-drag event. More... | |
| void | set_lastpos (QPoint const &point_in) |
| Set the value of lastpos. More... | |
Private Attributes | |
| core::pose::PoseCOP | pose_ |
| Const owning pointer to the pose that we'll be drawing. More... | |
| core::select::residue_selector::ResidueSelectorCOP | residue_selector_ |
| Const owning pointer to the residue selector that we'll use for colouring the pose. More... | |
| GLfloat | rotx_ |
| Rotation of the scene about the x-axis. More... | |
| GLfloat | roty_ |
| Rotation of the scene about the y-axis. More... | |
| GLfloat | rotz_ |
| Rotation of the scene about the z-axis. More... | |
| GLfloat | forward_back_ |
| How far have I moved backwards or forwards? More... | |
| QPoint | lastpos_ |
| The start of a mouse click-and-drag event. More... | |
| ColorMode | color_mode_ = ColorMode::none |
| The way in which we're currently colouring the pose. More... | |
| core::Real | energy_range_max_ |
| The energy value at the far upper end of the energy colour gradient. More... | |
| core::Real | energy_range_min_ |
| The energy value at the far lower end of the energy colour gradient. More... | |
| core::scoring::ScoreType | score_type_ |
| The score term to use if we're colouring by a single score type. More... | |
| DragMode | drag_mode_ = DragMode::rotate_and_zoom_viewport |
| The behaviour of the viewport when the user clicks and drags. More... | |
| ui::ui_core::pose_draw::SimplePoseDrawOpenGLWidget::SimplePoseDrawOpenGLWidget | ( | QWidget * | parent = nullptr | ) |
Constructor.
|
overrideprotected |
Initialize the OpenGL rendering environment.
|
inlineprotected |
The start of a mouse click-and-drag event.
References lastpos_.
Referenced by ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::mouseMoveEvent().
|
overrideprotected |
What do do when the user drags.
References 3d_histogram::dx, 3d_histogram::dy, 3d_histogram::dz, forward_back_, lastpos_, rotx_, rotz_, and basic::options::OptionKeys::mp::visualize::width.
Referenced by ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::mouseMoveEvent().
|
overrideprotected |
What to do when the user clicks.
References lastpos_.
|
overrideprotected |
How to actually draw a pose.
References utility::vectorL< L, T, A >::at(), color_mode_, build_restypes::elem, energy_range_max_, energy_range_min_, forward_back_, glutSolidSphere(), input_domain, pose_, residue_selector_, rotx_, roty_, rotz_, score_term, score_type_, selection, total_energy, and basic::options::OptionKeys::in::file::xyz.
|
inline |
Get currently assigned pose object.
References pose_.
Referenced by pyrosetta.bindings.pose.PoseScoreAccessor::__delitem__(), pyrosetta.bindings.scores.core.PoseCacheAccessor::__delitem__(), pyrosetta.bindings.scores.extra_scores.ExtraScoresAccessorBase::__delitem__(), pyrosetta.bindings.scores.simple_metrics.SimpleMetricDataAccessorBase::__delitem__(), pyrosetta.bindings.scores.simple_metrics.SimpleMetricStringDataAccessor::__delitem__(), pyrosetta.bindings.scores.simple_metrics.SimpleMetricRealDataAccessor::__delitem__(), pyrosetta.bindings.pose.PoseResidueAccessor::__getitem__(), pyrosetta.bindings.pose.PoseResidueLabelAccessor::__getitem__(), pyrosetta.bindings.pose.PoseResidueAccessor::__iadd__(), pyrosetta.bindings.pose.PoseResidueAccessor::__imul__(), pyrosetta.bindings.pose.PoseResidueAccessor::__iter__(), pyrosetta.bindings.pose.PoseResidueAccessor::__len__(), pyrosetta.bindings.pose.PoseResidueLabelAccessor::__len__(), pyrosetta.bindings.pose.PoseResidueLabelAccessor::__repr__(), pyrosetta.bindings.pose.PoseResidueAccessor::__reversed__(), pyrosetta.bindings.pose.PoseScoreAccessor::__setitem__(), pyrosetta.bindings.scores.extra_scores.ExtraScoresAccessorBase::__setitem__(), pyrosetta.bindings.scores.base.PoseCacheAccessorBase::_get_sm_data_dict(), pyrosetta.bindings.scores.base.PoseCacheAccessorBase::_has_reserved_custom_metric_keys(), pyrosetta.bindings.scores.base.PoseCacheAccessorBase::_maybe_delete_keys_from_sm_data(), pyrosetta.bindings.scores.base.PoseCacheAccessorBase::_maybe_delete_reserved_keys_from_sm_data(), pyrosetta.bindings.pose.PoseScoreAccessor::all(), pyrosetta.bindings.scores.energies.EnergiesAccessor::all(), pyrosetta.bindings.scores.extra_scores.ExtraFloatScoresDataAccessor::all(), pyrosetta.bindings.scores.extra_scores.ExtraStringScoresDataAccessor::all(), pyrosetta.bindings.scores.simple_metrics.SimpleMetricStringDataAccessor::all(), pyrosetta.bindings.scores.simple_metrics.SimpleMetricRealDataAccessor::all(), pyrosetta.bindings.scores.simple_metrics.SimpleMetricCompositeStringDataAccessor::all(), pyrosetta.bindings.scores.simple_metrics.SimpleMetricCompositeRealDataAccessor::all(), pyrosetta.bindings.scores.simple_metrics.SimpleMetricPerResidueStringDataAccessor::all(), pyrosetta.bindings.scores.simple_metrics.SimpleMetricPerResidueRealDataAccessor::all(), pyrosetta.bindings.scores.simple_metrics.SimpleMetricPerResidueProbabilitiesDataAccessor::all(), pyrosetta.bindings.scores.base.PoseCacheAccessorBase::apply(), pyrosetta.bindings.pose.PoseScoreAccessor::clear(), pyrosetta.bindings.scores.core.PoseCacheAccessor::clear(), pyrosetta.bindings.scores.energies.EnergiesAccessor::clear(), pyrosetta.bindings.scores.extra_scores.ExtraScoresAccessorBase::clear(), pyrosetta.bindings.scores.extra_scores.ExtraScoresAccessor::clear(), pyrosetta.bindings.scores.simple_metrics.SimpleMetricDataAccessor::clear(), pyrosetta.distributed.packed_pose.core.PackedPose::clone(), pyrosetta.bindings.scores.simple_metrics.SimpleMetricDataAccessor::composite_real(), pyrosetta.bindings.scores.simple_metrics.SimpleMetricDataAccessor::composite_string(), pyrosetta.distributed.packed_pose.core.PackedPose::empty(), pyrosetta.bindings.pose.PoseScoreAccessor::energies(), pyrosetta.bindings.scores.core.PoseCacheAccessor::energies(), pyrosetta.bindings.pose.PoseScoreAccessor::extra(), pyrosetta.bindings.scores.core.PoseCacheAccessor::extra(), pyrosetta.bindings.scores.core.PoseCacheAccessor::metrics(), pyrosetta.bindings.scores.simple_metrics.SimpleMetricDataAccessor::per_residue_probabilities(), pyrosetta.bindings.scores.simple_metrics.SimpleMetricDataAccessor::per_residue_real(), pyrosetta.bindings.scores.simple_metrics.SimpleMetricDataAccessor::per_residue_string(), pyrosetta.bindings.scores.extra_scores.ExtraScoresAccessor::real(), pyrosetta.bindings.scores.simple_metrics.SimpleMetricDataAccessor::real(), set_pose(), pyrosetta.bindings.scores.extra_scores.ExtraScoresAccessor::string(), pyrosetta.bindings.scores.simple_metrics.SimpleMetricDataAccessor::string(), test.T300_PyJobDistributor.TestPyJobDistributor::test_jd(), test.T300_PyJobDistributor.TestPyJobDistributor::test_jd_at(), test.T300_PyJobDistributor.TestPyJobDistributor::test_jd_serializable_scores(), test.T300_PyJobDistributor.TestPyJobDistributor::test_jd_unserializable_scores(), test.T010_LoadPDB.LoadPDBTest::test_pdbstring_io(), pyrosetta.tests.bindings.core.test_pose.TestPoseCacheAccessor::test_pose_cache(), test.T010_LoadPDB.LoadPDBTest::test_roundtrip_file(), test.T010_LoadPDB.LoadPDBTest::test_roundtrip_pdb(), test.T010_LoadPDB.LoadPDBTest::test_roundtrip_scored_pdb(), and pyrosetta.distributed.packed_pose.core.PackedPose::update_scores().
|
overrideprotected |
What to do when the window has been resized.
References tan, and basic::options::OptionKeys::mp::visualize::width.
|
inlineprotected |
Read the x-rotation value.
References rotx_.
Referenced by ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::determine_xyz_unit_vectors().
|
inlineprotected |
Read the y-rotation value.
References roty_.
|
inlineprotected |
Read the z-rotation value.
References rotz_.
Referenced by ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::determine_xyz_unit_vectors().
| void ui::ui_core::pose_draw::SimplePoseDrawOpenGLWidget::set_color_mode | ( | ColorMode | mode | ) |
Set the colour mode that we'll use for colouring the pose.
References color_mode_, and SmotifHasher::mode.
Referenced by MainWindow::MainWindow(), and MainWindow::on_radiobutton_colourby_totalscore_clicked().
| void ui::ui_core::pose_draw::SimplePoseDrawOpenGLWidget::set_drag_mode | ( | DragMode | mode | ) |
Set what happens when the user drags in the viewport.
References drag_mode_, and SmotifHasher::mode.
Referenced by MainWindow::on_tool_rotate_zoom_view_clicked().
| void ui::ui_core::pose_draw::SimplePoseDrawOpenGLWidget::set_energy_range | ( | core::Real const & | lower, |
| core::Real const & | upper | ||
| ) |
Set the lower and upper ends of the energy range in the gradient of colour values used.
There is no check that upper > lower.
References energy_range_max_, energy_range_min_, test_terpenes::lower, and test_terpenes::upper.
|
inlineprotected |
Set the value of lastpos.
References lastpos_.
Referenced by ui::ui_protocols::helical_bundle::HelicalBundlePoseDrawOpenGLWidget::mouseMoveEvent().
| void ui::ui_core::pose_draw::SimplePoseDrawOpenGLWidget::set_pose | ( | core::pose::PoseCOP | pose | ) |
Set the pose that we'll be drawing.
Referenced by MainWindow::MainWindow().
| void ui::ui_core::pose_draw::SimplePoseDrawOpenGLWidget::set_residue_selector | ( | core::select::residue_selector::ResidueSelectorCOP | selector_in | ) |
Set the residue selector that we'll use for colouring the pose.
Only used if colour_mode_ == SPODGLW_colour_by_selection.
References residue_selector_.
Referenced by MainWindow::update_residue_selector().
| void ui::ui_core::pose_draw::SimplePoseDrawOpenGLWidget::set_score_type | ( | core::scoring::ScoreType | scoretype_in | ) |
Set the score term to use if we're colouring by a single score type.
Only used if colour_mode_ == SPDOGLW_colour_by_score_term.
References score_type_.
| void ui::ui_core::pose_draw::SimplePoseDrawOpenGLWidget::update_pose_draw | ( | ) |
The pose has changed; redraw it.
Referenced by MainWindow::on_button_run_minimizer_clicked(), MainWindow::on_button_run_packer_clicked(), MainWindow::on_checkbox_select_boundary_clicked(), MainWindow::on_checkbox_select_core_clicked(), MainWindow::on_checkbox_select_surface_clicked(), MainWindow::on_nonparametric_geometry_moved(), MainWindow::on_radiobutton_colourby_selection_clicked(), MainWindow::on_radiobutton_colourby_totalscore_clicked(), MainWindow::rebuild_pose_from_scratch(), and MainWindow::update_pose().
|
private |
The way in which we're currently colouring the pose.
Referenced by paintGL(), and set_color_mode().
|
private |
The behaviour of the viewport when the user clicks and drags.
Referenced by set_drag_mode().
|
private |
The energy value at the far upper end of the energy colour gradient.
Referenced by paintGL(), and set_energy_range().
|
private |
The energy value at the far lower end of the energy colour gradient.
Referenced by paintGL(), and set_energy_range().
|
private |
How far have I moved backwards or forwards?
Referenced by mouseMoveEvent(), and paintGL().
|
private |
The start of a mouse click-and-drag event.
Referenced by lastpos(), mouseMoveEvent(), mousePressEvent(), and set_lastpos().
|
private |
Const owning pointer to the pose that we'll be drawing.
Referenced by paintGL(), pose(), sidechain_cst_3.Residue::pose_num(), and set_pose().
|
private |
Const owning pointer to the residue selector that we'll use for colouring the pose.
Referenced by paintGL(), and set_residue_selector().
|
private |
Rotation of the scene about the x-axis.
Referenced by mouseMoveEvent(), paintGL(), and rotx().
|
private |
|
private |
Rotation of the scene about the z-axis.
Referenced by mouseMoveEvent(), paintGL(), and rotz().
|
private |
The score term to use if we're colouring by a single score type.
Only used if colour_mode_ == SPDOGLW_colour_by_score_term.
Referenced by paintGL(), and set_score_type().