Molecular dynamics at an energy-level crossing