shirtsgroup / OpenFFCrystalBenchmarking

1 stars 1 forks source link

Make RMSD calculations more robust to jumping crystals across periodic boundaries. #3

Open mrshirts opened 2 years ago

mrshirts commented 2 years ago

Currently, if any molecules shift from one side of the box to the other during minimization, then the RMSD becomes incorrectly large, as the proper minimum image convention is not used.

We need to implement a better way to calculate RMSD that is robust to molecules hopping from one side of the cell to another.

Potentially implement a version of RSMD_20 in Mercury? I.e. "The small root–mean–squared deviation in atomic positions from a 20-molecule cluster from the crystal structure". It's hard to find this algorithm well documented! Basically, you want the closest 20 ( or some other N molecules) measured by distance of the centroids, with periodic boundaries accounted for, and then find the RMSD (again respecting periodic boundaries)

Alternatively, we could look just at a single cell, but make sure that the periodic boundaries are properly matched between two configurations.

Yu-Tang-Lin commented 2 years ago

Note for @Yu-Tang-Lin: Still trying to find the source code for RMSD20. This method had been published 10 years ago, but there is no Github resource for that. Maybe try to send some email to the research group who published before and ask for the code?

mrshirts commented 2 years ago

GitHub did not exist when the code was written. This: http://scripts.iucr.org/cgi-bin/paper?S0021889804027074 is the paper, but it is not very clear.

OpenEye has a version of this, and although they cannot describe the code, Caitlin Bannan can probably summarize it.

mrshirts commented 2 years ago

OK, here's my summary for RMSD(N) from what I can piece together.

  1. For each molecule, compute the center of geometry.
  2. Find the N closest molecular centers of geometry, MAKING SURE that periodic boundaries are included. If N is large enough, it might include some periodic copies of the molecules.
  3. All atomic locations are with respect to the center of geometry of the center molecue.
  4. Calculate the RMSD between these N molecules (including potentially periodic copies?) in the two crystal structures (with center of geometries aligned).