Skip to content

Commit

Permalink
Add tests for angle, distance, and dihedral
Browse files Browse the repository at this point in the history
  • Loading branch information
theavey committed Sep 26, 2018
1 parent c5c8807 commit 91b94f7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_geometries.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ def test_n_atoms(self, xyz):
def test_energy(self, xyz):
assert xyz.energy == -1058630.8496721

def test_dihedral(self, xyz):
assert xyz.dihedral_between(21, 34, 35, 36) == pytest.approx(62.085346)

def test_angle(self, xyz):
assert xyz.angle_between(9, 13, 3) == pytest.approx(122.521027)

def test_distance(self, xyz):
assert xyz.distance_between(41, 40) == pytest.approx(3.891653)

def test_bad_lines(self):
from paratemp.geometries import XYZ
with pytest.raises(ValueError):
Expand Down

0 comments on commit 91b94f7

Please sign in to comment.