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

Visualise atom trace #657

Open
wants to merge 35 commits into
base: protos
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
bea97c7
Enable basic atom trace visualisation
MBartkowiakSTFC Nov 5, 2024
f4ffba9
Merge branch 'protos' into maciej/reactivate-atom-trace
MBartkowiakSTFC Dec 4, 2024
190abbb
Merge branch 'maciej/simplify-chemical-system' into maciej/reactivate…
MBartkowiakSTFC Jan 17, 2025
8b65f3c
Add a basic atom trace dialog
MBartkowiakSTFC Jan 19, 2025
5491657
Merge branch 'maciej/simplify-chemical-system' into maciej/reactivate…
MBartkowiakSTFC Jan 23, 2025
f68e524
Simplify molecular trace calculation
MBartkowiakSTFC Jan 23, 2025
6caff25
Include atom volume in molecular trace
MBartkowiakSTFC Jan 23, 2025
6913e12
Optimise trajectory reading for trace
MBartkowiakSTFC Jan 23, 2025
951b012
Merge branch 'maciej/simplify-chemical-system' into maciej/reactivate…
MBartkowiakSTFC Jan 24, 2025
2985962
Merge branch 'maciej/simplify-chemical-system' into maciej/reactivate…
MBartkowiakSTFC Jan 29, 2025
c3d204a
Merge branch 'maciej/simplify-chemical-system' into maciej/reactivate…
MBartkowiakSTFC Jan 31, 2025
07d618c
Turn trace dialog into a widget
MBartkowiakSTFC Jan 31, 2025
e73ebd6
Merge branch 'maciej/simplify-chemical-system' into maciej/reactivate…
MBartkowiakSTFC Feb 4, 2025
d65e73b
Embed the trace creator in another tab
MBartkowiakSTFC Feb 5, 2025
b7b6336
Remove unused code
MBartkowiakSTFC Feb 5, 2025
ef55608
Update MDANSE/Src/MDANSE/Trajectory/H5MDTrajectory.py
MBartkowiakSTFC Feb 7, 2025
265e342
Update MDANSE/Src/MDANSE/Trajectory/H5MDTrajectory.py
MBartkowiakSTFC Feb 7, 2025
1948b8e
Update MDANSE/Src/MDANSE/Trajectory/H5MDTrajectory.py
MBartkowiakSTFC Feb 7, 2025
f6d7abb
Update MDANSE/Src/MDANSE/Trajectory/H5MDTrajectory.py
MBartkowiakSTFC Feb 7, 2025
a019a1d
Update MDANSE_GUI/Src/MDANSE_GUI/MolecularViewer/MolecularViewer.py
MBartkowiakSTFC Feb 7, 2025
a5b8606
Update MDANSE_GUI/Src/MDANSE_GUI/MolecularViewer/TraceWidget.py
MBartkowiakSTFC Feb 7, 2025
48ba26d
Improve code clarity following review comments
MBartkowiakSTFC Feb 7, 2025
351df0f
Merge branch 'protos' of https://github.com/ISISNeutronMuon/MDANSE in…
MBartkowiakSTFC Feb 7, 2025
337e34b
Merge branch 'maciej/reactivate-atom-trace' of https://github.com/ISI…
MBartkowiakSTFC Feb 7, 2025
2ad58df
Raise an exception on wrong cell shape in H5MD trajectory
MBartkowiakSTFC Feb 7, 2025
4244dda
Merge branch 'protos' of https://github.com/ISISNeutronMuon/MDANSE in…
MBartkowiakSTFC Feb 17, 2025
570c1a1
Add input validation for isosurface colour
MBartkowiakSTFC Feb 17, 2025
cd008a4
Implement changes following a review
MBartkowiakSTFC Feb 17, 2025
1fb24a5
Merge branch 'protos' of https://github.com/ISISNeutronMuon/MDANSE in…
MBartkowiakSTFC Feb 18, 2025
1d428a1
Add docstrings to the TraceWidget
MBartkowiakSTFC Feb 18, 2025
8388190
Clean up MolecularViewer code
MBartkowiakSTFC Feb 19, 2025
45297cf
Clean up MolecularViewer code, remove unused methods
MBartkowiakSTFC Feb 19, 2025
4b69c34
Merge branch 'protos' of https://github.com/ISISNeutronMuon/MDANSE in…
MBartkowiakSTFC Feb 19, 2025
917df66
Merge branch 'protos' of https://github.com/ISISNeutronMuon/MDANSE in…
MBartkowiakSTFC Feb 24, 2025
432881e
Respond to review comments
MBartkowiakSTFC Feb 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions MDANSE_GUI/Src/MDANSE_GUI/MolecularViewer/Controls.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,12 @@
QColorDialog,
QGroupBox,
QCheckBox,
)
from qtpy.QtGui import (
QPaintEvent,
QPainter,
QColor,
QTabWidget,
)

from MDANSE_GUI.Tabs.Views.Delegates import ColourPicker, RadiusSpinBox
from MDANSE_GUI.MolecularViewer.MolecularViewer import MolecularViewer
from MDANSE_GUI.MolecularViewer.TraceWidget import TraceWidget

button_lookup = {
"start": QStyle.StandardPixmap.SP_MediaSkipBackward,
Expand Down Expand Up @@ -96,7 +93,7 @@
class ViewerControls(QWidget):
def __init__(self, *args, **kwargs):
super(QWidget, self).__init__(*args, **kwargs)
layout = QGridLayout(self)
_ = QGridLayout(self)
self._viewer = None
self._buttons = {}
self._delegates = {}
Expand Down Expand Up @@ -180,9 +177,15 @@ def createButtons(self, orientation: Qt.Orientation):

def createSidePanel(self):
"""Adds widgets for finer control of the playback"""
absolute_base = QTabWidget(self)
absolute_base.setSizePolicy(
QSizePolicy.Policy.Maximum, QSizePolicy.Policy.Maximum
)
self._side_base = absolute_base
base = QWidget(self)
layout = QVBoxLayout(base)
base.setLayout(layout)
self._side_base.addTab(base, "Controls")
# colour changes
wrapper0 = QGroupBox("Colour settings", base)
layout0 = QHBoxLayout(wrapper0)
Expand Down Expand Up @@ -264,7 +267,22 @@ def createSidePanel(self):
layout.addWidget(wrapper5)
# the database of atom types
# self._database = TrajectoryAtomData()
self.layout().addWidget(base, 0, 2, 2, 1) # row, column, rowSpan, columnSpan
self.layout().addWidget(
absolute_base, 0, 2, 2, 1
) # row, column, rowSpan, columnSpan

def createTracePanel(self, viewer):
"""Adds widgets for finer control of the playback"""
base = QWidget(self)
base.setSizePolicy(QSizePolicy.Policy.Maximum, QSizePolicy.Policy.Maximum)
layout = QVBoxLayout(base)
base.setLayout(layout)
self._side_base.addTab(base, "Atom trace")
# colour changes
self._trace_widget = TraceWidget(viewer)
self._trace_widget.initialise_values(viewer)
layout.addWidget(self._trace_widget)
return self._trace_widget

@Slot()
def set_background_colour(self):
Expand Down
Loading