Double-bond fixation in conjugated .pi.-electron systems. IV. Self-consistent field formalism and applications to alternant hydrocarbons