MoleditPy-linux 2.8.0__tar.gz → 2.8.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.
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/PKG-INFO +3 -3
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/README.md +2 -2
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/pyproject.toml +1 -1
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/MoleditPy_linux.egg-info/PKG-INFO +3 -3
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/angle_dialog.py +27 -21
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/bond_length_dialog.py +9 -11
- moleditpy_linux-2.8.2/src/moleditpy_linux/modules/calculation_worker.py +1320 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/constants.py +1 -1
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/dihedral_dialog.py +3 -6
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/main_window_compute.py +9 -2
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/main_window_edit_3d.py +8 -19
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/main_window_main_init.py +1 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/mol_geometry.py +50 -0
- moleditpy_linux-2.8.0/src/moleditpy_linux/modules/calculation_worker.py +0 -1313
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/LICENSE +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/setup.cfg +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/MoleditPy_linux.egg-info/SOURCES.txt +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/MoleditPy_linux.egg-info/dependency_links.txt +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/MoleditPy_linux.egg-info/entry_points.txt +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/MoleditPy_linux.egg-info/requires.txt +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/MoleditPy_linux.egg-info/top_level.txt +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/__init__.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/__main__.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/assets/file_icon.ico +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/assets/icon.icns +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/assets/icon.ico +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/assets/icon.png +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/main.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/__init__.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/about_dialog.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/align_plane_dialog.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/alignment_dialog.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/analysis_window.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/atom_item.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/bond_item.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/color_settings_dialog.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/constrained_optimization_dialog.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/custom_interactor_style.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/custom_qt_interactor.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/dialog3_d_picking_mixin.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/main_window.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/main_window_app_state.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/main_window_dialog_manager.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/main_window_edit_actions.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/main_window_export.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/main_window_molecular_parsers.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/main_window_project_io.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/main_window_string_importers.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/main_window_ui_manager.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/main_window_view_3d.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/main_window_view_loaders.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/mirror_dialog.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/molecular_data.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/molecule_scene.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/move_group_dialog.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/periodic_table_dialog.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/planarize_dialog.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/plugin_interface.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/plugin_manager.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/plugin_manager_window.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/settings_dialog.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/sip_isdeleted_safe.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/template_preview_item.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/template_preview_view.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/translation_dialog.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/user_template_dialog.py +0 -0
- {moleditpy_linux-2.8.0 → moleditpy_linux-2.8.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.8.
|
|
3
|
+
Version: 2.8.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
|
|
@@ -711,10 +711,10 @@ This is the Linux version of MoleditPy. The Open Babel fallback is disabled due
|
|
|
711
711
|
[](https://pypi.org/project/MoleditPy/)
|
|
712
712
|
[](https://www.gnu.org/licenses/gpl-3.0)
|
|
713
713
|
[](https://github.com/HiroYokoyama/python_molecular_editor/actions)
|
|
714
|
-

|
|
715
715
|

|
|
716
716
|

|
|
717
|
-

|
|
718
718
|
[](https://pepy.tech/projects/moleditpy)
|
|
719
719
|
|
|
720
720
|
[🇯🇵 日本語 (Japanese)](#japanese)
|
|
@@ -8,10 +8,10 @@ This is the Linux version of MoleditPy. The Open Babel fallback is disabled due
|
|
|
8
8
|
[](https://pypi.org/project/MoleditPy/)
|
|
9
9
|
[](https://www.gnu.org/licenses/gpl-3.0)
|
|
10
10
|
[](https://github.com/HiroYokoyama/python_molecular_editor/actions)
|
|
11
|
-

|
|
12
12
|

|
|
13
13
|

|
|
14
|
-

|
|
15
15
|
[](https://pepy.tech/projects/moleditpy)
|
|
16
16
|
|
|
17
17
|
[🇯🇵 日本語 (Japanese)](#japanese)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: MoleditPy-linux
|
|
3
|
-
Version: 2.8.
|
|
3
|
+
Version: 2.8.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
|
|
@@ -711,10 +711,10 @@ This is the Linux version of MoleditPy. The Open Babel fallback is disabled due
|
|
|
711
711
|
[](https://pypi.org/project/MoleditPy/)
|
|
712
712
|
[](https://www.gnu.org/licenses/gpl-3.0)
|
|
713
713
|
[](https://github.com/HiroYokoyama/python_molecular_editor/actions)
|
|
714
|
-

|
|
715
715
|

|
|
716
716
|

|
|
717
|
-

|
|
718
718
|
[](https://pepy.tech/projects/moleditpy)
|
|
719
719
|
|
|
720
720
|
[🇯🇵 日本語 (Japanese)](#japanese)
|
|
@@ -24,10 +24,10 @@ from PyQt6.QtWidgets import (
|
|
|
24
24
|
|
|
25
25
|
try:
|
|
26
26
|
from .dialog3_d_picking_mixin import Dialog3DPickingMixin
|
|
27
|
-
from .mol_geometry import adjust_bond_angle, get_connected_group, rodrigues_rotate
|
|
27
|
+
from .mol_geometry import adjust_bond_angle, calc_angle_deg, get_connected_group, rodrigues_rotate
|
|
28
28
|
except Exception:
|
|
29
29
|
from modules.dialog3_d_picking_mixin import Dialog3DPickingMixin
|
|
30
|
-
from modules.mol_geometry import adjust_bond_angle, get_connected_group, rodrigues_rotate
|
|
30
|
+
from modules.mol_geometry import adjust_bond_angle, calc_angle_deg, get_connected_group, rodrigues_rotate
|
|
31
31
|
|
|
32
32
|
import numpy as np
|
|
33
33
|
from PyQt6.QtCore import Qt
|
|
@@ -152,11 +152,15 @@ class AngleDialog(Dialog3DPickingMixin, QDialog): # pragma: no cover
|
|
|
152
152
|
self.atom2_idx = atom_idx
|
|
153
153
|
elif self.atom3_idx is None:
|
|
154
154
|
self.atom3_idx = atom_idx
|
|
155
|
+
# Take a fresh snapshot immediately upon completing the triad selection
|
|
156
|
+
# This locks in the "original" initial geometry the user started modifying from
|
|
157
|
+
self._snapshot_positions = self.mol.GetConformer().GetPositions().copy()
|
|
155
158
|
else:
|
|
156
159
|
# Reset and start over
|
|
157
160
|
self.atom1_idx = atom_idx
|
|
158
161
|
self.atom2_idx = None
|
|
159
162
|
self.atom3_idx = None
|
|
163
|
+
self._snapshot_positions = None
|
|
160
164
|
|
|
161
165
|
# 原子ラベルを表示
|
|
162
166
|
self.show_atom_labels()
|
|
@@ -177,12 +181,6 @@ class AngleDialog(Dialog3DPickingMixin, QDialog): # pragma: no cover
|
|
|
177
181
|
self.disable_picking()
|
|
178
182
|
super().closeEvent(event)
|
|
179
183
|
|
|
180
|
-
def reject(self):
|
|
181
|
-
"""キャンセル時の処理"""
|
|
182
|
-
self.clear_atom_labels()
|
|
183
|
-
self.disable_picking()
|
|
184
|
-
super().reject()
|
|
185
|
-
|
|
186
184
|
def accept(self):
|
|
187
185
|
"""OK時の処理"""
|
|
188
186
|
self.clear_atom_labels()
|
|
@@ -194,6 +192,7 @@ class AngleDialog(Dialog3DPickingMixin, QDialog): # pragma: no cover
|
|
|
194
192
|
self.atom1_idx = None
|
|
195
193
|
self.atom2_idx = None # vertex atom
|
|
196
194
|
self.atom3_idx = None
|
|
195
|
+
self._snapshot_positions = None
|
|
197
196
|
self.clear_selection_labels()
|
|
198
197
|
self.update_display()
|
|
199
198
|
|
|
@@ -215,6 +214,7 @@ class AngleDialog(Dialog3DPickingMixin, QDialog): # pragma: no cover
|
|
|
215
214
|
self.selection_label.setText("No atoms selected")
|
|
216
215
|
self.angle_label.setText("")
|
|
217
216
|
self.apply_button.setEnabled(False)
|
|
217
|
+
self._snapshot_positions = None
|
|
218
218
|
# Clear angle input when no selection
|
|
219
219
|
try:
|
|
220
220
|
self.angle_input.blockSignals(True)
|
|
@@ -235,6 +235,7 @@ class AngleDialog(Dialog3DPickingMixin, QDialog): # pragma: no cover
|
|
|
235
235
|
)
|
|
236
236
|
self.angle_label.setText("")
|
|
237
237
|
self.apply_button.setEnabled(False)
|
|
238
|
+
self._snapshot_positions = None
|
|
238
239
|
# ラベル追加
|
|
239
240
|
self.add_selection_label(self.atom1_idx, "1")
|
|
240
241
|
# Clear angle input while selection is incomplete
|
|
@@ -258,6 +259,7 @@ class AngleDialog(Dialog3DPickingMixin, QDialog): # pragma: no cover
|
|
|
258
259
|
)
|
|
259
260
|
self.angle_label.setText("")
|
|
260
261
|
self.apply_button.setEnabled(False)
|
|
262
|
+
self._snapshot_positions = None
|
|
261
263
|
# ラベル追加
|
|
262
264
|
self.add_selection_label(self.atom1_idx, "1")
|
|
263
265
|
self.add_selection_label(self.atom2_idx, "2(vertex)")
|
|
@@ -308,17 +310,10 @@ class AngleDialog(Dialog3DPickingMixin, QDialog): # pragma: no cover
|
|
|
308
310
|
def calculate_angle(self):
|
|
309
311
|
"""現在の角度を計算"""
|
|
310
312
|
conf = self.mol.GetConformer()
|
|
311
|
-
pos1 =
|
|
312
|
-
pos2 =
|
|
313
|
-
pos3 =
|
|
314
|
-
|
|
315
|
-
vec1 = pos1 - pos2
|
|
316
|
-
vec2 = pos3 - pos2
|
|
317
|
-
|
|
318
|
-
cos_angle = np.dot(vec1, vec2) / (np.linalg.norm(vec1) * np.linalg.norm(vec2))
|
|
319
|
-
cos_angle = np.clip(cos_angle, -1.0, 1.0)
|
|
320
|
-
angle_rad = np.arccos(cos_angle)
|
|
321
|
-
return np.degrees(angle_rad)
|
|
313
|
+
pos1 = conf.GetAtomPosition(self.atom1_idx)
|
|
314
|
+
pos2 = conf.GetAtomPosition(self.atom2_idx) # vertex
|
|
315
|
+
pos3 = conf.GetAtomPosition(self.atom3_idx)
|
|
316
|
+
return calc_angle_deg(pos1, pos2, pos3)
|
|
322
317
|
|
|
323
318
|
def on_angle_input_changed(self, text):
|
|
324
319
|
"""Line edit text changed, update slider."""
|
|
@@ -340,7 +335,9 @@ class AngleDialog(Dialog3DPickingMixin, QDialog): # pragma: no cover
|
|
|
340
335
|
self._slider_dragging = True
|
|
341
336
|
self.main_window.push_undo_state()
|
|
342
337
|
# Snapshot positions so the rotation axis stays stable during drag
|
|
343
|
-
|
|
338
|
+
# Only take snapshot if one doesn't exist to preserve directional info
|
|
339
|
+
if getattr(self, '_snapshot_positions', None) is None:
|
|
340
|
+
self._snapshot_positions = self.mol.GetConformer().GetPositions().copy()
|
|
344
341
|
|
|
345
342
|
def on_slider_moved(self, value):
|
|
346
343
|
"""Update geometry in real-time while dragging."""
|
|
@@ -356,7 +353,8 @@ class AngleDialog(Dialog3DPickingMixin, QDialog): # pragma: no cover
|
|
|
356
353
|
def on_slider_released(self):
|
|
357
354
|
"""Finalize slider dragging."""
|
|
358
355
|
self._slider_dragging = False
|
|
359
|
-
|
|
356
|
+
# Do NOT clear snapshot here. Keep it to preserve the turning direction
|
|
357
|
+
# even if they approach ±180°. It gets cleared when selection is changed.
|
|
360
358
|
self.main_window.draw_molecule_3d(self.mol)
|
|
361
359
|
self.main_window.update_chiral_labels()
|
|
362
360
|
|
|
@@ -367,6 +365,11 @@ class AngleDialog(Dialog3DPickingMixin, QDialog): # pragma: no cover
|
|
|
367
365
|
if self.atom1_idx is None or self.atom2_idx is None or self.atom3_idx is None:
|
|
368
366
|
return
|
|
369
367
|
self.main_window.push_undo_state()
|
|
368
|
+
|
|
369
|
+
# Ensure we have a snapshot for click-to-position as well to maintain direction
|
|
370
|
+
if getattr(self, '_snapshot_positions', None) is None:
|
|
371
|
+
self._snapshot_positions = self.mol.GetConformer().GetPositions().copy()
|
|
372
|
+
|
|
370
373
|
self.angle_input.blockSignals(True)
|
|
371
374
|
self.angle_input.setText(f"{value}")
|
|
372
375
|
self.angle_input.blockSignals(False)
|
|
@@ -468,6 +471,9 @@ class AngleDialog(Dialog3DPickingMixin, QDialog): # pragma: no cover
|
|
|
468
471
|
self.main_window.draw_molecule_3d(self.mol)
|
|
469
472
|
|
|
470
473
|
def reject(self):
|
|
474
|
+
"""キャンセル時の処理"""
|
|
475
|
+
self.clear_atom_labels()
|
|
476
|
+
self.disable_picking()
|
|
471
477
|
super().reject()
|
|
472
478
|
try:
|
|
473
479
|
if self.main_window.current_mol:
|
{moleditpy_linux-2.8.0 → moleditpy_linux-2.8.2}/src/moleditpy_linux/modules/bond_length_dialog.py
RENAMED
|
@@ -26,7 +26,7 @@ from PyQt6.QtWidgets import (
|
|
|
26
26
|
)
|
|
27
27
|
|
|
28
28
|
from .dialog3_d_picking_mixin import Dialog3DPickingMixin
|
|
29
|
-
from .mol_geometry import get_connected_group
|
|
29
|
+
from .mol_geometry import calc_distance, get_connected_group
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class BondLengthDialog(Dialog3DPickingMixin, QDialog): # pragma: no cover
|
|
@@ -168,12 +168,6 @@ class BondLengthDialog(Dialog3DPickingMixin, QDialog): # pragma: no cover
|
|
|
168
168
|
self.disable_picking()
|
|
169
169
|
super().closeEvent(event)
|
|
170
170
|
|
|
171
|
-
def reject(self):
|
|
172
|
-
"""キャンセル時の処理"""
|
|
173
|
-
self.clear_atom_labels()
|
|
174
|
-
self.disable_picking()
|
|
175
|
-
super().reject()
|
|
176
|
-
|
|
177
171
|
def accept(self):
|
|
178
172
|
"""OK時の処理"""
|
|
179
173
|
self.clear_atom_labels()
|
|
@@ -248,9 +242,10 @@ class BondLengthDialog(Dialog3DPickingMixin, QDialog): # pragma: no cover
|
|
|
248
242
|
|
|
249
243
|
# Calculate current distance
|
|
250
244
|
conf = self.mol.GetConformer()
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
245
|
+
current_distance = calc_distance(
|
|
246
|
+
conf.GetAtomPosition(self.atom1_idx),
|
|
247
|
+
conf.GetAtomPosition(self.atom2_idx),
|
|
248
|
+
)
|
|
254
249
|
self.distance_label.setText(f"Current distance: {current_distance:.3f} Å")
|
|
255
250
|
self.apply_button.setEnabled(True)
|
|
256
251
|
# Update the distance input box to show current distance
|
|
@@ -355,7 +350,7 @@ class BondLengthDialog(Dialog3DPickingMixin, QDialog): # pragma: no cover
|
|
|
355
350
|
|
|
356
351
|
# Direction vector from atom1 to atom2
|
|
357
352
|
direction = pos2 - pos1
|
|
358
|
-
current_distance =
|
|
353
|
+
current_distance = calc_distance(pos1, pos2)
|
|
359
354
|
|
|
360
355
|
if current_distance == 0:
|
|
361
356
|
return
|
|
@@ -420,6 +415,9 @@ class BondLengthDialog(Dialog3DPickingMixin, QDialog): # pragma: no cover
|
|
|
420
415
|
self.main_window.draw_molecule_3d(self.mol)
|
|
421
416
|
|
|
422
417
|
def reject(self):
|
|
418
|
+
"""キャンセル時の処理"""
|
|
419
|
+
self.clear_atom_labels()
|
|
420
|
+
self.disable_picking()
|
|
423
421
|
super().reject()
|
|
424
422
|
try:
|
|
425
423
|
if self.main_window.current_mol:
|