def ImCrossTermID(atom_names):
    """
    # From a list of 4 atom names, corresponding two a pair
    # of angles between atoms# 3,2,1 and 3,2,4,
    # and replaces the list of atoms with a canonical tuple
    # which eliminates order ambiguity.
    # If you swap the first and last atom (#1 and #4), then
    # the -pair- of angles is the same.  Hence if atom #1
    # has a name which is lexicographically less than atom #4,
    # swap atoms 1 and 4.
    """
    if atom_names[0] <= atom_names[3]:
        return (atom_names[0]+','+atom_names[1]+','+
                atom_names[2]+','+atom_names[3])
    else:
        return (atom_names[3]+','+atom_names[1]+','+
                atom_names[2]+','+atom_names[0])