Molecular insight into the aggregation and dispersion behavior of modified nanoparticles