Near-edge X-ray absorption fine structure spectra have been calculated for
different carbon-nitrogen molecules, clusters and solids. The compounds inv
estigated are used to model the chemical bonding in carbon nitride thin fil
ms. The molecular and cluster spectra are calculated employing the static e
xchange ab initio technique, while the solid state calculations are perform
ed with the density functional full potential augmented plane wave method.