Structure and Electronic Properties of Quaternary Chalcogenide Semiconductors from First Principles