ANALYSIS OF CHEMICAL PHENOMENA BY SOLVING CONSTRAINED HARTREE-FOCK EQUATION. I: METHOD AND APPLICATION TO RESONANCE ENERGY IN LINEAR POLYENES