computes reference energies in parallel and some bugfixes