superimpose_without_outliers
#
- biotite.structure.superimpose_without_outliers(fixed, mobile, min_anchors=3, max_iterations=10, quantiles=(0.25, 0.75), outlier_threshold=1.5)[source]#
Superimpose structures onto a fixed structure, ignoring conformational outliers.
This method iteratively superimposes the mobile structure onto the fixed structure, removes conformational outliers and superimposes the remaining atoms (called anchors) again until no outlier remains.
- Parameters:
- fixedAtomArray, shape(n,) or AtomArrayStack, shape(m,n) or ndarray, shape(n,), dtype=float or ndarray, shape(m,n), dtype=float
The fixed structure(s). Alternatively coordinates can be given.
- mobile: AtomArray, shape(n,) or AtomArrayStack, shape(m,n) or ndarray, shape(n,), dtype=float or ndarray, shape(m,n), dtype=float
The structure(s) which is/are superimposed on the fixed structure. Each atom at index i in mobile must correspond the atom at index i in fixed to obtain correct results. Furthermore, if both fixed and mobile are
AtomArrayStack
objects, they must have the same number of models. Alternatively coordinates can be given.- min_anchorsint, optional
The outlier removal is stopped, if less than min_anchors anchors would be left.
- max_iterationsint, optional
The maximum number of iterations for removing conformational outliers. Setting the value to 1 means that no outlier removal is conducted.
- quantilestuple (float, float), optional
The lower and upper quantile for the interpercentile range (IPR). By default the interquartile range is taken.
- outlier_thresholdfloat, optional
The threshold for considering a conformational outlier. The threshold is given in units of IPR.
- Returns:
- fittedAtomArray or AtomArrayStack
A copy of the mobile structure(s), superimposed on the fixed structure. Only coordinates are returned, if coordinates were given in mobile.
- transformAffineTransformation
This object contains the affine transformation(s) that were applied on mobile.
AffineTransformation.apply()
can be used to transform another AtomArray in the same way.- anchor_indicesndarray, shape(k,), dtype=int
The indices of the anchor atoms. These atoms were used for the superimposition.
See also
superimpose
Superimposition without outlier removal
superimpose_homologs
Superimposition of homologous structures
Notes
This method runs the following algorithm in iterations:
Superimpose anchor atoms of mobile onto fixed.
Calculate the squared distance \(d^2\) between the superimposed anchors.
Remove conformational outliers from anchors based on the following criterion:
\[d^2 > P_\text{upper}(d^2) + \left( P_\text{upper}(d^2) - P_\text{lower}(d^2) \right) \cdot T\]In prose this means that an anchor is considered an outlier, if it is outlier_threshold \(T\) times the interpercentile range (IPR) above the upper percentile. By default, this is 1.5 times the interquartile range, which is the usual threshold to mark outliers in box plots.
In the beginning, all atoms are considered as anchors.
Considering all atoms (not only the anchors), this approach does not minimize the RMSD, in contrast to
superimpose()
. The purpose of this function is to ignore outliers to decrease the RMSD in the more conserved parts of the structure.