Dear Stephen,
The separate PP, PH, HP, and HH routines for the ccsdt density matrix are in the src/tce/gradients directory.
There is a file called tce_energy.F in src/tce directory. You can search for a line with "! CCSDT left" . This is where the lambda is computed. Either after this loop or the part that that is evaluated after convergence "if (residual .lt. thresh)" you can call the PP, PH, HP, and HH routines for CCSDT. Just follow the prescription in "ccsd_lambda.F". The only thing you will be changing is the call to the separate P/H block routines. Just make sure the variables match up with the call and routines. That prescription also contains the call to print out the blocks. After that, recompile and run.
Some suggestions in checking your density matrices:
1. While the reduced density matrix is not generally Hermitian due to the biorthogonality nature of the wave function, it is symmetric for cases in which the theory is exact, hence 3 or less electron systems or systems with only 3 or less valence orbitals for CCSDT. A symmetric density matrix in this case does not imply that the equations are implemented correctly, but can help identify problems in your equations.
2. Since you are dealing with spin-integrated equations, a check that is always good to perform is to switch the number of alpha and beta electrons for an open-shell system. You should end up with the same results. The only thing to be careful with is to make sure that if routines for different spin combinations are called and updated separately, that their order is reversed to reflect to switch in the number of alpha and beta electrons.
All the best,
Nick