Self-assembling nanoparticles for drug delivery