Amber-MD / cpptraj

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

'atommap' command unexpected result #1074

Closed juan-alcantara1 closed 6 months ago

juan-alcantara1 commented 7 months ago

I have two mol2 files containing the same molecule (same number of atoms) but the atoms are not ordered the same way in the two files. I followed the example available for the atommap cpptraj command and it ran without error, but it incorrectly mapped some of the atoms even though they are named the same in both files. Aligning both structures in ChimeraX, it shows that equivalent atoms have the same name so It's odd that atommap wasn't able to do the same matching.

publishedHeme_reordered.txt 6o3i_heme_wH.txt atommap.txt cpptraj_atommap_log.log cpptraj_atommap.txt publishedHeme.txt

drroe commented 7 months ago

Thanks for the report, I'll take a look.

drroe commented 7 months ago

Hi, sorry for the delay in replying.

So I think the issue here is that atommap is getting confused because the heme is very symmetric. It definitely appears to be doing the wrong thing though. I'm testing some fixes now and should hopefully have a fix soon. Thanks for the interesting test case!

drroe commented 7 months ago

OK - I think I have a fix based on ordering bonded atoms via priority. I'm testing it now and hopefully will have it in production early next week.

juan-alcantara1 commented 7 months ago

Thank you!

drroe commented 7 months ago

See if this structure seems better. The RMS to the 603i reference is 1.5971 Ang, which seems good. All the names match up except the following:

TgtAt  Tgt  RefAt  Ref
    64 HBA2     50 HBA1
    63 HBA1     51 HBA2
    67 HBD2     56 HBD1
    66 HBD1     57 HBD2

I visually inspected and it seems like the map provided by cpptraj does add up, and the names were actually switched (i.e. this is a real result). Let me know what you think. publishedHeme_reordered.mol2.txt

drroe commented 6 months ago

Example of the flip, this is 603i_heme_wH.mol2 on the left, and publishedHeme.mol2 on the right: flipped

drroe commented 6 months ago

Here is the other flip (603i_heme_wH.mol2 on the left, publishedHeme.mol2 on the right): flipped2

drroe commented 6 months ago

Hopefully addressed by #1076.