Conversation
- Adds fast zero-copy A3M and Stockholm parsing via strux-rs (v0.3.1) - Benchmark on 250,000 sequences (144.6 MB): * Python reference: 10.485s (23,800 seqs/s, 1,349 MB peak RAM) * strux-rs backend: 0.801s (312,000 seqs/s, 966 MB peak RAM) * Speedup: 13.1x faster, 383 MB RAM saved (28% reduction) - Implements transparent fallback to legacy pure-Python implementation if strux-rs is not installed - Adds openfold[fast-msa] to extras_require in setup.py without adding core dependencies - Output sequences and deletion matrices verified identical to AlphaFold ground truth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR integrates
strux-rsintoopenfold/data/parsers.pyto accelerate Multiple Sequence Alignment (MSA) parsing for.a3mand.sto(Stockholm) files.By offloading sequence cleaning, gap-filtering, and deletion matrix calculations to Rust (via PyO3/numpy bindings with Rayon multi-threading), we completely bypass slow Python string loops and avoid memory fragmentation.
strux-rshas been published to PyPI and will be automatically resolved and installed during installation.Benchmarks (20k sequences, length 500)