Structural, magnetic, optical and electronic properties of transition metal compounds and semiconductors