From 06c451c2cfd655b2b0cbc64a18bd4bc61a62c9c7 Mon Sep 17 00:00:00 2001 From: jvsguerra Date: Thu, 24 Oct 2024 10:32:16 -0300 Subject: [PATCH] Tweak vdw ValueError --- AtomPacker/core/io/vdw/file.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AtomPacker/core/io/vdw/file.py b/AtomPacker/core/io/vdw/file.py index 7ec81ec..e80561a 100644 --- a/AtomPacker/core/io/vdw/file.py +++ b/AtomPacker/core/io/vdw/file.py @@ -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)