Nanoparticle device for biomedical and optoelectronics applications