-
Notifications
You must be signed in to change notification settings - Fork 16
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
Make center of mass computation of a molecule more robust? #95
Comments
Not yet, but that what #3 is about. So we should handle it before implementing rewrap algorithm. I think we definitively want to get the "right" center of mass here, I don't know how we can do this. If we rewrap all the atomic positions before computing the center of mass, we still get wrong values:
What would we do if we find a bonding length without PBC that is bigger than the bonding length wit PBC? Wrap this particular atom? |
For the internal representation of positions, I would favor to never "partially wrap" molecules. I would wrap the molecule as a whole so that its center of mass lies within the cell. That is done at the moment in the translation of molecules with the implemented wrapping function (again, assuming that all particles of a molecule are adjacent).
Or "rewrap" it back so that its real positions is adjacent if we want to keep particles of molecules together. |
That could work. I have to think about it 😄 |
See https://en.wikipedia.org/wiki/Center_of_mass#Systems_with_periodic_boundary_conditions for an algorithm that should always be valid |
Currently, the center of mass computation does not check if all particles of a molecule are adjacent, or if some particles are wrapped into the simulation cell. If a molecule is partially wrapped, the current center of mass computation will yield wrong results.
In the current implementation, everything is working as long as the initial configuration does not contain "partially wrapped" molecules because there are no propagation methods or other system changes that apply such partial wrapping.
We could enhance the current implementation to check for partial wrapping - e.g. compute bonding lengths without period boundary conditions. Do you think that this is needed? It would make the usage of the existing method more robust with respect to custom extensions.
The text was updated successfully, but these errors were encountered: