Property Selectors: Difference between revisions
No edit summary |
No edit summary |
||
Line 169: | Line 169: | ||
[[Category:Selector Quick Reference]] | [[Category:Selector Quick Reference]] | ||
[[Category: | [[Category:Selecting|Selector Quick Reference]] |
Revision as of 17:36, 2 November 2007
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
PyMOL> select polar, symbol o+n |
name | n. |
atom-name-list
PyMOL> select carbons, name ca+cb+cg+cd |
resn | r. |
residue-name-list
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
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
PyMOL> select altconf, alt a+"" |
chain | c. |
chain-identifier-list
PyMOL> select firstch, chain a |
segi | s. |
segment-identifier-list
PyMOL> select ligand, segi lig |
flag | f. |
flag-number
PyMOL> select f1, flag 0 |
numeric_type | nt. |
type-number
PyMOL> select type1, nt. 5 |
text_type | tt. |
type-string
PyMOL> select subset, text_type HA+HC |
id | id |
external-index-number
PyMOL> select idno, id 23 |
index | idx. |
internal-index-number
<PyMOL> select intid, index 11 |
ss | ss |
secondary-structure-type
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
PyMOL> select fuzzy, b > 10 |
q | q |
comparison-operator occupancy-value
PyMOL> select lowcharges, q <0.50 |
formal_charge | fc. |
comparison-operator formal charge-value
PyMOL> select doubles, fc. = -1 |
partial_charge | pc. |
comparison-operator partial charge-value
PyMOL> select hicharges, pc. > 1 |
User Notes
To select atoms by their PDB ATOM number, use the id selector:
select Nt, id 1-30
makes a new selection called Nt and puts in it the first 30 atoms (assuming your PDB starts numbering at 1).