New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple segments reduce to one segid #1387

Open
tclick opened this Issue Jun 6, 2017 · 6 comments

Comments

Projects
None yet
3 participants
@tclick

tclick commented Jun 6, 2017

Using the MDAnalysis 0.16.1, a multisegmented system with overlapping residue numbers is reduced to a single segid by usage of topology.base.squash_by. In MDAnalysis 0.10.0, this did not occur because the topology handling system was different. Users who work with complex systems will want to have their systems separated by segments as well as residues and atoms.

As noted above, the root cause is in the squash_by function, which uses numpy.unique; if a list of resids is provided, then multisegmented systems with overlapping residues will reduce to the first instance within the first segment.

@richardjgowers

This comment has been minimized.

Show comment
Hide comment
@richardjgowers

richardjgowers Jun 6, 2017

Member
Member

richardjgowers commented Jun 6, 2017

@tclick

This comment has been minimized.

Show comment
Hide comment
@tclick

tclick Jun 6, 2017

I've tried both PSF and PDB, but the PSF parser is the only one that chokes on the multisegment issue.

tclick commented Jun 6, 2017

I've tried both PSF and PDB, but the PSF parser is the only one that chokes on the multisegment issue.

jbarnoud added a commit that referenced this issue Jun 13, 2017

Explicitly define __hash__ for groups
Groups (AtomGroup, ResidueGroup, SegmentGroup) cannot be stored in sets
or used as dict key if they are not hashable. In python 3, the __hash__
method is not defined implicitly anymore when a class has a __eq__ method.

Fixes #1387

@jbarnoud jbarnoud referenced this issue Jun 13, 2017

Merged

Explicitly define __hash__ for groups #1398

3 of 3 tasks complete
@richardjgowers

This comment has been minimized.

Show comment
Hide comment
@richardjgowers

richardjgowers Jun 15, 2017

Member

@tclick sorry for the delay, can you provide a toy example of a psf file that chokes? I'll be able to push a fix in 0.16.2 that way. Thanks

Member

richardjgowers commented Jun 15, 2017

@tclick sorry for the delay, can you provide a toy example of a psf file that chokes? I'll be able to push a fix in 0.16.2 that way. Thanks

@richardjgowers richardjgowers self-assigned this Jun 15, 2017

@richardjgowers richardjgowers added this to the 0.16.x milestone Jun 15, 2017

@tclick

This comment has been minimized.

Show comment
Hide comment
@tclick

tclick Jun 16, 2017

Sorry about the delay, but here is a PSF and CRD file. Also, I noticed that the segments are also alphabetized, which may not always correspond to the original setup (as in my case of PDZ3 and CRPT).

structure.zip

tclick commented Jun 16, 2017

Sorry about the delay, but here is a PSF and CRD file. Also, I noticed that the segments are also alphabetized, which may not always correspond to the original setup (as in my case of PDZ3 and CRPT).

structure.zip

@orbeckst orbeckst modified the milestones: 0.17.0, 0.16.x Aug 18, 2017

@orbeckst orbeckst added the defect label Aug 18, 2017

@orbeckst

This comment has been minimized.

Show comment
Hide comment
@orbeckst

orbeckst Aug 21, 2017

Member

@richardjgowers have you had a chance to look at this issue in more detail? It sounds like a regression that we should fix for 0.17.0.

Member

orbeckst commented Aug 21, 2017

@richardjgowers have you had a chance to look at this issue in more detail? It sounds like a regression that we should fix for 0.17.0.

@tclick

This comment has been minimized.

Show comment
Hide comment
@tclick

tclick Aug 23, 2017

tclick commented Aug 23, 2017

@richardjgowers richardjgowers modified the milestones: 0.17.0, 0.17.x Jan 25, 2018

@richardjgowers richardjgowers removed this from the 0.18 milestone Mar 5, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment