First-principles study of water desorption from montmorillonite surface