code: def is_hydrogen_bond(
      frag1,
      frag2,
      contact,
      hbond_distance_cutoff=4.0,
      hbond_angle_cutoff=40.0,
  ):
      """
      Determine if a pair of atoms (contact = frag1_atom_index,
      frag2_atom_index) between two molecules represents a hydrogen
      bond. Returns a boolean result.
  
      Parameters
      ----------
      frag1: tuple
          Tuple of (coords, rdkit mol / MolecularFragment)
      frag2: tuple
          Tuple of (coords, rdkit mol / MolecularFragment)
      contact: Tuple
          Tuple of indices for (atom_i, atom_j) contact.
      hbond_distance_cutoff: float, optional
          Distance cutoff for hbond.
      hbond_angle_cutoff: float, optional
          Angle deviance cutoff for hbond
      """
      frag1_xyz, frag2_xyz = frag1[0], frag2[0]
      frag1_mol, frag2_mol = frag1[1], frag2[1]
      frag1_atom_xyz = frag1_xyz[int(contact[0])]
      frag2_atom_xyz = frag2_xyz[int(contact[1])]
      frag1_atom = frag1_mol.GetAtoms()[int(contact[0])]
      frag2_atom = frag2_mol.GetAtoms()[int(contact[1])]
  
      # Nitrogen has atomic number 7, and oxygen 8.
      if (
          frag2_atom.GetAtomicNum() == 7
          or frag2_atom.GetAtomicNum() == 8
      ) and (
          frag1_atom.GetAtomicNum() == 7
          or frag1_atom.GetAtomicNum() == 8
      ):
          hydrogens = []
  
          for i, atom in enumerate(frag2_mol.GetAtoms()):
              # If atom is a hydrogen
              if atom.GetAtomicNum() == 1:
                  atom_xyz = frag2_xyz[i]
                  dist = np.linalg.norm(atom_xyz - frag2_atom_xyz)
                  # O-H distance is 0.96 A, N-H is 1.01 A. See http://www.science.uwaterloo.ca/~cchieh/cact/c120/bondel.html
                  if dist < 1.3:
                      hydrogens.append(atom_xyz)
  
          for j, atom in enumerate(frag1_mol.GetAtoms()):
              # If atom is a hydrogen
              if atom.GetAtomicNum() == 1:
                  atom_xyz = frag1_xyz[i]
                  dist = np.linalg.norm(atom_xyz - frag1_atom_xyz)
                  # O-H distance is 0.96 A, N-H is 1.01 A. See http://www.science.uwaterloo.ca/~cchieh/cact/c120/bondel.html
                  if dist < 1.3:
                      hydrogens.append(atom_xyz)
  
          for hydrogen_xyz in hydrogens:
              hydrogen_to_frag2 = frag2_atom_xyz - hydrogen_xyz
              hydrogen_to_frag1 = frag1_atom_xyz - hydrogen_xyz
              return is_angle_within_cutoff(
                  hydrogen_to_frag2,
                  hydrogen_to_frag1,
                  hbond_angle_cutoff,
              )
      return False
  
file_path: deepchem/deepchem/utils/noncovalent_utils.py
imports: import numpy
  from collections import Counter
  from deepchem.utils.fragment_utils import get_partial_charge
  from deepchem.utils.rdkit_utils import compute_ring_center
  from deepchem.utils.rdkit_utils import compute_ring_normal
  from deepchem.utils.geometry_utils import angle_between
  from deepchem.utils.geometry_utils import is_angle_within_cutoff
label_desc: Use image node_id 3 for calling a global function with example usage: is_hydrogen_bond(frag1, frag2, contact, hbond_distance_cutoff, hbond_angle_cutoff) and returns: False, is_angle_within_cutoff