The photostructural changes and reactivity of chalcogenide layers