Atomic and electronic structure of solids