We investigate the effect of glycoproteins on the optical properties of carbon nanotubes (CNTs) and carbon nanorings (CRNs), using density functional theory (DFT). Long rang correlation interactions are added by introducing van der Waals interaction. Our results show that the electronic and optical properties of both these materials are influenced by glycoprotein, which depends on their chirality and size. DFT can be used to predict the desired chirality and size of these nanomaterials. According to our outcomes, the predicted CNTs and CRNs may be chosen as the best sensitive and suitable candidates to use as bio-sensor materials.