def transform_coords(coords, swap, reflect):
    """
    coords - a set of coordinates
    swap - the swap transformation (i.e. (0, 2, 1) --> (x, z, y))
    reflect - the reflection transformation (i.e. (1, -1, 1) --> (x, -y, z))

    Returns the transformed coordinates
    """
    new_coords = []
    for i in range(len(coords)):
        new_coords.append([coords[i][swap[0]]*reflect[0], \
                            coords[i][swap[1]]*reflect[1], \
                            coords[i][swap[2]]*reflect[2]])
    return new_coords