Rather than using atom selection macros (/1jff//a/etc.../), the easiest
way is probably to execute the following command, which takes advantage
of PyMOL's built-in "hetatm" single-word selector:
select just_protein, ! hetatm
The "hetatm" selector consists of all atoms from the PDB file's HETATM
lines, so it's negated in the above command in order to select only the
ATOM lines (which I assume are only protein). A really paranoid way to
select only protein atoms is to try the following:
select CAs, name ca
select just_protein, byres CAs
Here we first select just the C-alphas ("CAs") and then use PyMOL's
selection algebra to expand this selection into a new object
("just_protein") that consists of only C-alphas and all atoms in
C-alpha-containing residues (i.e., entire protein). These two methods
should produce equivalent selections except in the unusual cases of (1)
having 'CA' atoms in HETATM lines of the PDB file or (2) having HETATM
lines that contain protein residues that you'd like to include in your
selection (whether they have 'CA' atoms or not). See
http://pymol.sourceforge.net/newman/user/S0220commands.html#7 for more info.
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?
=== Hanspeter Niederstrasser wrote (on 04/17/2004 01:03 PM): ===
I'm trying to create an object of a protein from a PDB file that doesn't
give a chain ID (pdb is 1BG2).
I normally do something like:
to pull a specific chain out of a PDB file, but 1BG2 doesn't have a chain
name. And if i use "create kin=(/1BG2////)", the object kin gets ALL the
elements from 1BG2, including the waters, nucleotide, and ions, which is
exactly what I'm trying to not do.
How can I create an object out from a nameless chain?
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
PyMOL-users mailing list