The electronic structure and optical properties of ABP2O7 (A = Na, Li) double phosphates