In this project, we use density functional computation to investigate physical properties of some materials that may be useful to reduce environmental problems, Spin density functional theory, relativistic Kohn-Sham equations and time dependent density functional theory are used for our calculations. In the first part, we investigate the structural, electronic and magnetic properties of Y 2 Fe 14 B, a new permanent magnet based on rare earth, iron, and boron. The most important property of these new permanent magnets is its strong anisotropy. Hard magnets are promising to improve the efficiency of all hybrid and electric cars and hence reduce carbon dioxide emission and air pullution. From fundamental point of view, Y 2 Fe 14 B is a suitable target for studying the effects of strain on itinerant d electrons (In contrast with localized f electrons), because Y is a prototypical f 0 example of rare-earth elements. We calculated the magnetic anisotropy energy by two different methods. In the first method, full self-consistent calculations in the presence of spin-orbit coupling are performed for calculation of the magnetic anisotropy energy. In the second approach, the spin-orbit interaction is considered as a perturbation to the scalar relativistic Hamiltonian and by using the second-order perturbation theory, the magnetic anisotropy of these crystals is determined with much lower computational cost (compared with the first method) and with an acceptable accuracy. In the second part of project, we determined the most stable structural isomers of the neutral Ag 8 cluster. For better understanding of the relative stability of different structures of Ag 8 , the structural, electronic, topological and optical properties were calculated. Also the many-body based GW correction was applied for accurate description of the highest occupied (HOMO) and the lowest unoccupied (LUMO) molecular orbital levels. Then adsorption of the toxic CO, NO, and HCN molecules on the Td and D 2d structures of the neutral Ag 8 cluster was investigated. The obtained adsorption energies fall in the range of physical adsorption (physisorption). The calculation of charge distribution by using Bader theory of atoms in molecules indicate a charge transfer from Ag 8 to CO and NO molecules while no significant charge transfer was observed in the HCN-Ag 8 system. Also the stable adsorption sites occur on the atoms which have contribution to both HOMO and LUMO. Also we calculated the absorption spectra of the molecule-Ag 8 complexes and the pristine Ag 8 . The results show that silver nanocluster can be employed as catalyst and optical sensor for NO molecule.