def test_align_flat_rmsd(self): for cout in xrange(20): x = perturb(randomize_mol(methane)) y = perturb(randomize_mol(methane)) y = x.copy() aligned_y = cm.align(x.copy(), y.copy()) self.assertAlmostEqual(cm.rmsd(x, y), cm.flat_rmsd(x, aligned_y), 5)
def rmsd(self, x, y): x = cm.translate(x, -cm.center_of_geometry(x)) y = cm.translate(y, -cm.center_of_geometry(y)) rot = cm.rmsd_rotation(x, y) y = cm.transform(y, rot) return cm.flat_rmsd(x, y)