Band structures and optical properties related to substitutional impurities in TlGaSe2 layered crystals: first-principles study