Hi,
I have a purely academic question: how do I neatly select "all residues that do not contain a C-beta atom" using MDAnalysis?
For standard proteins these are the Gly.
The best I could come up with was "byres (name CA and not (around 1.7 name CB))" but that includes the fragile fudge of an estimated maximum bonding distance of ~1.7 Å between CA and CB (which is larger than the ~1.4 Å C-C I would have expected):
from MDAnalysis import Universe
from MDAnalysis.tests.datafiles import PSF, DCD
u = Universe(PSF, DCD)
sel = u.selectAtoms("byres (name CA and not (around 1.7 name CB))")
ref = u.selectAtoms("resname GLY")
sel.residues[:] == ref.residues[:]
#>>> True
Does anyone have any better ideas; the naive
u.selectAtoms("not name CA").residues
does not work because you pick up ALL other atoms (e.g. the N in Gly) and hence you get all residues.
(As a curious side observation: sel[:] == ref[:] returns False.)
Oliver
--
Oliver Beckstein *
orbe...@gmx.net
skype: orbeckst *
orbe...@gmail.com