Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug fix chainsHB no ligand #1991

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions prody/proteins/interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,9 +710,11 @@ def calcChHydrogenBonds(atoms, **kwargs):

ChainsHBs = [ i for i in HBS_calculations if str(i[2]) != str(i[5]) ]
if not ChainsHBs:
ligand_name = list(set(atoms.select('all not protein and not ion').getResnames()))[0]
ChainsHBs = [ ii for ii in HBS_calculations if ii[0][:3] == ligand_name or ii[3][:3] == ligand_name ]

ligand_sel = atoms.select('all not protein and not ion')
if ligand_sel:
ligand_name = list(set(ligand_sel.getResnames()))[0]
ChainsHBs = [ ii for ii in HBS_calculations if ii[0][:3] == ligand_name or ii[3][:3] == ligand_name ]

return ChainsHBs


Expand Down
Loading