Add ASV benchmark for Contacts analysis#5291
Add ASV benchmark for Contacts analysis#5291Amarendra22 wants to merge 8 commits intoMDAnalysis:developfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5291 +/- ##
========================================
Coverage 93.82% 93.82%
========================================
Files 182 182
Lines 22487 22487
Branches 3196 3196
========================================
Hits 21099 21099
Misses 925 925
Partials 463 463 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Looks pretty good already. Please
- format with black
- add yourself to the end of AUTHORS (if you're not already in there)
- add an entry to CHANGELOG under Enhancements (see other examples of benchmarks)
EDIT: please also vary method='hard_cut' | 'soft_cut' | 'radius_cut' and pbc=True | False.
|
@Amarendra22 I've seen at least one other PR of yours. I encourage you to focus on one PR and try to get that merged. For MDAnalysis as a project it's much more important to get some work done well then all work started and never finished. |
2721748 to
d493eee
Compare
|
I am sorry for the delayed response, I was occupied with some other work over the past few days. I have implemented the requested changes:
Please let me know if anything else should be improved. |
orbeckst
left a comment
There was a problem hiding this comment.
Thank you for addressing my changes. However, the PR contains changes unrelated to ContactAnalysis benchmarks that should be removed — these belong into a separate PR.
Please also address the comments. Thanks.
|
Thank you for the review and for pointing this out. Please let me know if any further adjustments are needed. |
Summary
This PR adds an ASV benchmark for the Contacts analysis module.
The benchmark measures the runtime of
Contacts.run()using the PSF/DCD dataset from MDAnalysisTests. This allows trackingperformance changes in the native contacts analysis workflow across MDAnalysis versions.
Benchmark Added
analysis.contacts.ContactsBench.time_contacts_run
Motivation
The Contacts analysis is commonly used to calculate native contacts in molecular dynamics trajectories. Adding a benchmark
helps detect performance regressions and measure improvements in future optimizations.
LLM / AI generated code disclosure
LLMs or other AI-powered tools were used in this contribution: No
📚 Documentation preview 📚: https://mdanalysis--5291.org.readthedocs.build/en/5291/