next up previous contents index
Next: residue.phi dihedral 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/write_pdb_xref.py


# This demonstrates relating PDB residue numbers with residue indices.

from modeller import *

log.verbose()
env = environ()
env.io.atom_files_directory = '../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.chain.name, r.pdb_name)



Ben Webb 2008-02-01