From bc06bec0c0bd488d3e996c91c6635deda2cd5fde Mon Sep 17 00:00:00 2001 From: chrisjonesBSU Date: Fri, 13 Sep 2024 10:29:07 -0600 Subject: [PATCH] add else statement --- mbuild/formats/hoomd_writer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mbuild/formats/hoomd_writer.py b/mbuild/formats/hoomd_writer.py index fba8c3b44..100466d2a 100644 --- a/mbuild/formats/hoomd_writer.py +++ b/mbuild/formats/hoomd_writer.py @@ -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 @@ -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()