Пример #1
0
def orientational_rmsd(ref_A, ref_B, coords_A, coords_B):
    '''
    Calculates an RMSD meassure to assess the quality of the alignment of the reference structure. 
    Two RMSD values are calculated, A_rmsd for the alignment of reference A to sample A and B_rmsd for the alignment of reference B to sample B.
    
    Parameters:
    -----
    Requires:
        ref_A; a numpy array of shape (n_atoms, 3), containing the coordinates of reference domain A
        ref_B; a numpy array of shape (n_atoms, 3), containing the coordinates of reference domain B  
        coords_A; a numpy array of shape (n_atoms, 3), containing the coordinates of sample domain A
        coords_B; a numpy array of shape (n_atoms, 3), containing the coordinates of sample domain B 

    Returns:
        A_rmsd; a float describing the RMSD value for the alignment of reference domain A to sample domain A
        B_rmsd; a float describing the RMSD value for the alignment of reference domain B to sample domain B
    '''
    A_rmsd = al.rmsd_kabsch(ref_A, coords_A)
    B_rmsd = al.rmsd_kabsch(ref_B, coords_B)
    return A_rmsd, B_rmsd
Пример #2
0
def test_rmsd_nonzero():
    rmsd_kabsch = alignment.rmsd_kabsch(xyz1, xyz3)
    rmsd_qcp = alignment.rmsd_qcp(xyz1, xyz3)
    eq(rmsd_kabsch, rmsd_qcp, decimal=5)
Пример #3
0
def test_rmsd_nonzero():
    rmsd_kabsch = alignment.rmsd_kabsch(xyz1, xyz3)
    rmsd_qcp = alignment.rmsd_qcp(xyz1, xyz3)
    eq(rmsd_kabsch, rmsd_qcp, decimal=5)
Пример #4
0
def test_rmsd_zero():
    rmsd_kabsch = alignment.rmsd_kabsch(xyz1, xyz2)
    rmsd_qcp = alignment.rmsd_qcp(xyz1, xyz2)
    eq(float(rmsd_kabsch), 0.0, decimal=5)
    eq(float(rmsd_qcp), 0.0, decimal=5)
Пример #5
0
def test_rmsd_zero():
    rmsd_kabsch = alignment.rmsd_kabsch(xyz1, xyz2)
    rmsd_qcp = alignment.rmsd_qcp(xyz1, xyz2)
    eq(float(rmsd_kabsch), 0.0, decimal=5)
    eq(float(rmsd_qcp), 0.0, decimal=5)