ENH: add subselection keyword argument to AlignTraj (Issue #5380) - #5464
ENH: add subselection keyword argument to AlignTraj (Issue #5380)#5464AkshitBoora wants to merge 1 commit into
Conversation
Add a new 'subselection' keyword argument to AlignTraj.__init__ that accepts a selection string or AtomGroup. When provided, only those atoms are written to the output trajectory (enabling a performance/memory trade-off), while the superposition/RMSD fit is still computed using the atoms defined by 'select'. Also add a module-level guide in MDAnalysis.analysis.align documenting three usage patterns for aligning sub-systems with different memory characteristics. Changes: - package/MDAnalysis/analysis/align.py: add subselection param + docs - testsuite/MDAnalysisTests/analysis/test_align.py: 4 new unit tests - package/CHANGELOG: Enhancements + Documentation entries - package/AUTHORS: add Akshit Boora Closes MDAnalysis#5380
Documentation build overview
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5464 +/- ##
========================================
Coverage 93.87% 93.88%
========================================
Files 182 182
Lines 22522 22530 +8
Branches 3206 3208 +2
========================================
+ Hits 21143 21152 +9
+ Misses 917 916 -1
Partials 462 462 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
IAlibay
left a comment
There was a problem hiding this comment.
@AkshitBoora you declared "yes" to the use of AI generated code. Given that our AI policy does not generally allow for AI generated code, please tell us how AI tools were used in this contribution.
Hi @IAlibay, I have used AI for understanding the codebase and the issue. All the code was generated by me. Since I have used AI for understanding the codebase that's why I have declared "Yes". |
Fixes #5380
Changes made in this Pull Request:
subselectionkeyword argument toAlignTraj.__init__that acceptsa selection string or
AtomGroup. When provided, only the selected atoms arewritten to the output trajectory, enabling a performance/memory trade-off
while the superposition/RMSD fit is still computed using the atoms defined by
select. RaisesTypeErrorfor invalid types.sub-systems" to the
MDAnalysis.analysis.alignmodule docstring,demonstrating three usage patterns: fit-only selection, subselection output,
and in-memory alignment.
in-memory subselection, and invalid type handling.
LLM / AI generated code disclosure
LLMs or other AI-powered tools (beyond simple IDE use cases) were used in this contribution: yes
PR Checklist
package/CHANGELOGfile updated?package/AUTHORS? (If it is not, add it!)Developers Certificate of Origin
I certify that I can submit this code contribution as described in the Developer Certificate of Origin, under the MDAnalysis LICENSE.