How to calculate virial stress tensor in MD simulation?

GROMACS version: 2022
GROMACS modification: No
Here post your question

Hi All,

Does anyone know how to calculate the virial stress tensor in order to plot a stress-strain curve? What properties do I need to extract using the gmx_energy tool, and what relation (please include a relevant reference) should I apply to the extracted data to compute the virial stress? Or can this property be obtained directly from the MD data?

Thank you.