helmkit 0.3.1__tar.gz → 0.3.2__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.3.2/.github/dependabot.yml +6 -0
- helmkit-0.3.2/.pre-commit-config.yaml +27 -0
- {helmkit-0.3.1 → helmkit-0.3.2}/PKG-INFO +1 -1
- {helmkit-0.3.1 → helmkit-0.3.2}/benchmarks/README.md +7 -7
- helmkit-0.3.2/benchmarks/benchmark-import.py +36 -0
- {helmkit-0.3.1 → helmkit-0.3.2}/benchmarks/data/monomers.sdf +3316 -3316
- helmkit-0.3.2/benchmarks/helmkit-profile.py +31 -0
- {helmkit-0.3.1 → helmkit-0.3.2}/benchmarks/helmkit-with-reload-benchmark.py +3 -0
- {helmkit-0.3.1 → helmkit-0.3.2}/pyproject.toml +2 -1
- {helmkit-0.3.1 → helmkit-0.3.2}/src/helmkit/data/monomers.sdf +3220 -3220
- {helmkit-0.3.1 → helmkit-0.3.2}/src/helmkit/molecule.py +8 -13
- {helmkit-0.3.1 → helmkit-0.3.2}/tests/data/monomers.sdf +3316 -3316
- {helmkit-0.3.1 → helmkit-0.3.2}/uv.lock +198 -54
- helmkit-0.3.1/tests/backup +0 -66
- {helmkit-0.3.1 → helmkit-0.3.2}/.github/workflows/main.yml +0 -0
- {helmkit-0.3.1 → helmkit-0.3.2}/.gitignore +0 -0
- {helmkit-0.3.1 → helmkit-0.3.2}/.python-version +0 -0
- {helmkit-0.3.1 → helmkit-0.3.2}/LICENSE +0 -0
- {helmkit-0.3.1 → helmkit-0.3.2}/README.md +0 -0
- {helmkit-0.3.1 → helmkit-0.3.2}/benchmarks/data/peptides.csv +0 -0
- {helmkit-0.3.1 → helmkit-0.3.2}/benchmarks/helmkit-benchmark.py +0 -0
- {helmkit-0.3.1 → helmkit-0.3.2}/benchmarks/helmkit-parallel-benchmark.py +0 -0
- {helmkit-0.3.1 → helmkit-0.3.2}/benchmarks/pypept-benchmark.py +0 -0
- {helmkit-0.3.1 → helmkit-0.3.2}/src/helmkit/__init__.py +0 -0
- {helmkit-0.3.1 → helmkit-0.3.2}/src/helmkit/py.typed +0 -0
- {helmkit-0.3.1 → helmkit-0.3.2}/tests/data/generate_sdf.py +0 -0
- {helmkit-0.3.1 → helmkit-0.3.2}/tests/data/monomers.csv +0 -0
- {helmkit-0.3.1 → helmkit-0.3.2}/tests/data/peptides.csv +0 -0
- {helmkit-0.3.1 → helmkit-0.3.2}/tests/test_cycpeptmpdb.py +0 -0
- {helmkit-0.3.1 → helmkit-0.3.2}/tests/test_parallel_load.py +0 -0
- {helmkit-0.3.1 → helmkit-0.3.2}/tests/test_random_peptides.py +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v5.0.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: trailing-whitespace
|
|
6
|
+
- id: end-of-file-fixer
|
|
7
|
+
- id: check-yaml
|
|
8
|
+
- id: check-toml
|
|
9
|
+
- id: check-added-large-files
|
|
10
|
+
- repo: https://github.com/asottile/pyupgrade
|
|
11
|
+
rev: v3.20.0
|
|
12
|
+
hooks:
|
|
13
|
+
- id: pyupgrade
|
|
14
|
+
- repo: https://github.com/asottile/reorder-python-imports
|
|
15
|
+
rev: v3.15.0
|
|
16
|
+
hooks:
|
|
17
|
+
- id: reorder-python-imports
|
|
18
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
19
|
+
rev: v0.12.5
|
|
20
|
+
hooks:
|
|
21
|
+
- id: ruff-check
|
|
22
|
+
args: [ --fix ]
|
|
23
|
+
- id: ruff-format
|
|
24
|
+
- repo: https://github.com/astral-sh/uv-pre-commit
|
|
25
|
+
rev: 0.8.3
|
|
26
|
+
hooks:
|
|
27
|
+
- id: uv-lock
|
|
@@ -36,15 +36,15 @@ and average parsing time:
|
|
|
36
36
|
| Tool | Total Time (s) | Avg Time per Peptide (s) | Peptides per Second |
|
|
37
37
|
|-------------------------------------|---------------:|-------------------------:|--------------------:|
|
|
38
38
|
| `pyPept` | 676.65 | 0.14400 | 6.94 |
|
|
39
|
-
| `helmkit` (DB reload every peptide) |
|
|
40
|
-
| `helmkit` |
|
|
39
|
+
| `helmkit` (DB reload every peptide) | 252.67 | 0.05383 | 18.58 |
|
|
40
|
+
| `helmkit` | 2.83 | 0.00060 | 1658.68 |
|
|
41
41
|
| `helmkit` (parallel loading) | 1.42 | 0.00030 | 3305.63 |
|
|
42
42
|
|
|
43
|
-
`helmkit` outperforms `pyPept` by approximately
|
|
44
|
-
once per session. When forced to reload the library for every peptide
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
`helmkit` outperforms `pyPept` by approximately 239× when loading the monomer library
|
|
44
|
+
once per session. When forced to reload the library for every peptide, `helmkit` is
|
|
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
|
|
47
|
+
`pyPept`.
|
|
48
48
|
|
|
49
49
|
## Environment
|
|
50
50
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import time
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def benchmark_imports(import_code: str, repeats: int = 100):
|
|
6
|
+
times = []
|
|
7
|
+
for _ in range(repeats):
|
|
8
|
+
start = time.perf_counter()
|
|
9
|
+
exec(import_code)
|
|
10
|
+
end = time.perf_counter()
|
|
11
|
+
times.append(end - start)
|
|
12
|
+
# Remove imported modules to force fresh import next run
|
|
13
|
+
for mod in list(sys.modules):
|
|
14
|
+
if mod.startswith("pyPept") or mod.startswith("helmkit"):
|
|
15
|
+
del sys.modules[mod]
|
|
16
|
+
avg_time = sum(times) / repeats
|
|
17
|
+
print(f"Average import time for:\n{import_code}\n= {avg_time:.6f} seconds\n")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
pyPept_imports = """from pyPept.converter import Converter
|
|
21
|
+
from pyPept.molecule import Molecule
|
|
22
|
+
from pyPept.sequence import Sequence
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
helmkit_imports = """from helmkit import load_monomer_library
|
|
26
|
+
from helmkit import Molecule
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def main():
|
|
31
|
+
benchmark_imports(pyPept_imports)
|
|
32
|
+
benchmark_imports(helmkit_imports)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
if __name__ == "__main__":
|
|
36
|
+
main()
|