MoleditPy 2.4.1__tar.gz → 2.4.3__tar.gz
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-2.4.1 → moleditpy-2.4.3}/PKG-INFO +1 -1
- {moleditpy-2.4.1 → moleditpy-2.4.3}/pyproject.toml +1 -1
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/MoleditPy.egg-info/PKG-INFO +1 -1
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/constants.py +1 -1
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/main_window.py +4 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/main_window_edit_actions.py +11 -4
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/main_window_main_init.py +2 -1
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/molecule_scene.py +14 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/LICENSE +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/README.md +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/setup.cfg +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/MoleditPy.egg-info/SOURCES.txt +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/MoleditPy.egg-info/dependency_links.txt +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/MoleditPy.egg-info/entry_points.txt +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/MoleditPy.egg-info/requires.txt +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/MoleditPy.egg-info/top_level.txt +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/__init__.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/__main__.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/main.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/__init__.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/about_dialog.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/align_plane_dialog.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/alignment_dialog.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/analysis_window.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/angle_dialog.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/assets/file_icon.ico +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/assets/icon.icns +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/assets/icon.ico +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/assets/icon.png +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/atom_item.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/bond_item.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/bond_length_dialog.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/calculation_worker.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/color_settings_dialog.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/constrained_optimization_dialog.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/custom_interactor_style.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/custom_qt_interactor.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/dialog3_d_picking_mixin.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/dihedral_dialog.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/main_window_app_state.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/main_window_compute.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/main_window_dialog_manager.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/main_window_edit_3d.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/main_window_export.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/main_window_molecular_parsers.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/main_window_project_io.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/main_window_string_importers.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/main_window_ui_manager.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/main_window_view_3d.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/main_window_view_loaders.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/mirror_dialog.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/molecular_data.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/move_group_dialog.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/periodic_table_dialog.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/planarize_dialog.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/plugin_interface.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/plugin_manager.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/plugin_manager_window.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/settings_dialog.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/template_preview_item.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/template_preview_view.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/translation_dialog.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/user_template_dialog.py +0 -0
- {moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/zoomable_view.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: MoleditPy
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: MoleditPy
|
|
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
|
|
@@ -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)
|
|
@@ -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,9 +612,14 @@ 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):
|
|
@@ -663,6 +668,8 @@ class MainWindowEditActions(object):
|
|
|
663
668
|
self.push_undo_state()
|
|
664
669
|
self.statusBar().showMessage(f"Rotated {len(target_atoms)} atoms by {angle_degrees} degrees.")
|
|
665
670
|
self.scene.update()
|
|
671
|
+
# Force full redraw as requested
|
|
672
|
+
self.scene.update_all_items()
|
|
666
673
|
|
|
667
674
|
except Exception as e:
|
|
668
675
|
print(f"Error rotating molecule: {e}")
|
|
@@ -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()
|
|
@@ -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():
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{moleditpy-2.4.1 → moleditpy-2.4.3}/src/moleditpy/modules/constrained_optimization_dialog.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|