Structure of Nanoparticles: I. Generalized Crystallography of Nanoparticles and Magic Numbers