def compare(self, other, t_threshold=1e-3, r_threshold=1e-3): """Compare two transformations The RMSD values of the rotation matrices and the translation vectors are computed. The return value is True when the RMSD values are below the thresholds, i.e. when the two transformations are almost identical. """ return compute_rmsd(self.t, other.t) < t_threshold and compute_rmsd(self.r, other.r) < r_threshold
def compare(self, other, t_threshold=1e-3, r_threshold=1e-3): """Compare two transformations The RMSD values of the rotation matrices and the translation vectors are computed. The return value is True when the RMSD values are below the thresholds, i.e. when the two transformations are almost identical. """ return compute_rmsd(self.t, other.t) < t_threshold and compute_rmsd( self.r, other.r) < r_threshold
def fit_rmsd(ras, rbs, weights=None): """Fit geometry rbs onto ras, returns more info than superpose Arguments: | ``ras`` -- a numpy array with 3D coordinates of geometry A, shape=(N,3) | ``rbs`` -- a numpy array with 3D coordinates of geometry B, shape=(N,3) Optional arguments: | ``weights`` -- a numpy array with fitting weights for each coordinate, shape=(N,) Return values: | ``transformation`` -- the transformation that brings geometry A into overlap with geometry B | ``rbs_trans`` -- the transformed coordinates of geometry B | ``rmsd`` -- the rmsd of the distances between corresponding atoms in geometry A and B This is a utility routine based on the function superpose. It just computes rbs_trans and rmsd after calling superpose with the same arguments """ transformation = superpose(ras, rbs, weights) rbs_trans = transformation * rbs rmsd = compute_rmsd(ras, rbs_trans) return transformation, rbs_trans, rmsd
def fit_rmsd(ras, rbs, weights=None): """Fit geometry rbs onto ras, returns more info than superpose Arguments: | ``ras`` -- a numpy array with 3D coordinates of geometry A, shape=(N,3) | ``rbs`` -- a numpy array with 3D coordinates of geometry B, shape=(N,3) Optional arguments: | ``weights`` -- a numpy array with fitting weights for each coordinate, shape=(N,) Return values: | ``transformation`` -- the transformation that brings geometry A into overlap with geometry B | ``rbs_trans`` -- the transformed coordinates of geometry B | ``rmsd`` -- the rmsd of the distances between corresponding atoms in geometry A and B This is a utility routine based on the function superpose. It just computes rbs_trans and rmsd after calling superpose with the same arguments """ transformation = superpose(ras, rbs, weights) rbs_trans = transformation * rbs rmsd = compute_rmsd(ras, rbs_trans) return transformation, rbs_trans, rmsd
def compare(self, other, r_threshold=1e-3): """Compare two rotations The RMSD of the rotation matrices is computed. The return value is True when the RMSD is below the threshold, i.e. when the two rotations are almost identical. """ return compute_rmsd(self.r, other.r) < r_threshold
def compare(self, other, t_threshold=1e-3): """Compare two translations The RMSD of the translation vectors is computed. The return value is True when the RMSD is below the threshold, i.e. when the two translations are almost identical. """ return compute_rmsd(self.t, other.t) < t_threshold
def compare(self, other, r_threshold=1e-3): """Compare two rotations The RMSD of the rotation matrices is computed. The return value is True when the RMSD is below the threshold, i.e. when the two rotations are almost identical. """ return compute_rmsd(self.r, other.r) < r_threshold
def compare(self, other, t_threshold=1e-3): """Compare two translations The RMSD of the translation vectors is computed. The return value is True when the RMSD is below the threshold, i.e. when the two translations are almost identical. """ return compute_rmsd(self.t, other.t) < t_threshold