Skip to content

Commit

Permalink
add unit tests for graphene surface
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjonesBSU committed Oct 3, 2023
1 parent dee97a3 commit 6b4e33b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions hoomd_organics/tests/library/test_surfaces.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from hoomd_organics.library import Graphene


class TestSurfaces:
def test_create_graphene_surface(self):
surface = Graphene(
x_repeat=2,
y_repeat=2,
n_layers=3,
periodicity=(False, False, False),
)
assert surface.n_particles == 4 * 2 * 2 * 3
assert surface.n_bonds == 54

def test_graphene_with_periodicity(self):
surface = Graphene(
x_repeat=2, y_repeat=2, n_layers=3, periodicity=(True, True, False)
)
assert surface.n_particles == 4 * 2 * 2 * 3
assert surface.periodicity == (True, True, False)
assert surface.n_bonds == 72

0 comments on commit 6b4e33b

Please sign in to comment.