Electronic structure and optical properties of ABP 2 O 7 double phosphates