A lattice manipulation and simulation script