def vl2set(vl):
    """Convert VerletList object into set of pairs."""
    pairs = set()
    for i in range(vl.n_atoms):
        vli = vl.verlet_list(i)
        n_pairs_i = len(vli)
        for j in vli:
            pair = (i,j) if i<j else (j,i)
            # print(pair)
            pairs.add(pair)
    return pairs