Structure and spectra of atoms