Use a mapping to point to the residues ids as specified in the pdb file.