SUBROUTINE FreezeUMatCache(OrbTrans, nOld, nNew)
! We're in the middle of freezing some orbitals.
! OrbTrans(i) will give us the new position of the old orbital i.
INTEGER nOld, nNew, OrbTrans(nOld)
INTEGER onSlots, onPairs
if (nNew / 2 /= nStates .OR. tSmallUMat) THEN
write(stdout, *) "Reordering UMatCache for freezing"
onSlots = nSlots
onPairs = nPairs
CALL FreezeUMatCacheInt(OrbTrans, nOld, nNew, onSlots, onPairs)
else
write(stdout, *) "UMatCache size not changing. Not reordering."
end if
END SUBROUTINE FreezeUMatCache