class_docstr: Convert SMILES string to an image.
  
  SmilesToImage Featurizer takes a SMILES string, and turns it into an image.
  Details taken from [1]_.
  
  The default size of for the image is 80 x 80. Two image modes are currently
  supported - std & engd. std is the gray scale specification,
  with atomic numbers as pixel values for atom positions and a constant value of
  2 for bond positions. engd is a 4-channel specification, which uses atom
  properties like hybridization, valency, charges in addition to atomic number.
  Bond type is also used for the bonds.
  
  The coordinates of all atoms are computed, and lines are drawn between atoms
  to indicate bonds. For the respective channels, the atom and bond positions are
  set to the property values as mentioned in the paper.
  
  Examples
  --------
  >>> import deepchem as dc
  >>> smiles = ['CC(=O)OC1=CC=CC=C1C(=O)O']
  >>> featurizer = dc.feat.SmilesToImage(img_size=80, img_spec='std')
  >>> images = featurizer.featurize(smiles)
  >>> type (images[0])
  <class 'numpy.ndarray'>
  >>> images[0].shape # (img_size, img_size, 1)
  (80, 80, 1)
  
  References
  ----------
  .. [1] Goh, Garrett B., et al. "Using rule-based labels for weak supervised
      learning: a ChemNet for transferable chemical property prediction."
      Proceedings of the 24th ACM SIGKDD International Conference on Knowledge
      Discovery & Data Mining. 2018.
  
  Note
  ----
  This class requires RDKit to be installed.
docstr: Parameters
  ----------
  img_size: int, default 80
      Size of the image tensor
  res: float, default 0.5
      Displays the resolution of each pixel in Angstrom
  max_len: int, default 250
      Maximum allowed length of SMILES string
  img_spec: str, default std
      Indicates the channel organization of the image tensor
docstr_tok: ["Parameters","--","--","--","--","--","img_size",":","int",",","default","80","Size","of","the","image","tensor","res",":","float",",","default","0.5","Displays","the","resolution","of","each","pixel","in","Angstrom","max_len",":","int",",","default","250","Maximum","allowed","length","of","SMILES","string","img_spec",":","str",",","default","std","Indicates","the","channel","organization","of","the","image","tensor"]
code: def __init__(
      self,
      img_size: int = 80,
      res: float = 0.5,
      max_len: int = 250,
      img_spec: str = "std",
  ):
      """
      Parameters
      ----------
      img_size: int, default 80
          Size of the image tensor
      res: float, default 0.5
          Displays the resolution of each pixel in Angstrom
      max_len: int, default 250
          Maximum allowed length of SMILES string
      img_spec: str, default std
          Indicates the channel organization of the image tensor
  
      """
      if img_spec not in ["std", "engd"]:
          raise ValueError(
              "Image mode must be one of std or engd. {} is not supported".format(
                  img_spec
              )
          )
  
      self.img_size = img_size
      self.max_len = max_len
      self.res = res
      self.img_spec = img_spec
      self.embed = int(img_size * res / 2)
  
imports: import numpy
  from deepchem.utils.typing import RDKitMol
  from deepchem.feat.base_classes import MolecularFeaturizer
label_desc: Use image node_id 1 to create a new SmilesToImage object from inherited base classes: MolecularFeaturizer with example: obj = SmilesToImage(img_size, res, max_len, img_spec)