GROMACS version:2018.4
GROMACS modification: No
Here post your question
Hi All,
I have a quick question about the rotational kinetic energy calculated by gmx traj -ekr.
According to the manual, the gmx traj uses center of mass and velocity data to estimate the rotational kinetic energy of a target group.
The output data by -ekr can contain negative values as the example shown below.
Since kinetic energy cannot be negative, is the output by -ekr is the changes in rotational kinetic energy? If this is the case, what would be the reference value, starting point (t=0)?
I only posted partial data in my original post.
The rotational kinetic energy calculated from my systems shows similar scale of valule on both positive and negative ranges, as shown below.
I wonder if the rotational energy calculated by gmx traj -ekr is actually the changes in kinetic energy.
Check the ekrot() function in src/gromacs/gmxana/gmx_traj.cpp for the math that’s being used. I haven’t had time to go all the way through it, but that’s where you’ll find what the code is doing. It’s not computing a difference, e.g. over time.
Perhaps because of build on the HPC, I couldn’t find the file for “gmx_traj.cpp”.
I tried different version and even different HPC clusters.
I probably missed something.
The closest one I can find is the “gmx-traj.1”
which contains the following entry of ‘ekr’
…
.sp
Options \fB-ekt\fP and \fB-ekr\fP plot the translational and
rotational kinetic energy of each group,
provided velocities are present in the trajectory file.
This implies \fB-com\fP&.
.sp
…
For your reference, below is my command input and output for example.
which gmx_sp
/usr/common/software/gromacs/2018.4.knl/bin/gmx_sp
Thank you so much for pointing this out.
I just find it.
Based on the script below, it seems that -ekr is calculated by
Ekr = 0.5 * acm ^2 * TCM
Not exactly sure the how the rotational velocity acm and ‘moment of inertia ?’ TCM are derived from the mass, position, and velocity data.
If that was the case, rotational kinetic energy shall never be negative.
Thanks again.
static real ekrot(rvec x[], rvec v[], real mass[], int isize, int index[])
Hi Er1ck, Did you solve your problem? I meet the same problem. I tried to extract the rotational kinetic energy of a single water molecule in protein solutions. Surprisingly, the rotational kinetic energy at some moment is negative, as shown below.
Command line:
gmx traj -s md_water1.tpr -f md0_100ps.trr -n water1.ndx -ov water1_V.xvg -ekr water1_EKR.xvg -ekt water1_EKT.xvg
gmx traj is part of G R O M A C S:
Thanks for asking.
No, I haven’t. I pivoted my project and had stopped pursuing this direction further.
I did try to look into the source code, but to no avail.
To obtain the rotational kinetic energy, perhaps you can try different version of GROMACS or use a different simulation package. Sorry I wish I could be of more help.