Skip to content

superpose3D_se

esta.general.superpose3D_se

This module contains the definition of the Superpose3D() function used for registering two point clouds of known correspondence. (It is documented below.)

Note: The original version of this code contained for-loops. Newer versions of this code use numpy expressions to avoid for-loops, however the original code remains in quoted comments because some users find it easier to read.

Superpose3D(aaXf_orig, aaXm_orig, aWeights=None, allow_rescale=False, report_quaternion=False)

Superpose3D() takes two lists of xyz coordinates, (of the same length) and attempts to superimpose them using rotations, translations, and (optionally) rescale operations in order to minimize the root-mean-squared-distance (RMSD) between them.
These operations should be applied to the "aaXm_orig" argument. This function returns a tuple containing: (RMSD, optimal_translation, optimal_rotation, and optimal_scale_factor) More detailed documentation can be found in the repository's README.md file. This function implements a more general variant of the method described in this paper R. Diamond, (1988) Acta Cryst. A44, pp. 211-216 "A note on the rotational superposition problem" https://doi.org/10.1107/S0108767387010535 This version has been augmented slightly. The version in the original paper only considers rotation and translation and does not allow the coordinates of either object to be rescaled (multiplication by a scalar).