next up previous contents index
Next: The point class: a Up: The residue class: a Previous: residue.hetatm HETATM   Contents   Index

residue.index -- internal integer index

This is the index used internally to identify the residue; residues are numbered sequentially starting from 1.
Example: examples/commands/

# This demonstrates relating PDB residue numbers with residue indices.

from modeller import *

env = environ() = '../atom_files'

mdl = model(env, file='2abx')

print "Mapping from residue indices to PDB residue and chain names:"
for r in mdl.residues:
    print "%6d   %3s:%s   %s" % (r.index, r.num,, r.pdb_name)

Ben Webb 2007-01-19