# RES, RESTRICT

NAME
RES, RESTRICT - restrict the current selection.
SYNOPSIS
RES chain_identifiers/residue_serials/residue_names/atom_names
RES residue_ranges
RES residue_names
RES ATO atomic_ranges
RES keyword
RES ELE chemical_symbol
RESTRICT chain_identifiers/residue_serials/residue_names/atom_names
RESTRICT residue_ranges
RESTRICT residue_names
RESTRICT ATOMS atomic_ranges
RESTRICT keyword
RESTRICT ELEMENT chemical_symbol
DESCRIPTION
Restrict the current selection. Atoms which do not satisfy the specified cryteria are excluded from selection. Four types of restriction cryteria may be used:
(1) detailed selection;
(2) restriction by residue serial numbers;
(3) restriction by residue names;
(4) restriction selection (by keyword);
(5) restriction by chemical symbol;
(6) restriction by atom serial number.
DETAILED RESTRICTION
In this case four data types are specified simultaneously: chain identifiers, residue serial numbers, residue names and atom names. It is not possible to specify atomic serial numbers. The string should contain exactly three slashes, separating different data types:
chain_identifiers/residue_serials/residue_names/atom_names.
Both uppercase and lowercase characters are accepted. Space ( ), comma (,) and semicolon (;) may be used as separators.
Chain identifiers are single alphabetic characters. Asterisk (*) may be used to specify all chains. The keyword EXC (EXCEPT) may be used to exclude one or more chains from restriction.
Residue serial numbers consist of digits. Minus may be used to specify a range of residue serial numbers. For example, 1-100 specifyes residues from 1 to 100, including these two. Asterisk (*) may be used to specify all residue serials. The keyword EXC (EXCEPT) may be used to exclude serial numbers or ranges from restriction.
Residue names are expected in three letters code. Asterisk (*) may be used to specify all residue names. The keyword EXC (EXCEPT) may be used to exclude one or more names from restriction. Non-standard names are accepted.
The names of atoms are expected as used in the input file; do not replace them with pure chemical symbols. C alpha, for example, should be specified as CA or ca (case is not important), if coordinates are read from PDB file. Asterisk (*) may be used to specify all atoms, while EXC may be used to exclude some atoms from this specification. Examples:

res a/*/*/* | Leave only atoms which belong to chain A.
res * exc m/*/*/ca | Leave only CA atoms which belong to chain M.
res */*/*/* exc ca,c,n,o | Remove CA, C, N and O atoms from the selection.
res a/* exc 72-112/*/ca | Leave only CA atoms which belong to chain A, but exclude residues 72-112.

RESTRICTION BY RESIDUE SERIAL NUMBERS
In this type of selection restriction, residue numbers, residue ranges or residue names may be specified. The restriction cryteria should contain no slashes. Keyword EXC (EXCEPT) is accepted, but asterisk (*) will be missintepreted. Minus may be used to specify residue ranges. Comma (,), semicolon (;) and space ( ) may be used as separators. Examples:

res 1-100 | Leave only atoms which belong to residues from 1 to 100.
res 1-100 exc 20-40 | Leave only atoms which belong to residues 1-100, but exclude 20-40.
res 1, 4, 8, 11-48 exc 20-32 | Leave atoms which belong to residues 1, 4, 8, 11-48 but exclude residues 20-32.

RESTRICTION BY RESIDUE NAMES
Three letters code should be used. Asterisk (*) and keyword EXC (EXCEPT) are not accepted. Example:

res phe,tyr,trp | Restrict selection to PHE, TYR and TRP.

RESTRICTION BY ATOMIC SERIAL NUMBERS
To restrict the current selection to a single atom by the atomic serial number, combine the command RES (RESTRICT) and the keyword ATO (ATOMS). For example, to restrict the selection to the atom number 102 type:
res ato 102
The same keyword may be used to restrict the current selection to a range of atoms or to two or more ranges. Examples:

res ato 1-100 | Restrict the current selection to atoms which have serial numbers in the range between 1 and 100.
res 1-20 40-50 | Restrict the current selection to atoms which have serial numbers between 1 and 20 and between 40 and 50.

Do not combine the keywords EXC (EXCLUDE) and ATO (ATOMS).
SPECIAL RESTRICTION KEYWORDS
Some special keywords may be combined with RES to specify residues or atoms according to some properties. A single keyword should be used; asterisk (*) and keyword EXC (EXCEPT) are not accepted. COM (COMPLEMENT) may be specified, but restriction to complement means that nothing will be left in the selection. Examples:

res * res all | Leave the selection unchanged (trivial, useless).
res abo res above | Restrict to atoms above the plane.
res aci res acidic | Leave only acidic amino-acids in the selection (GLU and ASP).
res ali res aliphatic | Leave only aliphatic amino acids (ILE, LEU and VAL).
res alt | Restrict to atoms at alternate positions.
res bad | Restrict selection to bad residues. A residue is treated as bad if the peptide bond assigned to this residue is non-planar. The peptide bond is non-planar if the omega angle is different for 20 or more degrees from 0 or 180 degrees.
res bas res basic | Leave only basic amino acids (ARG, LYS and HIS).
res bel res below | Restrict to atoms below the plane.
res cha res charged | Leave only charged amino acids (ARG, LYS, HIS, GLU and ASP).
res cis | Restrict selection to cis residues.
res com res complement | Leave only atoms which were not select previously.
res het res hetero | Leave only hetero atoms (heme groups, water etc.).
res pho res hydrophobic | Leave only hydrophobic amino acids (ALA, ILE, LEU, MET, PHE, TRP, VAL, TYR, CYS, GLY and HIS).
res mai res main_chain | Leave only main chain atoms (CA, C, N and O).
res mod serial_number res model serial_number | Restrict to a model specified by serial_number. NMR structure is a set of models. Example: res mod 1
res pat res pattern | Restrict to the sequence pattern. The command PAT (PATTERN) is used to define the sequence pattern.
res neg res negative | Leave only negatively charged amino acids (GLU and ASP).
res pol res polar | Leave only polar amino acids (ARG, LYS, HIS, ASP, GLU, ASN, GLN, SER, THR, TRP and TYR).
res seq res sequence | Restrict to sequence fragments which match the sequence stored to the sequence buffer. The sequence buffer should be initialized before executing this command.
res pos res positive | Leave only positively charged amino acids (ARG, LYS and HIS).
res sid res side_chains | Leave only atoms which belong to side chains (all except CA, C, N and O).
res sma res small | Leave only small amino acids (GLY, ALA, SER, THR, CYS, VAL, PRO, ASP and ASN).
res sph res sphere | Restrict to the atoms inside the sphere. Use the command RAD (RADIUS) to set the sphere radius.
res tin res tiny | Leave only tiny amino acids (GLY,ALA and SER).
res tm | Restrict to the transmembrane part (useful for membrane proteins).
res tra res trans | Restrict selection to trans residues.
res tri res triplet | If there are three (or more) positively charged residues in a fragment of up to five protein residues, restrict the current set of selected atoms to these three residues. Detailed explanation may found in the article: D. Juretic, L. Zoranic and D. Zucic, Basic charge clusters and predictions of membrane protein topology, Journal of Chemical Information and Computer Sciences 42, No. 3, 620-632 (2002).

RESTRICTING SELECTION TO
THE SPECIFIED CHEMICAL ELEMENT
To restrict the selection to certain chemical element, use the keyword ELEMENT (short form: ELE) and the standard chemical symbol. To restrict your selection to iron atoms, for example, you should type the following command:
res ele fe
In addition to real chemical elements, garlic accepts two imaginary elements: "jellium" (J) and "quarkonium" (Q). Jellium is inert and it never binds to neighboring atoms, no matter how close they are. Quarkonium binds to other quarkonium atoms which have adjacent atomic serial numbers. For example, if some quarkonium atom has serial number i, it may form bonds with quarkonium atoms i-1 and i+1. The interatomic distance is not important! Both elements were introduced to enable drawing of special objects. Quarkonium may be used to draw polygonal lines in three dimensions. The original idea was to adapt garlic for visualization of some medical data. For example, quarkonium may be used to represent blood vessels and jellium to represent retraction balls characteristic for broken axons in human brain. By the way, quarkonium is a serious thing in high energy physics, but there it looks quite different. Note that symbols J and Q are not used in the periodic table of elements.
NOTES
(1) The command RESTRICT resets the editing mode to default (no editing).
RELATED COMMANDS
SELECT overwrites the previous selection. ADD expands the previous selection.