diff --git a/gmso/external/convert_hoomd.py b/gmso/external/convert_hoomd.py index ccc5b82dd..6a733feae 100644 --- a/gmso/external/convert_hoomd.py +++ b/gmso/external/convert_hoomd.py @@ -1108,11 +1108,6 @@ def _parse_dihedral_forces( expected_unitsDict[group] = potential_refs[group][ "expected_parameters_dimensions" ] - # groups[group] = _convert_connection_params_units( - # groups[group], - # expected_units_dim, - # base_units, - # ) dtype_group_map = { "OPLSTorsionPotential": { "container": hoomd.md.dihedral.OPLS, @@ -1176,7 +1171,10 @@ def _parse_dihedral_forces( base_units=base_units, ) ) - raise ValueError + else: + raise GMSOError( + f"Current version of HOOMD-blue, {hoomd_version}. is not supported. Please updated for version 3.8 or later." + ) return dihedral_forces diff --git a/gmso/utils/units.py b/gmso/utils/units.py index 29f4b1387..fbd4f8032 100644 --- a/gmso/utils/units.py +++ b/gmso/utils/units.py @@ -504,7 +504,26 @@ def convert_params_units( expected_units_dim, base_units, ): - """Convert parameters' units in the potential to that specified in the base_units.""" + """Convert parameters' units in the potential to that specified in the base_units. + + Parameters + ---------- + potentials : list + Set of potentials to apply the conversion to. + expected_units_dim : dict + The dimensionality expected for all parameters in the potential. This allows + the given dimensions to be converted to via the base_units specified in the + unit system. + base_units : dict + The units to use for conversion. Must have keys of "length", "energy", + and "mass". These are the base units any parameter will be converted into. + + Returns + ------- + converted_potentials : list + the input potentials converted into the base units given by + base_units `dict`. + """ converted_potentials = list() for potential in potentials: converted_params = dict()