helmkit 0.1.0__tar.gz → 0.2.0__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.
- {helmkit-0.1.0 → helmkit-0.2.0}/PKG-INFO +1 -1
- helmkit-0.2.0/benchmarks/README.md +55 -0
- {helmkit-0.1.0/tests → helmkit-0.2.0/benchmarks}/data/monomers.sdf +1155 -0
- helmkit-0.2.0/benchmarks/helmkit-benchmark.py +30 -0
- helmkit-0.2.0/benchmarks/helmkit-with-reload-benchmark.py +29 -0
- helmkit-0.2.0/benchmarks/pypept-benchmark.py +34 -0
- {helmkit-0.1.0 → helmkit-0.2.0}/pyproject.toml +5 -1
- {helmkit-0.1.0 → helmkit-0.2.0}/src/helmkit/molecule.py +2 -0
- {helmkit-0.1.0 → helmkit-0.2.0}/tests/data/generate_sdf.py +5 -2
- helmkit-0.2.0/tests/data/monomers.sdf +23797 -0
- helmkit-0.2.0/tests/data/peptides.csv +7299 -0
- {helmkit-0.1.0 → helmkit-0.2.0}/uv.lock +256 -0
- {helmkit-0.1.0 → helmkit-0.2.0}/.gitignore +0 -0
- {helmkit-0.1.0 → helmkit-0.2.0}/.python-version +0 -0
- {helmkit-0.1.0 → helmkit-0.2.0}/LICENSE +0 -0
- {helmkit-0.1.0 → helmkit-0.2.0}/README.md +0 -0
- {helmkit-0.1.0/tests → helmkit-0.2.0/benchmarks}/data/peptides.csv +0 -0
- {helmkit-0.1.0 → helmkit-0.2.0}/src/helmkit/__init__.py +0 -0
- {helmkit-0.1.0 → helmkit-0.2.0}/src/helmkit/data/monomers.sdf +0 -0
- {helmkit-0.1.0 → helmkit-0.2.0}/src/helmkit/py.typed +0 -0
- {helmkit-0.1.0 → helmkit-0.2.0}/tests/cycpeptmpdb.py +0 -0
- {helmkit-0.1.0 → helmkit-0.2.0}/tests/data/monomers.csv +0 -0
- {helmkit-0.1.0 → helmkit-0.2.0}/tests/random_peptides.py +0 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Benchmarks
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This benchmark evaluates the **reading speed** of
|
|
6
|
+
[`helmkit`](https://github.com/adaliaramon/helmkit) and
|
|
7
|
+
[`pyPept`](https://github.com/Boehringer-Ingelheim/pyPept) for parsing HELM notation
|
|
8
|
+
strings into RDKit molecules. The goal is to compare their performance and usability
|
|
9
|
+
differences when processing peptides in HELM format.
|
|
10
|
+
|
|
11
|
+
## Feature Comparison
|
|
12
|
+
|
|
13
|
+
The libraries differ in key implementation aspects that affect speed and robustness:
|
|
14
|
+
|
|
15
|
+
| Feature | `pyPept` | `helmkit` |
|
|
16
|
+
| ----------------------------- | ---------------------------------------------------- | ------------------------ |
|
|
17
|
+
| **Monomer library loading** | Reloaded for every peptide | Loaded once per session |
|
|
18
|
+
| **Conversion path** | HELM → BILN → Sequence → RDKit | HELM → RDKit |
|
|
19
|
+
| **Dependencies** | `rdkit`, `pandas`, `biopython`, `requests`, `igraph` | `rdkit` |
|
|
20
|
+
| **Monomer library input** | Requires directory + library name | Requires only file path |
|
|
21
|
+
| **Directory format** | Must be a Python module (with `__init__.py`) | No such requirement |
|
|
22
|
+
| **Monomer format strictness** | Very strict (e.g., fails on parentheses, dashes) | More tolerant |
|
|
23
|
+
| **Error handling** | Exits the process on error | Raises Python exceptions |
|
|
24
|
+
|
|
25
|
+
These differences influence both speed and ease of use, especially the monomer library
|
|
26
|
+
loading and conversion path.
|
|
27
|
+
|
|
28
|
+
## Reading Speed Results
|
|
29
|
+
|
|
30
|
+
We used the [CycPeptMPDB](http://cycpeptmpdb.com/peptides/type_PAMPA/) dataset,
|
|
31
|
+
comprising 7,298 cyclic peptides in HELM format. Peptides including monomers with names
|
|
32
|
+
that `pyPept` cannot handle were excluded (monomers with names containing whitespace,
|
|
33
|
+
hyphens or parenthesis), resulting in a total of 4694 peptides. We measured the total
|
|
34
|
+
and average parsing time:
|
|
35
|
+
|
|
36
|
+
| Tool | Total Time (s) | Avg Time per Peptide (s) |
|
|
37
|
+
|-------------------------------------|----------------|--------------------------|
|
|
38
|
+
| `pyPept` | 676.65 | 0.144 |
|
|
39
|
+
| `helmkit` | 3.60 | 0.00077 |
|
|
40
|
+
| `helmkit` (DB reload every peptide) | 261.81 | 0.056 |
|
|
41
|
+
|
|
42
|
+
`helmkit` outperforms `pyPept` by approximately 188× when loading the monomer library
|
|
43
|
+
once per session. When forced to reload the library for every peptide (needs disabling
|
|
44
|
+
memoization in the source code), `helmkit` is still about 3× faster.
|
|
45
|
+
|
|
46
|
+
## Environment
|
|
47
|
+
|
|
48
|
+
Benchmarks were run on an Intel Core i7-4790 (4 cores, 8 threads, 3.6 GHz) with 31.1 GiB
|
|
49
|
+
RAM and SSD storage, using Python 3.12.10 on Arch Linux (kernel 6.15.7). Key package
|
|
50
|
+
versions:
|
|
51
|
+
|
|
52
|
+
- `polars 1.31.0` (CSV parsing and dataframe processing)
|
|
53
|
+
- `rdkit 2025.3.3` (target output format and structure processing)
|
|
54
|
+
- `pypept 1.0.0` (commit `ade9f5840691ad1f8fa22d13939a665c25175d5a`)
|
|
55
|
+
- `helmkit 0.1.0` (local development version)
|