Skip to content

Commit

Permalink
Merge pull request #127 from sungekim/bug/saltbridge
Browse files Browse the repository at this point in the history
fixes salt bridge detection for nucleic acid receptors
  • Loading branch information
fkaiserbio committed Apr 5, 2022
2 parents 764591b + 1743cea commit 40671fd
Show file tree
Hide file tree
Showing 3 changed files with 8,226 additions and 0 deletions.
12 changes: 12 additions & 0 deletions plip/structure/preparation.py
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,7 @@ def find_hal(self, atoms):

def find_charged(self, mol):
"""Looks for positive charges in arginine, histidine or lysine, for negative in aspartic and glutamic acid."""
"""If nucleic acids are part of the receptor, looks for negative charges in phosphate backbone"""
data = namedtuple('pcharge', 'atoms atoms_orig_idx type center restype resnr reschain')
a_set = []
# Iterate through all residue, exclude those in chains defined as peptides
Expand Down Expand Up @@ -966,6 +967,17 @@ def find_charged(self, mol):
restype=res.GetName(),
resnr=res.GetNum(),
reschain=res.GetChain()))
if res.GetName() in config.DNA + config.RNA and config.DNARECEPTOR: # nucleic acids have negative charge in sugar phosphate
for a in pybel.ob.OBResidueAtomIter(res):
if a.GetType().startswith('P') and res.GetAtomProperty(a, 9) \
and not self.Mapper.mapid(a.GetIdx(), mtype='protein') in self.altconf:
a_contributing.append(pybel.Atom(a))
a_contributing_orig_idx.append(self.Mapper.mapid(a.GetIdx(), mtype='protein'))
if not len(a_contributing) == 0:
a_set.append(data(atoms=a_contributing,atoms_orig_idx=a_contributing_orig_idx, type='negative',
center=centroid([ac.coords for ac in a_contributing]), restype=res.GetName(),
resnr=res.GetNum(),
reschain=res.GetChain()))
return a_set

def find_metal_binding(self, mol):
Expand Down
Loading

0 comments on commit 40671fd

Please sign in to comment.