New code to handle 'lattice tectonics'