RasMol primitive expressions are the fundamental building blocks of atom expressions. There are two types of primitive expression. 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.
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 sulphate 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, it 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.