This is a standard Python list of all the residues in the
sequence. This can be used to query individual residue properties
(e.g. amino acid type) or to specify residues for use in restraints, etc.
Residues can be individually accessed in two ways:
- A string of the form 'RESIDUE_#[:CHAIN_ID]', where
RESIDUE_# is a five character residue number (four characters for the number
itself, plus one for an optional insertion code) as it occurs in the PDB file
of a model, and the optional CHAIN_ID is the single character chain id as
it occurs in the PDB file. For example, if 's' is a Sequence object,
PDB residue '10' in chain 'A' is given by 's.residues['10:A']'; if the
chain has no chain id, 's.residues['10']' would be sufficient. Note that
the quotes are required to force the use of PDB numbers.
- By numeric index, starting from zero, in standard Python fashion. For
example, if 's' is a Sequence object, 's.residues' is the second
residue. Contrast with 's.residues['1']' above, which returns the residue
with PDB number '1'.
See Section 6.20 for more information about Residue
See also model.residue_range(), for getting a contiguous range of
residues in a model.