bug fix. All 2RDM is correct by now. Implements internal check with the recomputed state-averaged energy