I am using the NEMD method to calculate the thermal conductivity of water in Gromacs. I have three groups in the simulation: hot water, cold water, and free water. I want to calculate the kinetic energy of each group.
Here is the method I used:
Using gmx select to isolate the group, producing an index file.
With the convert-tpr command, I can create a modified .tpr file centered on the selected group.
The gmx trjconv command extracts the group’s coordinates from the entire trajectory to obtain a group-specific trajectory.
With the modified .tpr file and the group-specific trajectory, the gmx mdrun command with the -rerun option recalculates the energies for the specific group, generating a new energy file. This energy data can then be extracted and analyzed using gmx energy.
However, there is no option for the kinetic energy. What I got is attached. Any suggestions would be very appreciated!
Thank you for your prompt response. I used a .trr file for the -rerun option and checked its contents using the gmx check command. The file contains velocities but lacks force data. Could the absence of forces be the reason I’m not obtaining kinetic energy values?
You can use gmx traj to compute the temperature of groups using a trr file with velocities. For water you need to multiply the temperature by a factor 1.5 to take the constraints into account that gmx traj ignores.
Thank you for your reply. Based on your reply, I have a couple of questions:
I utilized water as the basis for developing a protocol to predict thermal conductivity. How can I adapt this factor to other molecules?
I attempted to calculate translational and rotational kinetic energy using the gmx traj command. Is this factor also applicable to kinetic energy calculations?