How Ions and Molecules Organize to Form Crystals