Multireference spin-adapted variant of density functional theory.