Calculation of Optical Properties for Molecular-to-nanomaterials