This is already in the Pymol Wiki, but still, I was so happy when I found it :)
# The first residue in the structure file for 1cll is 4. To change this to 0, maybe to match scripts # outputted from other programs, just remove the offset of 4 from each atom alter 1cll, resi=str(int(resi)-4) # refresh (turn on seq_view to see what this command does). sort
If you have to compare a bunch of different structures of the same protein and they all have stupidly different numberings (who the hell starts counting at 500?) this helps a bit when you say “residue 10” instead of “residue 10 in struct 1, 24 in struct 2, etc…”.