Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Remove instant selectors #1377
Another issue from the dev meetings, @orbeckst proposed removing these selectors
I'll try and summarise the currently available operations and what they do, along with the best alternative
u = mda.Universe() # AtomGroup # attribute based u.atoms.H u.atoms.select_atoms('name H') # getitem based u.atoms['H'] u.atoms.select_atoms('name H') # ResidueGroup rg = u.residues rg.LYS rg[rg.resname == 'LYS'] # Segment u.segments.r1 # gives first residue u.segments.residues # Universe u.SYSTEM # based on segids in topology u.segments[u.segments.segids == 'SYSTEM']
They're also a little weird in that they *usually return Groups, but sometimes return singular objects if only one object was found. Ie
Should we ditch (all of?) these?
I don't like the
Having looked at the
I would even go a little further and say, why not make
I think it's really not used very much any more and with tab-completion in modern UIs it really doesn't matter so much any more, either. And if we want to slim down then it's now or not any time soon. Getting rid of stuff also seems to make devs happy ;-).…
On 2 Jun, 2017, at 18:04, mnmelo ***@***.***> wrote: But I recall @orbeckstwas keen on keeping the quick accessors. Change of mind?
-- Oliver Beckstein * firstname.lastname@example.org skype: orbeckst * email@example.com
I would really just ditch everything (i.e., 1); I wouldn't bother with
(I admit that there's a certain logic to