helmkit 0.3.2__tar.gz → 0.3.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.
Files changed (30) hide show
  1. {helmkit-0.3.2 → helmkit-0.3.3}/PKG-INFO +1 -1
  2. {helmkit-0.3.2 → helmkit-0.3.3}/benchmarks/README.md +4 -4
  3. {helmkit-0.3.2 → helmkit-0.3.3}/pyproject.toml +1 -1
  4. {helmkit-0.3.2 → helmkit-0.3.3}/src/helmkit/molecule.py +4 -4
  5. {helmkit-0.3.2 → helmkit-0.3.3}/uv.lock +1 -1
  6. {helmkit-0.3.2 → helmkit-0.3.3}/.github/dependabot.yml +0 -0
  7. {helmkit-0.3.2 → helmkit-0.3.3}/.github/workflows/main.yml +0 -0
  8. {helmkit-0.3.2 → helmkit-0.3.3}/.gitignore +0 -0
  9. {helmkit-0.3.2 → helmkit-0.3.3}/.pre-commit-config.yaml +0 -0
  10. {helmkit-0.3.2 → helmkit-0.3.3}/.python-version +0 -0
  11. {helmkit-0.3.2 → helmkit-0.3.3}/LICENSE +0 -0
  12. {helmkit-0.3.2 → helmkit-0.3.3}/README.md +0 -0
  13. {helmkit-0.3.2 → helmkit-0.3.3}/benchmarks/benchmark-import.py +0 -0
  14. {helmkit-0.3.2 → helmkit-0.3.3}/benchmarks/data/monomers.sdf +0 -0
  15. {helmkit-0.3.2 → helmkit-0.3.3}/benchmarks/data/peptides.csv +0 -0
  16. {helmkit-0.3.2 → helmkit-0.3.3}/benchmarks/helmkit-benchmark.py +0 -0
  17. {helmkit-0.3.2 → helmkit-0.3.3}/benchmarks/helmkit-parallel-benchmark.py +0 -0
  18. {helmkit-0.3.2 → helmkit-0.3.3}/benchmarks/helmkit-profile.py +0 -0
  19. {helmkit-0.3.2 → helmkit-0.3.3}/benchmarks/helmkit-with-reload-benchmark.py +0 -0
  20. {helmkit-0.3.2 → helmkit-0.3.3}/benchmarks/pypept-benchmark.py +0 -0
  21. {helmkit-0.3.2 → helmkit-0.3.3}/src/helmkit/__init__.py +0 -0
  22. {helmkit-0.3.2 → helmkit-0.3.3}/src/helmkit/data/monomers.sdf +0 -0
  23. {helmkit-0.3.2 → helmkit-0.3.3}/src/helmkit/py.typed +0 -0
  24. {helmkit-0.3.2 → helmkit-0.3.3}/tests/data/generate_sdf.py +0 -0
  25. {helmkit-0.3.2 → helmkit-0.3.3}/tests/data/monomers.csv +0 -0
  26. {helmkit-0.3.2 → helmkit-0.3.3}/tests/data/monomers.sdf +0 -0
  27. {helmkit-0.3.2 → helmkit-0.3.3}/tests/data/peptides.csv +0 -0
  28. {helmkit-0.3.2 → helmkit-0.3.3}/tests/test_cycpeptmpdb.py +0 -0
  29. {helmkit-0.3.2 → helmkit-0.3.3}/tests/test_parallel_load.py +0 -0
  30. {helmkit-0.3.2 → helmkit-0.3.3}/tests/test_random_peptides.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: helmkit
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Parse HELM strings into RDKit molecules
5
5
  License-File: LICENSE
6
6
  Requires-Python: >=3.11
@@ -37,13 +37,13 @@ and average parsing time:
37
37
  |-------------------------------------|---------------:|-------------------------:|--------------------:|
38
38
  | `pyPept` | 676.65 | 0.14400 | 6.94 |
39
39
  | `helmkit` (DB reload every peptide) | 252.67 | 0.05383 | 18.58 |
40
- | `helmkit` | 2.83 | 0.00060 | 1658.68 |
41
- | `helmkit` (parallel loading) | 1.42 | 0.00030 | 3305.63 |
40
+ | `helmkit` | 2.07 | 0.00044 | 2267.63 |
41
+ | `helmkit` (parallel loading) | 1.40 | 0.00030 | 3352.86 |
42
42
 
43
- `helmkit` outperforms `pyPept` by approximately 239× when loading the monomer library
43
+ `helmkit` outperforms `pyPept` by approximately 327x when loading the monomer library
44
44
  once per session. When forced to reload the library for every peptide, `helmkit` is
45
45
  still about 3× faster. If we use parallelized loading in `helmkit`, we achieve an
46
- additional 2.5× speedup, resulting in a total speedup of approximately 477× over
46
+ additional 1.5× speedup, resulting in a total speedup of approximately 477× over
47
47
  `pyPept`.
48
48
 
49
49
  ## Environment
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "helmkit"
3
- version = "0.3.2"
3
+ version = "0.3.3"
4
4
  description = "Parse HELM strings into RDKit molecules"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -2,7 +2,6 @@ import multiprocessing
2
2
  import re
3
3
  import warnings
4
4
  from functools import lru_cache
5
- from functools import reduce
6
5
  from importlib.resources import files
7
6
  from typing import Dict
8
7
  from typing import List
@@ -409,9 +408,10 @@ class Molecule:
409
408
  self.mol = Chem.RWMol()
410
409
  return
411
410
 
412
- mols = (monomer["m_romol"] for monomer in self.monomers)
413
- combined = reduce(Chem.CombineMols, mols)
414
- self.mol = Chem.RWMol(combined)
411
+ combined = Chem.RWMol(self.monomers[0]["m_romol"])
412
+ for monomer in self.monomers[1:]:
413
+ combined.InsertMol(monomer["m_romol"])
414
+ self.mol = combined
415
415
 
416
416
  def _add_bonds(self) -> None:
417
417
  """Add bonds between monomers based on bond list."""
@@ -140,7 +140,7 @@ wheels = [
140
140
 
141
141
  [[package]]
142
142
  name = "helmkit"
143
- version = "0.3.2"
143
+ version = "0.3.3"
144
144
  source = { editable = "." }
145
145
  dependencies = [
146
146
  { name = "rdkit" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes