Molecule Tutorials - Herong's Tutorial Examples - v1.21, by Dr. Herong Yang
"select" Command in PyMol
This section provides a tutorial on how to create a new selection by using the 'select' command an selection expression in PyMol.
You can create selections in PyMol by clicking atom locations. But you can also create selections by the "select" command:
select selection_name, selection_expression
"selection_expression" - An set of preperty name and value-list pairs joined by Boolean operators to identify a group of atoms in a molecule.
For example, the following command create a new selection named as "group_1" with all C or N atoms and indexed as 1, 2, or 3 in the molecule structure.
select group_1, name C+N and id 1+2+3
Let's create the "ring" selection again with the "select" command:
PyMOL>log_open Selection-Create-Ring.pml PyMOL>delete all PyMOL>reset PyMOL>load Molecule-HY-001.sdf CmdLoad: loaded as "Molecule-HY-001". PyMOL>hide all PyMOL>show lines PyMOL>select ring, id 6+9+10+11+12+13 Selector: selection "ring" defined with 6 atoms.
Now we have create the same selection "ring" as the previous tutorial with the "select" command without using the mouse.
Table of Contents