You need to find the pressure components using g_energy. The following references may be helpful - http://www.sciencedirect.com/science/article/pii/S0301462208001671 , http://pubs.acs.org/doi/abs/10.1021/la702286h , http://comments.gmane.org/gmane.science.biology.gromacs.user/38915 .