Skip to content

Commit

Permalink
Fix bug with finding hoomd minor version when checking for gaff Perio…
Browse files Browse the repository at this point in the history
…dicImpropers
  • Loading branch information
CalCraven committed Jun 16, 2024
1 parent 8822524 commit b364e48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gmso/external/convert_hoomd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1275,7 +1275,7 @@ def _parse_improper_forces(
base_units,
)

if int(hoomd_version[0]) >= 4 and int(hoomd_version[1]) >= 5:
if int(hoomd_version[0]) + float(hoomd_version[1]) * 0.1 >= 4.5:
itype_group_map = {
"HarmonicImproperPotential": {
"container": hoomd.md.improper.Harmonic,
Expand Down
3 changes: 2 additions & 1 deletion gmso/tests/test_hoomd.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,8 @@ def test_zero_charges(self):
@pytest.mark.skipif(not has_hoomd, reason="hoomd is not installed")
@pytest.mark.skipif(not has_mbuild, reason="mbuild not installed")
@pytest.mark.skipif(
int(hoomd_version[0]) <= 3.8, reason="Deprecated features in HOOMD 4"
int(hoomd_version[0]) + float(hoomd_version[1]) * 0.1 < 4.5,
reason="Feature added in HOOMD 4.5",
)
def test_gaff_sim(self, gaff_forcefield):
base_units = {
Expand Down

0 comments on commit b364e48

Please sign in to comment.