class_docstr: Computes ECFP fingerprints on a voxel grid.
  
  Given a macromolecular complex made up of multiple
  constituent molecules, first compute the contact points where
  atoms from different molecules come close to one another. For
  atoms within "contact regions," compute radial "ECFP"
  fragments which are sub-molecules centered at atoms in the
  contact region. Localize these ECFP fingeprints at the voxel
  in which they originated.
  
  Featurizes a macromolecular complex into a tensor of shape
  `(voxels_per_edge, voxels_per_edge, voxels_per_edge, size)` where
  `voxels_per_edge = int(box_width/voxel_width)`. If `flatten==True`,
  then returns a flattened version of this tensor of length
  `size*voxels_per_edge**3`
class_docstr_tok: ["Computes","ECFP","fingerprints","on","a","voxel","grid",".","Given","a","macromolecular","complex","made","up","of","multiple","constituent","molecules",",","first","compute","the","contact","points","where","atoms","from","different","molecules","come","close","to","one","another",".","For","atoms","within","``","contact","regions",",","''","compute","radial","``","ECFP","''","fragments","which","are","sub-molecules","centered","at","atoms","in","the","contact","region",".","Localize","these","ECFP","fingeprints","at","the","voxel","in","which","they","originated",".","Featurizes","a","macromolecular","complex","into","a","tensor","of","shape","`","(","voxels_per_edge",",","voxels_per_edge",",","voxels_per_edge",",","size",")","`","where","`","voxels_per_edge","=","int","(","box_width\/voxel_width",")","`",".","If","`","flatten==True","`",",","then","returns","a","flattened","version","of","this","tensor","of","length","`","size","*","voxels_per_edge","*","*","3","`"]
docstr: Parameters
  ----------
  cutoff: float (default 4.5)
      Distance cutoff in angstroms for molecules in complex.
  radius : int, optional (default 2)
      Fingerprint radius.
  size : int, optional (default 8)
      Length of generated bit vector.
  box_width: float, optional (default 16.0)
      Size of a box in which voxel features are calculated. Box
      is centered on a ligand centroid.
  voxel_width: float, optional (default 1.0)
      Size of a 3D voxel in a grid.
  flatten: bool, optional (default False)
      If True, then returns a flat feature vector rather than voxel grid. This
      feature vector is constructed by flattening the usual voxel grid.
docstr_tok: ["Parameters","--","--","--","--","--","cutoff",":","float","(","default","4.5",")","Distance","cutoff","in","angstroms","for","molecules","in","complex",".","radius",":","int",",","optional","(","default","2",")","Fingerprint","radius",".","size",":","int",",","optional","(","default","8",")","Length","of","generated","bit","vector",".","box_width",":","float",",","optional","(","default","16.0",")","Size","of","a","box","in","which","voxel","features","are","calculated",".","Box","is","centered","on","a","ligand","centroid",".","voxel_width",":","float",",","optional","(","default","1.0",")","Size","of","a","3D","voxel","in","a","grid",".","flatten",":","bool",",","optional","(","default","False",")","If","True",",","then","returns","a","flat","feature","vector","rather","than","voxel","grid",".","This","feature","vector","is","constructed","by","flattening","the","usual","voxel","grid","."]
code: def __init__(
      self,
      cutoff: float = 4.5,
      radius: int = 2,
      size: int = 8,
      box_width: float = 16.0,
      voxel_width: float = 1.0,
      flatten: bool = False,
  ):
      """
      Parameters
      ----------
      cutoff: float (default 4.5)
          Distance cutoff in angstroms for molecules in complex.
      radius : int, optional (default 2)
          Fingerprint radius.
      size : int, optional (default 8)
          Length of generated bit vector.
      box_width: float, optional (default 16.0)
          Size of a box in which voxel features are calculated. Box
          is centered on a ligand centroid.
      voxel_width: float, optional (default 1.0)
          Size of a 3D voxel in a grid.
      flatten: bool, optional (default False)
          If True, then returns a flat feature vector rather than voxel grid. This
          feature vector is constructed by flattening the usual voxel grid.
      """
      self.cutoff = cutoff
      self.radius = radius
      self.size = size
      self.box_width = box_width
      self.voxel_width = voxel_width
      self.voxels_per_edge = int(self.box_width / self.voxel_width)
      self.flatten = flatten
  
imports: import numpy
  import logging
  import itertools
  from deepchem.utils.hash_utils import hash_ecfp
  from deepchem.feat import ComplexFeaturizer
  from deepchem.utils.rdkit_utils import load_complex
  from deepchem.utils.hash_utils import vectorize
  from deepchem.utils.voxel_utils import voxelize
  from deepchem.utils.voxel_utils import convert_atom_to_voxel
  from deepchem.utils.rdkit_utils import compute_all_ecfp
  from deepchem.utils.rdkit_utils import compute_contact_centroid
  from deepchem.utils.rdkit_utils import MoleculeLoadException
  from deepchem.utils.geometry_utils import compute_pairwise_distances
  from deepchem.utils.geometry_utils import subtract_centroid
  from typing import Optional, Tuple, Dict
label_desc: Use image node_id 1 to create a new ContactCircularVoxelizer object from inherited base classes: ComplexFeaturizer with example: obj = ContactCircularVoxelizer(cutoff, radius, size, box_width, voxel_width, flatten)