MoleditPy-linux 2.4.1__tar.gz → 2.4.2__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.
Files changed (64) hide show
  1. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/PKG-INFO +1 -1
  2. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/pyproject.toml +1 -1
  3. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/MoleditPy_linux.egg-info/PKG-INFO +1 -1
  4. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/constants.py +1 -1
  5. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/main_window.py +4 -0
  6. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/main_window_edit_actions.py +5 -6
  7. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/molecule_scene.py +14 -0
  8. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/LICENSE +0 -0
  9. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/README.md +0 -0
  10. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/setup.cfg +0 -0
  11. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/MoleditPy_linux.egg-info/SOURCES.txt +0 -0
  12. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/MoleditPy_linux.egg-info/dependency_links.txt +0 -0
  13. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/MoleditPy_linux.egg-info/entry_points.txt +0 -0
  14. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/MoleditPy_linux.egg-info/requires.txt +0 -0
  15. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/MoleditPy_linux.egg-info/top_level.txt +0 -0
  16. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/__init__.py +0 -0
  17. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/__main__.py +0 -0
  18. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/main.py +0 -0
  19. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/__init__.py +0 -0
  20. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/about_dialog.py +0 -0
  21. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/align_plane_dialog.py +0 -0
  22. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/alignment_dialog.py +0 -0
  23. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/analysis_window.py +0 -0
  24. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/angle_dialog.py +0 -0
  25. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/assets/file_icon.ico +0 -0
  26. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/assets/icon.icns +0 -0
  27. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/assets/icon.ico +0 -0
  28. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/assets/icon.png +0 -0
  29. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/atom_item.py +0 -0
  30. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/bond_item.py +0 -0
  31. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/bond_length_dialog.py +0 -0
  32. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/calculation_worker.py +0 -0
  33. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/color_settings_dialog.py +0 -0
  34. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/constrained_optimization_dialog.py +0 -0
  35. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/custom_interactor_style.py +0 -0
  36. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/custom_qt_interactor.py +0 -0
  37. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/dialog3_d_picking_mixin.py +0 -0
  38. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/dihedral_dialog.py +0 -0
  39. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/main_window_app_state.py +0 -0
  40. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/main_window_compute.py +0 -0
  41. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/main_window_dialog_manager.py +0 -0
  42. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/main_window_edit_3d.py +0 -0
  43. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/main_window_export.py +0 -0
  44. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/main_window_main_init.py +0 -0
  45. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/main_window_molecular_parsers.py +0 -0
  46. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/main_window_project_io.py +0 -0
  47. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/main_window_string_importers.py +0 -0
  48. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/main_window_ui_manager.py +0 -0
  49. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/main_window_view_3d.py +0 -0
  50. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/main_window_view_loaders.py +0 -0
  51. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/mirror_dialog.py +0 -0
  52. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/molecular_data.py +0 -0
  53. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/move_group_dialog.py +0 -0
  54. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/periodic_table_dialog.py +0 -0
  55. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/planarize_dialog.py +0 -0
  56. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/plugin_interface.py +0 -0
  57. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/plugin_manager.py +0 -0
  58. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/plugin_manager_window.py +0 -0
  59. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/settings_dialog.py +0 -0
  60. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/template_preview_item.py +0 -0
  61. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/template_preview_view.py +0 -0
  62. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/translation_dialog.py +0 -0
  63. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/user_template_dialog.py +0 -0
  64. {moleditpy_linux-2.4.1 → moleditpy_linux-2.4.2}/src/moleditpy_linux/modules/zoomable_view.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MoleditPy-linux
3
- Version: 2.4.1
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
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
  [project]
6
6
  name = "MoleditPy-linux"
7
7
 
8
- version = "2.4.1"
8
+ version = "2.4.2"
9
9
 
10
10
  license = {file = "LICENSE"}
11
11
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MoleditPy-linux
3
- Version: 2.4.1
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
@@ -16,7 +16,7 @@ from PyQt6.QtGui import QFont, QColor
16
16
  from rdkit import Chem
17
17
 
18
18
  #Version
19
- VERSION = '2.4.1'
19
+ VERSION = '2.4.2'
20
20
 
21
21
  ATOM_RADIUS = 18
22
22
  BOND_OFFSET = 3.5
@@ -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 everything
627
+ # If no selection, do not rotate
628
628
  if not target_atoms:
629
- target_atoms = [data['item'] for data in self.data.atoms.values() if data.get('item') and not sip_isdeleted_safe(data['item'])]
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():
File without changes