def swap_coordinates(geo, idx1, idx2):
    """ Swap the order of the coordinates of two atoms in a molecular geometry.

        :param geo: molecular geometry
        :type geo: automol molecular geometry data structure
        :param idx1: index for one atom to swap coordinates
        :type idx1: int
        :param idx2: index for one atom to swap coordinates
        :type idx2: int
        :rtype: molecular geometry
    """

    geo = [list(x) for x in geo]
    geo[idx1], geo[idx2] = geo[idx2], geo[idx1]
    geo_swp = tuple(tuple(x) for x in geo)

    return geo_swp