Skip to content

Commit

Permalink
Fix hoomd version handling in convert_hoomd.py (#828)
Browse files Browse the repository at this point in the history
* move hoomd version var under if statement

* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
chrisjonesBSU and pre-commit-ci[bot] authored Jun 21, 2024
1 parent ab2e7f6 commit 6b18346
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gmso/external/convert_hoomd.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
if has_hoomd:
import hoomd

hoomd_version = hoomd.version.version.split(".")
else:
hoomd_version = None

# Note, charge will always be assumed to be in elementary_charge
MD_UNITS = {
"energy": u.kJ / u.mol,
Expand All @@ -44,8 +48,6 @@
"mass": u.g / u.mol, # aka amu
}

hoomd_version = hoomd.version.version.split(".")


def to_gsd_snapshot(
top,
Expand Down

0 comments on commit 6b18346

Please sign in to comment.