Hello. I was wondering what the difference is between PairwiseAlignment and PairwiseSimilarity3D?
Also, I've tried comparing two molecules using PairwiseAlignment and PairwiseSimilarity3D. PairwiseSimilarity3D gives a Tanimoto similarity of 3.11189, while PairwiseAlignment gives a Tanimoto of 392.59568. What do those numbers mean? Usually Tanimoto coefficients are normalized. I'm not sure what to do with a Tanimoto > 1.
The classes in the alignment package are only sparsely documented and it's very difficult to figure out exactly what a number of the classes and methods do. Please complete the documentation and add more examples. I think the classes in chemaxon.marvin.alignment could be quite useful if there was better documentation.
sorry for your inconvenience, we will add the missing API docs in the next release. We are also submitting a paper, that describes the algorithmic details of alignment along with benchmarking results.
"I was wondering what the difference is between PairwiseAlignment and PairwiseSimilarity3D?"
Yes, there is a substaintial difference between the two methods, please find a brief overview on the "Shape" and the "Match" method in the Screen3D whitepaper.
PairwiseAlignment uses the "Shape" method: The PairwiseAlignment.similarity(Molecule) returns the atomtyped shape intersection score FItq (see whitepaper pg. 5.), which is an unnormalized quantity. The bigger the number is, the more similar the two structures are. PairwiseAlignment.getShapeTanimoto() function returns the normalized shape intersection, which we call as "colored" shape Tanimoto (Tc in the whitepaper). Both the overlaid structures and the Tc value can be easily accessed and tested from MarvinSketch at Calculations/Conformation/3D Alignment menu.
PairwiseSimilarity3D uses the "Match" method, which systematically matches and scores all geometrically feasible atom-atom maps between the two molecules. A map consist of pairs of atoms, one from the query one from the target molecule. The more pairs the map has, and the more "similar" the histograms of the query/target atoms are, the higher the score is. This score is calculated as a sum of the distance range histogram Tanimotos of each pair of a mapping (denoted as S in the Screen3D whitepaper, pg.6).
When the alignment object is created with the PairwiseSimilarity3D(true) constructor, the PairwiseSimilarity3D.similarity(Molecule) returns the highest of this score found. When afterwards the getAlignedTarget() or getAlignedQuery() is called, it returns structures with coordinates, that maximize the overlap. The alignment in this case is based on the atom/atom mappings. The getShapeTanimoto() should always return 0 in this case.
When the alignment object is created with the PairwiseSimilarity3D(false) constructor, the PairwiseSimilarity3D.similarity(Molecule) again systematically matches and scores all geometrically feasible atom-atom maps, but this time also accumulates the N best atom-atom maps. Then performs alignment for all these N maps, and the "colored" shape Tanimoto score is calculated for each. The map, that has the highest shape value, is marked as the result map.
The PairwiseSimilarity3D.similarity(Molecule) returns the histogram score, found for the result map and the getShapeTanimoto() returns the best shape Tanimoto found. The value of N can be set by the setCount(int) method and by default N = 4.
Both PairwiseAlignment and PairwiseSimilarity3D can be accessed from command line calling screen3D in jchem, using or omitting the -match option.
We also have an MCS based alignment called MMPAlignment, which first finds the maximum common 2D substructure, than aligns by that. The non-MCS parts of the structures are aligned by the shape method. This alignment results in exactly the same coordinates for the MCS part, and the best shape overlay for the rest. This functionality can be accessed from MarvinSketch at Calculations/Conformation/3D Alignment, by selecting the MCS option.
I do not see why you are receiveing Tanimotos bigger than one. Please find some example sources attached. They should work with JChem 6.0.
I hope this helps, please do not hesitate to ask more questions.
Thank you for your interest.
Hello. I'm trying to do a molecule alignment where I'm keeping both the query and target molecules rigid (the two 3D conformations of the same molecule). I've tried it a few different ways: PairwiseAlignment, MMPAlignment, and AlignRigidEasy. They all give pretty similar results. However, I find that the "rotated" output molecule is slightly different from the input molecule that was rotated. In other words, if I take the resulting rotated molecule and try to align it back on the input geometry, it can't be matched exactly to the input molecule. Thus, it appears that something other than a rigid rotation/translation is being performed on the target structure.
Please provide guidance for how to circumvent this issue. I am using jchem version 6.2. Thanks!
The AlignRigidEasy class is the best tool for the rigid overlay of two conformations of the same molecule and to calculate the RMSD, as you have pointed out correctly. It should not change the internal coordinates of the molecule.
If such thing is happening I suspect that the atomic sequence is not the same in the two molecules.
I created a code example for you, that aligns two conformers of the same molecule onto each other, and calcualtes the rmsd. This code also asserts that the internal distances are the same before and after the overlay. Please find it attached.
Hope this help, and sorry for the late answer.