GMX angle dihedral increase output precision

Dear All,

Is it possible to increase the output precision of the gmx angle -type dihedral? Here are my commands:

gmx angle -type dihedral -n index_file.ndx -f data_xtc_file.xtc -ov Dihedral.xvg

For other properties, such as gmx trajconv, one can simply include the flag -ndec. This is not possible for gmx angle. I would like to avoid having to calculate the dihedral myself directly from the XYZ components of the atoms comprising the dihedral chain.

Thanks,
Ben

The .xtc file has a fixed precision; you can’t compute any quantity with greater precision than the data from which it is calculated.

Thank you for the reply Justin.

I can change the precision of the .xtc file using xtc-precision, correct? At most I can resolve the dihedral to 6 significant figures (for example, theta = 113.406). This does not change when I change xtc-precision, or on either single or double precision versions of gromacs. Is the precision of all .xtc files absolutely fixed? Is there, therefore, absolutely no way to increase the precision of the gmx angle -type dihedral when using .xtc files? Can you suggest using a different high-precision file type as input to gmx angle?

Ben

The .trr format allows for greater precision in the coordinates that are saved, but since the format is very bulky and often not useful, it is only written during the simulation if the user requests it.

It can be adjusted with the compressed-x-precision keyword.

There is a secondary issue that will require a change to the code - gmx angle writes its output with a certain precision, which you would have to change.

One of the biggest questions here is, what application requires greater than three decimal places of precision? Fluctuations over a trajectory render most of those digits insignificant (you’re more likely to get error bars in terms of whole degrees or maybe tenths), and experimental structural determination can never achieve such precision.

I am extracting time-dependent friction memory kernels from the dihedral trajectory. This required various correlation functions between the dihedral velocity and forces due to the dihedral potential. I find anomalous behavior in the memory kernels in time scales below 5fs, which is present for simulation time steps of 0.5fs, 1.0fs, and 2.0fs. Due to the iterative nature of numerically evaluating Volterra type equations, the data from the first time points are propagated through the full memory kernel. It may be that the resolution of the dihedral plays no part, but such things can not be ruled out until they are checked. It is a small detail, but one that we would like to identify.

I have confirmed that I can change the precision of the .xtc file, increasing the precision as you say, by using compressed-x-precision. As expected, there is no change in the precision of the dihedral. I understand from what you are saying that regardless, we would need to modify the code in order to make this change. Perhaps I will just try MDTraj or my own script. Thank you for your help.

Ben