class_docstr: This class implements the featurization to implement Duvenaud graph convolutions.
  
  Duvenaud graph convolutions [1]_ construct a vector of descriptors for each
  atom in a molecule. The featurizer computes that vector of local descriptors.
  
  Examples
  ---------
  >>> import deepchem as dc
  >>> smiles = ["C", "CCC"]
  >>> featurizer=dc.feat.ConvMolFeaturizer(per_atom_fragmentation=False)
  >>> f = featurizer.featurize(smiles)
  >>> # Using ConvMolFeaturizer to create featurized fragments derived from molecules of interest.
  ... # This is used only in the context of performing interpretation of models using atomic
  ... # contributions (atom-based model interpretation)
  ... smiles = ["C", "CCC"]
  >>> featurizer=dc.feat.ConvMolFeaturizer(per_atom_fragmentation=True)
  >>> f = featurizer.featurize(smiles)
  >>> len(f) # contains 2 lists with  featurized fragments from 2 mols
  2
  
  See Also
  --------
  Detailed examples of `GraphConvModel` interpretation are provided in Tutorial #28
  
  References
  ---------
  
  .. [1] Duvenaud, David K., et al. "Convolutional networks on graphs for
      learning molecular fingerprints." Advances in neural information
      processing systems. 2015.
  
  Note
  ----
  This class requires RDKit to be installed.
docstr: Parameters
  ----------
  master_atom: Boolean
      if true create a fake atom with bonds to every other atom.
      the initialization is the mean of the other atom features in
      the molecule.  This technique is briefly discussed in
      Neural Message Passing for Quantum Chemistry
      https://arxiv.org/pdf/1704.01212.pdf
  use_chirality: Boolean
      if true then make the resulting atom features aware of the
      chirality of the molecules in question
  atom_properties: list of string or None
      properties in the RDKit Mol object to use as additional
      atom-level features in the larger molecular feature.  If None,
      then no atom-level properties are used.  Properties should be in the
      RDKit mol object should be in the form
      atom XXXXXXXX NAME
      where XXXXXXXX is a zero-padded 8 digit number coresponding to the
      zero-indexed atom index of each atom and NAME is the name of the property
      provided in atom_properties.  So "atom 00000000 sasa" would be the
      name of the molecule level property in mol where the solvent
      accessible surface area of atom 0 would be stored.
  per_atom_fragmentation: Boolean
      If True, then multiple "atom-depleted" versions of each molecule will be created (using featurize() method).
      For each molecule, atoms are removed one at a time and the resulting molecule is featurized.
      The result is a list of ConvMol objects,
      one with each heavy atom removed. This is useful for subsequent model interpretation: finding atoms
      favorable/unfavorable for (modelled) activity. This option is typically used in combination
      with a FlatteningTransformer to split the lists into separate samples.
  
      Since ConvMol is an object and not a numpy array, need to set dtype to
      object.
docstr_tok: ["Parameters","--","--","--","--","--","master_atom",":","Boolean","if","true","create","a","fake","atom","with","bonds","to","every","other","atom",".","the","initialization","is","the","mean","of","the","other","atom","features","in","the","molecule",".","This","technique","is","briefly","discussed","in","Neural","Message","Passing","for","Quantum","Chemistry","https",":","\/\/arxiv.org\/pdf\/1704.01212.pdf","use_chirality",":","Boolean","if","true","then","make","the","resulting","atom","features","aware","of","the","chirality","of","the","molecules","in","question","atom_properties",":","list","of","string","or","None","properties","in","the","RDKit","Mol","object","to","use","as","additional","atom-level","features","in","the","larger","molecular","feature",".","If","None",",","then","no","atom-level","properties","are","used",".","Properties","should","be","in","the","RDKit","mol","object","should","be","in","the","form","atom","XXXXXXXX","NAME","where","XXXXXXXX","is","a","zero-padded","8","digit","number","coresponding","to","the","zero-indexed","atom","index","of","each","atom","and","NAME","is","the","name","of","the","property","provided","in","atom_properties",".","So","``","atom","00000000","sasa","''","would","be","the","name","of","the","molecule","level","property","in","mol","where","the","solvent","accessible","surface","area","of","atom","0","would","be","stored",".","per_atom_fragmentation",":","Boolean","If","True",",","then","multiple","``","atom-depleted","''","versions","of","each","molecule","will","be","created","(","using","featurize","(",")","method",")",".","For","each","molecule",",","atoms","are","removed","one","at","a","time","and","the","resulting","molecule","is","featurized",".","The","result","is","a","list","of","ConvMol","objects",",","one","with","each","heavy","atom","removed",".","This","is","useful","for","subsequent","model","interpretation",":","finding","atoms","favorable\/unfavorable","for","(","modelled",")","activity",".","This","option","is","typically","used","in","combination","with","a","FlatteningTransformer","to","split","the","lists","into","separate","samples",".","Since","ConvMol","is","an","object","and","not","a","numpy","array",",","need","to","set","dtype","to","object","."]
code: def __init__(
      self,
      master_atom: bool = False,
      use_chirality: bool = False,
      atom_properties: Iterable[str] = [],
      per_atom_fragmentation: bool = False,
  ):
      """
      Parameters
      ----------
      master_atom: Boolean
          if true create a fake atom with bonds to every other atom.
          the initialization is the mean of the other atom features in
          the molecule.  This technique is briefly discussed in
          Neural Message Passing for Quantum Chemistry
          https://arxiv.org/pdf/1704.01212.pdf
      use_chirality: Boolean
          if true then make the resulting atom features aware of the
          chirality of the molecules in question
      atom_properties: list of string or None
          properties in the RDKit Mol object to use as additional
          atom-level features in the larger molecular feature.  If None,
          then no atom-level properties are used.  Properties should be in the
          RDKit mol object should be in the form
          atom XXXXXXXX NAME
          where XXXXXXXX is a zero-padded 8 digit number coresponding to the
          zero-indexed atom index of each atom and NAME is the name of the property
          provided in atom_properties.  So "atom 00000000 sasa" would be the
          name of the molecule level property in mol where the solvent
          accessible surface area of atom 0 would be stored.
      per_atom_fragmentation: Boolean
          If True, then multiple "atom-depleted" versions of each molecule will be created (using featurize() method).
          For each molecule, atoms are removed one at a time and the resulting molecule is featurized.
          The result is a list of ConvMol objects,
          one with each heavy atom removed. This is useful for subsequent model interpretation: finding atoms
          favorable/unfavorable for (modelled) activity. This option is typically used in combination
          with a FlatteningTransformer to split the lists into separate samples.
  
          Since ConvMol is an object and not a numpy array, need to set dtype to
          object.
      """
      self.dtype = object
      self.master_atom = master_atom
      self.use_chirality = use_chirality
      self.atom_properties = list(atom_properties)
      self.per_atom_fragmentation = per_atom_fragmentation
  
imports: import numpy
  import deepchem
  from deepchem.feat.base_classes import MolecularFeaturizer
  from deepchem.feat.mol_graphs import ConvMol, WeaveMol
  from deepchem.data import DiskDataset
  import logging
  from typing import Optional, List, Tuple, Union, Iterable
  from deepchem.utils.typing import RDKitMol, RDKitAtom
  from deepchem.utils.molecule_feature_utils import one_hot_encode
label_desc: Use image node_id 1 to create a new ConvMolFeaturizer object from inherited base classes: MolecularFeaturizer with example: obj = ConvMolFeaturizer(master_atom, use_chirality, atom_properties, per_atom_fragmentation)