Subject: Re: [IMP-dev] Residue number vs residue index
From: Daniel Russel <>
Date: Tue, 3 May 2011 17:02:46 -0700
Reply-to: List for IMP development <>
On May 3, 2011, at 4:45 PM, Ben Webb wrote:
> On 5/3/11 3:23 PM, Daniel Russel wrote:
>> It was pointed out that the thing we call a "residue index" in imp
>> appears to be more commonly referred to as a "residue number" (that
>> is, the number of the residue as stored in the pdb file).
> Whoever pointed that out was incorrect. ;)
Actually, based on what you say below, they were quite correct :-)
> The two are subtly different:
> 1 Residue index is sequential; you are (pretty much) guaranteed that
> residue(our index+1) is the next residue and residue(0) is the first
> residue in a chain.
We don't have any explicit storage of this in IMP other than a Residue being the ith child of a Chain. I'm not sure there is any need for storing/dealing with such a thing as one can simply traverse the tree.
> 2 PDB residue number is not sequential, and in fact may not even be a
> number. ;) Since the residue number is derived from the sequencing,
> you may have gaps in the numbering (if structures are not available)
> which I guess is no big deal, or you may have extra residues with
> insertion codes (e.g. PDB residue numbers may go 4, 5, 6, 6A, 6B, 7,
> 15, 16).
Currently this "PDB residue number" is what is called "residue index" in IMP. The insertion code is stored separately and not many operations support it as no one has cared. One can always add insertion code support to Selections and such when there is demand.