Study on the stability of organic–inorganic perovskite solar cell materials based on first principle