Back to TABLE OF CONTENTS
Atom Expressions
   RasMol atom expressions uniquely identify an arbitrary group of atoms within a molecule. Atom expressions are composed of either primitive expressions, predefined sets, comparison operators, within expressions, or logical (boolean) combinations of the above expression types.
   The logical operators allow complex queries to be constructed out of simpler ones using the standard boolean connectives and, or and not. These may be abbreviated by the symbols "&", "|" and "!" respectively. Parentheses (brackets) may be used to alter the precedence of the operators. For convenience, a comma may also be used for boolean disjunction.
   The atom expression is evaluated for each atom, hence protein and backbone selects protein backbone atoms, not the protein and [nucleic] acid backbone atoms!

Examples:    backbone and not helix
             within( 8.0, ser70 )
             not (hydrogen or hetero)
             not *.FE and hetero
             8, 12, 16, 20-28
             arg, his, lys

Examples
Primitive Expressions
Comparison Operators
Within Expressions
Example Expressions
   The following table gives some useful examples of RasMol atom expressions.

    Expression      Interpretation
    *               All atoms
    cys             Atoms in cysteines
    hoh             Atoms in heterogenous water molecules
    as?             Atoms in either asparagine or aspartic acid
    *120            Atoms at residue 120 of all chains
    *p              Atoms in chain P
    *.n?            Nitrogen atoms
    cys.sg          Sulfur atoms in cysteine residues
    ser70.c?        Carbon atoms in serine-70
    hem*p.fe        Iron atoms in the Heme groups of chain P

Primitive Expressions
   RasMol primitive expressions are the fundamental building blocks of atom expressions. There are two types of primitive expression.

  1. The first type is used to identify a given residue number or range of residue numbers. A single residue is identified by its number (position in the sequence), and a range is specified by lower and upper bounds separated by a hyphen character. For example select 5,6,7,8 is also select 5-8. Note that this selects the given residue numbers in all macromolecule chains.
  2. The second type of primitive expression specifies a sequence of fields that must match for a given atom. The first part specifies a residue (or group of residues) and an optional second part specifies the atoms within those residues. The first part consists of a residue name, optionally followed by a residue number and/or chain identifier.

   A residue name typically consists of up to three alphabetic characters, which are case insensitive. Hence the primitive expressions SER and ser are equivalent, identifying all serine residues. Residue names that contain non-alphabetic characters, such as sulfate groups, may be delimited using square brackets, i.e.[SO4]
   The residue number is the residue's position in the macromolecule sequence. Negative sequence numbers are permited. For example, SER70. Care must be taken when specifying both residue name and number: if the group at the specified position isn't the specified residue no atoms are selected.
   The chain identifier is typically a single case-insensitive alphabetic or numeric character. Numeric chain identifiers must be distinguished or separated from residue numbers by a colon character. For example, SER70A or SER70:1
   The second part consists of a period character followed by an atom name. An atom name may be up to four alphabetic or numeric characters.
An asterisk may be used as a wild card for a whole field and a question mark as a single character wildcard.    Multiple NMR Models in PDB files: The syntax of RasMol atom expressions allows the selection of individual molecule conformations if present in an NMR file. The simplest form of the atom expression is the syntax "::25" to select model 25 from the molecule. This is equivalent to the atom expression, "model = 25", as the keyword model may now be used in comparison expressions. The most general form of atom expression is now CYS32:A:25.SG which denotes the gamma sulfur of residue cysteine-32 in chain A of model 25.
   Individual chains may be specified by the syntax ":A" for chain A, or ":1" for chain 1 (i.e. the wildcard may be dropped from the expression "*:A"). This may also be extended to NMR models; ":A:4" denotes chain A of model 4, and even more terse, "::4" means all atoms in all chains of NMR model 4.
Comparison Operators
   Parts of a molecule may also be distinguished using equality, inequality and ordering operators on their properties. The format of such comparison expression is a property name, followed by a comparison operator and then an integer value.
    The atom properties that may be used in RasMol are atomno for the atom serial number, elemno for the atom's atomic number (element), resno for the residue number, radius for the spacefill radius in RasMol units (or zero if not represented as a sphere) and temperature for the PDB anisotropic temperature value.
   The equality operator is denoted as either = or ==. The inequality operator is either <>, !=, or /=. The ordering operators are: <   for less than; <=   for less than or equal to; >   for greater than; and >=   for greater than or equal to.

Examples:    resno  23
             temperature >= 900
             atomno == 487

Within Expressions
   A RasMol within expression allows atoms to be selected on their proximity to another set of atoms. A within expression takes two parameters separated by a comma and surrounded by parentheses. The first argument is an integer value called the "cut-off" distance of the within expression and the second argument is any valid atom expression. The cut-off distance is expressed in either integer RasMol units or Angstroms containing a decimal point. An atom is selected if it is within the cut-off distance of any of the atoms defined by the second argument. This allows complex expressions to be constructed containing nested within expressions.
    For example, the command select within(3.2,backbone) selects any atom within a 3.2 � radius of any atom in a protein or nucleic acid backbone. Within expressions are particularly useful for selecting the atoms around an active site.
   Back to TABLE OF CONTENTS    Atom Expressions