MoleditPy-linux 2.2.1__tar.gz → 2.2.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.
Files changed (63) hide show
  1. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/PKG-INFO +1 -1
  2. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/pyproject.toml +1 -1
  3. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/MoleditPy_linux.egg-info/PKG-INFO +1 -1
  4. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/constants.py +1 -1
  5. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/main_window_compute.py +5 -8
  6. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/main_window_dialog_manager.py +0 -4
  7. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/main_window_edit_3d.py +0 -4
  8. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/main_window_edit_actions.py +0 -4
  9. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/main_window_export.py +0 -4
  10. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/main_window_main_init.py +1 -1
  11. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/main_window_molecular_parsers.py +0 -4
  12. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/main_window_project_io.py +0 -4
  13. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/main_window_string_importers.py +0 -4
  14. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/main_window_view_3d.py +1 -5
  15. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/main_window_view_loaders.py +0 -4
  16. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/plugin_manager_window.py +8 -5
  17. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/LICENSE +0 -0
  18. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/README.md +0 -0
  19. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/setup.cfg +0 -0
  20. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/MoleditPy_linux.egg-info/SOURCES.txt +0 -0
  21. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/MoleditPy_linux.egg-info/dependency_links.txt +0 -0
  22. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/MoleditPy_linux.egg-info/entry_points.txt +0 -0
  23. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/MoleditPy_linux.egg-info/requires.txt +0 -0
  24. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/MoleditPy_linux.egg-info/top_level.txt +0 -0
  25. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/__init__.py +0 -0
  26. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/__main__.py +0 -0
  27. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/main.py +0 -0
  28. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/__init__.py +0 -0
  29. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/about_dialog.py +0 -0
  30. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/align_plane_dialog.py +0 -0
  31. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/alignment_dialog.py +0 -0
  32. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/analysis_window.py +0 -0
  33. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/angle_dialog.py +0 -0
  34. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/assets/icon.icns +0 -0
  35. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/assets/icon.ico +0 -0
  36. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/assets/icon.png +0 -0
  37. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/atom_item.py +0 -0
  38. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/bond_item.py +0 -0
  39. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/bond_length_dialog.py +0 -0
  40. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/calculation_worker.py +0 -0
  41. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/color_settings_dialog.py +0 -0
  42. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/constrained_optimization_dialog.py +0 -0
  43. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/custom_interactor_style.py +0 -0
  44. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/custom_qt_interactor.py +0 -0
  45. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/dialog3_d_picking_mixin.py +0 -0
  46. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/dihedral_dialog.py +0 -0
  47. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/main_window.py +0 -0
  48. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/main_window_app_state.py +0 -0
  49. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/main_window_ui_manager.py +0 -0
  50. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/mirror_dialog.py +0 -0
  51. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/molecular_data.py +0 -0
  52. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/molecule_scene.py +0 -0
  53. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/move_group_dialog.py +0 -0
  54. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/periodic_table_dialog.py +0 -0
  55. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/planarize_dialog.py +0 -0
  56. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/plugin_interface.py +0 -0
  57. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/plugin_manager.py +0 -0
  58. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/settings_dialog.py +0 -0
  59. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/template_preview_item.py +0 -0
  60. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/template_preview_view.py +0 -0
  61. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/translation_dialog.py +0 -0
  62. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/src/moleditpy_linux/modules/user_template_dialog.py +0 -0
  63. {moleditpy_linux-2.2.1 → moleditpy_linux-2.2.3}/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.2.1
3
+ Version: 2.2.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
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
  [project]
6
6
  name = "MoleditPy-linux"
7
7
 
8
- version = "2.2.1"
8
+ version = "2.2.3"
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.2.1
3
+ Version: 2.2.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
@@ -16,7 +16,7 @@ from PyQt6.QtGui import QFont, QColor
16
16
  from rdkit import Chem
17
17
 
18
18
  #Version
19
- VERSION = '2.2.1'
19
+ VERSION = '2.2.3'
20
20
 
21
21
  ATOM_RADIUS = 18
22
22
  BOND_OFFSET = 3.5
@@ -84,10 +84,6 @@ except Exception:
84
84
  class MainWindowCompute(object):
85
85
  """ main_window.py から分離された機能クラス """
86
86
 
87
- def __init__(self, main_window):
88
- """ クラスの初期化 """
89
- self.mw = main_window
90
-
91
87
 
92
88
  def set_optimization_method(self, method_name):
93
89
  """Set preferred 3D optimization method and persist to settings.
@@ -209,8 +205,8 @@ class MainWindowCompute(object):
209
205
  menu.addAction(a)
210
206
 
211
207
  # Add Plugin Optimization Methods
212
- if hasattr(self.mw, 'plugin_manager') and self.mw.plugin_manager.optimization_methods:
213
- methods = self.mw.plugin_manager.optimization_methods
208
+ if hasattr(self, 'plugin_manager') and self.plugin_manager.optimization_methods:
209
+ methods = self.plugin_manager.optimization_methods
214
210
  if methods:
215
211
  menu.addSeparator()
216
212
  for method_name, info in methods.items():
@@ -781,8 +777,9 @@ class MainWindowCompute(object):
781
777
  self.statusBar().showMessage(f"UFF (RDKit) optimization error: {e}")
782
778
  return
783
779
  # Plugin method dispatch
784
- elif hasattr(self.mw, 'plugin_manager') and hasattr(self.mw.plugin_manager, 'optimization_methods') and method in self.mw.plugin_manager.optimization_methods:
785
- info = self.mw.plugin_manager.optimization_methods[method]
780
+ # Plugin method dispatch
781
+ elif hasattr(self, 'plugin_manager') and hasattr(self.plugin_manager, 'optimization_methods') and method in self.plugin_manager.optimization_methods:
782
+ info = self.plugin_manager.optimization_methods[method]
786
783
  callback = info['callback']
787
784
  try:
788
785
  success = callback(self.current_mol)
@@ -111,10 +111,6 @@ except Exception:
111
111
  class MainWindowDialogManager(object):
112
112
  """ main_window.py から分離された機能クラス """
113
113
 
114
- def __init__(self, main_window):
115
- """ クラスの初期化 """
116
- self.mw = main_window
117
-
118
114
 
119
115
  def show_about_dialog(self):
120
116
  """Show the custom About dialog with Easter egg functionality"""
@@ -84,10 +84,6 @@ except Exception:
84
84
  class MainWindowEdit3d(object):
85
85
  """ main_window.py から分離された機能クラス """
86
86
 
87
- def __init__(self, main_window):
88
- """ クラスの初期化 """
89
- self.mw = main_window
90
-
91
87
 
92
88
  def toggle_measurement_mode(self, checked):
93
89
  """測定モードのオン/オフを切り替える"""
@@ -102,10 +102,6 @@ except Exception:
102
102
  class MainWindowEditActions(object):
103
103
  """ main_window.py から分離された機能クラス """
104
104
 
105
- def __init__(self, main_window):
106
- """ クラスの初期化 """
107
- self.mw = main_window
108
-
109
105
 
110
106
  def copy_selection(self):
111
107
  """選択された原子と結合をクリップボードにコピーする"""
@@ -88,10 +88,6 @@ except Exception:
88
88
  class MainWindowExport(object):
89
89
  """ main_window.py から分離された機能クラス """
90
90
 
91
- def __init__(self, main_window):
92
- """ クラスの初期化 """
93
- self.mw = main_window
94
-
95
91
 
96
92
  def export_stl(self):
97
93
  """STLファイルとしてエクスポート(色なし)"""
@@ -1897,7 +1897,7 @@ class MainWindowMainInit(object):
1897
1897
 
1898
1898
  # Add action to the resolved parent_menu
1899
1899
  action = QAction(p['name'], self)
1900
- action.triggered.connect(lambda checked, mod=p['module']: self.plugin_manager.run_plugin(mod, self.mw if hasattr(self, 'mw') else self))
1900
+ action.triggered.connect(lambda checked, mod=p['module']: self.plugin_manager.run_plugin(mod, self))
1901
1901
  parent_menu.addAction(action)
1902
1902
 
1903
1903
  # 4. Integrate Export Actions into Export Button and Menu
@@ -88,10 +88,6 @@ except Exception:
88
88
  class MainWindowMolecularParsers(object):
89
89
  """ main_window.py から分離された機能クラス """
90
90
 
91
- def __init__(self, main_window):
92
- """ クラスの初期化 """
93
- self.mw = main_window
94
-
95
91
 
96
92
  def load_mol_file(self, file_path=None):
97
93
  if not self.check_unsaved_changes():
@@ -83,10 +83,6 @@ except Exception:
83
83
  class MainWindowProjectIo(object):
84
84
  """ main_window.py から分離された機能クラス """
85
85
 
86
- def __init__(self, main_window):
87
- """ クラスの初期化 """
88
- self.mw = main_window
89
-
90
86
 
91
87
  def save_project(self):
92
88
  """上書き保存(Ctrl+S)- デフォルトでPMEPRJ形式"""
@@ -82,10 +82,6 @@ except Exception:
82
82
  class MainWindowStringImporters(object):
83
83
  """ main_window.py から分離された機能クラス """
84
84
 
85
- def __init__(self, main_window):
86
- """ クラスの初期化 """
87
- self.mw = main_window
88
-
89
85
 
90
86
  def import_smiles_dialog(self):
91
87
  """ユーザーにSMILES文字列の入力を促すダイアログを表示する"""
@@ -88,10 +88,6 @@ except Exception:
88
88
  class MainWindowView3d(object):
89
89
  """ main_window.py から分離された機能クラス """
90
90
 
91
- def __init__(self, main_window):
92
- """ クラスの初期化 """
93
- self.mw = main_window
94
-
95
91
 
96
92
  def set_3d_style(self, style_name):
97
93
  """3D表示スタイルを設定し、ビューを更新する"""
@@ -121,7 +117,7 @@ class MainWindowView3d(object):
121
117
 
122
118
  def draw_molecule_3d(self, mol):
123
119
  """Dispatch to custom style or standard drawing."""
124
- mw = self.mw if hasattr(self, 'mw') else self
120
+ mw = self
125
121
 
126
122
  if hasattr(mw, 'plugin_manager') and hasattr(mw.plugin_manager, 'custom_3d_styles'):
127
123
  if hasattr(self, 'current_3d_style') and self.current_3d_style in mw.plugin_manager.custom_3d_styles:
@@ -79,10 +79,6 @@ except Exception:
79
79
  class MainWindowViewLoaders(object):
80
80
  """ main_window.py から分離された機能クラス """
81
81
 
82
- def __init__(self, main_window):
83
- """ クラスの初期化 """
84
- self.mw = main_window
85
-
86
82
  def load_xyz_for_3d_viewing(self, file_path=None):
87
83
  """XYZファイルを読み込んで3Dビューアで表示する"""
88
84
  if not file_path:
@@ -85,7 +85,9 @@ class PluginManagerWindow(QDialog):
85
85
 
86
86
  self.table.setRowCount(len(plugins))
87
87
  for row, p in enumerate(plugins):
88
- self.table.setItem(row, 0, QTableWidgetItem(str(p.get('status', 'Unknown'))))
88
+ status_item = QTableWidgetItem(str(p.get('status', 'Unknown')))
89
+ status_item.setTextAlignment(Qt.AlignmentFlag.AlignCenter)
90
+ self.table.setItem(row, 0, status_item)
89
91
  self.table.setItem(row, 1, QTableWidgetItem(str(p.get('name', 'Unknown'))))
90
92
  self.table.setItem(row, 2, QTableWidgetItem(str(p.get('version', ''))))
91
93
  self.table.setItem(row, 3, QTableWidgetItem(str(p.get('author', ''))))
@@ -108,7 +110,7 @@ class PluginManagerWindow(QDialog):
108
110
  if status.startswith("Error"):
109
111
  color = Qt.GlobalColor.red
110
112
  elif status == "Loaded":
111
- color = Qt.GlobalColor.green
113
+ color = Qt.GlobalColor.darkGreen
112
114
  elif status == "No Entry Point":
113
115
  color = Qt.GlobalColor.gray
114
116
 
@@ -120,7 +122,7 @@ class PluginManagerWindow(QDialog):
120
122
  if hasattr(self, 'btn_remove'):
121
123
  self.btn_remove.setEnabled(has_selection)
122
124
 
123
- def on_reload(self):
125
+ def on_reload(self, silent=False):
124
126
  # Trigger reload in main manager
125
127
  if self.plugin_manager.main_window:
126
128
  self.plugin_manager.discover_plugins(self.plugin_manager.main_window)
@@ -132,7 +134,8 @@ class PluginManagerWindow(QDialog):
132
134
  # We will handle UI rebuild in the main window code by observing or callback.
133
135
 
134
136
  # For immediate feedback:
135
- QMessageBox.information(self, "Reloaded", "Plugins have been reloaded.")
137
+ if not silent:
138
+ QMessageBox.information(self, "Reloaded", "Plugins have been reloaded.")
136
139
  else:
137
140
  self.plugin_manager.discover_plugins()
138
141
  self.refresh_plugin_list()
@@ -155,7 +158,7 @@ class PluginManagerWindow(QDialog):
155
158
  if reply == QMessageBox.StandardButton.Yes:
156
159
  try:
157
160
  os.remove(filepath)
158
- self.on_reload() # Reload list and plugins
161
+ self.on_reload(silent=True) # Reload list and plugins
159
162
  QMessageBox.information(self, "Success", f"Removed '{plugin.get('name', 'Unknown')}'.")
160
163
  except Exception as e:
161
164
  QMessageBox.critical(self, "Error", f"Failed to delete file: {e}")
File without changes