Skip to content

Commit

Permalink
Tweak vdw ValueError
Browse files Browse the repository at this point in the history
  • Loading branch information
jvsguerra committed Oct 24, 2024
1 parent b908521 commit 06c451c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion AtomPacker/core/io/vdw/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,7 @@ def _lookup_radii(
elif isinstance(vdw, dict):
# Check if all elements are provided in vdw
if not all([name in vdw for name in names]):
raise ValueError("Not all elements are provided in the `vdw` dictionary.")
raise ValueError(
f"Missing atoms in `vdw` dictionary: {set(names) - set(vdw.keys())}"
)
return numpy.vectorize(lambda x: vdw[x])(names)

0 comments on commit 06c451c

Please sign in to comment.