The flexibility of a model polyimide, pyromellitic-dianhydride 1,4-oxydianiline (PMDA-ODA) is investigated using fully ab initio methods. Hartree-Fock, second-order Møller-Plesset theory (MP2) and density-functional theory (DFT) methods are employed along with both numerical and Gaussian basis sets. A hybrid scheme which combines energies and first derivatives is also used and appraised for this system. Energies of monomer fragments of the polyimide as a function of torsional angle are calculated using geometry optimizations. Extensive comparisons are made with maleanil, a smaller fragment of PMDA-ODA.