First-Principles Calculations of Stability, Electronic Structure, and Sorption Properties of Nanoparticle Systems