class_docstr: Counts hydrogen bonds between atoms in macromolecular complexes.
  
  Given a macromolecular complex made up of multiple
  constitutent molecules, count the number of hydrogen bonds
  between atoms in the macromolecular complex.
  
  Creates a scalar output of shape `(3,)` (assuming the default value
  ofor `distance_bins` with 3 bins) for each macromolecular complex
  that computes the total number of hydrogen bonds.
class_docstr_tok: ["Counts","hydrogen","bonds","between","atoms","in","macromolecular","complexes",".","Given","a","macromolecular","complex","made","up","of","multiple","constitutent","molecules",",","count","the","number","of","hydrogen","bonds","between","atoms","in","the","macromolecular","complex",".","Creates","a","scalar","output","of","shape","`","(","3",",",")","`","(","assuming","the","default","value","ofor","`","distance_bins","`","with","3","bins",")","for","each","macromolecular","complex","that","computes","the","total","number","of","hydrogen","bonds","."]
docstr: Parameters
  ----------
  cutoff: float (default 4.5)
      Distance cutoff in angstroms for molecules in complex.
  reduce_to_contacts: bool, optional
      If True, reduce the atoms in the complex to those near a contact
      region.
  distance_bins: list[tuple]
      List of hydgrogen bond distance bins. If not specified is
      set to default
      `[(2.2, 2.5), (2.5, 3.2), (3.2, 4.0)]`.
  angle_cutoffs: list[float]
      List of hydrogen bond angle cutoffs. Max allowed
      deviation from the ideal (180 deg) angle between
      hydrogen-atom1, hydrogen-atom2 vectors.If not specified
      is set to default `[5, 50, 90]`
code: def __init__(
      self,
      cutoff: float = 4.5,
      reduce_to_contacts: bool = True,
      distance_bins: Optional[List[Tuple[float, float]]] = None,
      angle_cutoffs: Optional[List[float]] = None,
  ):
      """
      Parameters
      ----------
      cutoff: float (default 4.5)
          Distance cutoff in angstroms for molecules in complex.
      reduce_to_contacts: bool, optional
          If True, reduce the atoms in the complex to those near a contact
          region.
      distance_bins: list[tuple]
          List of hydgrogen bond distance bins. If not specified is
          set to default
          `[(2.2, 2.5), (2.5, 3.2), (3.2, 4.0)]`.
      angle_cutoffs: list[float]
          List of hydrogen bond angle cutoffs. Max allowed
          deviation from the ideal (180 deg) angle between
          hydrogen-atom1, hydrogen-atom2 vectors.If not specified
          is set to default `[5, 50, 90]`
      """
      self.cutoff = cutoff
      if distance_bins is None:
          self.distance_bins = HBOND_DIST_BINS
      else:
          self.distance_bins = distance_bins
      if angle_cutoffs is None:
          self.angle_cutoffs = HBOND_ANGLE_CUTOFFS
      else:
          self.angle_cutoffs = angle_cutoffs
      self.reduce_to_contacts = reduce_to_contacts
  
imports: import itertools
  import logging
  import numpy
  from deepchem.utils import rdkit_utils
  from deepchem.feat import ComplexFeaturizer
  from deepchem.utils.voxel_utils import voxelize
  from deepchem.utils.voxel_utils import convert_atom_to_voxel
  from deepchem.utils.voxel_utils import convert_atom_pair_to_voxel
  from deepchem.utils.noncovalent_utils import compute_salt_bridges
  from deepchem.utils.noncovalent_utils import compute_binding_pocket_cation_pi
  from deepchem.utils.noncovalent_utils import compute_pi_stack
  from deepchem.utils.noncovalent_utils import compute_hydrogen_bonds
  from deepchem.utils.rdkit_utils import MoleculeLoadException
  from deepchem.utils.rdkit_utils import compute_contact_centroid
  from deepchem.utils.geometry_utils import compute_pairwise_distances
  from deepchem.utils.geometry_utils import subtract_centroid
  from deepchem.utils.fragment_utils import get_partial_charge
  from deepchem.utils.fragment_utils import reduce_molecular_complex_to_contacts
  from typing import List, Tuple, Optional
label_desc: Use image node_id 1 to create a new HydrogenBondCounter object from inherited base classes: ComplexFeaturizer with example: obj = HydrogenBondCounter(cutoff, reduce_to_contacts, distance_bins, angle_cutoffs)