subroutine getProjEOffset()
! get the offset of the projected energy versus the total energy,
! which is the reference energy
implicit none
! if the reference energy is used as an offset to the hamiltonian (default behaviour)
! just get it
if(.not.tZeroRef) then
OutputHii = Hii
! else, calculate the reference energy
else if (tHPHF) then
OutputHii = hphf_diag_helement (ProjEDet(:,1), iLutRef(:,1))
else if (tGUGA) then
OutputHii = calcDiagMatEleGUGA_nI(ProjEDet(:,1))
else
OutputHii = get_helement (ProjEDet(:,1), ProjEDet(:,1), 0)
end if
end subroutine getProjEOffset