Assigning Structures to Ions in Mass Spectrometry