Skip to content

Commit

Permalink
extract res if only 1
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmkrieger committed Sep 25, 2024
1 parent 9639506 commit 0c397d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion prody/atomic/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 0c397d8

Please sign in to comment.