Necklace Enum

Necklace Enum lists the symmetrically distinct derivative superstructures of a parent lattice — the ways of decorating it with several kinds of atom — by generating each one directly instead of filtering out duplicates. The quotient group of a superlattice is a discrete torus. Reading its sites column by column along the largest cyclic factor turns every decoration into a word on which translations act as rotations combined with one permutation applied to every letter, so the distinct structures are Lyndon words and can be produced with a necklace algorithm. Nothing about earlier structures is stored, so memory does not grow with the number of structures: counting 9.2 billion structures stays within 10 MB of the interpreter's baseline, and listing stays below 0.22 GB on problems where enumlib needs gigabytes or runs out of memory. The package reproduces all published counts and lists structures ~2–90× faster than the fastest of enumlib, Enumlib.jl and dsenum on each benchmark problem, for cells larger than 14 sites. Each structure comes with its degeneracy, its weight in a partition function, at fixed composition as well, taken from the generator's own symmetry comparisons.