Skip to content

Commit

Permalink
add else statement
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjonesBSU committed Sep 13, 2024
1 parent 4edad91 commit bc06bec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mbuild/formats/hoomd_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"""

import gsd.hoomd
import numpy as np
import parmed as pmd
import unyt as u
from gmso.external import from_mbuild, from_parmed, to_gsd_snapshot
Expand Down Expand Up @@ -56,6 +55,10 @@ def to_hoomdsnapshot(
gmso_top = from_mbuild(compound=compound)
elif isinstance(compound, pmd.Structure):
gmso_top = from_parmed(structure=compound)
else:
raise ValueError(
"You must pass in an mBuild Compound or Parmed Structure."
)

if identify_connections:
gmso_top.identify_connections()
Expand Down

0 comments on commit bc06bec

Please sign in to comment.