Structural Transformations in Two-Dimensional Transition-Metal Dichalcogenide MoS2 under an Electron Beam: Insights from First-Principles Calculations.