Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help
Special pages
SBGrid Resources
SBGrid Consortium
SBGrid Data Bank
Software Webinars
PyMOL Webinar
PyMOL Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Selection Algebra
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Selection Operator/Modifier Table == Selection operators and modifiers are listed below. The dummy variables ''s1'' and ''s2'' stand for selection-expressions such as "chain a" or "hydro." {| class="wikitable" |- ! Operator ! Aliases ! Description |- !colspan="3" style="text-align:left"| Generic |- | all || * | All atoms currently loaded into PyMOL |- | none || | Empty selection |- | enabled || | Atoms from enabled objects |- !colspan="3" style="text-align:left"| Named selections |- | <span style="color: #999">sele</span> || | Named selection or object "sele", but only if it doesn't conflict with the name of another operator |- | %<span style="color: #999">sele</span> || | Named selection or object "sele" <span style="padding: 1px 4px; background-color: #fc3; border: 1px solid #ccc">Recommended, avoids ambiguity</span> |- | ?<span style="color: #999">sele</span> || | Named selection or object "sele", or empty selection if "sele" doesn't exist |- !colspan="3" style="text-align:left"| Logical |- | not <span style="color: #999">S1</span> || ! | Inverts selection |- | <span style="color: #999">S1</span> and <span style="color: #999">S2</span> || & | Atoms included in both S1 and S2 |- | <span style="color: #999">S1</span> or <span style="color: #999">S2</span> || <nowiki>|</nowiki> | Atoms included in either S1 or S2 |- | <span style="color: #999">S1 S2</span> || | implicit '''or''' |- | <span style="color: #999">S1</span> and (<span style="color: #999">S2</span> or <span style="color: #999">S3</span>) || | Parentheses for evaluation order control |- | first <span style="color: #999">S1</span> || | First atom in S1 (single atom selection) |- | last <span style="color: #999">S1</span> || | Last atom in S1 (single atom selection) |- !colspan="3" style="text-align:left"| Identifiers <small style="font-weight: normal">(see also [[Selection Macros]])</small> |- | model <span style="color: #999">1ubq</span> || m. | Atoms from object "1ubq" |- | chain <span style="color: #999">C</span> || c. | Chain identifier "C" |- | segi <span style="color: #999">S</span> || s. | Segment identifier "S" ('''label_asym_id''' from mmCIF) |- | resn <span style="color: #999">ALA</span> || r. | Residue name "ALA" |- | resi <span style="color: #999">100-200</span> || i. | Residue identifier between 100 and 200 |- | name <span style="color: #999">CA</span> || n. | Atom name "CA" |- | alt <span style="color: #999">A</span> || | Alternate location "A" |- | index <span style="color: #999">123</span> || idx. | Internal per-object atom index (changes with [[sort|sorting]]) |- | id <span style="color: #999">123</span> || | ID column from PDB file |- | rank <span style="color: #999">123</span> || | Per-object atom index at load time (see also [[retain_order]]) |- | pepseq <span style="color: #999">ACDEF</span> || ps. | Protein residue sequence with one-letter code "ACDEF" (see also [[FindSeq]]) |- | label <span style="color: #999">"Hello World"</span> || | Atoms with label "Hello World" ''(new in PyMOL 1.9)'' |- !colspan="3" style="text-align:left"| Identifier matching |- | <span style="color: #999">S1</span> in <span style="color: #999">S2</span> || | Atoms in S1 whose identifiers ''name, resi, resn, chain'' and ''segi'' '''all''' match atoms in S2 |- | <span style="color: #999">S1</span> like <span style="color: #999">S2</span> || | Atoms in S1 whose identifiers ''name'' and ''resi'' match atoms in S2 |- !colspan="3" style="text-align:left"| Entity expansion |- |colspan="3" style="background-color: #fc3"| <span id="weak-by">Important:</span> All "by"-operators have a '''weak priority''', so (byres S1 or S2) is actually identical to (byres (S1 or S2)) and '''not''' to ((byres S1) or S2) |- | byobject <span style="color: #999">S1</span> || | Expands S1 to complete objects |- | bysegi <span style="color: #999">S1</span> || bs. | Expands S1 to complete segments |- | bychain <span style="color: #999">S1</span> || bc. | Expands S1 to complete chains |- | byres <span style="color: #999">S1</span> || br. | Expands S1 to complete residues |- | bycalpha <span style="color: #999">S1</span> || bca. | CA atoms of residues with at least one atom in S1 |- | bymolecule <span style="color: #999">S1</span> || bm. | Expands S1 to complete molecules (connected with bonds) |- | byfragment <span style="color: #999">S1</span> || bf. | |- | byring <span style="color: #999">S1</span> || | All rings of size β€ 7 which have at least one atom in S1 ''(new in PyMOL 1.8.2)'' |- | bycell <span style="color: #999">S1</span> || | Expands selection to unit cell |- !colspan="3" style="text-align:left"| Bond expansion |- | bound_to <span style="color: #999">S1</span> || bto. | Atoms directly bonded to S1, may include S1 |- | neighbor <span style="color: #999">S1</span> || nbr. | Atoms directly bonded to S1, excludes S1 |- | <span style="color: #999">S1</span> extend <span style="color: #999">3</span> || xt. | Expands S1 by 3 bonds connected to atoms in S1 |- !colspan="3" style="text-align:left"| Proximity <small style="font-weight: normal">(see also [[#Comparison of distance operators|comparison of distance operators]])</small> |- | <span style="color: #999">S1</span> within <span style="color: #999">12.3</span> of <span style="color: #999">S2</span> || w. | Atoms in S1 that are within 12.3 Angstroms of any atom in S2 |- | <span style="color: #999">S1</span> around <span style="color: #999">12.3</span> || a. | Atoms with centers within 12.3 Angstroms of the center of any atom in S1 |- | <span style="color: #999">S1</span> expand <span style="color: #999">12.3</span> || x. | Expands S1 by atoms within 12.3 Angstroms of the center of any atom in S1 |- | <span style="color: #999">S1</span> gap <span style="color: #999">1.2</span> || | Atoms whose VDW radii are separated from the VDW radii of S1 by a minimum of 1.2 Angstroms. |- | <span style="color: #999">S1</span> near_to <span style="color: #999">12.3</span> of <span style="color: #999">S2</span> || nto. | Same as ''within'', but excludes S2 from the selection (and thus is identical to <code>S1 and S2 around 12.3</code>) |- | <span style="color: #999">S1</span> beyond <span style="color: #999">12.3</span> of <span style="color: #999">S2</span> || be. | Atoms in S1 that are at least 12.3 Anstroms away from S2 |- !colspan="3" style="text-align:left"| Properties |- | partial_charge <span style="color: #999">< 1.2</span> || pc. | |- | formal_charge <span style="color: #999">= 1</span> || fc. | |- | b <span style="color: #999">< 100.0</span> || | B-factor less than 100.0 |- | q <span style="color: #999">< 1.0</span> || | Occupancy less than 1.0 |- | ss <span style="color: #999">H+S</span> || | Atoms with secondary structure H (helix) or S (sheet) |- | elem <span style="color: #999">C</span> || e. | Atoms of element C (carbon) |- | p<span style="color: #999">.foo</span> = <span style="color: #999">12</span> || | |- | p<span style="color: #999">.foo</span> < <span style="color: #999">12.3</span> || | |- | p<span style="color: #999">.foo</span> in <span style="color: #999">12+34</span> || | |- | stereo <span style="color: #999">R</span> || | Chiral R/S stereo center with label R ''(only [https://pymol.org/d/media:stereochemistry Incentive PyMOL 1.4-1.8])'' |- !colspan="3" style="text-align:left"| Flags |- | bonded || | Atoms which have at least one bond |- | protected || | see [[protect]] |- | fixed || fxd. | see [[flag]] |- | restrained || rst. | see [[flag]] |- | masked || msk. | see [[mask]] |- | flag <span style="color: #999">25</span> || f. | Atoms with flag 25, see [[flag]] |- !colspan="3" style="text-align:left"| Chemical classes |- | organic || org. | Non-polymer organic compounds (e.g. ligands, buffers) |- | inorganic || ino. | Non-polymer inorganic atoms/ions |- | solvent || sol. | Water molecules |- | polymer || pol. | Protein or Nucleic Acid |- | polymer.protein || | Protein ''(New in PyMOL 2.1)'' |- | polymer.nucleic || | Nucleic Acid ''(New in PyMOL 2.1)'' |- | guide || | Protein CA and nucleic acid C4*/C4' |- | hetatm || | Atoms loaded from PDB HETATM records |- | hydrogens || h. | Hydrogen atoms |- | backbone || bb. | Polymer backbone atoms ''(new in PyMOL 1.6.1)'' |- | sidechain || sc. | Polymer non-backbone atoms ''(new in PyMOL 1.6.1)'' |- | metals || | Metal atoms ''(new in PyMOL 1.6.1)'' |- | donors || don. | Hydrogen bond donor atoms |- | acceptors || acc. | Hydrogen bond acceptor atoms |- !colspan="3" style="text-align:left"| Style |- | visible || v. | Atoms in enabled objects with at least one visible representation |- | rep <span style="color: #999">cartoon</span> || | Atoms with cartoon representation |- | color <span style="color: #999">blue</span> || | Atoms with atom-color blue (by color index) |- | cartoon_color <span style="color: #999">blue</span> || | Atoms with atom-level cartoon_color setting (by color index) |- | ribbon_color <span style="color: #999">blue</span> || | Atoms with atom-level ribbon_color setting (by color index) |- !colspan="3" style="text-align:left"| Non molecular |- | center || | Pseudo-atom at the center of the scene |- | origin || | Pseudo-atom at the origin of rotation |- !colspan="3" style="text-align:left"| Coordinates |- | state <span style="color: #999">123</span> || | Atoms with coordinates in state 123 |- | present || pr. | Atoms with coordinates in the current state |- | x <span style="color: #999">< 12.3</span> || | Atoms with model-space x coordinate less than 12.3 |- | y <span style="color: #999">< 12.3</span> || | Atoms with model-space y coordinate less than 12.3 |- | z <span style="color: #999">> 12.3</span> || | Atoms with model-space z coordinate greater than 12.3 |- !colspan="3" style="text-align:left"| Atom typing |- | text_type <span style="color: #999">TT</span> || tt. | ''Auto-assigned in [https://pymol.org/d/media:atomtyping Incentive PyMOL 1.4-1.8])'' |- | numeric_type <span style="color: #999">123</span> || nt. | |}
Summary:
Please note that all contributions to PyMOL Wiki are considered to be released under the GNU Free Documentation License 1.2 (see
PyMOL Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Selection Algebra
(section)
Add topic