From 6bf2442210c90f2da64e7d957fc0cdf9da4bc594 Mon Sep 17 00:00:00 2001 From: Katja Linnemann Date: Thu, 7 Mar 2024 18:25:49 +0100 Subject: [PATCH] Fixing omega angle calculation in water bridge detection This closes #122 --- plip/structure/detection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plip/structure/detection.py b/plip/structure/detection.py index 71fec63..7af526b 100644 --- a/plip/structure/detection.py +++ b/plip/structure/detection.py @@ -291,7 +291,7 @@ def water_bridges(bs_hba, lig_hba, bs_hbd, lig_hbd, water): if not wl.oxy == wd.oxy: continue # Same water molecule and angle within omega - w_angle = vecangle(vector(acc.a.coords, wl.oxy.coords), vector(wl.oxy.coords, don.h.coords)) + w_angle = vecangle(vector(wl.oxy.coords, acc.a.coords), vector(wl.oxy.coords, don.h.coords)) if not config.WATER_BRIDGE_OMEGA_MIN < w_angle < config.WATER_BRIDGE_OMEGA_MAX: continue resnr, reschain, restype = whichresnumber(don.d), whichchain(don.d), whichrestype(don.d) @@ -309,7 +309,7 @@ def water_bridges(bs_hba, lig_hba, bs_hbd, lig_hbd, water): if not wl.oxy == wd.oxy: continue # Same water molecule and angle within omega - w_angle = vecangle(vector(acc.a.coords, wl.oxy.coords), vector(wl.oxy.coords, don.h.coords)) + w_angle = vecangle(vector(wl.oxy.coords, acc.a.coords), vector(wl.oxy.coords, don.h.coords)) if not config.WATER_BRIDGE_OMEGA_MIN < w_angle < config.WATER_BRIDGE_OMEGA_MAX: continue resnr, reschain, restype = whichresnumber(acc.a), whichchain(acc.a), whichrestype(acc.a)