Skip to content

Commit 6b18346

Browse files
Fix hoomd version handling in convert_hoomd.py (#828)
* 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>
1 parent ab2e7f6 commit 6b18346

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

gmso/external/convert_hoomd.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
if has_hoomd:
3232
import hoomd
3333

34+
hoomd_version = hoomd.version.version.split(".")
35+
else:
36+
hoomd_version = None
37+
3438
# Note, charge will always be assumed to be in elementary_charge
3539
MD_UNITS = {
3640
"energy": u.kJ / u.mol,
@@ -44,8 +48,6 @@
4448
"mass": u.g / u.mol, # aka amu
4549
}
4650

47-
hoomd_version = hoomd.version.version.split(".")
48-
4951

5052
def to_gsd_snapshot(
5153
top,

0 commit comments

Comments
 (0)