Skip to content

Commit

Permalink
add dialanine test for qcp
Browse files Browse the repository at this point in the history
  • Loading branch information
RMeli committed Oct 17, 2019
1 parent 83e79fc commit 50dee08
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pyrmsd/tests/test_rmsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,22 @@ def test_rmsd_qcp_ethanol():
assert rmsd.rmsd_dummy(m1, m2) > 0.0

assert rmsd.rmsd_qcp(m1, m2) == pytest.approx(0)


def test_rmsd_qcp_dialanine():

mol1 = molecules.dialanine
mol2 = molecules.dialanine

m1 = molecule.openbabel_to_molecule(mol1)
m2 = molecule.openbabel_to_molecule(mol2)

assert rmsd.rmsd_dummy(m1, m2) == pytest.approx(0)
assert rmsd.rmsd_qcp(m1, m2) == pytest.approx(0)

m2.translate(5 * np.random.rand(3))
m2.rotate(15, np.array([-2, 1, 3]))

assert rmsd.rmsd_dummy(m1, m2) > 0.0

assert rmsd.rmsd_qcp(m1, m2) == pytest.approx(0)

0 comments on commit 50dee08

Please sign in to comment.