Understanding glass alteration mechanisms at the molecular scale