Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Molecule preview button and fast plotting #620

Open
wants to merge 10 commits into
base: protos
Choose a base branch
from

Conversation

raunakkbanerjee
Copy link
Collaborator

Description of work

Added molecule preview button which, on clicking, creates a window with a 3d view of the selected molecule.
Added fast plotting functionality, on double clicking the file under plot creator tab creates a new plot under plot holder tab. The dataset with main tag is plotted with solid line and dataset with partial and main tag is plotted with dashed line.

To test

Molecule preview can tested by selecting a job like angular correlation under the actions tab after using a trajectory with multiple molecules
Fast plotting can be tested by selecting a .mda file for plotting under the plot creator file and double clicking the file creates a new plot under plot holder tab.

@@ -0,0 +1,155 @@
from qtpy.QtWidgets import QWidget, QSizePolicy, QVBoxLayout, QLabel, QDialog
from qtpy.Qt3DExtras import Qt3DWindow
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to update the pyproject.toml and add pyqt3d as a dependency. @MBartkowiakSTFC I guess we should add PyQt6-3D since PyQt6<=6.7.0 is in the pyproject.toml.

@MBartkowiakSTFC
Copy link
Collaborator

Overall, something seems to be missing in this PR. My MoleculeWidget does not get created, with the error:

Traceback (most recent call last):
  File "Src/MDANSE_GUI/Tabs/Visualisers/Action.py", line 223, in update_panel
    input_widget = widget_class(parent=self, **ddict)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "Src/MDANSE_GUI/InputWidgets/MoleculeWidget.py", line 41, in __init__
    ].chemical_system.unique_molecule_names
                      ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'ChemicalSystem' object has no attribute 'unique_molecule_names'. Did you mean: 'unique_molecules'

Copy link
Collaborator

@ChiCheng45 ChiCheng45 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fast plotting seems to work great. Just one thing, when you double click you also end up opening the drop-down. Maybe this could be changed so that the fast plotting can be added to right click menu to avoid this issue?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants