code: def determine_hbonds_for_drawing(self, analysis_cutoff):
          self.frequency = defaultdict(int)
          for traj in self.hbonds_by_type:
              for bond in self.hbonds_by_type[traj]:
                  if bond["donor_resnm"]!="LIG":
                      self.frequency[(bond["donor_idx"],bond["acceptor_atom"],bond["donor_atom"],bond["acceptor_idx"])] += bond["frequency"]
                  else:
                      self.frequency[(bond["acceptor_idx"],bond["donor_atom"],bond["acceptor_atom"],bond["donor_idx"])] += bond["frequency"]
          self.frequency = {i:self.frequency[i] for i in self.frequency if self.frequency[i]>(int(len(self.trajectory))*analysis_cutoff)}
          self.hbonds_for_drawing = {}
          for bond in self.frequency:
              atomname = bond[1]
              if atomname.startswith("O",0) or atomname.startswith("N",0):
                  lig_atom=atomname
              else:
                  atomindex = [index for index,atom in enumerate(self.topology_data.universe.ligand.atoms) if atom.name==atomname][0]
                  rdkit_atom = self.topology_data.mol.GetAtomWithIdx(atomindex)
                  for neigh in rdkit_atom.GetNeighbors():
                      neigh_atom_id = neigh.GetIdx()
                  lig_atom = [atom.name for index,atom in enumerate(self.topology_data.universe.ligand.atoms) if index==neigh_atom_id][0]
              self.hbonds_for_drawing[(bond[0],lig_atom,bond[2],bond[3])]=self.frequency[bond]