Brownian dynamics simulation of nanoparticles and polymers with applications in drug delivery