Critical appraisal of the fewest switches algorithm for surface hopping.