Skip to content

Commit

Permalink
Fixing omega angle calculation in water bridge detection
Browse files Browse the repository at this point in the history
This closes pharmai#122
  • Loading branch information
kalinni committed Mar 26, 2024
1 parent 4013ead commit 6bf2442
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plip/structure/detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 6bf2442

Please sign in to comment.