The structure of small molecules and ions