Skip to content

Commit

Permalink
Merge pull request prody#1921 from fdoljanin/fixing_waterBridges_zero…
Browse files Browse the repository at this point in the history
…Hydrogen

Fix zero hydrogen handling in water bridges
  • Loading branch information
karolamik13 authored Jul 28, 2024
2 parents ed88515 + 1399309 commit 3983969
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prody/proteins/waterbridges.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def calcWaterBridges(atoms, **kwargs):
waterHydrogens = consideredAtoms.select('water and hydrogen') or []
waterOxygens = consideredAtoms.select('water and oxygen')
waterHydroOxyPairs = findNeighbors(
waterOxygens, DIST_COVALENT_H, waterHydrogens)
waterOxygens, DIST_COVALENT_H, waterHydrogens) if waterHydrogens else []
for oxygen in waterOxygens:
relations.addNode(oxygen, ResType.WATER)
for pair in waterHydroOxyPairs:
Expand All @@ -414,7 +414,7 @@ def calcWaterBridges(atoms, **kwargs):

proteinHydrogens = consideredAtoms.select(f'protein and hydrogen') or []
proteinHydroPairs = findNeighbors(
proteinHydrophilic, DIST_COVALENT_H, proteinHydrogens)
proteinHydrophilic, DIST_COVALENT_H, proteinHydrogens) if proteinHydrogens else []
for hydrophilic in proteinHydrophilic:
relations.addNode(hydrophilic, ResType.PROTEIN)
for pair in proteinHydroPairs:
Expand Down

0 comments on commit 3983969

Please sign in to comment.