First-principles simulation of phosphorus-selenium systems