  We derive and analyze a novel approach for modeling and computing the
mechanical relaxation of incommensurate 2D heterostructures. Our approach
parametrizes the relaxation pattern by the compact local configuration space
rather than real space, thus bypassing the need for the standard supercell
approximation and giving a true aperiodic atomistic configuration. Our model
extends the computationally accessible regime of weakly coupled bilayers with
similar orientations or lattice spacing, for example materials with a small
relative twist where the widely studied large-scale moire patterns arise. Our
model also makes possible the simulation of multi-layers for which no
interlayer empirical atomistic potential exists, such as those composed of MoS2
layers, and more generally makes possible the simulation of the relaxation of
multi-layer heterostructures for which a planar moire pattern does not exist.
