Skip to content

Commit

Permalink
Merge pull request prody#1991 from jamesmkrieger/chHB_no_lig
Browse files Browse the repository at this point in the history
bug fix chainsHB no ligand
  • Loading branch information
jamesmkrieger authored Nov 15, 2024
2 parents 1389bda + 8d64b00 commit e20a87c
Showing 1 changed file with 5 additions and 3 deletions.
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

0 comments on commit e20a87c

Please sign in to comment.