First-Principles-Based Modeling of Energetic Stability for Alloy Nanoparticles with Multiple Shapes