Skip to content

Commit

Permalink
Merge branch 'master' of github.com:prody/ProDy into jmk_waterFinder_2
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmkrieger committed Apr 16, 2024
2 parents a227161 + a514a90 commit 0fe84e1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion prody/proteins/waterbridges.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,17 @@ def calcWaterBridges(atoms, **kwargs):
if outputType not in ['info', 'atomic', 'indices']:
raise TypeError('Output can be info, atomic or indices.')

water = atoms.select('water')
if water is None:
raise ValueError('atoms has no water so cannot be analysed with WatFinder')

relations = RelationList(len(atoms))
consideredAtoms = ~atoms.select(
tooFarAtoms = atoms.select(
f'water and not within {distWR} of protein')
if tooFarAtoms is None:
consideredAtoms = atoms
else:
consideredAtoms = ~tooFarAtoms

waterHydrogens = consideredAtoms.select('water and hydrogen') or []
waterOxygens = consideredAtoms.select('water and oxygen')
Expand Down

0 comments on commit 0fe84e1

Please sign in to comment.