Suppose the trajectory of molecular system with interactions between all molecules. How is to obtain the time dependence of intramolecular energy of the given molecule with unique resname and the total energy of this molecule in the system including intermolecular interactions?