Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjonesBSU committed Mar 10, 2025
1 parent d93696e commit 82d2409
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
10 changes: 5 additions & 5 deletions flowermd/tests/library/test_polymers.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ def test_ellipsoid_chain(self):
lengths=4,
num_mols=2,
lpar=0.5,
bead_mass=100,
bead_mass=1,
)
assert ellipsoid_chain.n_particles == 16
assert ellipsoid_chain.molecules[0].mass == 400
assert ellipsoid_chain.molecules[0].n_particles == 8
assert ellipsoid_chain.molecules[0].n_bonds == 7
assert ellipsoid_chain.n_particles == 32
assert ellipsoid_chain.molecules[0].mass == 4
assert ellipsoid_chain.molecules[0].n_particles == 16
assert ellipsoid_chain.molecules[0].n_bonds == 10
7 changes: 4 additions & 3 deletions flowermd/tests/utils/test_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class TestBondConstraint(BaseTest):
def test_single_fixed_bonds(self):
chains = LJChain(lengths=10, num_mols=1)
system = Pack(molecules=chains, density=0.001)
system = Pack(molecules=chains, density=0.001, base_units=dict())
snap, d = set_bond_constraints(
snapshot=system.hoomd_snapshot,
bond_types=["A-A"],
Expand All @@ -31,7 +31,7 @@ def test_multiple_fixed_bonds(self):
bead_mass={"A": 1.0, "B": 0.7},
bond_lengths={"A-B": 1.0, "B-B": 0.80},
)
system = Pack(molecules=chains, density=0.0001)
system = Pack(molecules=chains, density=0.0001, base_units=dict())
snap, d = set_bond_constraints(
snapshot=system.hoomd_snapshot,
bond_types=["A-B", "B-B"],
Expand All @@ -53,7 +53,7 @@ def test_multiple_fixed_bonds(self):

def test_ellipsoid_fixed_bonds_bad_val(self):
chains = LJChain(lengths=10, num_mols=1)
system = Pack(molecules=chains, density=0.001)
system = Pack(molecules=chains, density=0.001, base_units=dict())
with pytest.raises(ValueError):
set_bond_constraints(
system.hoomd_snapshot,
Expand All @@ -77,6 +77,7 @@ def test_ellipsoid_create_rigid_body(self):
edge=5,
overlap=1,
fix_orientation=True,
base_units=dict(),
)
snap = system.hoomd_snapshot
rigid_frame, rigid = create_rigid_ellipsoid_chain(snap)
Expand Down

0 comments on commit 82d2409

Please sign in to comment.