Ag2O band structure and x-ray-absorption near-edge spectra