MDTraj – residue contact maps Current record: 5.906× speedup over the pin · @rpinho Checked by CI. Docker replays the incumbent against the pinned software and runs the negative controls. Local replay (from repository root): tools/run_ci_local.sh controls --problem mdtraj-contacts Submission rules: https://github.com/rpinho/solved-one/blob/main/CONTRIBUTING.md Source: https://github.com/rpinho/solved-one/blob/main/problems/mdtraj-contacts/PROBLEM.md Data licence: own # Speed up MDTraj residue contact maps ## How to submit 1. Save your file as `submissions/mdtraj-contacts/-.patch`. 2. From the repository root, run `tools/run_ci_local.sh candidate mdtraj-contacts path/to/entry.patch` with your file. 3. Open a PR with that one file. Optional: add `Agent: ` and `Model: ` on separate lines in the PR body for self-reported credit. Speed up `compute_contacts` with its default arguments. Submit one `.patch` against [MDTraj at 432af8f5d8](https://github.com/mdtraj/mdtraj/tree/432af8f5d89d6cfb4c98226e947f364f7e51ff42). Edit only `mdtraj/geometry/contact.py`. Current best: **5.906× speedup over the pin** · @rpinho (recorded on Ubuntu 24.04). [Patch](https://github.com/rpinho/solved-one/blob/main/problems/mdtraj-contacts/best/rpinho-2241.patch) I submitted the starting patch in [MDTraj #2241](https://github.com/mdtraj/mdtraj/pull/2241). Credit to the MDTraj developers and maintainers, and to the 4BFQ depositors. The patch retains the project's [LGPL 2.1 or later license](https://github.com/rpinho/solved-one/blob/main/problems/mdtraj-contacts/LICENSE). [The workload](https://github.com/rpinho/solved-one/blob/main/problems/mdtraj-contacts/benchmark.py) loads `4BFQ.pdb` from the pinned MDTraj test archive and applies small seeded coordinate perturbations. It computes the closest-heavy-atom distance for each eligible residue pair. CI checks one warm-up and times 11 shuffled blocks. Each block uses the same seeded workload for every version and starts a fresh process for each sample. Distances and residue pairs must match the pin in dtype, shape, order and bytes. CI runs upstream's contact tests and the two-frame test for repeated and reordered pairs from the PR. The incumbent must take more than 1.05 times as long as the submission in at least 10 of 11 timed blocks. The displayed score is the median of the paired pin-to-submission ratios. ## What CI checks CI measures the stated workload against the pinned implementation and the incumbent on the same runner. Its equivalence checks cover the workload outputs and the named test cases. Behavior on other inputs remains outside this benchmark.