-
Notifications
You must be signed in to change notification settings - Fork 823
Closed
Milestone
Description
Likeky following #1403, calling the segments property of a universe issues the following deprecation warning:
/home/jon/dev/mdanalysis/package/MDAnalysis/core/topologyattrs.py:1268: DeprecationWarning: `_get_named_segment` is deprecated!
Instant selector SegmentGroup.<name> is deprecated and will be removed in 1.0. Use SegmentGroup[SegmentGroup.segids == '<name>'] instead.
return segmentgroup._get_named_segment(segid)
The residues property issues the following one:
/home/jon/dev/mdanalysis/package/MDAnalysis/core/topologyattrs.py:1064: DeprecationWarning: `_get_named_residue` is deprecated!
Instant selector ResidueGroup.<name> or Segment.<name> is deprecated and will be removed in 1.0. Use ResidueGroup[ResidueGroup.resnames == '<name>'] or Segment.residues[Segment.residues == '<name>'] instead.
return residuegroup._get_named_residue(resname)
No warning should be emitted.
The atoms property does not emit warning as expected.
Resnames._get_named_residue and Segments._get_named_segment should handle the deprecation warning the same way as Atoms._get_named_atom; issue the warning only if the methods return something. See #1403 (comment) and a9f9655.
Reactions are currently unavailable