moleditpy 1.2.2__tar.gz → 1.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moleditpy
3
- Version: 1.2.2
3
+ Version: 1.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
  Project-URL: Homepage, https://github.com/HiroYokoyama/python_molecular_editor
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
  [project]
6
6
  name = "moleditpy"
7
7
 
8
- version = "1.2.2"
8
+ version = "1.2.3"
9
9
 
10
10
  authors = [
11
11
  { name="HiroYokoyama", email="titech.yoko.hiro@gmail.com" },
@@ -11,7 +11,7 @@ DOI 10.5281/zenodo.17268532
11
11
  """
12
12
 
13
13
  #Version
14
- VERSION = '1.2.2'
14
+ VERSION = '1.2.3'
15
15
 
16
16
  print("-----------------------------------------------------")
17
17
  print("MoleditPy — A Python-based molecular editing software")
@@ -879,7 +879,7 @@ class MoleculeScene(QGraphicsScene):
879
879
  stereo_to_use = self.bond_stereo if self.mode.startswith('bond') else None
880
880
 
881
881
 
882
- if line.length() < 10:
882
+ if is_click:
883
883
  # 短いクリック: 既存原子のシンボル更新 (atomモードのみ)
884
884
  if self.mode.startswith('atom') and self.start_atom.symbol != self.current_atom_symbol:
885
885
  self.start_atom.symbol=self.current_atom_symbol; self.data.atoms[self.start_atom.atom_id]['symbol']=self.current_atom_symbol; self.start_atom.update_style()
@@ -3150,8 +3150,11 @@ class MainWindow(QMainWindow):
3150
3150
  try:
3151
3151
  mol = self.data.to_rdkit_mol()
3152
3152
  if mol:
3153
+ # 水素原子を明示的に追加した分子オブジェクトを生成
3154
+ mol_with_hs = Chem.AddHs(mol)
3153
3155
  mol_formula = rdMolDescriptors.CalcMolFormula(mol)
3154
- num_atoms = mol.GetNumAtoms()
3156
+ # 水素を含む分子オブジェクトから原子数を取得
3157
+ num_atoms = mol_with_hs.GetNumAtoms()
3155
3158
  # 右側のラベルのテキストを更新
3156
3159
  self.formula_label.setText(f"Formula: {mol_formula} | Atoms: {num_atoms}")
3157
3160
  except Exception:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moleditpy
3
- Version: 1.2.2
3
+ Version: 1.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
  Project-URL: Homepage, https://github.com/HiroYokoyama/python_molecular_editor
File without changes
File without changes