MoleditPy-linux 2.4.2__py3-none-any.whl → 2.4.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- moleditpy_linux/modules/constants.py +1 -1
- moleditpy_linux/modules/main_window_edit_actions.py +15 -7
- moleditpy_linux/modules/main_window_main_init.py +2 -1
- {moleditpy_linux-2.4.2.dist-info → moleditpy_linux-2.4.3.dist-info}/METADATA +1 -1
- {moleditpy_linux-2.4.2.dist-info → moleditpy_linux-2.4.3.dist-info}/RECORD +9 -9
- {moleditpy_linux-2.4.2.dist-info → moleditpy_linux-2.4.3.dist-info}/WHEEL +0 -0
- {moleditpy_linux-2.4.2.dist-info → moleditpy_linux-2.4.3.dist-info}/entry_points.txt +0 -0
- {moleditpy_linux-2.4.2.dist-info → moleditpy_linux-2.4.3.dist-info}/licenses/LICENSE +0 -0
- {moleditpy_linux-2.4.2.dist-info → moleditpy_linux-2.4.3.dist-info}/top_level.txt +0 -0
|
@@ -47,7 +47,7 @@ from PyQt6.QtCore import (
|
|
|
47
47
|
)
|
|
48
48
|
|
|
49
49
|
class Rotate2DDialog(QDialog):
|
|
50
|
-
def __init__(self, parent=None):
|
|
50
|
+
def __init__(self, parent=None, initial_angle=0):
|
|
51
51
|
super().__init__(parent)
|
|
52
52
|
self.setWindowTitle("Rotate 2D")
|
|
53
53
|
self.setFixedWidth(300)
|
|
@@ -59,14 +59,14 @@ class Rotate2DDialog(QDialog):
|
|
|
59
59
|
input_layout.addWidget(QLabel("Angle (degrees):"))
|
|
60
60
|
self.angle_spin = QSpinBox()
|
|
61
61
|
self.angle_spin.setRange(-360, 360)
|
|
62
|
-
self.angle_spin.setValue(
|
|
62
|
+
self.angle_spin.setValue(initial_angle)
|
|
63
63
|
input_layout.addWidget(self.angle_spin)
|
|
64
64
|
layout.addLayout(input_layout)
|
|
65
65
|
|
|
66
66
|
# Slider
|
|
67
67
|
self.slider = QSlider(Qt.Orientation.Horizontal)
|
|
68
68
|
self.slider.setRange(-180, 180)
|
|
69
|
-
self.slider.setValue(
|
|
69
|
+
self.slider.setValue(initial_angle)
|
|
70
70
|
self.slider.setTickPosition(QSlider.TickPosition.TicksBelow)
|
|
71
71
|
self.slider.setTickInterval(15)
|
|
72
72
|
layout.addWidget(self.slider)
|
|
@@ -612,21 +612,29 @@ class MainWindowEditActions(object):
|
|
|
612
612
|
|
|
613
613
|
def open_rotate_2d_dialog(self):
|
|
614
614
|
"""2D回転ダイアログを開く"""
|
|
615
|
-
|
|
615
|
+
# Initialize last_rotation_angle if not present
|
|
616
|
+
if not hasattr(self, 'last_rotation_angle'):
|
|
617
|
+
self.last_rotation_angle = 0
|
|
618
|
+
|
|
619
|
+
dialog = Rotate2DDialog(self, initial_angle=self.last_rotation_angle)
|
|
616
620
|
if dialog.exec() == QDialog.DialogCode.Accepted:
|
|
617
621
|
angle = dialog.get_angle()
|
|
622
|
+
self.last_rotation_angle = angle # Remember for next time
|
|
618
623
|
self.rotate_molecule_2d(angle)
|
|
619
624
|
|
|
620
625
|
def rotate_molecule_2d(self, angle_degrees):
|
|
621
|
-
"""2D
|
|
626
|
+
"""2D分子を指定角度回転させる(選択範囲があればそれのみ、なければ全体)"""
|
|
622
627
|
try:
|
|
623
628
|
# Determine target atoms
|
|
624
629
|
selected_items = self.scene.selectedItems()
|
|
625
630
|
target_atoms = [item for item in selected_items if isinstance(item, AtomItem)]
|
|
626
631
|
|
|
627
|
-
# If no selection,
|
|
632
|
+
# If no selection, rotate everything
|
|
633
|
+
if not target_atoms:
|
|
634
|
+
target_atoms = [data['item'] for data in self.data.atoms.values() if data.get('item') and not sip_isdeleted_safe(data['item'])]
|
|
635
|
+
|
|
628
636
|
if not target_atoms:
|
|
629
|
-
self.statusBar().showMessage("No atoms
|
|
637
|
+
self.statusBar().showMessage("No atoms to rotate.")
|
|
630
638
|
return
|
|
631
639
|
|
|
632
640
|
# Calculate Center
|
|
@@ -992,6 +992,7 @@ class MainWindowMainInit(object):
|
|
|
992
992
|
edit_menu.addSeparator()
|
|
993
993
|
|
|
994
994
|
rotate_2d_action = QAction("Rotate 2D...", self)
|
|
995
|
+
rotate_2d_action.setShortcut(QKeySequence("Ctrl+R"))
|
|
995
996
|
rotate_2d_action.triggered.connect(self.open_rotate_2d_dialog)
|
|
996
997
|
edit_menu.addAction(rotate_2d_action)
|
|
997
998
|
|
|
@@ -1054,7 +1055,7 @@ class MainWindowMainInit(object):
|
|
|
1054
1055
|
|
|
1055
1056
|
reset_3d_view_action = QAction("Reset 3D View", self)
|
|
1056
1057
|
reset_3d_view_action.triggered.connect(lambda: self.plotter.reset_camera() if hasattr(self, 'plotter') else None)
|
|
1057
|
-
reset_3d_view_action.setShortcut(QKeySequence("Ctrl+R"))
|
|
1058
|
+
reset_3d_view_action.setShortcut(QKeySequence("Ctrl+Shift+R"))
|
|
1058
1059
|
view_menu.addAction(reset_3d_view_action)
|
|
1059
1060
|
|
|
1060
1061
|
view_menu.addSeparator()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: MoleditPy-linux
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.3
|
|
4
4
|
Summary: A cross-platform, simple, and intuitive molecular structure editor built in Python. It allows 2D molecular drawing and 3D structure visualization. It supports exporting structure files for input to DFT calculation software.
|
|
5
5
|
Author-email: HiroYokoyama <titech.yoko.hiro@gmail.com>
|
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
|
@@ -12,7 +12,7 @@ moleditpy_linux/modules/bond_item.py,sha256=hOwga7DcxZf8zxwZr8F7viTNgEi_9wftKFgS
|
|
|
12
12
|
moleditpy_linux/modules/bond_length_dialog.py,sha256=6bFPGssnqlgINuqpxLv-OhjMH3_hspnaH8QtorAyu2M,14782
|
|
13
13
|
moleditpy_linux/modules/calculation_worker.py,sha256=KiGQY7i-QCQofEoE0r65KoQgpEGFcbhmxWv6egfkUdc,42324
|
|
14
14
|
moleditpy_linux/modules/color_settings_dialog.py,sha256=Ow44BhCOLo0AFb6klO001k6B4drOgKX9DeNBQhZLp5o,15474
|
|
15
|
-
moleditpy_linux/modules/constants.py,sha256=
|
|
15
|
+
moleditpy_linux/modules/constants.py,sha256=JnedcxOEw20rOrJh2Qb2t1CbYdcnkBwiHdhV1RtfNPY,4702
|
|
16
16
|
moleditpy_linux/modules/constrained_optimization_dialog.py,sha256=REsk4ePsqNmAGPMTS_jckeM7jexrU3krwun8sKqKUCs,30062
|
|
17
17
|
moleditpy_linux/modules/custom_interactor_style.py,sha256=LDNODMJoNHGe1AUSrvqv6PdeJm-hpPmSpWINppnJLt0,38942
|
|
18
18
|
moleditpy_linux/modules/custom_qt_interactor.py,sha256=vCZsDfRO-FtphD5cTP7Ps-5rpHZMIGloaoe6EaKzrsw,4139
|
|
@@ -23,9 +23,9 @@ moleditpy_linux/modules/main_window_app_state.py,sha256=8YDcGNCSpLTO1NGL9tEvNkXp
|
|
|
23
23
|
moleditpy_linux/modules/main_window_compute.py,sha256=ipIkhH_DONXDnPzh7xeym9X-Yfx8EhsvXYOdyxsAj4c,53347
|
|
24
24
|
moleditpy_linux/modules/main_window_dialog_manager.py,sha256=QR96LqHAPSOShXbc9cK-Ffq8a16JrXAoMKB0pHjESrQ,20072
|
|
25
25
|
moleditpy_linux/modules/main_window_edit_3d.py,sha256=CUArB5wcsgq1C7LygAEC6URlbnn4RhRYDa5n-Y-etWI,19731
|
|
26
|
-
moleditpy_linux/modules/main_window_edit_actions.py,sha256=
|
|
26
|
+
moleditpy_linux/modules/main_window_edit_actions.py,sha256=drVXRFpSOhILYfApcSro9zssnDw-a8F7wNcfQ3xQukw,69412
|
|
27
27
|
moleditpy_linux/modules/main_window_export.py,sha256=_Vd7MeP_xaLWDYDm3-ZIZiPuAXhP-AvrQbi7Yx3Jy3c,43020
|
|
28
|
-
moleditpy_linux/modules/main_window_main_init.py,sha256=
|
|
28
|
+
moleditpy_linux/modules/main_window_main_init.py,sha256=tqXkyyE7TSkq-On7LZ7RMoZAoq9pzFcHWBsqrVV-1WY,94849
|
|
29
29
|
moleditpy_linux/modules/main_window_molecular_parsers.py,sha256=KR6vzuqc3nutOcorpYr0QOyX3MFBcxTwDhZX96VgJ9Q,48291
|
|
30
30
|
moleditpy_linux/modules/main_window_project_io.py,sha256=TWwtuKDuvgcvPZ9IGmW8r1EJJOrgxrIJRnxe_f4C1oM,17149
|
|
31
31
|
moleditpy_linux/modules/main_window_string_importers.py,sha256=v47wOd4RtjKYcF-aLP-mogGGdYTpTEo3dDyAu79_5MM,10782
|
|
@@ -51,9 +51,9 @@ moleditpy_linux/modules/assets/file_icon.ico,sha256=yyVj084A7HuMNbV073cE_Ag3Ne40
|
|
|
51
51
|
moleditpy_linux/modules/assets/icon.icns,sha256=wD5R6-Vw7K662tVKhu2E1ImN0oUuyAP4youesEQsn9c,139863
|
|
52
52
|
moleditpy_linux/modules/assets/icon.ico,sha256=RfgFcx7-dHY_2STdsOQCQziY5SNhDr3gPnjO6jzEDPI,147975
|
|
53
53
|
moleditpy_linux/modules/assets/icon.png,sha256=kCFN1WacYIdy0GN6SFEbNA00ef39pCczBnFdkkBI8Bs,147110
|
|
54
|
-
moleditpy_linux-2.4.
|
|
55
|
-
moleditpy_linux-2.4.
|
|
56
|
-
moleditpy_linux-2.4.
|
|
57
|
-
moleditpy_linux-2.4.
|
|
58
|
-
moleditpy_linux-2.4.
|
|
59
|
-
moleditpy_linux-2.4.
|
|
54
|
+
moleditpy_linux-2.4.3.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
55
|
+
moleditpy_linux-2.4.3.dist-info/METADATA,sha256=iPEaC6MzhfchKUqEYaEi-xF3e0BqLbZ21d4N6NA9Dn8,60708
|
|
56
|
+
moleditpy_linux-2.4.3.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
57
|
+
moleditpy_linux-2.4.3.dist-info/entry_points.txt,sha256=-OzipSi__yVwlimNtu3eiRP5t5UMg55Cs0udyhXYiyw,60
|
|
58
|
+
moleditpy_linux-2.4.3.dist-info/top_level.txt,sha256=qyqe-hDYL6CXyin9E5Me5rVl3PG84VqiOjf9bQvfJLs,16
|
|
59
|
+
moleditpy_linux-2.4.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|