Skip to content

Commit

Permalink
add test for site level
Browse files Browse the repository at this point in the history
  • Loading branch information
daico007 committed Nov 13, 2023
1 parent b243619 commit 2c17ff9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gmso/tests/test_atom.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ def test_bad_pos_input(self, position):
with pytest.raises((u.exceptions.InvalidUnitOperation, ValueError)):
Atom(name="atom", position=u.nm * position)

def test_pos_restraint(self, spce_water):
for site in spce_water.sites:
for ax in ["kx", "ky", "kz"]:
assert site.restraint[ax] == 1000 * u.Unit("kJ/(mol*nm**2)")
site.restraint[ax] = 500 * u.Unit("kJ/(mol*nm**2)")

def test_equivalence(self):
ref = Atom(name="atom", position=u.nm * np.zeros(3))
same_atom = Atom(name="atom", position=u.nm * np.zeros(3))
Expand Down

0 comments on commit 2c17ff9

Please sign in to comment.