Understanding the thermodynamic behavior of nanoparticles to tailor polymer nancomposite structure