def permute_all_atoms(labels, coords, permutation):
    """
    labels - atom labels
    coords - a set of coordinates
    permuation - a permutation of atoms

    Returns the permuted labels and coordinates
    """
    new_coords = coords[:]
    new_labels = labels[:]
    for i in range(len(permutation)):
        new_coords[permutation[i]] = coords[i]
        new_labels[permutation[i]] = labels[i]
    return new_labels, new_coords