Am Montag 04 März 2013 16:18:03 schrieb Luc Bourhis:
Hi Jan,
the cctbx does not have a tool doing exactly what you describe. But there is cctbx.euclidean_model_matching, that we all call emma, which could be close enough. It tries to find the best isometry matching the biggest subset of the 1st structure onto the 2nd structure, and since an isometry preserves bond lengths, angles and even torsion angles, perhaps you may find that tool useful. Here is a very quick kickstarter:
Starting from two instances of xray.structure xs1 and xs2 for the two structures you wish to compare, the following is all you need to do
from cctbx import euclidean_model_matching as emma .... m = emma.model_matches( xs1.as_emma_model(), xs2.as_emma_model(), tolerance=0.5, break_if_match_with_no_singles=False ).refined_matches[0]
Then m.rms gives the rms for the discrepancy between each set of coordinates, while m.rt gives you the symmetry that had to be applied to best match each structures. Then m.singles1 is the list of scatterers in the 1st structure that could not be matched to any scatterer in the 2nd one. Obviously, m.singles2 is the other-way around. Finally, m.pairs is the mapping established between a subset of the 1st structure and a subset of the 2nd structure. Hi Luc,
Emma seems to work quite nicely although it could use some more documentation. Right now I wonder where one would put a cut-off on rms with respect to a) the structures disagree substantially b) the structures have the same scatterers but at completely different positions relative to each other or the symmetry elements c) the structures are quite similar (e.g. you only have to move a single scatterer a little) d) the structures are identical within the tolerance limit (apart from origin shifts). Is there a paper I could read for reference and can you give some rule of thumb rms intervals for the cases mentioned above? With regards, Dipl. Phys. Jan M. Simons Institute of Crystallography RWTH Aachen University