moleditpy 3.0.0__tar.gz → 3.0.0a1__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 (95) hide show
  1. {moleditpy-3.0.0 → moleditpy-3.0.0a1}/PKG-INFO +4 -5
  2. {moleditpy-3.0.0 → moleditpy-3.0.0a1}/README.md +3 -4
  3. {moleditpy-3.0.0 → moleditpy-3.0.0a1}/pyproject.toml +1 -1
  4. {moleditpy-3.0.0 → moleditpy-3.0.0a1}/src/MoleditPy.egg-info/PKG-INFO +4 -5
  5. moleditpy-3.0.0a1/src/MoleditPy.egg-info/SOURCES.txt +72 -0
  6. {moleditpy-3.0.0/src/moleditpy/utils → moleditpy-3.0.0a1/src/moleditpy}/__init__.py +4 -0
  7. moleditpy-3.0.0a1/src/moleditpy/main.py +34 -0
  8. moleditpy-3.0.0/src/moleditpy/ui/sip_isdeleted_safe.py → moleditpy-3.0.0a1/src/moleditpy/modules/__init__.py +39 -35
  9. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/about_dialog.py +110 -116
  10. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/align_plane_dialog.py +298 -228
  11. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/alignment_dialog.py +12 -18
  12. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/analysis_window.py +226 -226
  13. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/angle_dialog.py +480 -404
  14. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/atom_item.py +44 -64
  15. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/bond_item.py +524 -529
  16. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/bond_length_dialog.py +423 -351
  17. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/calculation_worker.py +644 -984
  18. moleditpy-3.0.0a1/src/moleditpy/modules/color_settings_dialog.py +276 -0
  19. {moleditpy-3.0.0/src/moleditpy/utils → moleditpy-3.0.0a1/src/moleditpy/modules}/constants.py +2 -2
  20. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/constrained_optimization_dialog.py +33 -63
  21. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/custom_interactor_style.py +784 -859
  22. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/custom_qt_interactor.py +97 -97
  23. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/dialog_3d_picking_mixin.py +210 -229
  24. moleditpy-3.0.0a1/src/moleditpy/modules/dihedral_dialog.py +513 -0
  25. moleditpy-3.0.0a1/src/moleditpy/modules/main_window.py +98 -0
  26. moleditpy-3.0.0a1/src/moleditpy/modules/main_window_app_state.py +906 -0
  27. moleditpy-3.0.0a1/src/moleditpy/modules/main_window_compute.py +828 -0
  28. moleditpy-3.0.0a1/src/moleditpy/modules/main_window_dialog_manager.py +468 -0
  29. moleditpy-3.0.0/src/moleditpy/ui/edit_3d_logic.py → moleditpy-3.0.0a1/src/moleditpy/modules/main_window_edit_3d.py +52 -113
  30. moleditpy-3.0.0/src/moleditpy/ui/edit_actions_logic.py → moleditpy-3.0.0a1/src/moleditpy/modules/main_window_edit_actions.py +381 -521
  31. moleditpy-3.0.0/src/moleditpy/ui/export_logic.py → moleditpy-3.0.0a1/src/moleditpy/modules/main_window_export.py +196 -220
  32. moleditpy-3.0.0a1/src/moleditpy/modules/main_window_main_init.py +1704 -0
  33. moleditpy-3.0.0a1/src/moleditpy/modules/main_window_molecular_parsers.py +534 -0
  34. moleditpy-3.0.0a1/src/moleditpy/modules/main_window_project_io.py +384 -0
  35. moleditpy-3.0.0/src/moleditpy/ui/string_importers.py → moleditpy-3.0.0a1/src/moleditpy/modules/main_window_string_importers.py +253 -257
  36. moleditpy-3.0.0a1/src/moleditpy/modules/main_window_ui_manager.py +501 -0
  37. moleditpy-3.0.0/src/moleditpy/ui/view_3d_logic.py → moleditpy-3.0.0a1/src/moleditpy/modules/main_window_view_3d.py +303 -594
  38. moleditpy-3.0.0a1/src/moleditpy/modules/main_window_view_loaders.py +251 -0
  39. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/mirror_dialog.py +139 -140
  40. {moleditpy-3.0.0/src/moleditpy/core → moleditpy-3.0.0a1/src/moleditpy/modules}/mol_geometry.py +25 -250
  41. {moleditpy-3.0.0/src/moleditpy/core → moleditpy-3.0.0a1/src/moleditpy/modules}/molecular_data.py +427 -509
  42. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/molecular_scene_handler.py +332 -418
  43. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/molecule_scene.py +121 -211
  44. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/move_group_dialog.py +653 -623
  45. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/periodic_table_dialog.py +196 -196
  46. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/planarize_dialog.py +236 -194
  47. moleditpy-3.0.0a1/src/moleditpy/modules/plugin_interface.py +230 -0
  48. {moleditpy-3.0.0/src/moleditpy/plugins → moleditpy-3.0.0a1/src/moleditpy/modules}/plugin_manager.py +521 -678
  49. {moleditpy-3.0.0/src/moleditpy/plugins → moleditpy-3.0.0a1/src/moleditpy/modules}/plugin_manager_window.py +313 -352
  50. moleditpy-3.0.0a1/src/moleditpy/modules/settings_dialog.py +1729 -0
  51. moleditpy-3.0.0a1/src/moleditpy/modules/sip_isdeleted_safe.py +17 -0
  52. {moleditpy-3.0.0/src/moleditpy/utils → moleditpy-3.0.0a1/src/moleditpy/modules}/system_utils.py +70 -71
  53. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/template_preview_item.py +2 -2
  54. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/template_preview_view.py +85 -85
  55. moleditpy-3.0.0a1/src/moleditpy/modules/translation_dialog.py +337 -0
  56. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/user_template_dialog.py +712 -724
  57. {moleditpy-3.0.0/src/moleditpy/ui → moleditpy-3.0.0a1/src/moleditpy/modules}/zoomable_view.py +1 -3
  58. moleditpy-3.0.0/src/MoleditPy.egg-info/SOURCES.txt +0 -82
  59. moleditpy-3.0.0/src/moleditpy/__init__.py +0 -20
  60. moleditpy-3.0.0/src/moleditpy/core/__init__.py +0 -0
  61. moleditpy-3.0.0/src/moleditpy/main.py +0 -78
  62. moleditpy-3.0.0/src/moleditpy/plugins/__init__.py +0 -11
  63. moleditpy-3.0.0/src/moleditpy/plugins/plugin_interface.py +0 -400
  64. moleditpy-3.0.0/src/moleditpy/ui/__init__.py +0 -25
  65. moleditpy-3.0.0/src/moleditpy/ui/app_state.py +0 -866
  66. moleditpy-3.0.0/src/moleditpy/ui/base_picking_dialog.py +0 -126
  67. moleditpy-3.0.0/src/moleditpy/ui/color_settings_dialog.py +0 -454
  68. moleditpy-3.0.0/src/moleditpy/ui/compute_logic.py +0 -673
  69. moleditpy-3.0.0/src/moleditpy/ui/dialog_logic.py +0 -478
  70. moleditpy-3.0.0/src/moleditpy/ui/dihedral_dialog.py +0 -406
  71. moleditpy-3.0.0/src/moleditpy/ui/geometry_base_dialog.py +0 -113
  72. moleditpy-3.0.0/src/moleditpy/ui/io_logic.py +0 -1036
  73. moleditpy-3.0.0/src/moleditpy/ui/main_window.py +0 -100
  74. moleditpy-3.0.0/src/moleditpy/ui/main_window_init.py +0 -2084
  75. moleditpy-3.0.0/src/moleditpy/ui/settings_dialog.py +0 -204
  76. moleditpy-3.0.0/src/moleditpy/ui/settings_tabs/__init__.py +0 -11
  77. moleditpy-3.0.0/src/moleditpy/ui/settings_tabs/settings_2d_tab.py +0 -220
  78. moleditpy-3.0.0/src/moleditpy/ui/settings_tabs/settings_3d_tabs.py +0 -276
  79. moleditpy-3.0.0/src/moleditpy/ui/settings_tabs/settings_other_tab.py +0 -111
  80. moleditpy-3.0.0/src/moleditpy/ui/settings_tabs/settings_tab_base.py +0 -63
  81. moleditpy-3.0.0/src/moleditpy/ui/translation_dialog.py +0 -193
  82. moleditpy-3.0.0/src/moleditpy/ui/ui_manager.py +0 -648
  83. moleditpy-3.0.0/src/moleditpy/utils/default_settings.py +0 -85
  84. moleditpy-3.0.0/src/moleditpy/utils/sip_isdeleted_safe.py +0 -41
  85. {moleditpy-3.0.0 → moleditpy-3.0.0a1}/LICENSE +0 -0
  86. {moleditpy-3.0.0 → moleditpy-3.0.0a1}/setup.cfg +0 -0
  87. {moleditpy-3.0.0 → moleditpy-3.0.0a1}/src/MoleditPy.egg-info/dependency_links.txt +0 -0
  88. {moleditpy-3.0.0 → moleditpy-3.0.0a1}/src/MoleditPy.egg-info/entry_points.txt +0 -0
  89. {moleditpy-3.0.0 → moleditpy-3.0.0a1}/src/MoleditPy.egg-info/requires.txt +0 -0
  90. {moleditpy-3.0.0 → moleditpy-3.0.0a1}/src/MoleditPy.egg-info/top_level.txt +0 -0
  91. {moleditpy-3.0.0 → moleditpy-3.0.0a1}/src/moleditpy/__main__.py +0 -0
  92. {moleditpy-3.0.0 → moleditpy-3.0.0a1}/src/moleditpy/assets/file_icon.ico +0 -0
  93. {moleditpy-3.0.0 → moleditpy-3.0.0a1}/src/moleditpy/assets/icon.icns +0 -0
  94. {moleditpy-3.0.0 → moleditpy-3.0.0a1}/src/moleditpy/assets/icon.ico +0 -0
  95. {moleditpy-3.0.0 → moleditpy-3.0.0a1}/src/moleditpy/assets/icon.png +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MoleditPy
3
- Version: 3.0.0
3
+ Version: 3.0.0a1
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
@@ -710,10 +710,10 @@ Dynamic: license-file
710
710
  [![Python Versions](https://img.shields.io/pypi/pyversions/MoleditPy.svg)](https://pypi.org/project/MoleditPy/)
711
711
  [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
712
712
  [![Build Status](https://github.com/HiroYokoyama/python_molecular_editor/actions/workflows/tests.yml/badge.svg)](https://github.com/HiroYokoyama/python_molecular_editor/actions)
713
- ![Core Logic Coverage](https://img.shields.io/badge/core_logic_coverage-75%25-green)
714
- ![Overall Coverage](https://img.shields.io/badge/coverage-67%25-green)
713
+ ![Core Logic Coverage](https://img.shields.io/badge/core_logic_coverage-72%25-green)
714
+ ![Overall Coverage](https://img.shields.io/badge/coverage-50%25-orange)
715
715
  ![GUI Status](https://img.shields.io/badge/GUI-Manually_Verified-blue)
716
- ![Pylint Score](https://img.shields.io/badge/pylint-9%2F10-brightgreen)
716
+ ![Pylint Score](https://img.shields.io/badge/pylint-8.64%2F10-brightgreen)
717
717
  [![PyPI Downloads](https://static.pepy.tech/personalized-badge/moleditpy?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads)](https://pepy.tech/projects/moleditpy)
718
718
 
719
719
  [🇯🇵 日本語 (Japanese)](#japanese)
@@ -834,7 +834,6 @@ moleditpy
834
834
  * **GUI and 2D Drawing (PyQt6):** The editor is built on a `QGraphicsScene`, where custom `AtomItem` and `BondItem` objects are interactively manipulated. The Undo/Redo feature is implemented by serializing the application state.
835
835
  * **Chemical Calculations (RDKit / Open Babel):** RDKit is used to generate molecule objects from 2D data, perform 3D coordinate generation, and calculate properties. Open Babel serves as a fallback for 3D conversion. All heavy computations are run on a separate `QThread` to keep the GUI responsive.
836
836
  * **3D Visualization (PyVista / pyvistaqt):** 3D rendering is achieved by generating PyVista meshes (spheres and cylinders) from RDKit conformer coordinates. A custom `vtkInteractorStyle` enables direct drag-and-drop editing of atoms in the 3D view.
837
- * **Modular Architecture:** The codebase is organized into dedicated packages for `core` logic, `ui` components, and `utils`. The main application logic is decomposed into reusable mixins, ensuring long-term maintainability and easier verification.
838
837
 
839
838
  ## License
840
839
 
@@ -6,10 +6,10 @@
6
6
  [![Python Versions](https://img.shields.io/pypi/pyversions/MoleditPy.svg)](https://pypi.org/project/MoleditPy/)
7
7
  [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
8
8
  [![Build Status](https://github.com/HiroYokoyama/python_molecular_editor/actions/workflows/tests.yml/badge.svg)](https://github.com/HiroYokoyama/python_molecular_editor/actions)
9
- ![Core Logic Coverage](https://img.shields.io/badge/core_logic_coverage-75%25-green)
10
- ![Overall Coverage](https://img.shields.io/badge/coverage-67%25-green)
9
+ ![Core Logic Coverage](https://img.shields.io/badge/core_logic_coverage-72%25-green)
10
+ ![Overall Coverage](https://img.shields.io/badge/coverage-50%25-orange)
11
11
  ![GUI Status](https://img.shields.io/badge/GUI-Manually_Verified-blue)
12
- ![Pylint Score](https://img.shields.io/badge/pylint-9%2F10-brightgreen)
12
+ ![Pylint Score](https://img.shields.io/badge/pylint-8.64%2F10-brightgreen)
13
13
  [![PyPI Downloads](https://static.pepy.tech/personalized-badge/moleditpy?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads)](https://pepy.tech/projects/moleditpy)
14
14
 
15
15
  [🇯🇵 日本語 (Japanese)](#japanese)
@@ -130,7 +130,6 @@ moleditpy
130
130
  * **GUI and 2D Drawing (PyQt6):** The editor is built on a `QGraphicsScene`, where custom `AtomItem` and `BondItem` objects are interactively manipulated. The Undo/Redo feature is implemented by serializing the application state.
131
131
  * **Chemical Calculations (RDKit / Open Babel):** RDKit is used to generate molecule objects from 2D data, perform 3D coordinate generation, and calculate properties. Open Babel serves as a fallback for 3D conversion. All heavy computations are run on a separate `QThread` to keep the GUI responsive.
132
132
  * **3D Visualization (PyVista / pyvistaqt):** 3D rendering is achieved by generating PyVista meshes (spheres and cylinders) from RDKit conformer coordinates. A custom `vtkInteractorStyle` enables direct drag-and-drop editing of atoms in the 3D view.
133
- * **Modular Architecture:** The codebase is organized into dedicated packages for `core` logic, `ui` components, and `utils`. The main application logic is decomposed into reusable mixins, ensuring long-term maintainability and easier verification.
134
133
 
135
134
  ## License
136
135
 
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
  [project]
6
6
  name = "MoleditPy"
7
7
 
8
- version = "3.0.0"
8
+ version = "3.0.0a1"
9
9
 
10
10
  license = {file = "LICENSE"}
11
11
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MoleditPy
3
- Version: 3.0.0
3
+ Version: 3.0.0a1
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
@@ -710,10 +710,10 @@ Dynamic: license-file
710
710
  [![Python Versions](https://img.shields.io/pypi/pyversions/MoleditPy.svg)](https://pypi.org/project/MoleditPy/)
711
711
  [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
712
712
  [![Build Status](https://github.com/HiroYokoyama/python_molecular_editor/actions/workflows/tests.yml/badge.svg)](https://github.com/HiroYokoyama/python_molecular_editor/actions)
713
- ![Core Logic Coverage](https://img.shields.io/badge/core_logic_coverage-75%25-green)
714
- ![Overall Coverage](https://img.shields.io/badge/coverage-67%25-green)
713
+ ![Core Logic Coverage](https://img.shields.io/badge/core_logic_coverage-72%25-green)
714
+ ![Overall Coverage](https://img.shields.io/badge/coverage-50%25-orange)
715
715
  ![GUI Status](https://img.shields.io/badge/GUI-Manually_Verified-blue)
716
- ![Pylint Score](https://img.shields.io/badge/pylint-9%2F10-brightgreen)
716
+ ![Pylint Score](https://img.shields.io/badge/pylint-8.64%2F10-brightgreen)
717
717
  [![PyPI Downloads](https://static.pepy.tech/personalized-badge/moleditpy?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads)](https://pepy.tech/projects/moleditpy)
718
718
 
719
719
  [🇯🇵 日本語 (Japanese)](#japanese)
@@ -834,7 +834,6 @@ moleditpy
834
834
  * **GUI and 2D Drawing (PyQt6):** The editor is built on a `QGraphicsScene`, where custom `AtomItem` and `BondItem` objects are interactively manipulated. The Undo/Redo feature is implemented by serializing the application state.
835
835
  * **Chemical Calculations (RDKit / Open Babel):** RDKit is used to generate molecule objects from 2D data, perform 3D coordinate generation, and calculate properties. Open Babel serves as a fallback for 3D conversion. All heavy computations are run on a separate `QThread` to keep the GUI responsive.
836
836
  * **3D Visualization (PyVista / pyvistaqt):** 3D rendering is achieved by generating PyVista meshes (spheres and cylinders) from RDKit conformer coordinates. A custom `vtkInteractorStyle` enables direct drag-and-drop editing of atoms in the 3D view.
837
- * **Modular Architecture:** The codebase is organized into dedicated packages for `core` logic, `ui` components, and `utils`. The main application logic is decomposed into reusable mixins, ensuring long-term maintainability and easier verification.
838
837
 
839
838
  ## License
840
839
 
@@ -0,0 +1,72 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/MoleditPy.egg-info/PKG-INFO
5
+ src/MoleditPy.egg-info/SOURCES.txt
6
+ src/MoleditPy.egg-info/dependency_links.txt
7
+ src/MoleditPy.egg-info/entry_points.txt
8
+ src/MoleditPy.egg-info/requires.txt
9
+ src/MoleditPy.egg-info/top_level.txt
10
+ src/moleditpy/__init__.py
11
+ src/moleditpy/__main__.py
12
+ src/moleditpy/main.py
13
+ src/moleditpy.egg-info/PKG-INFO
14
+ src/moleditpy.egg-info/SOURCES.txt
15
+ src/moleditpy.egg-info/dependency_links.txt
16
+ src/moleditpy.egg-info/entry_points.txt
17
+ src/moleditpy.egg-info/requires.txt
18
+ src/moleditpy.egg-info/top_level.txt
19
+ src/moleditpy/assets/file_icon.ico
20
+ src/moleditpy/assets/icon.icns
21
+ src/moleditpy/assets/icon.ico
22
+ src/moleditpy/assets/icon.png
23
+ src/moleditpy/modules/__init__.py
24
+ src/moleditpy/modules/about_dialog.py
25
+ src/moleditpy/modules/align_plane_dialog.py
26
+ src/moleditpy/modules/alignment_dialog.py
27
+ src/moleditpy/modules/analysis_window.py
28
+ src/moleditpy/modules/angle_dialog.py
29
+ src/moleditpy/modules/atom_item.py
30
+ src/moleditpy/modules/bond_item.py
31
+ src/moleditpy/modules/bond_length_dialog.py
32
+ src/moleditpy/modules/calculation_worker.py
33
+ src/moleditpy/modules/color_settings_dialog.py
34
+ src/moleditpy/modules/constants.py
35
+ src/moleditpy/modules/constrained_optimization_dialog.py
36
+ src/moleditpy/modules/custom_interactor_style.py
37
+ src/moleditpy/modules/custom_qt_interactor.py
38
+ src/moleditpy/modules/dialog_3d_picking_mixin.py
39
+ src/moleditpy/modules/dihedral_dialog.py
40
+ src/moleditpy/modules/main_window.py
41
+ src/moleditpy/modules/main_window_app_state.py
42
+ src/moleditpy/modules/main_window_compute.py
43
+ src/moleditpy/modules/main_window_dialog_manager.py
44
+ src/moleditpy/modules/main_window_edit_3d.py
45
+ src/moleditpy/modules/main_window_edit_actions.py
46
+ src/moleditpy/modules/main_window_export.py
47
+ src/moleditpy/modules/main_window_main_init.py
48
+ src/moleditpy/modules/main_window_molecular_parsers.py
49
+ src/moleditpy/modules/main_window_project_io.py
50
+ src/moleditpy/modules/main_window_string_importers.py
51
+ src/moleditpy/modules/main_window_ui_manager.py
52
+ src/moleditpy/modules/main_window_view_3d.py
53
+ src/moleditpy/modules/main_window_view_loaders.py
54
+ src/moleditpy/modules/mirror_dialog.py
55
+ src/moleditpy/modules/mol_geometry.py
56
+ src/moleditpy/modules/molecular_data.py
57
+ src/moleditpy/modules/molecular_scene_handler.py
58
+ src/moleditpy/modules/molecule_scene.py
59
+ src/moleditpy/modules/move_group_dialog.py
60
+ src/moleditpy/modules/periodic_table_dialog.py
61
+ src/moleditpy/modules/planarize_dialog.py
62
+ src/moleditpy/modules/plugin_interface.py
63
+ src/moleditpy/modules/plugin_manager.py
64
+ src/moleditpy/modules/plugin_manager_window.py
65
+ src/moleditpy/modules/settings_dialog.py
66
+ src/moleditpy/modules/sip_isdeleted_safe.py
67
+ src/moleditpy/modules/system_utils.py
68
+ src/moleditpy/modules/template_preview_item.py
69
+ src/moleditpy/modules/template_preview_view.py
70
+ src/moleditpy/modules/translation_dialog.py
71
+ src/moleditpy/modules/user_template_dialog.py
72
+ src/moleditpy/modules/zoomable_view.py
@@ -9,3 +9,7 @@ License: GPL-3.0 license
9
9
  Repo: https://github.com/HiroYokoyama/python_molecular_editor
10
10
  DOI: 10.5281/zenodo.17268532
11
11
  """
12
+
13
+ """Top-level package for moleditpy.
14
+
15
+ """
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+
4
+ """
5
+ MoleditPy — A Python-based molecular editing software
6
+
7
+ Author: Hiromichi Yokoyama
8
+ License: GPL-3.0 license
9
+ Repo: https://github.com/HiroYokoyama/python_molecular_editor
10
+ DOI: 10.5281/zenodo.17268532
11
+ """
12
+
13
+ import ctypes
14
+ import sys
15
+
16
+ from PyQt6.QtWidgets import QApplication
17
+
18
+ try:
19
+ from .modules.main_window import MainWindow
20
+ except ImportError:
21
+ from modules.main_window import MainWindow
22
+
23
+
24
+ def main():
25
+ # --- Additional handling for Windows taskbar icon ---
26
+ if sys.platform == "win32":
27
+ myappid = "hyoko.moleditpy.1.0" # Application-specific ID (arbitrary)
28
+ ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
29
+
30
+ app = QApplication(sys.argv)
31
+ file_path = sys.argv[1] if len(sys.argv) > 1 else None
32
+ window = MainWindow(initial_file=file_path)
33
+ window.show()
34
+ sys.exit(app.exec())
@@ -1,35 +1,39 @@
1
- #!/usr/bin/env python3
2
- # -*- coding: utf-8 -*-
3
-
4
- """
5
- MoleditPy — A Python-based molecular editing software
6
-
7
- Author: Hiromichi Yokoyama
8
- License: GPL-3.0 license
9
- Repo: https://github.com/HiroYokoyama/python_molecular_editor
10
- DOI: 10.5281/zenodo.17268532
11
- """
12
-
13
- try:
14
- from PyQt6 import sip as _sip # type: ignore
15
-
16
- _sip_isdeleted = getattr(_sip, "isdeleted", None)
17
- except (AttributeError, RuntimeError, TypeError, ImportError):
18
- _sip = None
19
- _sip_isdeleted = None
20
-
21
-
22
- def sip_isdeleted_safe(obj) -> bool:
23
- """Return True if sip reports the given wrapper object as deleted.
24
-
25
- This function is conservative: if SIP isn't available or any error
26
- occurs while checking, it returns False (i.e. not deleted) so that the
27
- caller can continue other lightweight guards (like checking scene()).
28
- """
29
- try:
30
- if _sip_isdeleted is None:
31
- return False
32
- # Ensure we return a boolean value
33
- return bool(_sip_isdeleted(obj))
34
- except (AttributeError, RuntimeError, TypeError):
35
- return False
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+
4
+ """
5
+ MoleditPy — A Python-based molecular editing software
6
+
7
+ Author: Hiromichi Yokoyama
8
+ License: GPL-3.0 license
9
+ Repo: https://github.com/HiroYokoyama/python_molecular_editor
10
+ DOI: 10.5281/zenodo.17268532
11
+ """
12
+
13
+ try:
14
+ import importlib.util
15
+ OBABEL_AVAILABLE = importlib.util.find_spec("openbabel") is not None
16
+ except ImportError:
17
+ OBABEL_AVAILABLE = False
18
+
19
+ try:
20
+ from PyQt6 import sip as _sip # type: ignore
21
+ _sip_isdeleted = getattr(_sip, "isdeleted", None)
22
+ except ImportError:
23
+ _sip = None
24
+ _sip_isdeleted = None
25
+
26
+
27
+ def sip_isdeleted_safe(obj) -> bool:
28
+ """Return True if sip reports the given wrapper object as deleted.
29
+
30
+ This function is conservative: if SIP isn't available or any error
31
+ occurs while checking, it returns False (i.e. not deleted) so that the
32
+ caller can continue other lightweight guards (like checking scene()).
33
+ """
34
+ try:
35
+ if _sip_isdeleted is None:
36
+ return False
37
+ return bool(_sip_isdeleted(obj))
38
+ except (AttributeError, RuntimeError, TypeError):
39
+ return False
@@ -1,116 +1,110 @@
1
- #!/usr/bin/env python3
2
- # -*- coding: utf-8 -*-
3
-
4
- """
5
- MoleditPy — A Python-based molecular editing software
6
-
7
- Author: Hiromichi Yokoyama
8
- License: GPL-3.0 license
9
- Repo: https://github.com/HiroYokoyama/python_molecular_editor
10
- DOI: 10.5281/zenodo.17268532
11
- """
12
-
13
- import logging
14
-
15
- import os
16
-
17
- from PyQt6.QtCore import Qt
18
- from PyQt6.QtGui import QCursor, QPainter, QPen, QPixmap
19
- from PyQt6.QtWidgets import QDialog, QHBoxLayout, QLabel, QPushButton, QVBoxLayout
20
-
21
- try:
22
- from ..utils.constants import VERSION
23
- except ImportError:
24
- from moleditpy.utils.constants import VERSION
25
-
26
-
27
- class AboutDialog(QDialog):
28
- def __init__(self, main_window, parent=None):
29
- super().__init__(parent)
30
- self.main_window = main_window
31
- self.setWindowTitle("About MoleditPy")
32
- self.setFixedSize(250, 300)
33
- self.init_ui()
34
-
35
- def init_ui(self):
36
- layout = QVBoxLayout(self)
37
-
38
- # Create a clickable image label
39
- self.image_label = QLabel()
40
- self.image_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
41
-
42
- # Load the original icon image
43
- icon_path = os.path.join(os.path.dirname(__file__), "..", "assets", "icon.png")
44
- if os.path.exists(icon_path):
45
- original_pixmap = QPixmap(icon_path)
46
- # Scale to 2x size (160x160)
47
- pixmap = original_pixmap.scaled(
48
- 160,
49
- 160,
50
- Qt.AspectRatioMode.KeepAspectRatio,
51
- Qt.TransformationMode.SmoothTransformation,
52
- )
53
- else:
54
- # Fallback: create a simple placeholder if icon.png not found
55
- pixmap = QPixmap(160, 160)
56
- pixmap.fill(Qt.GlobalColor.lightGray)
57
- painter = QPainter(pixmap)
58
- painter.setPen(QPen(Qt.GlobalColor.black, 2))
59
- painter.drawText(pixmap.rect(), Qt.AlignmentFlag.AlignCenter, "MoleditPy")
60
- painter.end()
61
-
62
- self.image_label.setPixmap(pixmap)
63
- try:
64
- self.image_label.setCursor(QCursor(Qt.CursorShape.ArrowCursor))
65
- except (AttributeError, RuntimeError, ValueError, TypeError) as e:
66
- logging.debug(
67
- f"Suppressed exception: {e}"
68
- ) # Suppress cursor setting errors on about image
69
-
70
- self.image_label.mousePressEvent = self.image_mouse_press_event
71
-
72
- layout.addWidget(self.image_label)
73
-
74
- # Add text information
75
- info_text = f"MoleditPy Ver. {VERSION}\nAuthor: Hiromichi Yokoyama\nLicense: GPL-3.0 license"
76
- info_label = QLabel(info_text)
77
- info_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
78
- layout.addWidget(info_label)
79
-
80
- # Add OK button
81
- ok_button = QPushButton("OK")
82
- ok_button.setFixedSize(80, 30) # Fixed small size
83
- ok_button.clicked.connect(self.accept)
84
-
85
- # Center the button
86
- button_layout = QHBoxLayout()
87
- button_layout.addStretch()
88
- button_layout.addWidget(ok_button)
89
- button_layout.addStretch()
90
- layout.addLayout(button_layout)
91
-
92
- def image_clicked(self, event):
93
- """Easter egg: Clear all and load bipyrimidine from SMILES"""
94
- # Clear the current scene
95
- self.main_window.edit_actions_manager.clear_all()
96
-
97
- bipyrimidine_smiles = "C1=CN=C(N=C1)C2=NC=CC=N2"
98
- self.main_window.string_importer_manager.load_from_smiles(bipyrimidine_smiles)
99
-
100
- # Close the dialog
101
- self.accept()
102
-
103
- def image_mouse_press_event(self, event):
104
- """Handle mouse press on the image: trigger easter egg only for right-click."""
105
- try:
106
- if event.button() == Qt.MouseButton.RightButton:
107
- self.image_clicked(event)
108
- else:
109
- event.ignore()
110
- except (AttributeError, RuntimeError, ValueError, TypeError):
111
- try:
112
- event.ignore()
113
- except (AttributeError, RuntimeError, ValueError, TypeError) as e:
114
- logging.debug(
115
- f"Suppressed exception: {e}"
116
- ) # Suppress nested event errors
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+
4
+ """
5
+ MoleditPy — A Python-based molecular editing software
6
+
7
+ Author: Hiromichi Yokoyama
8
+ License: GPL-3.0 license
9
+ Repo: https://github.com/HiroYokoyama/python_molecular_editor
10
+ DOI: 10.5281/zenodo.17268532
11
+ """
12
+
13
+ import os
14
+
15
+ from PyQt6.QtCore import Qt
16
+ from PyQt6.QtGui import QCursor, QPainter, QPen, QPixmap
17
+ from PyQt6.QtWidgets import QDialog, QHBoxLayout, QLabel, QPushButton, QVBoxLayout
18
+
19
+ try:
20
+ from .constants import VERSION
21
+ except ImportError:
22
+ from modules.constants import VERSION
23
+
24
+
25
+ class AboutDialog(QDialog):
26
+ def __init__(self, main_window, parent=None):
27
+ super().__init__(parent)
28
+ self.main_window = main_window
29
+ self.setWindowTitle("About MoleditPy")
30
+ self.setFixedSize(250, 300)
31
+ self.init_ui()
32
+
33
+ def init_ui(self):
34
+ layout = QVBoxLayout(self)
35
+
36
+ # Create a clickable image label
37
+ self.image_label = QLabel()
38
+ self.image_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
39
+
40
+ # Load the original icon image
41
+ icon_path = os.path.join(os.path.dirname(__file__), "..", "assets", "icon.png")
42
+ if os.path.exists(icon_path):
43
+ original_pixmap = QPixmap(icon_path)
44
+ # Scale to 2x size (160x160)
45
+ pixmap = original_pixmap.scaled(
46
+ 160,
47
+ 160,
48
+ Qt.AspectRatioMode.KeepAspectRatio,
49
+ Qt.TransformationMode.SmoothTransformation,
50
+ )
51
+ else:
52
+ # Fallback: create a simple placeholder if icon.png not found
53
+ pixmap = QPixmap(160, 160)
54
+ pixmap.fill(Qt.GlobalColor.lightGray)
55
+ painter = QPainter(pixmap)
56
+ painter.setPen(QPen(Qt.GlobalColor.black, 2))
57
+ painter.drawText(pixmap.rect(), Qt.AlignmentFlag.AlignCenter, "MoleditPy")
58
+ painter.end()
59
+
60
+ self.image_label.setPixmap(pixmap)
61
+ try:
62
+ self.image_label.setCursor(QCursor(Qt.CursorShape.ArrowCursor))
63
+ except (AttributeError, RuntimeError, ValueError, TypeError):
64
+ pass # Suppress cursor setting errors on about image
65
+
66
+ self.image_label.mousePressEvent = self.image_mouse_press_event
67
+
68
+ layout.addWidget(self.image_label)
69
+
70
+ # Add text information
71
+ info_text = f"MoleditPy Ver. {VERSION}\nAuthor: Hiromichi Yokoyama\nLicense: GPL-3.0 license"
72
+ info_label = QLabel(info_text)
73
+ info_label.setAlignment(Qt.AlignmentFlag.AlignCenter)
74
+ layout.addWidget(info_label)
75
+
76
+ # Add OK button
77
+ ok_button = QPushButton("OK")
78
+ ok_button.setFixedSize(80, 30) # Fixed small size
79
+ ok_button.clicked.connect(self.accept)
80
+
81
+ # Center the button
82
+ button_layout = QHBoxLayout()
83
+ button_layout.addStretch()
84
+ button_layout.addWidget(ok_button)
85
+ button_layout.addStretch()
86
+ layout.addLayout(button_layout)
87
+
88
+ def image_clicked(self, event):
89
+ """Easter egg: Clear all and load bipyrimidine from SMILES"""
90
+ # Clear the current scene
91
+ self.main_window.clear_all()
92
+
93
+ bipyrimidine_smiles = "C1=CN=C(N=C1)C2=NC=CC=N2"
94
+ self.main_window.load_from_smiles(bipyrimidine_smiles)
95
+
96
+ # Close the dialog
97
+ self.accept()
98
+
99
+ def image_mouse_press_event(self, event):
100
+ """Handle mouse press on the image: trigger easter egg only for right-click."""
101
+ try:
102
+ if event.button() == Qt.MouseButton.RightButton:
103
+ self.image_clicked(event)
104
+ else:
105
+ event.ignore()
106
+ except (AttributeError, RuntimeError, ValueError, TypeError):
107
+ try:
108
+ event.ignore()
109
+ except (AttributeError, RuntimeError, ValueError, TypeError):
110
+ pass # Suppress nested event errors