MoleditPy-linux 4.4.0__py3-none-any.whl → 4.4.1__py3-none-any.whl

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.
@@ -455,7 +455,8 @@ class ComputeManager:
455
455
  if item:
456
456
  item.has_problem = True
457
457
  item.update()
458
- self.host.init_manager.view_2d.setFocus()
458
+ # Defer so Qt finishes routing the modal result before restoring focus.
459
+ QTimer.singleShot(0, self.host.init_manager.view_2d.setFocus)
459
460
 
460
461
  def _setup_mol_block_for_worker(self, mol: Chem.Mol) -> str:
461
462
  mol_block = self.host.state_manager.data.to_mol_block()
@@ -617,6 +618,9 @@ class ComputeManager:
617
618
  with suppress_log(TypeError, RuntimeError):
618
619
  QMessageBox.critical(self.host, "Calculation Error", msg)
619
620
 
621
+ # Restore 2D editor focus so keyboard shortcuts remain active.
622
+ QTimer.singleShot(0, self.host.init_manager.view_2d.setFocus)
623
+
620
624
  def create_atom_id_mapping(self) -> None:
621
625
  """Map 2D atom IDs to 3D RDKit indices."""
622
626
  if not self.host.view_3d_manager.current_mol:
@@ -426,11 +426,12 @@ class TemplateMixin:
426
426
  else:
427
427
  angle_step = 2 * math.pi / n
428
428
  start_angle = -math.pi / 2 if n % 2 != 0 else -math.pi / 2 - angle_step / 2
429
+ circumradius = bond_len / (2 * math.sin(math.pi / n))
429
430
  points = [
430
431
  pos
431
432
  + QPointF(
432
- bond_len * math.cos(start_angle + i * angle_step),
433
- bond_len * math.sin(start_angle + i * angle_step),
433
+ circumradius * math.cos(start_angle + i * angle_step),
434
+ circumradius * math.sin(start_angle + i * angle_step),
434
435
  )
435
436
  for i in range(n)
436
437
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: MoleditPy-linux
3
- Version: 4.4.0
3
+ Version: 4.4.1
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
@@ -757,7 +757,7 @@ This application combines a modern GUI built with **PyQt6**, powerful cheminform
757
757
  * **Mirror:** Create a mirror image of the molecule across a selected plane (XY, XZ, or YZ).
758
758
  * **Set Bond Length, Angle, & Dihedral Angle:** Set precise numerical values for distances, angles, and torsional angles.
759
759
  * **Constrained Optimization:** Perform force field optimization (MMFF/UFF) while applying fixed constraints to specific distances, angles, or dihedral angles.
760
- * **3D Measurement Tools:** A dedicated "Measure" mode allows you to click on atoms in the 3D view to instantly measure and display:
760
+ * **3D Measurement Tools:** The "Select" mode allows you to click on atoms in the 3D view to instantly measure and display:
761
761
  * **Distance** (between 2 atoms)
762
762
  * **Angle** (between 3 atoms)
763
763
  * **Dihedral Angle** (between 4 atoms)
@@ -893,7 +893,7 @@ Additionally, please cite the plugins you used.
893
893
  * **鏡像作成:** 選択した平面 (XY, XZ, YZ) に対して分子の鏡像を作成します。
894
894
  * **結合長・角度・二面角:** 原子を選択し、目標値を入力することで、距離、角度、ねじれ角を正確に設定します。
895
895
  * **制約付き最適化:** 特定の距離、角度、二面角を固定したまま、力場計算 (MMFF/UFF) による構造最適化を実行します。
896
- * **3D測定ツール:** 専用の「Measure」モードで3Dビュー内の原子をクリックするだけで、以下の値を即座に測定・表示します。
896
+ * **3D測定ツール:** 「Select」モードで3Dビュー内の原子をクリックするだけで、以下の値を即座に測定・表示します。
897
897
  * **距離** (2原子間)
898
898
  * **角度** (3原子間)
899
899
  * **二面角** (4原子間)
@@ -26,7 +26,7 @@ moleditpy_linux/ui/bond_item.py,sha256=rVjORuGLp_Cxhmw7ARTE83QM614VSIDA5LVcIYpWW
26
26
  moleditpy_linux/ui/bond_length_dialog.py,sha256=lss8J2g_pUK-BCbqWk25JMFsn-g8SxBjiBp8mZrn57I,15930
27
27
  moleditpy_linux/ui/calculation_worker.py,sha256=bwrzCW5935Twe5EY7Mtd35YQaWJILvBPwzPIQgmqz98,41849
28
28
  moleditpy_linux/ui/color_settings_dialog.py,sha256=RFp8h0R1yC8YwqOxc972Da9xO95Gu-0qywAAEeXMj4E,14224
29
- moleditpy_linux/ui/compute_logic.py,sha256=DIPmqzlQv-g-MK8EllAD_soG0tk8PMoW5oxEl-uvsJA,31216
29
+ moleditpy_linux/ui/compute_logic.py,sha256=OBEJvw4atAaEXIv4eueoilIjTF1sxvJQGQB4ABOthYA,31462
30
30
  moleditpy_linux/ui/constrained_optimization_dialog.py,sha256=rc3YK6DOJdIbhriwsM2jOAW9j_-3PvFz1XtFHpGw4E4,36346
31
31
  moleditpy_linux/ui/custom_interactor_style.py,sha256=0bN4UiSH6YVSx4mYSnY0tW8KyDnBAtxrGKd_P5NajB8,49226
32
32
  moleditpy_linux/ui/custom_qt_interactor.py,sha256=76L0Jpbg09VXzHOzJs9kG260Vs9qcwbt8Chn0iOopDg,2820
@@ -41,7 +41,7 @@ moleditpy_linux/ui/io_logic.py,sha256=X-xxKU2Eo4QkGqdinC7DdWXUWJKVr_8z-gKBquNHoS
41
41
  moleditpy_linux/ui/main_window.py,sha256=qVSN2XclGCBsRCRtC10xBUn5VdzPer0rzMPHOuYw2ZU,12553
42
42
  moleditpy_linux/ui/main_window_init.py,sha256=94_Sf_E5ZTtkyQvSIURWXbuXxabg46L0AxOMsVPKHf8,77244
43
43
  moleditpy_linux/ui/mirror_dialog.py,sha256=Tsc2O9Ktjz0zzJWB_YkVgkqgDhytQ7ksN_PwpcY9vJI,5169
44
- moleditpy_linux/ui/molecular_scene_handler.py,sha256=Y53CceA2cbtPdY-n7mcnYsfRl2MgQT55R9xCMQ4m18o,70035
44
+ moleditpy_linux/ui/molecular_scene_handler.py,sha256=p_OhYC965qden-aFQVifNTcMMi_Ikx8TzCwH9XgWR3A,70110
45
45
  moleditpy_linux/ui/molecule_scene.py,sha256=ZUZBaCyWaNEAITHI4JmJ__gQcI9kgttj8qBP6dgF6LU,44090
46
46
  moleditpy_linux/ui/move_group_dialog.py,sha256=3jfj8zmKrYs0N9537o3g0V3f0UOnr0pj8uNT0qvUlPM,27063
47
47
  moleditpy_linux/ui/move_selected_atoms_dialog.py,sha256=7_Krz69LDx71_pBr9_bP55UhT97SJZU-W6OEN59waDg,29889
@@ -68,9 +68,9 @@ moleditpy_linux/utils/default_settings.py,sha256=K3wzi3cj4WAoyO_2xD8_XCNkzZpcrZY
68
68
  moleditpy_linux/utils/sip_isdeleted_safe.py,sha256=aXoW_PDHAsu0SkqcvkUZAsWDhl9Ka8-VnzgNE5ub41Y,1215
69
69
  moleditpy_linux/utils/suppress_log.py,sha256=EFkN79q6QfYXAuii8g1fBuvFJrnVsio3aFTKMvAmXW4,928
70
70
  moleditpy_linux/utils/system_utils.py,sha256=j1RAiiKXg3N-rjpTh7yxKVAYED_kUJy4aVrY-9Hh0Mc,2674
71
- moleditpy_linux-4.4.0.dist-info/licenses/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
72
- moleditpy_linux-4.4.0.dist-info/METADATA,sha256=3I2NYHgnJWlatph8yVgbcdCItjm6Pl4nOUCM0W3iV8M,65372
73
- moleditpy_linux-4.4.0.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
74
- moleditpy_linux-4.4.0.dist-info/entry_points.txt,sha256=-OzipSi__yVwlimNtu3eiRP5t5UMg55Cs0udyhXYiyw,60
75
- moleditpy_linux-4.4.0.dist-info/top_level.txt,sha256=qyqe-hDYL6CXyin9E5Me5rVl3PG84VqiOjf9bQvfJLs,16
76
- moleditpy_linux-4.4.0.dist-info/RECORD,,
71
+ moleditpy_linux-4.4.1.dist-info/licenses/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
72
+ moleditpy_linux-4.4.1.dist-info/METADATA,sha256=dfwO08W-auR4Wb7PGGQ1s7yaNNA8WI_LqPN-wIoqaoc,65353
73
+ moleditpy_linux-4.4.1.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
74
+ moleditpy_linux-4.4.1.dist-info/entry_points.txt,sha256=-OzipSi__yVwlimNtu3eiRP5t5UMg55Cs0udyhXYiyw,60
75
+ moleditpy_linux-4.4.1.dist-info/top_level.txt,sha256=qyqe-hDYL6CXyin9E5Me5rVl3PG84VqiOjf9bQvfJLs,16
76
+ moleditpy_linux-4.4.1.dist-info/RECORD,,