def get_residue_index(d):
    """Gets the index of the residue in the protein sequence (1-indexed). This is stored in the 'label_seq_id' field.
    
    :param dict d: the atom dictionary to read.
    :rtype: ``int``"""

    index = d["label_seq_id"]
    if index != '.':
        index = int(index)
    else:
        index = 0
    return index