Skip to content

Commit

Permalink
Merge pull request #1963 from jamesmkrieger/extend_extract
Browse files Browse the repository at this point in the history
extract res if only 1 in extendAtoms
  • Loading branch information
jamesmkrieger authored Sep 30, 2024
2 parents e769fbc + 0c397d8 commit 7bcf0e3
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 7bcf0e3

Please sign in to comment.