Response of nanoparticle structure to different types of surface environments: Wide-angle x-ray scattering and molecular dynamics simulations