Exemple #1
0
def test_superposition():
    n = 4
    crds1 = [v3.random_vector() for i in range(n)]
    random_m = v3.random_rotation()
    crds2 = [v3.transform(random_m, c) for c in crds1]
    rms, m = rmsd.calc_rmsd_rot(crds1, crds2)
    for crd1, crd2 in zip(crds1, crds2):
        assert v3.is_similar_vector(v3.transform(m, crd1), crd2)
Exemple #2
0
def test_superposition():
  n = 4
  crds1 = [v3.random_vector() for i in range(n)]
  random_m = v3.random_rotation()
  crds2 = [v3.transform(random_m, c) for c in crds1]
  rms, m = rmsd.calc_rmsd_rot(crds1, crds2)
  for crd1, crd2 in zip(crds1, crds2):
    assert v3.is_similar_vector(v3.transform(m, crd1), crd2)
Exemple #3
0
def test_rmsd():
    n = 4
    crds1 = [v3.random_vector() for i in range(n)]
    random_m = v3.random_rotation()
    crds2 = [v3.transform(random_m, c) for c in crds1]
    rms, m = rmsd.calc_rmsd_rot(crds1, crds2)
    assert v3.is_similar_mag(0, rms)
    # test the two algorithms separately
    rms, m = rmsd.pyqcprot_rmsd_rot(crds1, crds2)
    assert v3.is_similar_mag(0, rms)
    if rmsd.is_numpy:
        rms, m = rmsd.numpy_svd_rmsd_rot(crds1, crds2)
        assert v3.is_similar_mag(0, rms)
Exemple #4
0
def test_rmsd():
  n = 4
  crds1 = [v3.random_vector() for i in range(n)]
  random_m = v3.random_rotation()
  crds2 = [v3.transform(random_m, c) for c in crds1]
  rms, m = rmsd.calc_rmsd_rot(crds1, crds2)
  assert v3.is_similar_mag(0, rms)
  # test the two algorithms separately
  rms, m = rmsd.pyqcprot_rmsd_rot(crds1, crds2)
  assert v3.is_similar_mag(0, rms)
  if rmsd.is_numpy:
    rms, m = rmsd.numpy_svd_rmsd_rot(crds1, crds2)
    assert v3.is_similar_mag(0, rms)