Bonding of chromium to the polyimide, PMDA-ODA, surface is still subject to debate. In an attempt to clarify this problem, we have performed density functional theory calculations on a model molecule, phthalimide, which contains the most reactive functionalities of the polyimide PMDA part. Considering only the low spin case, we find that chromium bonds preferentially to the phenyl ring. However, when we release the spin polarisation and optimise the structure, we find that the absolute stable configuration is that of chromium in a quintet state at a carbonyl group. The energy difference is 0.30 eV. The complete optimised structures are determined. The infrared spectrum have been calculated for phthalimide and compared to experimental spectra. The agreement is excellent. A vibrational analysis for the Cr/phthalimide system, in both configurations (Cr on C=O and Cr on phenyl), in their stable spin states, is presented.