Skip to content

Commit

Permalink
fixed handling of modified residues in protein ligands.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarah Naomi Bolz committed Jan 13, 2025
1 parent 979e56d commit c2bb26f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions plip/structure/preparation.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,14 @@ def getpeptides(self, chain):
try to extract the underlying ligand formed by all residues in the
given chain without water
"""
all_from_chain = [o for o in pybel.ob.OBResidueIter(
self.proteincomplex.OBMol) if o.GetChain() == chain and not self.is_het_residue(o)] # All residues from chain
# All residues from chain
if config.KEEPMOD:
all_from_chain = [o for o in pybel.ob.OBResidueIter(
self.proteincomplex.OBMol) if o.GetChain() == chain and (not self.is_het_residue(o) or
o.GetName() in self.modresidues)]
else:
all_from_chain = [o for o in pybel.ob.OBResidueIter(
self.proteincomplex.OBMol) if o.GetChain() == chain and not self.is_het_residue(o)]
if len(all_from_chain) == 0:
return None
else:
Expand Down

0 comments on commit c2bb26f

Please sign in to comment.