Amber-MD / cpptraj

Biomolecular simulation trajectory/data analysis.
Other
133 stars 64 forks source link

More Explicit RMSD Documentation Or more error message? #667

Closed hainm closed 5 years ago

hainm commented 5 years ago

hi,

I brought this from pytraj: https://github.com/Amber-MD/pytraj/issues/1467

It is not entirely clear from the documentation that rmsd() and symmrmsd() need the atoms in the same order for the reference structure and the trajectory. If the atoms are not in the same order, the RMSD is computed without warnings/error, but the result is obviously wrong.

Do you think cpptraj should warn user or we just simply update the docs (pytraj(cpptraj)) to remind him/her about the atom order.

swails commented 5 years ago

How are we supposed to detect that the order is "wrong" and it's not simply a different compound with a common backbone you're aligning on?

The common use-case here is to allow homologous RMSD calculations. Two related proteins can do a minimum RMSD fit on the common backbone.

This is a potentially useful feature, and you wouldn't want to emit warnings that users might be making a mistake when most likely they're not.

I'm not aware of any RMSD calculator that will test all order permutations between the reference and target structures -- the cost of any such algorithm would be prohibitive for large systems (some take into account rotationally degenerate atoms, like carboxylate oxygens, but that's a much simpler problem).

RMeli commented 5 years ago

When comparing different docking poses of small ligands, OpenBabel obrms works as expected even if the atoms in the two PDB structures are shuffled.

However I understand this is a specific case and it's different when you have different compounds with a common backbone for alignment. It would be nice to have clearly stated in the documentation that when computing the RMSD for the same compound, the atoms should be in the same order (as described in Tutorial C1)

drroe commented 5 years ago

See my response here: https://github.com/Amber-MD/pytraj/issues/1467#issuecomment-464052678

TL;DR - The documentation can be made more explicit, and users can try using the atommap command to "correct" the atom ordering prior to an RMSD calculation between differently-ordered systems.

RMeli commented 5 years ago

Thanks, I replied there: Amber-MD/pytraj#1467. Explicit documentation (with link to atommap) could be helpful.