Open ChiCheng45 opened 1 month ago
I am not sure about this. We would need to agree and document what the AC analysis does, but I think that originally the goal was to calculate the reorientation of a specific vector in the molecule, in a way similar to the equation here: https://manual.gromacs.org/current/reference-manual/analysis/correlation-function.html#equation-eqncorrleg From this point of view, I find perfectly reasonable that in your example the vector defined by C-H_up has a behaviour completely different from any of the possible three vectors C-H_down, as the first is fixed while any of the other three are rotating.
Description of the error The angular correlation is dependent on the molecule atom ordering. Here I have created a CH4 molecule trajectory that simply rotates around the CH bond.
In this example, I calculate the AC where the atom is ordered so that the first atom is the carbon (similar results when the first atom is the CH hydrogen).
Here is an example where I used one of the hydrogen which is not the CH hydrogen we are rotating around.
The AC dependency on the atom order will be an issue if the same molecules are different in the same trajectory.
Suggested fix We need a scheme that is not dependent on the atom ordering of the molecule. We could use the Kabsch algorithm to determine the optimal rotation matrix to map the molecule at time t1 to the molecule at time t0 we can then obtain that angle and use this to determine the angular correlation function. This will be a more computationally expensive approach but will be much more robust.