Last modified: 5-apr-2004
The SELECT subsentence can be included in almost any MAIN command sentence. It allows you to perform the desired operations on a limited ATOM or POINT SELECTION. In most cases ALL atoms are selected by default, sometimes (as in a DELETE command) such default is not acceptable, and a selection must be specified.
The SELECT ... END subsentence assigns each atom a flag value 1 for (true) or 0 for (false).
In general a SELECT sentence looks like this:
MAIN> ... SELECT tag1 .OR. tag2 .AND. ( .NOT. tag3 ...) .XOR. tag4 END
The user can combine the tag(s) with logical operators .AND., .OR., .NOT. and brackets (). Up to 10 levels of brackets are allowed. Logical operators .AND. and .OR. act between 2 tags, while .NOT. acts on one only.
Recursive use of the SELECT sentence is possible only indirectly with the help of KEY(s). The SELECT sentence uses the result of a previous one as a tag.
Operators allow you to combine tags with logical relations:
Tag is a synonym for an atom property or its description. Through tags you can reach particular group of atoms and combine them by applying brackets and logical operations. Tags refer to ATOM NAMES, atomic TEMPERATURE factors, atomic positions regarding to a PLANE or a CENTER, ...
MAIN differentiates between small and capital letters. The star sign '*' and the percent sign '%' have special meaning when atoms are selected according to their NAMES or KEY(s). The star allows any further character, and the percent sign allows any character on that particular place.
See also section "Operators".
PAIR RESIDUE SEGMENT SEQUENCE
ANALYSIS AVERAGE real real
RMS real real MINIMAL real real MAXIMAL real real
AROUND KEY string DISTANCE real
CENTER ATOM atom-num CALCULATED COORDINATES real real real
ATOM MODULUS inte inte [inte] (*)
NUMBER inte [: inte inte ] NAME string [strings ...] CLASS string
BETWEEN inte inte
BOND PAIR inte
NUMBER inte RANGE real1 real2
CHAIN MODULUS inte inte [inte] (*)
NUMBER inte [inte] NAME string [strings ...] SIZE inte inte
CHARGE real real
COLOR inte inte
CTABLE inte inte
CUT atom-num atom-num
ELEMENTS int1 int2
INTERNAL DISTANCE real real
ANGLE real real DIHEDRAL real real
MAP inte  real real
NEIGHBOUR atom-num inte
PATH inte inte
PLANE inte real real
RESIDUE MODULUS inte inte [inte] (*)
NUMBER inte [: inte] NAME string
SEQUENCE string [: string] [string ...]
SEGMENT MODULUS inte inte [inte] (*)
NUMBER inte [: inte] NAME string [strings ...] SIZE inte inte
TEMPERATURE real real
WEIGHT real real
(*) ATOM NAME is equivalent to NAME ATOM. Word order is also not important for combinations of words as RESIDUE and SEGMENT with words NAME, NUMBER and MODULUS.
... BY BOND ... PAIR RESIDUE SEGMENT SEQUENCE
BY is a special tag operator that can precede any other tag including a KEYED SELECTION. It means that atoms that are covalently bound (BOND), form a PAIR, are in the same RESIDUE or SEGMENT or have the same SEQUENCE name as any of the tagged atoms, will be SELECTED. Operators BY RESIDUE, SEGMENT or SEQUENCE operators SELECT also the tagged atoms, while the BY BOND and PAIR don't.
... ALL ...
Selects ALL atoms. In some command sentences (DEFINE, IMAGE, WRITE) it is the default SELECTION so that it doesn't always have to be explicitly specified. In general, ALL atoms are SELECTED, unless a selection is required.
... AVERAGE real real RMS real real MINIMAL real real MAXIMAL real real
Select analysis data (AVERAGE, RMS, MINIMAL or MAXIMAL) within the given range for ATOM or RESIDUE selection.
... AROUND KEY string CENTER ATOM atom-num CALCULATED COORDINATES real real real FROM string DISTANCE real
The AROUND tag selects atoms that are AROUND any atom from the KEY or AROUND a specified point in space (CENTER) for the specified DISTANCE. The CENTER can be defined either by an ATOM position, by the current IMAGE center (CALCULATED) or specified directly with COORDINATES. In order to speed up the calculation, it is reasonable to limit the search only to the atoms FROM the specified key.
... BETWEEN int1 int2
Selects all atoms included in the covalent bond network between the two specified atoms. (Used for selection of all atoms between two CA atoms to specify rotation of the whole peptide bond subunit.)
... CHARGE real real
SELECTS atoms with their partial atomic CHARGES in a specified range.
... CLASS string
SELECTS atoms with specified atom CLASSES.
... COLOR inte
SELECT atoms with the specified COLOR.
... CTABLE inte inte
Selects atoms with the number of covalently attached neighbors between "int1" and "int2".
... CUT atom-num1 atom-num2
SELECTS the atoms, that are included in the network of covalent bonds, starting at the atom-num2 away from the atom-num1. This is a shortcut to the procedure, where you should first cut the bond (atom-num1 - atom-num2), then select all atoms included in the covalent bond network on the side of atom-num2 and at the end join the atoms again.
... ELEMENTS int1 [int2 ...]
SELECTS atoms with the given element number (atomic number). More than one number can be specified at a time.
SELECTS atoms from the HISTORY list.
Selects displayed atoms.
INTERNAL DISTANCE real real
SELECTS the atoms whose INTERNAL coordinate (DISTANCE, ANGLE or DIHEDRAL angle) is in the specified range. Internal coordinates and Z_TABLE are required.
Selects the MAIN chain amino acid residue atoms (C,O,CA,H,N). Its equivalent is ATOM NAME C O CA H N.
... ATOM MODULUS inte inte [inte] NUMBER inte [inte] NAME string [strings...] CLASS string
Selects ATOMS according to their NAME(S), CLASS, consecutive NUMBER in a range or MODULUS operator.
... RESIDUE MODULUS inte inte [inte] NUMBER inte [inte] NAME string [strings...]
Selects RESIDUES according to their NAME(S), consecutive NUMBER in a range or MODULUS operator. See ATOMS for a further description of NAME.
... SEGMENT MODULUS inte inte [inte] NUMBER inte [inte] NAME string [strings...] SIZE inte inte
Selects SEGMENTS according to their NAME(S), consecutive NUMBER in a range or MODULUS operator. SEGMENT SIZE selects segments that include number of atoms within the specified limits.
... CHAIN MODULUS inte inte [inte] NUMBER inte [inte] NAME string [strings...] SIZE inte inte
Selects CHAINS according to their NAME(S), consecutive NUMBER in a range or MODULUS operator. CHAIN SIZE chains of atoms that include number of atoms within the specified limits.
... MAP inte real real
Select atoms within the specified (electron) density range. The density at an atom center is calculated from the MAP inte by linear interpolation.
... NEIGHBOUR atom-num inte
SELECTS all the atoms that are within the range of the inte steps form the central atom-num. 1 step is one covalent bond. With 0 only the atom atom-num is selected, with 1 its NEIGHBOURS, with 2 NEIGHBOURS of the NEIGHBOURS and so on. With inte -1 the whole molecule (network of covalent bonds starting at the atom-num) is SELECTED.
... PATH inte1 inte2
SELECTS atoms on the covalent bond network on the direct path betwen the two specified atoms.
... PLANE inte real1 real2 ...
SELECTS atoms that are located in the specified distance range (real1 and real2) distances from the PLANE inte. Distances are calculated from the scalar product between the atomic position and the plane equation and can be negative. Planes are defined with a SET PLANE or CALCULATE PLANE command sentence.
SELECTS atoms involved in RINGS of covalent networks.
... SEQUENCE string (string) ...
SELECTS the residues between the residues with the specified sequence names. When only residues with a single SEQUENCE name are to be found, then the second string is redundant.
... TEMPERATURE real real ...
SELECT atoms with TEMPERATURE factors in the specified range.
... WEIGHT real real ...
SELECT atoms with crystallographic WEIGHTING factors in the specified range.
MAIN> write select all end coordinates
Selects all atoms and writes their coordinates to the terminal.
MAIN> key a select atom name C* N* O* .and. .not. MAIN> ( main .or. residue - MAIN> name A* ) .and. segment number 2 10 end
Assigns to key 'a' all atoms, which ATOM NAME starts with C, N or O and are not ( the MAIN chain atoms or their RESIDUE NAME doesn't start with an A ) and are included in segments with their consecutive numbers from 2 to 10.
MAIN> key inhibitor select segment number 1 : 3 5 end
Assigns the atoms included in the segment number 1 to 3 and 5 to the KEY inhibitor.
MAIN> key water select residue name HOH end
Assigns to key water all residues with names HOH
MAIN> ... select around key inhib distance 4.5 from water end
SELECTS atoms that are closer than 4.5A to key inhib and belong to key water. (Two solvation shells).
MAIN> key bond_to_C select by bond atom name C* end
SELECTS all atoms that are covalently bound to atoms with name starting with the letter C (carbons). When two C* atoms are connected to each other, then they are both SELECTED.