MoleditPy-linux 2.7.0__tar.gz → 2.7.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 (66) hide show
  1. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/PKG-INFO +3 -3
  2. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/pyproject.toml +3 -3
  3. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/MoleditPy_linux.egg-info/PKG-INFO +3 -3
  4. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/MoleditPy_linux.egg-info/requires.txt +2 -2
  5. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/constants.py +1 -1
  6. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/main_window.py +4 -0
  7. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/main_window_edit_actions.py +10 -5
  8. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/main_window_main_init.py +4 -0
  9. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/main_window_molecular_parsers.py +1 -1
  10. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/main_window_project_io.py +7 -2
  11. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/LICENSE +0 -0
  12. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/README.md +0 -0
  13. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/setup.cfg +0 -0
  14. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/MoleditPy_linux.egg-info/SOURCES.txt +0 -0
  15. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/MoleditPy_linux.egg-info/dependency_links.txt +0 -0
  16. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/MoleditPy_linux.egg-info/entry_points.txt +0 -0
  17. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/MoleditPy_linux.egg-info/top_level.txt +0 -0
  18. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/__init__.py +0 -0
  19. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/__main__.py +0 -0
  20. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/assets/file_icon.ico +0 -0
  21. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/assets/icon.icns +0 -0
  22. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/assets/icon.ico +0 -0
  23. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/assets/icon.png +0 -0
  24. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/main.py +0 -0
  25. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/__init__.py +0 -0
  26. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/about_dialog.py +0 -0
  27. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/align_plane_dialog.py +0 -0
  28. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/alignment_dialog.py +0 -0
  29. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/analysis_window.py +0 -0
  30. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/angle_dialog.py +0 -0
  31. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/atom_item.py +0 -0
  32. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/bond_item.py +0 -0
  33. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/bond_length_dialog.py +0 -0
  34. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/calculation_worker.py +0 -0
  35. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/color_settings_dialog.py +0 -0
  36. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/constrained_optimization_dialog.py +0 -0
  37. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/custom_interactor_style.py +0 -0
  38. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/custom_qt_interactor.py +0 -0
  39. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/dialog3_d_picking_mixin.py +0 -0
  40. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/dihedral_dialog.py +0 -0
  41. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/main_window_app_state.py +0 -0
  42. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/main_window_compute.py +0 -0
  43. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/main_window_dialog_manager.py +0 -0
  44. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/main_window_edit_3d.py +0 -0
  45. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/main_window_export.py +0 -0
  46. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/main_window_string_importers.py +0 -0
  47. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/main_window_ui_manager.py +0 -0
  48. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/main_window_view_3d.py +0 -0
  49. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/main_window_view_loaders.py +0 -0
  50. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/mirror_dialog.py +0 -0
  51. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/mol_geometry.py +0 -0
  52. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/molecular_data.py +0 -0
  53. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/molecule_scene.py +0 -0
  54. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/move_group_dialog.py +0 -0
  55. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/periodic_table_dialog.py +0 -0
  56. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/planarize_dialog.py +0 -0
  57. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/plugin_interface.py +0 -0
  58. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/plugin_manager.py +0 -0
  59. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/plugin_manager_window.py +0 -0
  60. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/settings_dialog.py +0 -0
  61. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/sip_isdeleted_safe.py +0 -0
  62. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/template_preview_item.py +0 -0
  63. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/template_preview_view.py +0 -0
  64. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/translation_dialog.py +0 -0
  65. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.2}/src/moleditpy_linux/modules/user_template_dialog.py +0 -0
  66. {moleditpy_linux-2.7.0 → moleditpy_linux-2.7.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.7.0
3
+ Version: 2.7.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
@@ -694,8 +694,8 @@ Requires-Python: <3.15,>=3.9
694
694
  Description-Content-Type: text/markdown
695
695
  License-File: LICENSE
696
696
  Requires-Dist: numpy
697
- Requires-Dist: pyqt6<6.10
698
- Requires-Dist: pyvista<0.47
697
+ Requires-Dist: pyqt6<6.11
698
+ Requires-Dist: pyvista<0.48
699
699
  Requires-Dist: pyvistaqt<0.12
700
700
  Requires-Dist: rdkit<2025.10
701
701
  Dynamic: license-file
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
  [project]
6
6
  name = "MoleditPy-linux"
7
7
 
8
- version = "2.7.0"
8
+ version = "2.7.2"
9
9
 
10
10
  license = {file = "LICENSE"}
11
11
 
@@ -34,8 +34,8 @@ classifiers = [
34
34
 
35
35
  dependencies = [
36
36
  "numpy",
37
- "pyqt6 < 6.10",
38
- "pyvista < 0.47",
37
+ "pyqt6 < 6.11",
38
+ "pyvista < 0.48",
39
39
  "pyvistaqt < 0.12",
40
40
  "rdkit < 2025.10",
41
41
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MoleditPy-linux
3
- Version: 2.7.0
3
+ Version: 2.7.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
@@ -694,8 +694,8 @@ Requires-Python: <3.15,>=3.9
694
694
  Description-Content-Type: text/markdown
695
695
  License-File: LICENSE
696
696
  Requires-Dist: numpy
697
- Requires-Dist: pyqt6<6.10
698
- Requires-Dist: pyvista<0.47
697
+ Requires-Dist: pyqt6<6.11
698
+ Requires-Dist: pyvista<0.48
699
699
  Requires-Dist: pyvistaqt<0.12
700
700
  Requires-Dist: rdkit<2025.10
701
701
  Dynamic: license-file
@@ -1,5 +1,5 @@
1
1
  numpy
2
- pyqt6<6.10
3
- pyvista<0.47
2
+ pyqt6<6.11
3
+ pyvista<0.48
4
4
  pyvistaqt<0.12
5
5
  rdkit<2025.10
@@ -16,7 +16,7 @@ from PyQt6.QtGui import QColor, QFont
16
16
  from rdkit import Chem
17
17
 
18
18
  # Version
19
- VERSION = "2.7.0"
19
+ VERSION = "2.7.2"
20
20
 
21
21
  ATOM_RADIUS = 18
22
22
  BOND_OFFSET = 3.5
@@ -484,6 +484,10 @@ class MainWindow(QMainWindow):
484
484
  # --- MOVED TO main_window_view_3d.py ---
485
485
  return self.main_window_view_3d.draw_molecule_3d(mol)
486
486
 
487
+ def redraw_molecule_3d(self):
488
+ # --- MOVED TO main_window_edit_actions.py ---
489
+ return self.main_window_edit_actions.redraw_molecule_3d()
490
+
487
491
  def _calculate_double_bond_offset(self, mol, bond, conf):
488
492
  # --- MOVED TO main_window_view_3d.py ---
489
493
  return self.main_window_view_3d._calculate_double_bond_offset(mol, bond, conf)
@@ -699,14 +699,10 @@ class MainWindowEditActions(object):
699
699
  def clear_all(self):
700
700
  # 未保存の変更があるかチェック
701
701
  if not self.check_unsaved_changes():
702
- return # ユーザーがキャンセルした場合は何もしない
702
+ return False # ユーザーがキャンセルした場合は何もしない
703
703
 
704
704
  self.restore_ui_for_editing()
705
705
 
706
- # データが存在しない場合は何もしない
707
- if not self.data.atoms and self.current_mol is None:
708
- return
709
-
710
706
  # 3Dモードをリセット
711
707
  if self.measurement_mode:
712
708
  self.measurement_action.setChecked(False)
@@ -766,6 +762,7 @@ class MainWindowEditActions(object):
766
762
  self.plugin_manager.invoke_document_reset_handlers()
767
763
 
768
764
  self.statusBar().showMessage("Cleared all data.")
765
+ return True
769
766
 
770
767
  def clear_2d_editor(self, push_to_undo=True):
771
768
  self.data = MolecularData()
@@ -1109,6 +1106,14 @@ class MainWindowEditActions(object):
1109
1106
  finally:
1110
1107
  self.view_2d.setFocus()
1111
1108
 
1109
+ def redraw_molecule_3d(self):
1110
+ """Manually trigger redraw of the 3D molecule."""
1111
+ if hasattr(self, "current_mol") and self.current_mol:
1112
+ self.draw_molecule_3d(self.current_mol)
1113
+ self.statusBar().showMessage("Redraw complete.", 2000)
1114
+ else:
1115
+ self.statusBar().showMessage("No 3D molecule to redraw.")
1116
+
1112
1117
  def resolve_overlapping_groups(self):
1113
1118
  """
1114
1119
  誤差範囲で完全に重なっている原子のグループを検出し、
@@ -1134,6 +1134,10 @@ class MainWindowMainInit(object):
1134
1134
  reset_3d_view_action.setShortcut(QKeySequence("Ctrl+Shift+R"))
1135
1135
  view_menu.addAction(reset_3d_view_action)
1136
1136
 
1137
+ self.redraw_menu_action = QAction("Redraw 3D Molecule", self)
1138
+ self.redraw_menu_action.triggered.connect(self.redraw_molecule_3d)
1139
+ view_menu.addAction(self.redraw_menu_action)
1140
+
1137
1141
  view_menu.addSeparator()
1138
1142
 
1139
1143
  # Panel Layout submenu
@@ -1076,7 +1076,7 @@ class MainWindowMolecularParsers(object):
1076
1076
  except Exception:
1077
1077
  multiplicity = 1 # 取得失敗時は 1 (singlet)
1078
1078
 
1079
- smiles = Chem.MolToSmiles(Chem.RemoveHs(self.current_mol))
1079
+ #smiles = Chem.MolToSmiles(Chem.RemoveHs(self.current_mol))
1080
1080
  xyz_lines.append(
1081
1081
  f"chrg = {charge} mult = {multiplicity} | Generated by MoleditPy Ver. {VERSION}"
1082
1082
  )
@@ -209,6 +209,9 @@ class MainWindowProjectIo(object):
209
209
  if not file_path:
210
210
  return
211
211
 
212
+ if not self.clear_all():
213
+ return
214
+
212
215
  try:
213
216
  with open(file_path, "rb") as f:
214
217
  loaded_data = pickle.load(f)
@@ -307,6 +310,9 @@ class MainWindowProjectIo(object):
307
310
  if not file_path:
308
311
  return
309
312
 
313
+ if not self.clear_all():
314
+ return
315
+
310
316
  try:
311
317
  with open(file_path, "r", encoding="utf-8") as f:
312
318
  json_data = json.load(f)
@@ -357,8 +363,7 @@ class MainWindowProjectIo(object):
357
363
  # Previously this function opened .pmeprj/.pmeraw without prompting the
358
364
  # user to save current unsaved work. Ensure we honor the global
359
365
  # unsaved-change check like other loaders (SMILES/MOL/etc.).
360
- if not self.check_unsaved_changes():
361
- return
366
+ # No longer needed here as loaders call clear_all() which does the check
362
367
  if not file_path: # pragma: no cover
363
368
  file_path, _ = QFileDialog.getOpenFileName(
364
369
  self,
File without changes