Next: model.chains all
Up: The model class: handling
Previous: model.atoms all
Contents
Index
This is a standard Python list of all the residues in the model.
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 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 'm' is a model object,
PDB residue '10' in chain 'A' is given by 'm.residues['10:A']'; if the
chain has no chain id, 'm.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 'm' is a model object, 'm.residues[1]' is the second
residue. Contrast with 'm.residues['1']' above, which returns the residue
with PDB number '1'.
See Section 6.16 for more information about residue
objects.
See also model.residue_range(), for getting a contiguous range of
residues.
Next: model.chains all
Up: The model class: handling
Previous: model.atoms all
Contents
Index
Ben Webb
2007-08-03