Cameron > This reminds me of a related question I once had -- does > anyone know if there's a way to create selections based > loosely (and very generally) on bond connectivity criteria, > in a somewhat similar manner as specified in force fields > used for proteins. It would be neat to be able to select all > groups of atoms in all residues that are topologically > connected (i.e. by any number of bonds) as separate groups, > in the absense of chain IDs of course... there's probably a > clever way of doing this via byobject, byresi, etc. commands?
There are a set of selection keywords which act on the covalent topology; (some of these are new in 0.95). "neighbor" or "nbr." (neighbor selection) selects all atoms with bonds to a selection, but are not part of that selection. e.g. (neighbor resi 100) "bound_to" or "bto." (bound_to selection) select all atoms with bonds to a selection, whether or not they are part of it. e.g. (neighbor (resi 123)) "extend" or "xt." (selection extend number) selects all atoms within a certain number of bonds e.g. (name ca extend 2) "bymolecule" or "bymol" or "bm." (bymol selection) selects all atoms in the covalent tree(s) which contain the selection e.g. (bymol resi 100) "byfragment" or "byfrag" or "bf." (byfrag selection) selects all atoms in the covalent tree(s) which contain the selection, stopping at any and all picked atoms (the pick selections are: pk1, pk2, pk3, and pk4 -- used mostly for molecular editing). e.g. after picking 10/C into pk1, 15/N into pk2, (byfrag 13/CA) would give you all atoms that are covalently attached to 13/CA up to, but not including, 10/C and 15/N. Discounting the presence of disulfide bonds, this would be all atoms in residues 11, 12, 13, & 14. If no atoms are picked by the molecular editor, byfragment works just like bymolecule. Cheers, Warren