Theory of Finite-Length Grain Boundaries of Controlled Misfit Angle in Two-Dimensional Materials.