Calculation of molecular orbital energies of macromolecules with conjugated double bonds