Fragments method: check that all atoms are the same

This addresses issue #13.