Simulating self-assembly of nanoparticles in tumor environments