From 139930969f650beaf82c2c012013941ca83aeb37 Mon Sep 17 00:00:00 2001 From: fdoljanin Date: Sun, 28 Jul 2024 19:12:53 +0200 Subject: [PATCH] fix zero hydrogen handling in water bridges --- prody/proteins/waterbridges.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prody/proteins/waterbridges.py b/prody/proteins/waterbridges.py index cb56f4008..19aea470d 100644 --- a/prody/proteins/waterbridges.py +++ b/prody/proteins/waterbridges.py @@ -392,7 +392,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: @@ -404,7 +404,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: