OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
hbond.py
Go to the documentation of this file.
1 import ost as _ost
2 import ost.geom as _geom
3 
4 """
5 Module written by Niklaus Johner (niklaus.johner@a3.epfl.ch) 2012
6 
7 This module is a flexible rewrite of HBPlus, allowing to calculate hbond
8 conservation between different structures or over a trajectory.
9 It uses customizable dictionaries to define donors and acceptors and can
10 account for equivalent HBonds such as involving for example either oxygen atom
11 of an Aspartic Acid.
12 """
13 __all__=('HBondDonor','HBondAcceptor','BuildCHARMMHBondDonorAcceptorDict','AreHBonded','GetHbondDonorAcceptorList',\
14  'GetHbondListFromDonorAcceptorLists','GetHbondListFromView','GetHbondListFromTraj','GetHbondListBetweenViews'\
15  'CalculateHBondScore','AnalyzeHBondScore')
16 
17 
19  def __init__(self,donors=[],acceptors=[]):
20  self.donors=donors
21  self.acceptors=acceptors
22 
24  hb_da_dict={}
25  bb_donors=[['N','HN']]
26  bb_acceptors=[['O',['C']]]
27 
28  #hydrophobic
29  hb_da_dict['ALA']=HBondableAtoms(bb_donors,bb_acceptors)
30  hb_da_dict['GLY']=HBondableAtoms(bb_donors,bb_acceptors)
31  hb_da_dict['ILE']=HBondableAtoms(bb_donors,bb_acceptors)
32  hb_da_dict['LEU']=HBondableAtoms(bb_donors,bb_acceptors)
33  hb_da_dict['PHE']=HBondableAtoms(bb_donors,bb_acceptors)
34  hb_da_dict['MET']=HBondableAtoms(bb_donors,bb_acceptors)
35  hb_da_dict['VAL']=HBondableAtoms(bb_donors,bb_acceptors)
36  #special case
37  hb_da_dict['PRO']=HBondableAtoms([],bb_acceptors)
38 
39  #sidechain donors
40  ne=[['NE','HE']]
41  cz=[['NH1','HH11'],['NH1','HH12'],['NH2','HH21'],['NH2','HH22']]
42  hb_da_dict['ARG']=HBondableAtoms(bb_donors+ne+cz,bb_acceptors)
43  nz=[['NZ','HZ1'],['NZ','HZ2'],['NZ','HZ3']]
44  hb_da_dict['LYS']=HBondableAtoms(bb_donors+nz,bb_acceptors)
45  ne1=[['NE1','HE1']]
46  hb_da_dict['TRP']=HBondableAtoms(bb_donors+ne1,bb_acceptors)
47  sg=[['SG','HG1']]
48  hb_da_dict['CYS']=HBondableAtoms(bb_donors+sg,bb_acceptors)
49 
50  #sidechain acceptors
51  od12=[['OD1',['CG']],['OD2',['CG']]]
52  hb_da_dict['ASP']=HBondableAtoms(bb_donors,bb_acceptors+od12)
53  oe12=[['OE1',['CD']],['OE2',['CD']]]
54  hb_da_dict['GLU']=HBondableAtoms(bb_donors,bb_acceptors+oe12)
55 
56  #sidechain donor and acceptor
57  od1=[['OD1',['CG']]]
58  nd2=[['ND2','HD21'],['ND2','HD22']]
59  hb_da_dict['ASN']=HBondableAtoms(bb_donors+nd2,bb_acceptors+od1)
60  ne2=[['NE2','HE21'],['NE2','HE22']]
61  oe1=[['OE1',['CD']]]
62  hb_da_dict['GLN']=HBondableAtoms(bb_donors+ne2,bb_acceptors+oe1)
63  og_d=[['OG','HG1']]
64  og_a=[['OG',['CB']]]
65  hb_da_dict['SER']=HBondableAtoms(bb_donors+og_d,bb_acceptors+og_a)
66  og1_d=[['OG1','HG1']]
67  og1_a=[['OG1',['CB']]]
68  hb_da_dict['THR']=HBondableAtoms(bb_donors+og1_d,bb_acceptors+og1_a)
69  oh_d=[['OH','HH']]
70  oh_a=[['OH',['CZ']]]
71  hb_da_dict['TYR']=HBondableAtoms(bb_donors+oh_d,bb_acceptors+oh_a)
72  #histidine
73  nd1_d=[['ND1','HD1']]
74  ne2_a=[['NE2',['CD2','CE1']]]
75  hb_da_dict['HSD']=HBondableAtoms(bb_donors+nd1_d,bb_acceptors+ne2_a)
76  ne2_d=[['NE2','HE2']]
77  nd1_a=[['ND1',['CG','CE1']]]
78  hb_da_dict['HSE']=HBondableAtoms(bb_donors+ne2_d,bb_acceptors+nd1_a)
79  hb_da_dict['HSP']=HBondableAtoms(bb_donors+nd1_d+ne2_d,bb_acceptors)
80  #non-standard protonation state:
81  oe12=[['OE1',['CD']],['OE2',['CD']]]
82  oe2=[['OE2','HE2']]
83  hb_da_dict['GLUP']=HBondableAtoms(bb_donors+oe2,bb_acceptors+oe12)
84  od12=[['OD1',['CG']],['OD2',['CG']]]
85  od2=[['OD2','HD2']]
86  hb_da_dict['ASPP']=HBondableAtoms(bb_donors+od2,bb_acceptors+od12)
87  return hb_da_dict
88 
90  donor_swap_dict={}
91  donor_swap_dict['ARG']=[[['NH1','HH11'],['NH1','HH12'],['NH2','HH21'],['NH2','HH22']]]
92  donor_swap_dict['ASN']=[[['ND2','HD21'],['ND2','HD22']]]
93  donor_swap_dict['GLN']=[[['NE2','HE21'],['NE2','HE22']]]
94  donor_swap_dict['LYS']=[[['NZ','HZ1'],['NZ','HZ2'],['NZ','HZ3']]]
95  return donor_swap_dict
96 
98  acceptor_swap_dict={}
99  acceptor_swap_dict['ASP']=[[['OD1',['CG']],['OD2',['CG']]]]
100  acceptor_swap_dict['GLU']=[[['OE1',['CD']],['OE2',['CD']]]]
101  return acceptor_swap_dict
102 
103 def ListEquivalentDonors(donor,donor_swap_dict):
104  if not donor.heavy_atom.residue.name in donor_swap_dict:return [donor]
105  donor_list=[donor]
106  donor_atom_names=[donor.heavy_atom.name,donor.hydrogen.name]
107  res=donor.heavy_atom.residue
108  for equivalence_list in donor_swap_dict[donor.heavy_atom.residue.name]:
109  if not donor_atom_names in equivalence_list:continue
110  for atom_names in equivalence_list:
111  if atom_names==donor_atom_names:continue
112  else:donor_list.append(HBondDonor.FromResidue(res,atom_names[0],atom_names[1]))
113  return donor_list
114 
115 def ListEquivalentAcceptors(acceptor,acceptor_swap_dict):
116  if not acceptor.atom.residue.name in acceptor_swap_dict:return [acceptor]
117  acceptor_list=[acceptor]
118  acceptor_atom_names=[acceptor.atom.name,[a.name for a in acceptor.antecedent_list]]
119  res=acceptor.atom.residue
120  for equivalence_list in acceptor_swap_dict[acceptor.atom.residue.name]:
121  if not acceptor_atom_names in equivalence_list:continue
122  for atom_names in equivalence_list:
123  if atom_names==acceptor_atom_names:continue
124  else:acceptor_list.append(HBondAcceptor.FromResidue(res,atom_names[0],atom_names[1]))
125  return acceptor_list
126 
127 
129  def __init__(self,donor,hydrogen):
130  self.heavy_atom=donor
131  self.hydrogen=hydrogen
132  def __eq__(self,hbd):
133  if not isinstance(hbd,HBondDonor):return False
134  else:return self.heavy_atom==hbd.heavy_atom and self.hydrogen==hbd.hydrogen
135  def __hash__(self):
136  return hash((self.heavy_atom,self.hydrogen))
137  @classmethod
138  def FromResidue(cls,res,donor_name,hydrogen_name,verbose=True):
139  _donor=res.FindAtom(donor_name).handle
140  _hydrogen=res.FindAtom(hydrogen_name).handle
141  if not _donor.IsValid():
142  if verbose:print 'Could not find '+donor_name+' in residue '+str(res)
143  return
144  if not _hydrogen.IsValid():
145  if verbose:print 'Could not find '+hydrogen_name+' in residue '+str(res)
146  return
147  return cls(_donor,_hydrogen)
148 
149  def IsHBondedTo(self,acceptor):
150  return AreHBonded(self,acceptor)
151 
152 
154  def __init__(self,acceptor,antecedent_list):
155  self.atom=acceptor
156  self.antecedent_list=antecedent_list
157  def __eq__(self,hba):
158  if not isinstance(hba,HBondAcceptor):return False
159  else:return self.atom==hba.atom
160  def __hash__(self):
161  return hash(self.atom)
162  @classmethod
163  def FromResidue(cls,res,acceptor_name,antecedent_name_list,verbose=True):
164  _acceptor=res.FindAtom(acceptor_name).handle
165  _antecedent_list=_ost.mol.AtomHandleList([res.FindAtom(name).handle for name in antecedent_name_list])
166  if not _acceptor.IsValid():
167  if verbose:print 'Could not find '+acceptor_name+' in residue '+str(res)
168  return
169  for i,a in enumerate(_antecedent_list):
170  if not a.IsValid():
171  if verbose:print 'Could not find '+antecedent_name_list[i]+' in residue '+str(res)
172  return
173  return cls(_acceptor,_antecedent_list)
174 
175  def IsHBondedTo(self,donor):
176  return AreHBonded(donor,self)
177 
178 class HBond:
179  def __init__(self,donor,acceptor):
180  self.donor=donor
181  self.acceptor=acceptor
182  def __eq__(self,hb):
183  if not isinstance(hb,HBond):return False
184  else:return self.acceptor==hb.acceptor and self.donor==hb.donor
185  def __hash__(self):
186  return hash((self.donor,self.acceptor))
187  def IsFormed(self):return AreHBonded(self.donor,self.acceptor)
188  def DonorAcceptorDistance(self):return _geom.Distance(self.donor.heavy_atom.pos,self.acceptor.atom.pos)
189  def HydrogenAcceptorDistance(self):return _geom.Distance(self.donor.hydrogen.pos,self.acceptor.atom.pos)
191  dp=self.donor.heavy_atom.pos;ap=self.acceptor.atom.pos;hp=self.donor.hydrogen.pos
192  return _geom.Angle(dp-hp,ap-hp)
194  dp=self.donor.heavy_atom.pos;ap=self.acceptor.atom.pos
195  a=min([_geom.Angle(aa.pos-ap,dp-ap) for aa in self.acceptor.antecedent_list])
196  return a
198  hp=self.donor.hydrogen.pos;ap=self.acceptor.atom.pos
199  a=min([_geom.Angle(aa.pos-ap,hp-ap) for aa in acceptor.antecedent_list])
200  return a
201 
202 
203 def AreHBonded(donor,acceptor,da_dist=3.9,ha_dist=2.5,dha_angle=1.57,daaa_angle=1.57,haaa_angle=1.57):
204  """
205  determines if a donor/acceptor pair is hydrogen bonded or not
206  """
207  dp=donor.heavy_atom.pos
208  ap=acceptor.atom.pos
209  if _geom.Distance(dp,ap)>da_dist:return False
210  hp=donor.hydrogen.pos
211  if _geom.Distance(hp,ap)>ha_dist:return False
212  if _geom.Angle(dp-hp,ap-hp)<dha_angle:return False
213  a=min([_geom.Angle(aa.pos-ap,dp-ap) for aa in acceptor.antecedent_list])
214  if a<daaa_angle:return False
215  a=min([_geom.Angle(aa.pos-ap,hp-ap) for aa in acceptor.antecedent_list])
216  if a<haaa_angle:return False
217  return True
218 
219 def GetHbondDonorAcceptorList(eh,hbond_donor_acceptor_dict={},verbose=True):
220  """
221  returns a list of hydrogen-bond donors and acceptors from an Entity or EntityView.
222  It relies on atom names to determine the list of H-bond donors and acceptors.
223  These names are given in a dictionary, which defaults to CHARMM.
224  """
225  if not hbond_donor_acceptor_dict:
226  print 'Using default CHARMM atom namings'
227  hbond_donor_acceptor_dict=BuildCHARMMHBondDonorAcceptorDict()
228  donor_list=[]
229  acceptor_list=[]
230  for r in eh.residues:
231  if not r.name in hbond_donor_acceptor_dict:
232  print 'donors and acceptors for',r,'are not defined in the dictionary and will not be included'
233  continue
234  res_da_dict=hbond_donor_acceptor_dict[r.name]
235  for acceptor in res_da_dict.acceptors:
236  a=HBondAcceptor.FromResidue(r,acceptor[0],acceptor[1],verbose)
237  if not a==None:acceptor_list.append(a)
238  for donor in res_da_dict.donors:
239  d=HBondDonor.FromResidue(r,donor[0],donor[1],verbose)
240  if not d==None:donor_list.append(d)
241  return [donor_list,acceptor_list]
242 
243 
244 def GetHbondListFromDonorAcceptorLists(donor_list,acceptor_list):
245  """
246  return a list of hydrogen bonds between donors and acceptors from
247  a list of donors and a list of acceptors.
248  """
249  hbond_list=[]
250  for donor in donor_list:
251  for acceptor in acceptor_list:
252  if AreHBonded(donor,acceptor):hbond_list.append(HBond(donor,acceptor))
253  return hbond_list
254 
255 def GetHbondListFromView(eh,hbond_donor_acceptor_dict={},verbose=True):
256  """
257  return a list of hydrogen bonds from an Entity or EntityView.
258  if no dictionary for the hbond donors and acceptors is specified
259  it will use the standard CHARMM names to determine them
260  """
261  [donor_list,acceptor_list]=GetHbondDonorAcceptorList(eh,hbond_donor_acceptor_dict,verbose)
262  hbond_list=[]
263  for donor in donor_list:
264  for acceptor in acceptor_list:
265  if AreHBonded(donor,acceptor):hbond_list.append(HBond(donor,acceptor))
266  return hbond_list
267 
268 def GetHbondListFromTraj(t,eh,cutoff=0.7,stride=1,swap=False,donor_swap_dict={},acceptor_swap_dict={},hbond_donor_acceptor_dict={},verbose=True):
269  """
270  return a list of hydrogen bonds from an Entity or EntityView that are
271  present in a fraction of the frames larger than *cutoff*.
272  if no dictionary for the hbond donors and acceptors is specified
273  it will use the standard CHARMM names to determine them
274  """
275  if swap:
276  if not donor_swap_dict:
277  print 'use of standard CHARMM HBond donor swap dictionary'
278  donor_swap_dict=BuildCHARMMHBondDonorEquivalenceDict()
279  if not acceptor_swap_dict:
280  print 'use of standard CHARMM HBond acceptor swap dictionary'
281  acceptor_swap_dict=BuildCHARMMHBondAcceptorEquivalenceDict()
282  [donor_list,acceptor_list]=GetHbondDonorAcceptorList(eh,hbond_donor_acceptor_dict,verbose)
283  hb_list=[]
284  hb_score=[]
285  nframes=0
286  for i in range(0,t.GetFrameCount(),stride):
287  t.CopyFrame(i)
288  nframes+=1
289  hbond_list=GetHbondListFromDonorAcceptorLists(donor_list,acceptor_list)
290  if swap:
291  hbond_list=GetEquivalentHBonds(hbond_list,eh,swap,donor_swap_dict,acceptor_swap_dict,verbose)
292  for hb in hbond_list:
293  if hb in hbond_list[hbond_list.index(hb)+1:]:hbond_list.pop(hbond_list.index(hb))
294  for hb in hbond_list:
295  if hb in hb_list:hb_score[hb_list.index(hb)]+=1
296  else:
297  hb_score.append(1)
298  hb_list.append(hb)
299  hbond_list=[]
300  hbond_score=[]
301  for hb,s in zip(hb_list,hb_score):
302  if s/float(nframes)>=cutoff:
303  if swap:hbond_list.append(list(hb)[0])
304  else:hbond_list.append(hb)
305  hbond_score.append(s/float(nframes))
306  return (hbond_list,hbond_score)
307 
308 def GetHbondListBetweenViews(eh1,eh2,hbond_donor_acceptor_dict={},verbose=True):
309  """
310  return the list of hydrogen bonds formed between two Entity or EntityView.
311  if no dictionary for the hbond donors and acceptors is specified
312  it will use the standard CHARMM names to determine them
313  """
314  [donor_list1,acceptor_list1]=GetHbondDonorAcceptorList(eh1,hbond_donor_acceptor_dict,verbose)
315  [donor_list2,acceptor_list2]=GetHbondDonorAcceptorList(eh2,hbond_donor_acceptor_dict,verbose)
316  hbond_list=[]
317  for donor in donor_list1:
318  for acceptor in acceptor_list2:
319  if AreHBonded(donor,acceptor):
320  hb=HBond(donor,acceptor)
321  if hb in hbond_list:continue
322  hbond_list.append(hb)
323  for donor in donor_list2:
324  for acceptor in acceptor_list1:
325  if AreHBonded(donor,acceptor):
326  hb=HBond(donor,acceptor)
327  if hb in hbond_list:continue
328  hbond_list.append(hb)
329  return hbond_list
330 
331 def GetEquivalentHBonds(ref_hbond_list,eh,swap=False,donor_swap_dict={},acceptor_swap_dict={},verbose=True):
332  hbond_list=[]
333  if not swap:
334  for hbond in ref_hbond_list:
335  res1=eh.FindResidue(hbond.donor.heavy_atom.chain.name,hbond.donor.heavy_atom.residue.number.num)
336  res2=eh.FindResidue(hbond.acceptor.atom.chain.name,hbond.acceptor.atom.residue.number.num)
337  donor=HBondDonor.FromResidue(res1,hbond.donor.heavy_atom.name,hbond.donor.hydrogen.name,verbose)
338  acceptor=HBondAcceptor.FromResidue(res2,hbond.acceptor.atom.name,[a.name for a in hbond.acceptor.antecedent_list],verbose)
339  hbond_list.append(set([HBond(donor,acceptor)]))
340  else:
341  if not donor_swap_dict:
342  print 'use of standard CHARMM HBond donor swap dictionary'
343  donor_swap_dict=BuildCHARMMHBondDonorEquivalenceDict()
344  if not acceptor_swap_dict:
345  print 'use of standard CHARMM HBond acceptor swap dictionary'
346  acceptor_swap_dict=BuildCHARMMHBondAcceptorEquivalenceDict()
347  for hbond in ref_hbond_list:
348  res1=eh.FindResidue(hbond.donor.heavy_atom.chain.name,hbond.donor.heavy_atom.residue.number.num)
349  res2=eh.FindResidue(hbond.acceptor.atom.chain.name,hbond.acceptor.atom.residue.number.num)
350  donor=HBondDonor.FromResidue(res1,hbond.donor.heavy_atom.name,hbond.donor.hydrogen.name,verbose)
351  acceptor=HBondAcceptor.FromResidue(res2,hbond.acceptor.atom.name,[a.name for a in hbond.acceptor.antecedent_list],verbose)
352  donor_list=ListEquivalentDonors(donor,donor_swap_dict)
353  acceptor_list=ListEquivalentAcceptors(acceptor,acceptor_swap_dict)
354  hbond_list.append(set([HBond(d,a) for d in donor_list for a in acceptor_list]))
355  return hbond_list
356 
357 
358 def CalculateHBondScore(ref_eh,eh2,ref_eh2=None,hbond_donor_acceptor_dict={},swap=False,donor_swap_dict={},acceptor_swap_dict={},verbose=True):
359  """
360  Returns the fraction of H-bonds from ref_eh that are also present in eh2.
361  If ref_eh2 is specified, it uses as reference the Hbonds between ref_eh and ref_eh2.
362  This allows to look at H-bonds between specific parts of proteins or so.
363  Alternatively ref_eh can be a list of H-bonds.
364  This function relies on atom names to determine the list of H-bond donors and acceptors.
365  These names are given in a dictionary, which defaults to CHARMM.
366  If swap is set to True, a dictionary for equivalent donors and one for equivalent acceptors
367  (defaults to CHARMM) is used to check for equivalent HBonds in eh2.
368  If swap is set to True, if two equivalent hydrogen bonds are present in the reference entity
369  (for example both oxygens of ASP H-bonding the same atom), it suffices that on of these bonds is
370  present in eh2 for both of them to be counted as present in eh2.
371  """
372  if ref_eh2:hbond_list1=GetHbondListBetweenViews(ref_eh,ref_eh2,hbond_donor_acceptor_dict,verbose)
373  elif type(ref_eh)==list:hbond_list1=ref_eh
374  else:hbond_list1=GetHbondListFromView(ref_eh,hbond_donor_acceptor_dict,verbose)
375  nbonds=float(len(hbond_list1))
376  if nbonds==0:
377  print 'No HBonds in reference view'
378  return None
379  hbond_list2=GetEquivalentHBonds(hbond_list1,eh2,swap,donor_swap_dict,acceptor_swap_dict,verbose)
380  c=0
381  for hl in hbond_list2:
382  for hbond in hl:
383  if HBond(hbond.donor,hbond.acceptor).IsFormed():
384  c+=1
385  break
386  return c/float(len(hbond_list1))
387 
388 
389 def AnalyzeHBondScore(ref_eh,t,eh2,ref_eh2=None,hbond_donor_acceptor_dict={},swap=False,donor_swap_dict={},acceptor_swap_dict={},first=0,last=-1,stride=1,verbose=True):
390  """
391  Returns the same score as CalculateHBondScore, but for a trajectory.
392  """
393  if swap:
394  if not donor_swap_dict:
395  print 'use of standard CHARMM HBond donor swap dictionary'
396  donor_swap_dict=BuildCHARMMHBondDonorEquivalenceDict()
397  if not acceptor_swap_dict:
398  print 'use of standard CHARMM HBond acceptor swap dictionary'
399  acceptor_swap_dict=BuildCHARMMHBondAcceptorEquivalenceDict()
400  if ref_eh2:hbond_list1=GetHbondListBetweenViews(ref_eh,ref_eh2,hbond_donor_acceptor_dict,verbose)
401  elif type(ref_eh)==list:hbond_list1=ref_eh
402  else:hbond_list1=GetHbondListFromView(ref_eh,hbond_donor_acceptor_dict,verbose)
403  nbonds=float(len(hbond_list1))
404  if nbonds==0:
405  print 'No HBonds in reference view'
406  return None
407  print 'number of hbonds in ref_eh:',nbonds
408  hbond_list2=GetEquivalentHBonds(hbond_list1,eh2,swap,donor_swap_dict,acceptor_swap_dict,verbose)
409  if last==-1:last=t.GetFrameCount()
410  score=FloatList()
411  for f in range(first,last,stride):
412  t.CopyFrame(f)
413  c=0
414  for hl in hbond_list2:
415  for hbond in hl:
416  if hbond.IsFormed():
417  c+=1
418  break
419  score.append(c/nbonds)
420  return score
421 
422 
423 def GetHBondListIntersection(ref_hbond_list,ref_eh,hbond_list,swap=False,donor_swap_dict={},acceptor_swap_dict={}):
424  if swap:
425  if not donor_swap_dict:
426  print 'use of standard CHARMM HBond donor swap dictionary'
427  donor_swap_dict=BuildCHARMMHBondDonorEquivalenceDict()
428  if not acceptor_swap_dict:
429  print 'use of standard CHARMM HBond acceptor swap dictionary'
430  acceptor_swap_dict=BuildCHARMMHBondAcceptorEquivalenceDict()
431  hbond_list=GetEquivalentHBonds(hbond_list,ref_eh,swap,donor_swap_dict,acceptor_swap_dict)
432  ref_hbond_list=GetEquivalentHBonds(ref_hbond_list,ref_eh,swap,donor_swap_dict,acceptor_swap_dict)
433  out_hbond_list=[]
434  for hb in ref_hbond_list:
435  if hb in hbond_list:
436  out_hbond_list.append(hb)
437  return out_hbond_list
438 
439 
440 
441 
442 
443 
def GetEquivalentHBonds
Definition: hbond.py:331
def GetHbondDonorAcceptorList
Definition: hbond.py:219
def BuildCHARMMHBondDonorEquivalenceDict
Definition: hbond.py:89
def AnalyzeHBondScore
Definition: hbond.py:389
def GetHbondListFromDonorAcceptorLists
Definition: hbond.py:244
def DonorAcceptorAcceptorAntecedentAngle
Definition: hbond.py:193
def BuildCHARMMHBondDonorAcceptorDict
Definition: hbond.py:23
def HydrogenAcceptorAcceptorAntecedentAngle
Definition: hbond.py:197
def GetHBondListIntersection
Definition: hbond.py:423
def GetHbondListFromView
Definition: hbond.py:255
def GetHbondListBetweenViews
Definition: hbond.py:308
def BuildCHARMMHBondAcceptorEquivalenceDict
Definition: hbond.py:97
Real DLLEXPORT_OST_GEOM Distance(const Line2 &l, const Vec2 &v)
def ListEquivalentDonors
Definition: hbond.py:103
def CalculateHBondScore
Definition: hbond.py:358
def ListEquivalentAcceptors
Definition: hbond.py:115
def GetHbondListFromTraj
Definition: hbond.py:268