calculation of optical properties of nano particles