Tuning the Interaction of Nanoparticles from Repulsive to Attractive by Pressure