Skip to content

Commit

Permalink
Merge pull request prody#1868 from jamesmkrieger/jmk_waterFinder_2
Browse files Browse the repository at this point in the history
add no waters align error
  • Loading branch information
karolamik13 authored Apr 16, 2024
2 parents 5d52162 + 51d69fc commit e8d68bc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions prody/proteins/waterbridges.py
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,9 @@ def findClusterCenters(file_pattern, **kwargs):
sel_waters.append(j)

coords_wat = np.array([sel_waters], dtype=float)
if coords_wat.shape[0] == 0:
raise ValueError('No waters were selected. You may need to align your trajectory')

selectedWaters.setCoords(coords_wat)
selectedWaters.setNames(['DUM']*len(selectedWaters))
selectedWaters.setResnums(range(1, len(selectedWaters)+1))
Expand Down

0 comments on commit e8d68bc

Please sign in to comment.