Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions smee/tests/convertors/openmm/test_ff.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def test_convert_to_openmm_ffxml(tmp_cwd, with_constraints, smiles):
switchDistance=8.0 * openmm.unit.angstrom,
constraints=openmm.app.HBonds if with_constraints else None,
rigidWater=True,
removeCMMotion=False,
removeCMMotion=True,
)
system_from_off = off_ff.create_openmm_system(off_top)

Expand Down Expand Up @@ -114,7 +114,7 @@ def test_convert_to_openmm_ffxml_v_sites(tmp_cwd):
switchDistance=8.0 * openmm.unit.angstrom,
constraints=openmm.app.HBonds,
rigidWater=True,
removeCMMotion=False,
removeCMMotion=True,
)
system_from_off = off_ff.create_openmm_system(off_top)

Expand Down
5 changes: 5 additions & 0 deletions smee/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,11 @@ def test_logsumexp(a, b, dim, keepdim):
logsumexp(a.numpy(), dim, b if b is None else b.numpy(), keepdim)
)

# scipy.logsumexp returns shape (1,) for 0-d inputs with keepdim=True
# but we expect shape () for 0-d inputs regardless of keepdim
if a.ndim == 0 and expected.ndim == 1:
expected = expected.squeeze()

assert actual.shape == expected.shape
assert torch.allclose(actual.double(), expected.double())

Expand Down
Loading