helmkit 0.7.2__tar.gz → 0.7.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: helmkit
3
- Version: 0.7.2
3
+ Version: 0.7.3
4
4
  Summary: Parse HELM strings into RDKit molecules
5
5
  License-File: LICENSE
6
6
  Requires-Python: >=3.11
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "helmkit"
3
- version = "0.7.2"
3
+ version = "0.7.3"
4
4
  description = "Parse HELM strings into RDKit molecules"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -89,7 +89,6 @@ class MonomerData(TypedDict):
89
89
  m_RgroupIdx: list[int | None]
90
90
  m_attachmentPointIdx: list[int | None]
91
91
  m_type: str
92
- m_subtype: str
93
92
  m_abbr: str
94
93
 
95
94
 
@@ -123,14 +122,17 @@ def load_monomer_library(library_path: str | None = None) -> MonomerLibrary:
123
122
  rgroup_idx = parse_comma_separated_property(mol, "m_RgroupIdx", int)
124
123
  attachment_point_idx = infer_attachment_points(mol, rgroup_idx)
125
124
 
125
+ abbr = get_molecule_property(mol, "m_abbr", "")
126
+ if not abbr:
127
+ continue
128
+
126
129
  monomers_dict[m_type][symbol] = {
127
130
  "m_romol": mol,
128
131
  "m_Rgroups": rgroups,
129
132
  "m_RgroupIdx": rgroup_idx,
130
133
  "m_attachmentPointIdx": attachment_point_idx,
131
134
  "m_type": m_type,
132
- "m_subtype": get_molecule_property(mol, "m_subtype", ""),
133
- "m_abbr": get_molecule_property(mol, "m_abbr", ""),
135
+ "m_abbr": abbr,
134
136
  }
135
137
 
136
138
  return monomers_dict
@@ -224,12 +226,9 @@ def _create_missing_monomer(monomer_name: str, m_type: str = "aa") -> MonomerDat
224
226
  rgroup_idx_full[1] = new_idx
225
227
  attachment_points[1] = attachment_id
226
228
 
227
- mol.SetProp("m_name", monomer_name)
228
-
229
229
  mol.SetProp("symbol", monomer_name)
230
230
  mol.SetProp("m_abbr", monomer_name)
231
231
  mol.SetProp("m_type", m_type)
232
- mol.SetProp("m_subtype", "non-natural" if m_type == "aa" else "")
233
232
  mol.SetProp("m_RgroupIdx", ",".join(map(str, rgroup_idx_full)))
234
233
  mol.SetProp("m_Rgroups", ",".join(map(str, rgroup_vals)))
235
234
  mol.SetProp("m_attachmentPointIdx", ",".join(map(str, attachment_points)))
@@ -241,7 +240,6 @@ def _create_missing_monomer(monomer_name: str, m_type: str = "aa") -> MonomerDat
241
240
  "m_RgroupIdx": rgroup_idx_full,
242
241
  "m_attachmentPointIdx": attachment_points,
243
242
  "m_type": m_type,
244
- "m_subtype": "non-natural" if m_type == "aa" else "",
245
243
  "m_abbr": monomer_name,
246
244
  }
247
245
 
@@ -385,15 +383,11 @@ class Molecule:
385
383
  return None
386
384
 
387
385
  return {
388
- "m_name": monomer_name,
389
- "m_chainID": chain_id,
390
- "m_resID": residue_idx,
391
386
  "m_romol": monomer_info["m_romol"],
392
387
  "m_Rgroups": monomer_info["m_Rgroups"][:],
393
388
  "m_RgroupIdx": monomer_info["m_RgroupIdx"],
394
389
  "m_attachmentPointIdx": monomer_info["m_attachmentPointIdx"],
395
390
  "m_type": monomer_info["m_type"],
396
- "m_subtype": monomer_info["m_subtype"],
397
391
  "m_abbr": monomer_info["m_abbr"],
398
392
  }
399
393
 
@@ -464,12 +458,12 @@ class Molecule:
464
458
  attachment_point1 = monomer1["m_attachmentPointIdx"][1]
465
459
  if attachment_point1 is None:
466
460
  raise ValueError(
467
- f"R-group 2 is not present in monomer {monomer_idx} ({monomer1['m_name']}). Check monomers."
461
+ f"R-group 2 is not present in monomer {monomer_idx} ({monomer1['m_abbr']}). Check monomers."
468
462
  )
469
463
  attachment_point2 = monomer2["m_attachmentPointIdx"][0]
470
464
  if attachment_point2 is None:
471
465
  raise ValueError(
472
- f"R-group 1 is not present in monomer {monomer_idx + 1} ({monomer2['m_name']}). Check monomers."
466
+ f"R-group 1 is not present in monomer {monomer_idx + 1} ({monomer2['m_abbr']}). Check monomers."
473
467
  )
474
468
 
475
469
  self.bondlist.append([
@@ -518,12 +512,12 @@ class Molecule:
518
512
  attachment_point1 = None
519
513
  if attachment_point1 is None:
520
514
  raise ValueError(
521
- f"R-group {r_index + 1} is not present in monomer {prev_monomer} ({monomer1['m_name']}). Check monomers."
515
+ f"R-group {r_index + 1} is not present in monomer {prev_monomer} ({monomer1['m_abbr']}). Check monomers."
522
516
  )
523
517
  attachment_point2 = monomer2["m_attachmentPointIdx"][0]
524
518
  if attachment_point2 is None:
525
519
  raise ValueError(
526
- f"R-group 1 is not present in monomer {monomer_idx} ({monomer2['m_name']}). Check monomers."
520
+ f"R-group 1 is not present in monomer {monomer_idx} ({monomer2['m_abbr']}). Check monomers."
527
521
  )
528
522
 
529
523
  self.bondlist.append([
@@ -609,12 +603,12 @@ class Molecule:
609
603
  attachment_idx1 = monomer1["m_attachmentPointIdx"][rgroup1]
610
604
  if attachment_idx1 is None:
611
605
  raise ValueError(
612
- f"R-group {rgroup1} is not present in monomer {monomer_idx1 + 1} ({monomer1['m_name']}). Check connections."
606
+ f"R-group {rgroup1} is not present in monomer {monomer_idx1 + 1} ({monomer1['m_abbr']}). Check connections."
613
607
  )
614
608
  attachment_idx2 = monomer2["m_attachmentPointIdx"][rgroup2]
615
609
  if attachment_idx2 is None:
616
610
  raise ValueError(
617
- f"R-group {rgroup2} is not present in monomer {monomer_idx2 + 1} ({monomer2['m_name']}). Check connections."
611
+ f"R-group {rgroup2} is not present in monomer {monomer_idx2 + 1} ({monomer2['m_abbr']}). Check connections."
618
612
  )
619
613
 
620
614
  self.bondlist.append([
@@ -165,7 +165,7 @@ wheels = [
165
165
 
166
166
  [[package]]
167
167
  name = "helmkit"
168
- version = "0.7.2"
168
+ version = "0.7.3"
169
169
  source = { editable = "." }
170
170
  dependencies = [
171
171
  { name = "rdkit" },
@@ -553,30 +553,30 @@ wheels = [
553
553
 
554
554
  [[package]]
555
555
  name = "polars"
556
- version = "1.43.0"
556
+ version = "1.43.1"
557
557
  source = { registry = "https://pypi.org/simple" }
558
558
  dependencies = [
559
559
  { name = "polars-runtime-32" },
560
560
  ]
561
- sdist = { url = "https://files.pythonhosted.org/packages/66/5b/5d0f0aa53c6e9a8ecbc99ff502edcf9584e5d08ab34ea407c086999103d5/polars-1.43.0.tar.gz", hash = "sha256:bb2c67553e4968c18dfe268a88ff9a5790d5c2e0b7ea7efe97640b9a90438c88", size = 749537, upload-time = "2026-07-21T04:30:25.966Z" }
561
+ sdist = { url = "https://files.pythonhosted.org/packages/32/79/720f4901230992f359653717e7cc3596731ed36e1a27be351d128ee0c3b7/polars-1.43.1.tar.gz", hash = "sha256:cb07ff3ad61c7b28043e6176e5fdb04a294346920b7f033deeb84116b4911883", size = 750058, upload-time = "2026-07-27T12:07:58.288Z" }
562
562
  wheels = [
563
- { url = "https://files.pythonhosted.org/packages/76/28/a8eac2c1d1b2d2a4ba2eb745921616d863185d94b1afd91cbb07af9ef21a/polars-1.43.0-py3-none-any.whl", hash = "sha256:c49078b14e2d6b8ff5cc5b78b6d9638603ea5dffafb889d9204818822f55b813", size = 846493, upload-time = "2026-07-21T04:29:06.68Z" },
563
+ { url = "https://files.pythonhosted.org/packages/f3/7c/d74a56d5afae8e91924aad91cba621b286a05307e88569ecab666b3055b3/polars-1.43.1-py3-none-any.whl", hash = "sha256:f6ecd9184956f46442ddfcf6185423401475bbeffea59e238de8b9ecedacf16c", size = 846844, upload-time = "2026-07-27T12:06:33.913Z" },
564
564
  ]
565
565
 
566
566
  [[package]]
567
567
  name = "polars-runtime-32"
568
- version = "1.43.0"
568
+ version = "1.43.1"
569
569
  source = { registry = "https://pypi.org/simple" }
570
- sdist = { url = "https://files.pythonhosted.org/packages/86/96/7e714cad082e9e6aaebb8886fcb1b0220d5c35149d4c8d3466bd7e7d581e/polars_runtime_32-1.43.0.tar.gz", hash = "sha256:5fb47a3a883402e62eab2fde5922f78c531d037aeece3640c15225f39228621e", size = 3090044, upload-time = "2026-07-21T04:30:27.185Z" }
570
+ sdist = { url = "https://files.pythonhosted.org/packages/60/44/390c9e9eef393991d907b7067264ddaa685b550a5bab94991765459a5e64/polars_runtime_32-1.43.1.tar.gz", hash = "sha256:2931c71fce2080ade2fc743207b3d70ea659f694e0273b6bacfe551ad6ce43e0", size = 3093618, upload-time = "2026-07-27T12:07:59.492Z" }
571
571
  wheels = [
572
- { url = "https://files.pythonhosted.org/packages/0f/14/9b1f5eb1c5104ba1ceb380a7308ffcd979f3ce1df86e76293062698f2ff1/polars_runtime_32-1.43.0-cp310-abi3-macosx_10_12_x86_64.whl", hash = "sha256:6707193d30a7135bce0424304f76d8145270527444097548e794ad8d26823b70", size = 53059463, upload-time = "2026-07-21T04:29:09.194Z" },
573
- { url = "https://files.pythonhosted.org/packages/ca/14/73d77d1c0c928eb599d9516d874af0cd2b6225201e1327a6c4857e6776d0/polars_runtime_32-1.43.0-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:78ca2f97740b2a6beb36eb112749280b5e08750c60f53c08d2feffebdba9d35a", size = 47499586, upload-time = "2026-07-21T04:29:13.229Z" },
574
- { url = "https://files.pythonhosted.org/packages/80/b1/98278fa796f93d0975fd3fe1d4ab4031707d4a9f1da44c21c29996b62c73/polars_runtime_32-1.43.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4ffa99bb2c7ee0a9392ae50b350af0ed17acf0519d15c75fe223021798566174", size = 51326702, upload-time = "2026-07-21T04:29:16.084Z" },
575
- { url = "https://files.pythonhosted.org/packages/ab/7d/24ae73389aac03296925973c4e2cbe2e4982e859b9fad69eb1a72b9026fa/polars_runtime_32-1.43.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ecc8feaf04de5989a29245885921db612ef1ce9065e5cb6ec37495acfa55bba", size = 57266705, upload-time = "2026-07-21T04:29:19.288Z" },
576
- { url = "https://files.pythonhosted.org/packages/5c/49/2026be1f7b51242ad62e08b20728462558e161fb84b564e5b986f2b38664/polars_runtime_32-1.43.0-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:01e1471a5ee161a969c7a96991d8e5d20b97a0b7fe075df9c7a01f52a49c5ac2", size = 51484129, upload-time = "2026-07-21T04:29:22.639Z" },
577
- { url = "https://files.pythonhosted.org/packages/db/e2/047c7695f08a9b18614c0e1ec5e70a754455542a21a6d52955f7f05c6268/polars_runtime_32-1.43.0-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:9cd8b813afe67d59e87027dedcaf5c6a06fe602472fd74e1a49f4bafea47259c", size = 55169401, upload-time = "2026-07-21T04:29:25.902Z" },
578
- { url = "https://files.pythonhosted.org/packages/92/dc/bfd2533c487563c7a21ab7d7af3d78f820b0236e14dc5ee63d46188cd275/polars_runtime_32-1.43.0-cp310-abi3-win_amd64.whl", hash = "sha256:41a75fb3cb4cc574eb21801383578f75cfc374597c22322ef457ab7bac8a3301", size = 52541527, upload-time = "2026-07-21T04:29:29.162Z" },
579
- { url = "https://files.pythonhosted.org/packages/46/d7/5c47f1bf57479d1671669af9c421f9abf4986b2ddaa64c177244ff811de0/polars_runtime_32-1.43.0-cp310-abi3-win_arm64.whl", hash = "sha256:c285e598dd91e08560e519275b8b8108adbafb438d218a175ebe073dbc2027fb", size = 46552281, upload-time = "2026-07-21T04:29:32.224Z" },
572
+ { url = "https://files.pythonhosted.org/packages/72/a5/72c075ff95b31807c3cf497757bdd87f81b5b8869e60a22ec532238bac99/polars_runtime_32-1.43.1-cp310-abi3-macosx_10_12_x86_64.whl", hash = "sha256:ddc7bca81e3616b74eba597bff09acbe3567e5b66798cc5305adc2e91a36e31e", size = 53084414, upload-time = "2026-07-27T12:06:36.283Z" },
573
+ { url = "https://files.pythonhosted.org/packages/b3/8f/a34347323459116becbc3b6223bc55b25a1be705d6064decac6b7aa0c769/polars_runtime_32-1.43.1-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:3bdaeb8b017be11d7d2f8a938ae98cb4135f90de451771c2bac4d21dca2f7cf4", size = 47514709, upload-time = "2026-07-27T12:06:39.63Z" },
574
+ { url = "https://files.pythonhosted.org/packages/83/7e/a0a22740388facc22f2faa81787b4150231a22dad42ad02b2c6efdba0d0a/polars_runtime_32-1.43.1-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:def1c19a339903ab39f1d134a69a9e8b02feb4f800f547809fbfed458ccb135e", size = 51351657, upload-time = "2026-07-27T12:06:44.701Z" },
575
+ { url = "https://files.pythonhosted.org/packages/34/f1/4a07318711eeb3a27c62c916751ca45f18df6b0891d18aba68ffd9c18a76/polars_runtime_32-1.43.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f323e5c4aa0f068c2c911bd01f1ecdc25c1f3a501879b29550a41ab95490965", size = 57289250, upload-time = "2026-07-27T12:06:48.173Z" },
576
+ { url = "https://files.pythonhosted.org/packages/26/74/c6b55dbb4db2574a9478bf1c2aa04624ea924fc44dc14b64050be462db7e/polars_runtime_32-1.43.1-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:b93d4bf59dcb0bac68ab2458890f1e8431d17369e59efc88625f0d92b22cad92", size = 51505657, upload-time = "2026-07-27T12:06:51.557Z" },
577
+ { url = "https://files.pythonhosted.org/packages/43/2e/12e987b0f311f20e41f904acc452824af3009579d60c878a5435ae1e9f0a/polars_runtime_32-1.43.1-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:977b4620d837f3ca0d131f858ac1bd72e2ae10a5e85a6cc27fddc71fbdb5005d", size = 55189721, upload-time = "2026-07-27T12:06:54.68Z" },
578
+ { url = "https://files.pythonhosted.org/packages/3a/f6/5bfba6f40a08b2b1bbe0507e9cc638ebada2dceaece45f9d87a905c57de5/polars_runtime_32-1.43.1-cp310-abi3-win_amd64.whl", hash = "sha256:fa557938e9113c12d59c56df8d7f7e1a411cc1954df0dafbb05900136c6329e7", size = 52566672, upload-time = "2026-07-27T12:06:57.725Z" },
579
+ { url = "https://files.pythonhosted.org/packages/f9/5e/41df901e2684e8857bdffd458c8157d237c701df9f3f922d101075f97724/polars_runtime_32-1.43.1-cp310-abi3-win_arm64.whl", hash = "sha256:cc186bad9f33b71f66ee6cc3ba2146d64315a120b0e988814d6fb1a37f0cc9e9", size = 46575356, upload-time = "2026-07-27T12:07:00.856Z" },
580
580
  ]
581
581
 
582
582
  [[package]]
@@ -750,14 +750,14 @@ wheels = [
750
750
 
751
751
  [[package]]
752
752
  name = "tqdm"
753
- version = "4.69.1"
753
+ version = "4.70.0"
754
754
  source = { registry = "https://pypi.org/simple" }
755
755
  dependencies = [
756
756
  { name = "colorama", marker = "sys_platform == 'win32'" },
757
757
  ]
758
- sdist = { url = "https://files.pythonhosted.org/packages/dd/84/da0e5038228fa34dfd77c5026b173ed035d2a3ba31f1077590c013de2bff/tqdm-4.69.1.tar.gz", hash = "sha256:2be21080a0ce17e902c2f1baeb6a74bf551b67bbdfa4bc0109fad471d0b4cb0d", size = 793046, upload-time = "2026-07-24T14:22:02.08Z" }
758
+ sdist = { url = "https://files.pythonhosted.org/packages/21/3b/6c24bec5be5e743ffd99576daa5cc077722fc7d5bbc00bd133fa0c698dc6/tqdm-4.70.0.tar.gz", hash = "sha256:55b0b0dbd97462d06ebee91e4dac24ed4d4702be82b24f07e6c1d27e08cea220", size = 795438, upload-time = "2026-07-27T11:33:15.271Z" }
759
759
  wheels = [
760
- { url = "https://files.pythonhosted.org/packages/01/50/5817619a0fca56aff06383dbfde7ae017b3ca383915b3f1e4713164273cf/tqdm-4.69.1-py3-none-any.whl", hash = "sha256:0a654b96f7a2660cceb615b56f307ec2bef96c515409014a429a561981ab52b4", size = 675452, upload-time = "2026-07-24T14:22:00.048Z" },
760
+ { url = "https://files.pythonhosted.org/packages/f9/1c/01bfd571a64e7f270e6bab5e33777debe0edc56759233ce84f27dec92d14/tqdm-4.70.0-py3-none-any.whl", hash = "sha256:7f585706bfddbdebf89daac705b2dfcc16890130727d3197ca62c732b4310953", size = 80184, upload-time = "2026-07-27T11:33:13.167Z" },
761
761
  ]
762
762
 
763
763
  [[package]]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes