def remove_dihedral(mol, a, b, c, d):
    """
    utils.remove_dihedral

    Remove a specific dihedral in RDkit Mol object

    Args:
        mol: RDkit Mol object
        a, b, c: Atom index removing a specific dihedral (int)

    Returns:
        boolean
    """

    if not hasattr(mol, 'dihedrals'):
        return False

    for i, dihedral in enumerate(mol.dihedrals):
        if ((dihedral.a == a and dihedral.b == b and dihedral.c == c and dihedral.d == d) or
            (dihedral.d == a and dihedral.c == b and dihedral.b == c and dihedral.a == d)):
            del mol.dihedrals[i]
            break

    return True