BUG: combine cmaps when merging Universes (Issue #3672)#5415
Open
apoorva-01 wants to merge 1 commit into
Open
Conversation
Merge() only remapped bonds/angles/dihedrals/impropers, so a Universe carrying cmaps fell through to the plain-array path and raised a TypeError. Add cmaps to that set so it's merged like the other connection groups.
6 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5415 +/- ##
========================================
Coverage 93.85% 93.85%
========================================
Files 182 182
Lines 22509 22509
Branches 3202 3202
========================================
Hits 21125 21125
Misses 922 922
Partials 462 462 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Fixes #3672
Changes made in this Pull Request:
Merge()remaps the connection attributes (bonds, angles, dihedrals, impropers) onto the merged Universe and concatenates everything else as a plain array.cmapsis a connection attribute too, but it wasn't in that set, so merging a Universe that carries cmaps raisedTypeError: Encountered unexpected topology attribute of type ...TopologyGroup. This addscmapsto the set so it's combined the same way as the others, with a regression test that fails without the change.UreyBradleysis another_Connectionmissing from that set, so it has the same latent bug. I kept this PR to justcmaps, but I'm happy to generalise it (derive the set from the_Connectionsubclasses) or do a follow-up if you'd rather.LLM / AI generated code disclosure
LLMs or other AI-powered tools (beyond simple IDE use cases) were used in this contribution: no
PR Checklist
package/CHANGELOGfile updated?package/AUTHORS?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.