How to calculation the interaction energys between two subsets during the dynmics process

Hi  everybody,

             Does anyone know how to calculated the interaction energys between two subset during the dynamics process?   I want to carry this by BTCL of Discover