def parse_cmap(cmap_file):
    """
    Perform parsing of the specified CMAP file holding interaction information and return its entries.

    Parameters
    ----------
    cmap_file : str
        The CMAP file holding the interaction informations among residues of the same structure.

    Returns
    -------
    entries : list of (str, str, int, int, float)
        The list of entries. Each entry is a tuple of the form
        (chain_id_1, chain_id_2, residue_id_1, residue_id_2, f), where `f` belongs to [0,1] and is a
        measure of whether residues 1 and 2 are interacting. Usually value of `f` larger than 0.1
        indicate interaction.
    """
    entries = []
    cmap = open(cmap_file)
    for line in cmap:
        fields = line.split()
        if fields[0] == 'contact':
            fs_1_2_1, fs_1_2_2 =  fields[1].split(','), fields[2].split(',')
            if len(fs_1_2_1) != 2 or len(fs_1_2_2) != 2 or not fs_1_2_1[1].isdigit() or not fs_1_2_2[1].isdigit():
                return
            chain_id_1, res_idx_1 = fs_1_2_1[0], int(fs_1_2_1[1])
            chain_id_2, res_idx_2 = fs_1_2_2[0], int(fs_1_2_2[1])
            f = float(fields[3])
            entries.append((chain_id_1, chain_id_2, res_idx_1, res_idx_2, f))
    return entries