FUNCTION GetNewTMatEl(I, J)
! In:
! i,j: spin orbitals.
! Return <i|h|j>, the "TMat" element.
! Used post-freezing. See also GetTMatEl.
IMPLICIT NONE
INTEGER I, J
HElement_t(dp) GetNEWTMATEl
if (tCPMDSymTMat) then
#ifdef CMPLX_
if (j >= i) then
GetNewTMatEl = TMATSYM2(TMatInd(I, J))
else
GetNewTMatEl = Conjg(TMATSYM2(TMatInd(I, J)))
end if
#else
GetNewTMatEl = TMATSYM2(TMatInd(I, J))
#endif
ELSE
if (tOneElecDiag) then
if (I /= J) then
GetNEWTMATEl = 0.0_dp
else
GetNewTMATEl = TMAT2D2(I, 1)
end if
else
GetNEWTMATEl = TMAT2D2(I, J)
end if
end if
END FUNCTION GetNewTMatEl