MoleditPy 3.0.3__tar.gz → 3.0.5__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-3.0.3 → moleditpy-3.0.5}/PKG-INFO +1 -1
- {moleditpy-3.0.3 → moleditpy-3.0.5}/pyproject.toml +1 -1
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/MoleditPy.egg-info/PKG-INFO +1 -1
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/main.py +14 -3
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/plugins/plugin_manager.py +21 -1
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/about_dialog.py +2 -1
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/main_window_init.py +5 -4
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/view_3d_logic.py +2 -2
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/utils/constants.py +1 -1
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/utils/default_settings.py +1 -1
- {moleditpy-3.0.3 → moleditpy-3.0.5}/LICENSE +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/README.md +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/setup.cfg +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/MoleditPy.egg-info/SOURCES.txt +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/MoleditPy.egg-info/dependency_links.txt +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/MoleditPy.egg-info/entry_points.txt +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/MoleditPy.egg-info/requires.txt +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/MoleditPy.egg-info/top_level.txt +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/__init__.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/__main__.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/assets/file_icon.ico +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/assets/icon.icns +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/assets/icon.ico +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/assets/icon.png +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/core/__init__.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/core/mol_geometry.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/core/molecular_data.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/plugins/__init__.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/plugins/plugin_interface.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/plugins/plugin_manager_window.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/__init__.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/align_plane_dialog.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/alignment_dialog.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/analysis_window.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/angle_dialog.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/app_state.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/atom_item.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/base_picking_dialog.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/bond_item.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/bond_length_dialog.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/calculation_worker.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/color_settings_dialog.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/compute_logic.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/constrained_optimization_dialog.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/custom_interactor_style.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/custom_qt_interactor.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/dialog_3d_picking_mixin.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/dialog_logic.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/dihedral_dialog.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/edit_3d_logic.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/edit_actions_logic.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/export_logic.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/geometry_base_dialog.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/io_logic.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/main_window.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/mirror_dialog.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/molecular_scene_handler.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/molecule_scene.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/move_group_dialog.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/periodic_table_dialog.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/planarize_dialog.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/settings_dialog.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/settings_tabs/__init__.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/settings_tabs/settings_2d_tab.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/settings_tabs/settings_3d_tabs.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/settings_tabs/settings_other_tab.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/settings_tabs/settings_tab_base.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/sip_isdeleted_safe.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/string_importers.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/template_preview_item.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/template_preview_view.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/translation_dialog.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/ui_manager.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/user_template_dialog.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/ui/zoomable_view.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/utils/__init__.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/utils/sip_isdeleted_safe.py +0 -0
- {moleditpy-3.0.3 → moleditpy-3.0.5}/src/moleditpy/utils/system_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: MoleditPy
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.5
|
|
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: 3.0.
|
|
3
|
+
Version: 3.0.5
|
|
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,15 +16,22 @@ import argparse
|
|
|
16
16
|
import logging
|
|
17
17
|
import os
|
|
18
18
|
|
|
19
|
-
from PyQt6.QtWidgets import QApplication
|
|
20
|
-
|
|
21
19
|
try:
|
|
22
|
-
from .
|
|
20
|
+
from .utils.constants import VERSION
|
|
23
21
|
except ImportError:
|
|
24
22
|
# Add the parent directory (src) to sys.path so 'moleditpy.*' imports work
|
|
25
23
|
src_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
|
|
26
24
|
if src_dir not in sys.path:
|
|
27
25
|
sys.path.insert(0, src_dir)
|
|
26
|
+
from moleditpy.utils.constants import VERSION
|
|
27
|
+
|
|
28
|
+
# VERSION is resolved above (before Qt) so --version works without launching the app.
|
|
29
|
+
|
|
30
|
+
from PyQt6.QtWidgets import QApplication
|
|
31
|
+
|
|
32
|
+
try:
|
|
33
|
+
from .ui.main_window import MainWindow
|
|
34
|
+
except ImportError:
|
|
28
35
|
from moleditpy.ui.main_window import MainWindow
|
|
29
36
|
|
|
30
37
|
|
|
@@ -63,6 +70,10 @@ def main():
|
|
|
63
70
|
prog="moleditpy", description="MoleditPy molecular editor"
|
|
64
71
|
)
|
|
65
72
|
parser.add_argument("file", nargs="?", default=None, help="File to open on startup")
|
|
73
|
+
_variant = " (Linux)" if "moleditpy_linux" in (__file__ or "") else ""
|
|
74
|
+
parser.add_argument(
|
|
75
|
+
"--version", action="version", version=f"MoleditPy{_variant} {VERSION}"
|
|
76
|
+
)
|
|
66
77
|
parser.add_argument(
|
|
67
78
|
"--safe",
|
|
68
79
|
action="store_true",
|
|
@@ -254,7 +254,27 @@ class PluginManager:
|
|
|
254
254
|
)
|
|
255
255
|
unique_module_name = unique_module_name.strip(".")
|
|
256
256
|
|
|
257
|
-
|
|
257
|
+
is_package = os.path.basename(filepath) == "__init__.py"
|
|
258
|
+
pkg_dir = os.path.dirname(filepath) if is_package else None
|
|
259
|
+
|
|
260
|
+
# For package plugins, register stub parent packages so that
|
|
261
|
+
# relative imports (e.g. "from . import parser") resolve correctly.
|
|
262
|
+
if is_package and "." in unique_module_name:
|
|
263
|
+
parts = unique_module_name.split(".")
|
|
264
|
+
for i in range(1, len(parts)):
|
|
265
|
+
parent_name = ".".join(parts[:i])
|
|
266
|
+
if parent_name not in sys.modules:
|
|
267
|
+
import types as _types
|
|
268
|
+
stub = _types.ModuleType(parent_name)
|
|
269
|
+
stub.__path__ = []
|
|
270
|
+
stub.__package__ = parent_name
|
|
271
|
+
sys.modules[parent_name] = stub
|
|
272
|
+
|
|
273
|
+
spec = importlib.util.spec_from_file_location(
|
|
274
|
+
unique_module_name,
|
|
275
|
+
filepath,
|
|
276
|
+
submodule_search_locations=([pkg_dir] if is_package else None),
|
|
277
|
+
)
|
|
258
278
|
if spec and spec.loader:
|
|
259
279
|
module = importlib.util.module_from_spec(spec)
|
|
260
280
|
sys.modules[spec.name] = module
|
|
@@ -72,7 +72,8 @@ class AboutDialog(QDialog):
|
|
|
72
72
|
layout.addWidget(self.image_label)
|
|
73
73
|
|
|
74
74
|
# Add text information
|
|
75
|
-
|
|
75
|
+
_variant = " (Linux)" if "moleditpy_linux" in (__file__ or "") else ""
|
|
76
|
+
info_text = f"MoleditPy{_variant} Ver. {VERSION}\nAuthor: Hiromichi Yokoyama\nLicense: GPL-3.0 license"
|
|
76
77
|
info_label = QLabel(info_text)
|
|
77
78
|
info_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
|
78
79
|
layout.addWidget(info_label)
|
|
@@ -264,7 +264,7 @@ class MainInitManager:
|
|
|
264
264
|
file_ext = ext_with_dot.lstrip(".")
|
|
265
265
|
|
|
266
266
|
# 1. Custom Plugin Openers
|
|
267
|
-
if ext_with_dot in self.host.plugin_manager.file_openers:
|
|
267
|
+
if self.host.plugin_manager and ext_with_dot in self.host.plugin_manager.file_openers:
|
|
268
268
|
openers = self.host.plugin_manager.file_openers[ext_with_dot]
|
|
269
269
|
# Iterate through openers (already sorted by priority)
|
|
270
270
|
for opener_info in openers:
|
|
@@ -276,9 +276,10 @@ class MainInitManager:
|
|
|
276
276
|
self.host.init_manager.current_file_path = file_path
|
|
277
277
|
self.host.state_manager.update_window_title()
|
|
278
278
|
return # Success
|
|
279
|
-
except
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
except Exception as e:
|
|
280
|
+
logging.warning(
|
|
281
|
+
"Plugin opener failed for '%s': %s",
|
|
282
|
+
opener_info.get('plugin', 'Unknown'), e
|
|
282
283
|
)
|
|
283
284
|
# If this opener fails, try the next one or fall through to default
|
|
284
285
|
continue
|
|
@@ -175,7 +175,7 @@ class View3DManager:
|
|
|
175
175
|
self._3d_color_map.clear()
|
|
176
176
|
|
|
177
177
|
# 1. Camera state and clear
|
|
178
|
-
camera_state = self.host.view_3d_manager.plotter.
|
|
178
|
+
camera_state = self.host.view_3d_manager.plotter.camera_position
|
|
179
179
|
|
|
180
180
|
# Force removal to prevent ghost actor residues
|
|
181
181
|
old_axes_actor = getattr(self, "axes_actor", None)
|
|
@@ -279,7 +279,7 @@ class View3DManager:
|
|
|
279
279
|
self._add_3d_bond_cylinders(mol_to_draw, conf, col, current_style, mesh_props)
|
|
280
280
|
self._add_3d_aromatic_rings(mol_to_draw, current_style, mesh_props)
|
|
281
281
|
self._add_3d_labels(mol, mol_to_draw)
|
|
282
|
-
self.host.view_3d_manager.plotter.
|
|
282
|
+
self.host.view_3d_manager.plotter.camera_position = camera_state
|
|
283
283
|
|
|
284
284
|
# Update projection mode and force render
|
|
285
285
|
settings = getattr(self, "settings", {})
|
|
@@ -53,7 +53,7 @@ DEFAULT_SETTINGS = {
|
|
|
53
53
|
"display_aromatic_circles_3d": False,
|
|
54
54
|
"display_kekule_3d": False,
|
|
55
55
|
# --- 3D Conversion and Optimization ---
|
|
56
|
-
"3d_conversion_mode": "
|
|
56
|
+
"3d_conversion_mode": "fallback",
|
|
57
57
|
"optimization_method": "MMFF_RDKIT",
|
|
58
58
|
"optimize_intermolecular_interaction_rdkit": True,
|
|
59
59
|
"skip_chemistry_checks": False,
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|