From 0c397d81af43c1b21c2fa5b3fbdfd07d366fac64 Mon Sep 17 00:00:00 2001 From: James Krieger Date: Wed, 25 Sep 2024 18:29:21 +0200 Subject: [PATCH] extract res if only 1 --- prody/atomic/functions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/prody/atomic/functions.py b/prody/atomic/functions.py index c2cab1b6c..12964c96a 100644 --- a/prody/atomic/functions.py +++ b/prody/atomic/functions.py @@ -346,7 +346,10 @@ def extendAtoms(nodes, atoms, is3d=False): if res is None: raise ValueError('atoms must contain a residue for all atoms') if isinstance(res, list): - raise ValueError('not enough data to get a single residue for all atoms') + if len(res) == 1: + res = res[0] + else: + raise ValueError('not enough data to get a single residue for all atoms') res_atom_indices = res._getIndices() if not fastin(res, residues):