diff --git a/prody/proteins/waterbridges.py b/prody/proteins/waterbridges.py index 5fb15737e..7aa643c9e 100644 --- a/prody/proteins/waterbridges.py +++ b/prody/proteins/waterbridges.py @@ -1334,13 +1334,12 @@ def findClusterCenters(file_pattern, **kwargs): removeResid = [] removeCoords = [] for ii in range(len(coords_all)): - if 'water' not in selection.split(): - sel = coords_all.select(str(selection)+' within '+str(distC)+' of center', - center=coords_all.getCoords()[ii]) - if 'water' in selection.split() or np.any([water in selection.split() for water in DEFAULTS['water']]): sel = coords_all.select('water within '+str(distC)+' of center', center=coords_all.getCoords()[ii]) + else: + sel = coords_all.select(str(selection)+' within '+str(distC)+' of center', + center=coords_all.getCoords()[ii]) if sel is not None and len(sel) <= int(numC): removeResid.append(coords_all.getResnums()[ii])