This is a read-only mirror of pymolwiki.org

Difference between revisions of "Property Selectors"

From PyMOL Wiki
Jump to navigation Jump to search
(Property Selectors)
 
Line 158: Line 158:
 
</TABLE>
 
</TABLE>
  
[[Category:Using Pymol]]
 
[[Category:Objects and Selections]]
 
 
[[Category:Selector Quick Reference]]
 
[[Category:Selector Quick Reference]]
[[Category:Property Selectors]]
 

Revision as of 00:36, 21 February 2005

Property Selectors

PyMOL reads data files written in PDB, MOL/SDF, Macromodel, ChemPy Model, and Tinker XYZ formats. Some of the data fields in these formats allow PyMOL to assign properties to atoms. You can group and select atoms according to these properties using property selectors and identifiers: the selectors correspond to the fields in the data files, and the identifiers correspond to the target words to match, or the target numbers to compare.

General

The items in a list of identifiers are separated by plus signs (+) only. Do not add spaces within a list of identifiers. The selector resi takes (+)-separated lists of identifiers, as in

PyMOL> select nterm, resi 1+2+3

or, alternatively, it may take a range given with a dash

PyMOL> select nterm, resi 1-3

However, you will get an error message if you try to combine a list and a range in an identifier to a resi as in

PyMOL> select mistake, resi 1-3+6      <--This is WRONG

The identifier for a blank field in an input file is and empty pair of quotes

PyMOL> select unstruct, ss ""   # A named selection is created
                                # to contain all atoms that are not assigned 
                                # a secondary structure.


Property Selector Table

Most property selectors select matches to their identifiers

Matching Property Selector Short Form Selector Identifier and Example
symbol e.

chemical-symbol-list
list of 1- or 2-letter chemical symbols from the periodic table

PyMOL> select polar, symbol o+n
name n.

atom-name-list


list of up to 4-letter codes for atoms in proteins or nucleic acids

PyMOL> select carbons, name ca+cb+cg+cd
resn r.

residue-name-list
list of 3-letter codes for amino acids


PyMOL> select aas, resn asp+glu+asn+gln 

or list of up to 2-letter codes for nucleic acids

<B>PyMOL></B> select bases, resn a+g
resi i.

residue-identifier-list
list of up to 4-digit residue numbers

PyMOL> select mults10, resi 1+10+100+1000

residue-identifier-range

<B>PyMOL></B> select nterm, resi 1-10
alt alt

alternate-conformation-identifier-list
list of single letters

PyMOL> select altconf, alt a+""
chain c.

chain-identifier-list
list of single letters or sometimes numbers

PyMOL> select firstch, chain a
segi s.

segment-identifier-list


list of up to 4 letter identifiers

PyMOL> select ligand, segi lig 
flag f.

flag-number
a single integer from 0 to 31

PyMOL> select f1, flag 0
  numeric_type   nt.

type-number
a single integer

PyMOL> select type1, nt. 5
text_type tt.

type-string
a list of up to 4 letter codes

PyMOL> select subset, text_type HA+HC
id id

external-index-number
a single integer

PyMOL> select idno, id 23
index idx.

internal-index-number


a single integer

<PyMOL> select intid, index 11
ss ss

secondary-structure-type
list of single letters


PyMOL> select allstrs, ss h+s+l+""


Numeric Selector Table

Other property selectors select by comparison to numeric identifiers

Numeric Selector Short Form Argument and Example
b b

comparison-operator b-factor-value
a real number

PyMOL> select fuzzy, b > 10
q q

comparison-operator occupancy-value
a real number

PyMOL> select lowcharges, q <0.50
  formal_charge   fc.

comparison-operator formal charge-value
an integer

PyMOL> select doubles, fc. = -1
  partial_charge   pc.

comparison-operator partial charge-value


a real number

PyMOL> select hicharges, pc. > 1