This is a read-only mirror of pymolwiki.org

Difference between revisions of "Single-word Selectors"

From PyMOL Wiki
Jump to navigation Jump to search
 
m (1 revision)
 
(17 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 +
#REDIRECT [[Selection Algebra]]
 +
 
== Single-word Selectors ==
 
== Single-word Selectors ==
  
The very simplest ''selection-expressions'' are single-word selectors. These selectors do not take identifiers; they are complete by themselves.
+
The very simplest ''selection-expressions'' are single-word selectors. These selectors do not take identifiers; they are complete by themselves. Below are some commonly used single-word selectors.
 
 
<TABLE BORDER="1">
 
<TR><TH ALIGN="CENTER">Single Word Selector</TH>
 
<TH ALIGN="CENTER">Short Form Selector</TH>
 
<TH ALIGN="CENTER">Description</TH></TR>
 
<TR><TD ALIGN="CENTER">all</TD><TD ALIGN="CENTER">*</TD><TD>All atoms currently loaded into PyMOL</TD></TR>
 
<TR><TD ALIGN="CENTER">none</TD><TD ALIGN="CENTER">none</TD>
 
<TD>No atoms (empty selection)</TD></TR>
 
<TR><TD ALIGN="CENTER">hydro</TD><TD ALIGN="CENTER">h.</TD>
 
<TD>All hydrogen atoms currently loaded into PyMOL</TD></TR>
 
<TR><TD ALIGN="CENTER">hetatm</TD><TD ALIGN="CENTER">het</TD>
 
<TD>All atoms loaded from Protein Data Bank HETATM records</TD></TR>
 
<TR><TD ALIGN="CENTER">visible</TD><TD ALIGN="CENTER">v.</TD>
 
<TD>All atoms in enabled objects with at least one visible representation</TD></TR>
 
<TR><TD ALIGN="CENTER">present</TD><TD ALIGN="CENTER">pr.</TD><TD>All atoms with defined coordinates in the current state (used in creating movies)</TD></TR>
 
</TABLE>
 
  
 +
{| class="wikitable"
 +
|-
 +
! Single-Word Selector
 +
! Short-Form Selector
 +
! Description
 +
|-
 +
| all
 +
| *
 +
| All atoms currently loaded into PyMOL
 +
|-
 +
| none
 +
| none
 +
| No atoms (empty selection)
 +
|-
 +
| hydro
 +
| h.
 +
| All hydrogen atoms currently loaded into PyMOL
 +
|-
 +
| hetatm
 +
| het
 +
| All atoms loaded from Protein Data Bank HETATM records
 +
|-
 +
| visible
 +
| v.
 +
| All atoms in enabled objects with at least one visible representation
 +
|-
 +
| polymer
 +
| pol.
 +
| All atoms on the polymer (not het).
 +
|-
 +
| backbone
 +
| bb.
 +
| Polymer backbone atoms ''(new in PyMOL 1.6.1)''
 +
|-
 +
| sidechain
 +
| sc.
 +
| Polymer non-backbone atoms ''(new in PyMOL 1.6.1)''
 +
|-
 +
| present
 +
| pr.
 +
| All atoms with defined coordinates in the current state (used in creating movies)
 +
|-
 +
| center
 +
|
 +
| Pseudo-atom at the center of the scene
 +
|-
 +
| origin
 +
|
 +
| Pseudo-atom at the origin of rotation
 +
|}
  
 
The selector '''none''' won't come up much when you are typing commands directly into PyMOL, but it is useful in programming scripts.
 
The selector '''none''' won't come up much when you are typing commands directly into PyMOL, but it is useful in programming scripts.
Line 24: Line 60:
 
As the table shows, many single-word selectors have short forms to save on typing. Some short forms must be followed by a period and a space, in order to delimit the word. Short forms and long forms have the same effect, so choose the form that suits you.
 
As the table shows, many single-word selectors have short forms to save on typing. Some short forms must be followed by a period and a space, in order to delimit the word. Short forms and long forms have the same effect, so choose the form that suits you.
  
<pre>
+
<source lang="python">
  PyMOL> color blue, all          # It all turns blue.
+
PyMOL> color blue, all          # It all turns blue.
  PyMOL> color blue, *
+
PyMOL> color blue, *
 
    
 
    
  PyMOL> hide hydro              # Representations of all  
+
PyMOL> hide hydro              # Representations of all  
  PyMOL> hide h.                  # hydrogen atoms are hidden.
+
PyMOL> hide h.                  # hydrogen atoms are hidden.
 
    
 
    
  PyMOL> show spheres, hetatom    # All the atoms defined as HETATOMS  
+
PyMOL> show spheres, hetatom    # All the atoms defined as HETATOMS  
  PyMOL> show spheres, het        # in the PDB input file
+
PyMOL> show spheres, het        # in the PDB input file
 
                                   # are represented as spheres.
 
                                   # are represented as spheres.
</pre>
+
</source>
 +
 
 +
== More selectors ==
 +
{| class="wikitable"
 +
|-
 +
! Single-Word Selector
 +
! Short-Form Selector
 +
! Description
 +
|-
 +
| enabled
 +
|
 +
| All enabled objects or selections from the object list.
 +
|-
 +
| masked
 +
| msk.
 +
| All masked atoms.
 +
|-
 +
| protected
 +
| pr.
 +
| All protected atoms.
 +
|-
 +
| bonded
 +
|
 +
| All bonded atoms
 +
|-
 +
| donors
 +
| don.
 +
| All hydrogen bond donor atoms.
 +
|-
 +
| acceptors
 +
| acc.
 +
| All hydrogen bond acceptor atoms.
 +
|-
 +
| fixed
 +
| fxd.
 +
| All fixed atoms.
 +
|-
 +
| restrained
 +
| rst.
 +
| All restrained atoms.
 +
|-
 +
| organic
 +
| org.
 +
| All atoms in non-polymer organic compounds (e.g. ligands, buffers).
 +
|-
 +
| inorganic
 +
| ino.
 +
| All non-polymer inorganic atoms/ions.
 +
|-
 +
| solvent
 +
| sol.
 +
| All water molecules.
 +
|-
 +
| guide
 +
|
 +
| All protein CA and nucleic acid C4*/C4'
 +
|-
 +
| metals
 +
|
 +
| All metal atoms ''(new in PyMOL 1.6.1)''
 +
|}
 +
 
  
 +
[[Category:Selector Quick Reference]]
  
[[Category:Single-word Selectors]]
+
[[Category:Selecting|Single Word Selectors]]
 +
[[Category:States]]

Latest revision as of 04:50, 11 December 2017

Redirect to:

Single-word Selectors

The very simplest selection-expressions are single-word selectors. These selectors do not take identifiers; they are complete by themselves. Below are some commonly used single-word selectors.

Single-Word Selector Short-Form Selector Description
all * All atoms currently loaded into PyMOL
none none No atoms (empty selection)
hydro h. All hydrogen atoms currently loaded into PyMOL
hetatm het All atoms loaded from Protein Data Bank HETATM records
visible v. All atoms in enabled objects with at least one visible representation
polymer pol. All atoms on the polymer (not het).
backbone bb. Polymer backbone atoms (new in PyMOL 1.6.1)
sidechain sc. Polymer non-backbone atoms (new in PyMOL 1.6.1)
present pr. All atoms with defined coordinates in the current state (used in creating movies)
center Pseudo-atom at the center of the scene
origin Pseudo-atom at the origin of rotation

The selector none won't come up much when you are typing commands directly into PyMOL, but it is useful in programming scripts.

As the table shows, many single-word selectors have short forms to save on typing. Some short forms must be followed by a period and a space, in order to delimit the word. Short forms and long forms have the same effect, so choose the form that suits you.

PyMOL> color blue, all          # It all turns blue.
PyMOL> color blue, *
   
PyMOL> hide hydro               # Representations of all 
PyMOL> hide h.                  # hydrogen atoms are hidden.
   
PyMOL> show spheres, hetatom    # All the atoms defined as HETATOMS 
PyMOL> show spheres, het        # in the PDB input file
                                   # are represented as spheres.

More selectors

Single-Word Selector Short-Form Selector Description
enabled All enabled objects or selections from the object list.
masked msk. All masked atoms.
protected pr. All protected atoms.
bonded All bonded atoms
donors don. All hydrogen bond donor atoms.
acceptors acc. All hydrogen bond acceptor atoms.
fixed fxd. All fixed atoms.
restrained rst. All restrained atoms.
organic org. All atoms in non-polymer organic compounds (e.g. ligands, buffers).
inorganic ino. All non-polymer inorganic atoms/ions.
solvent sol. All water molecules.
guide All protein CA and nucleic acid C4*/C4'
metals All metal atoms (new in PyMOL 1.6.1)