Theoretical study of near-edge X-ray absorption fine structure spectra of metal phthalocyanines at C and N K-edges.