Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Angular correlation results depend on the atom ordering of the molecule. #556

Open
ChiCheng45 opened this issue Sep 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ChiCheng45
Copy link
Collaborator

ChiCheng45 commented Sep 23, 2024

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.

Animation46

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).

image

Here is an example where I used one of the hydrogen which is not the CH hydrogen we are rotating around.

image

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.

@ChiCheng45 ChiCheng45 added the bug Something isn't working label Sep 23, 2024
@gonzalezma
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants