periodicity not handled correctly for dihedrals computed with g_angle
I keep noticing that when I compute dihedral angles using g_angle, periodicity
is not handled correctly anytime the dihedral flips completely around in the
course of a simulation. In particular, 360^o is never subtracted out, so over
the course of a ns or two, dihedrals go from being in the range of 0 to about
1500^o or so. I always have to take care of the periodicity when I read output
of g_angle, which is inconvenient.
Suggested fix: Subtract out m*360 when the angles are outside the range 0 to 360
or something similar.
#4 Updated by David Mobley over 14 years ago
No luck. Syntax error?
gmx_angle.c: In function 'gmx_angle':
gmx_angle.c:110: error: syntax error before 'int'
gmx_angle.c:119: error: 'bPBC' undeclared (first use in this function)
gmx_angle.c:119: error: (Each undeclared identifier is reported only once
gmx_angle.c:119: error: for each function it appears in.)
make: *** [gmx_angle.lo] Error 1
Did you try compiling? It doesn't work for me.
#6 Updated by David Mobley over 14 years ago
That compiles, but as far as I can tell it doesn't do anything. In particular,
just using "-periodic" on a trajectory where the dihedral rotates more than
360^o still gives me dihedrals running on 0 to 1500 degrees.
I looked at the code and didn't see anything obvious, but I'm not used to
parsing input arguments in C.
#8 Updated by David Mobley over 14 years ago
I did some more testing on this. The -all flag does seem to change the behavior
(it adds an extra column in the xvg files output to -ov) but the entries in this
column still doesn't seem to be correct.
Also, things are even more weird than I thought. When I run it on a full 1 ns
trajectory, it doesn't work at all. But if I use trjconv to generate a partial
trajectory from 20-40 ps (using -b and -e) it works fine on that trajectory
(in that it takes out the periodicity correctly). But if I use trjconv to
generate a partial trajectory with either command alone (either -b or -e) it
doesn't work on the resulting trajectory (in that periodicity is NOT removed).
I am uploading a tarball so that you can hopefully reproduce this. I have to
apologize for the size of it, but since any trajectory where I've removed the
beginning using -b won't seem to reproduce the problem, I have to include some
irrelevant regions of the trajectory.
In my tarball are:
traj0_40.trr: Frames 0 to 40 of my trajectory (running g_angle with -periodic traj.tpr: the relevant tpr file.
on this leaves in the stuff that the -periodic flag SHOULD remove).
-traj.trr: Frames 20 to 40 of the same trajectory. -periodic works fine on this.
- anglegps.ndx: the index file for the relevant dihedral.
It seems EXTREMELY strange to me that how exactly I apply trjconv makes a
difference in whether or not the periodicity is removed correctly. Please let me
know what the problem is, as it seems very concerning to me.
#10 Updated by David Mobley over 14 years ago
Whoops. No wonder it took you so long to respond: You were waiting for me! I am not sure whether I
simply forgot to upload it, or whether the upload claimed to work but didn't upload the file (I thought for
sure I had uploaded it). Regardless, I will make another attempt at uploading now and if it doesn't work,
let me know and I will put it on the web somewhere.
#11 Updated by David Mobley over 14 years ago
Hmm. Seems to be too big.
I uploaded to my group's web page, but at the moment the server seems to be down. It is at
www.dillgroup.ucsf.edu/~dmobley/forbugzilla.tar.gz. You should be able to get it hopefully later this
afternoon (as soon as the server is back up).