Tuning Valleys and Wave Functions of van der Waals Heterostructures by Varying the Number of Layers: A First-Principles Study.