Modeling the Structure and Composition of Nanoparticles by Extended X-ray Absorption Fine-structure Spectroscopy