MoleditPy-linux 2.4.1__py3-none-any.whl → 2.4.2__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.py +4 -0
- moleditpy_linux/modules/main_window_edit_actions.py +5 -6
- moleditpy_linux/modules/molecule_scene.py +14 -0
- {moleditpy_linux-2.4.1.dist-info → moleditpy_linux-2.4.2.dist-info}/METADATA +1 -1
- {moleditpy_linux-2.4.1.dist-info → moleditpy_linux-2.4.2.dist-info}/RECORD +10 -10
- {moleditpy_linux-2.4.1.dist-info → moleditpy_linux-2.4.2.dist-info}/WHEEL +0 -0
- {moleditpy_linux-2.4.1.dist-info → moleditpy_linux-2.4.2.dist-info}/entry_points.txt +0 -0
- {moleditpy_linux-2.4.1.dist-info → moleditpy_linux-2.4.2.dist-info}/licenses/LICENSE +0 -0
- {moleditpy_linux-2.4.1.dist-info → moleditpy_linux-2.4.2.dist-info}/top_level.txt +0 -0
|
@@ -532,6 +532,10 @@ class MainWindow(QMainWindow):
|
|
|
532
532
|
# --- MOVED TO main_window_edit_actions.py ---
|
|
533
533
|
return self.main_window_edit_actions.open_rotate_2d_dialog()
|
|
534
534
|
|
|
535
|
+
def rotate_molecule_2d(self, angle_degrees):
|
|
536
|
+
# --- MOVED TO main_window_edit_actions.py ---
|
|
537
|
+
return self.main_window_edit_actions.rotate_molecule_2d(angle_degrees)
|
|
538
|
+
|
|
535
539
|
def draw_molecule_3d(self, mol):
|
|
536
540
|
# --- MOVED TO main_window_view_3d.py ---
|
|
537
541
|
return self.main_window_view_3d.draw_molecule_3d(mol)
|
|
@@ -618,18 +618,15 @@ class MainWindowEditActions(object):
|
|
|
618
618
|
self.rotate_molecule_2d(angle)
|
|
619
619
|
|
|
620
620
|
def rotate_molecule_2d(self, angle_degrees):
|
|
621
|
-
"""2D
|
|
621
|
+
"""2D分子を指定角度回転させる(選択範囲があればそれのみ)"""
|
|
622
622
|
try:
|
|
623
623
|
# Determine target atoms
|
|
624
624
|
selected_items = self.scene.selectedItems()
|
|
625
625
|
target_atoms = [item for item in selected_items if isinstance(item, AtomItem)]
|
|
626
626
|
|
|
627
|
-
# If no selection, rotate
|
|
627
|
+
# If no selection, do not rotate
|
|
628
628
|
if not target_atoms:
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
if not target_atoms:
|
|
632
|
-
self.statusBar().showMessage("No atoms to rotate.")
|
|
629
|
+
self.statusBar().showMessage("No atoms selected to rotate.")
|
|
633
630
|
return
|
|
634
631
|
|
|
635
632
|
# Calculate Center
|
|
@@ -663,6 +660,8 @@ class MainWindowEditActions(object):
|
|
|
663
660
|
self.push_undo_state()
|
|
664
661
|
self.statusBar().showMessage(f"Rotated {len(target_atoms)} atoms by {angle_degrees} degrees.")
|
|
665
662
|
self.scene.update()
|
|
663
|
+
# Force full redraw as requested
|
|
664
|
+
self.scene.update_all_items()
|
|
666
665
|
|
|
667
666
|
except Exception as e:
|
|
668
667
|
print(f"Error rotating molecule: {e}")
|
|
@@ -116,6 +116,20 @@ class MoleculeScene(QGraphicsScene):
|
|
|
116
116
|
self.reinitialize_items()
|
|
117
117
|
|
|
118
118
|
|
|
119
|
+
def update_connected_bonds(self, atoms):
|
|
120
|
+
"""指定された原子リストに接続する全ての結合の位置を更新する"""
|
|
121
|
+
bonds_to_update = set()
|
|
122
|
+
for atom in atoms:
|
|
123
|
+
if hasattr(atom, 'bonds'):
|
|
124
|
+
bonds_to_update.update(atom.bonds)
|
|
125
|
+
|
|
126
|
+
for bond in bonds_to_update:
|
|
127
|
+
try:
|
|
128
|
+
if not sip_isdeleted_safe(bond):
|
|
129
|
+
bond.update_position()
|
|
130
|
+
except Exception:
|
|
131
|
+
continue
|
|
132
|
+
|
|
119
133
|
def update_all_items(self):
|
|
120
134
|
"""全てのアイテムを強制的に再描画する"""
|
|
121
135
|
for item in self.items():
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: MoleditPy-linux
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.2
|
|
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,18 +12,18 @@ 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=0jpJ6XvyBlso4hWUR9UqslTG-g8maR7_yipw9e9HoRk,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
|
|
19
19
|
moleditpy_linux/modules/dialog3_d_picking_mixin.py,sha256=z4udbkiX9PYmIGazPXsbftkk_oRRwZhcvlCqbyJzr24,6493
|
|
20
20
|
moleditpy_linux/modules/dihedral_dialog.py,sha256=bOTDO6-b74vEDn_z6OyuBr5cRz3RnRj83PiaEBUyWJA,18002
|
|
21
|
-
moleditpy_linux/modules/main_window.py,sha256=
|
|
21
|
+
moleditpy_linux/modules/main_window.py,sha256=w52L0F7V3b0BiNhQImbulZ9N8cRKolYy06szfoMOIcg,36830
|
|
22
22
|
moleditpy_linux/modules/main_window_app_state.py,sha256=8YDcGNCSpLTO1NGL9tEvNkXpUcS7JW-uK7TdUGvEqnk,35189
|
|
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=9CLyhfxLWG-zrqJXw_J5fwKzd3U3M5vKmQsy5qTFSJ8,68889
|
|
27
27
|
moleditpy_linux/modules/main_window_export.py,sha256=_Vd7MeP_xaLWDYDm3-ZIZiPuAXhP-AvrQbi7Yx3Jy3c,43020
|
|
28
28
|
moleditpy_linux/modules/main_window_main_init.py,sha256=t-um1lHvXo_tPXSkjx5Y0mjZlrKUhZbmb529e-7ffNU,94781
|
|
29
29
|
moleditpy_linux/modules/main_window_molecular_parsers.py,sha256=KR6vzuqc3nutOcorpYr0QOyX3MFBcxTwDhZX96VgJ9Q,48291
|
|
@@ -34,7 +34,7 @@ moleditpy_linux/modules/main_window_view_3d.py,sha256=CxZxyJHl2isF7KtyVWSI9f8LVb
|
|
|
34
34
|
moleditpy_linux/modules/main_window_view_loaders.py,sha256=gklTMo27QnyJ8Gd0ampPdbm9d0Gi-oHWkIqQuGADHmI,14352
|
|
35
35
|
moleditpy_linux/modules/mirror_dialog.py,sha256=c3v4qY6R4FAljzk4EPaDjL9ZdZMjLQSFLqDMXz2fBUk,4696
|
|
36
36
|
moleditpy_linux/modules/molecular_data.py,sha256=8gE9ByYg3kSBfb1zANsyad_BVBTm6WOLF7NsZIYuG2E,13250
|
|
37
|
-
moleditpy_linux/modules/molecule_scene.py,sha256=
|
|
37
|
+
moleditpy_linux/modules/molecule_scene.py,sha256=7NijkUjelz7ZrGxZxaPPGMrMFRB8kw_eLQ0gXqge9BY,96429
|
|
38
38
|
moleditpy_linux/modules/move_group_dialog.py,sha256=Fyuy3Uq1KsFsk9qR96r_FxPbAM_-zSfW2dsMQGv7btc,27276
|
|
39
39
|
moleditpy_linux/modules/periodic_table_dialog.py,sha256=ItEZUts1XCietz9paY-spvbzxh6SXak3GnikwqkHZCw,4006
|
|
40
40
|
moleditpy_linux/modules/planarize_dialog.py,sha256=eaqI1MpF35e-VUMpJATt-EtGG5FhcSUlbAenUaFGabY,8593
|
|
@@ -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.2.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
55
|
+
moleditpy_linux-2.4.2.dist-info/METADATA,sha256=ssVC4cCxZSB97Lal7SKjEbrSkZa6EhirUnYkJn3GjQs,60708
|
|
56
|
+
moleditpy_linux-2.4.2.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
57
|
+
moleditpy_linux-2.4.2.dist-info/entry_points.txt,sha256=-OzipSi__yVwlimNtu3eiRP5t5UMg55Cs0udyhXYiyw,60
|
|
58
|
+
moleditpy_linux-2.4.2.dist-info/top_level.txt,sha256=qyqe-hDYL6CXyin9E5Me5rVl3PG84VqiOjf9bQvfJLs,16
|
|
59
|
+
moleditpy_linux-2.4.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|