class_docstr: This class is a featurizer for the Molecule Attention Transformer [1]_.
  The returned value is a numpy array which consists of molecular graph descriptions:
      - Node Features
      - Adjacency Matrix
      - Distance Matrix
  
  References
  ---------
  .. [1] Lukasz Maziarka et al. "Molecule Attention Transformer`<https://arxiv.org/abs/2002.08264>`"
  
  Examples
  --------
  >>> import deepchem as dc
  >>> feat = dc.feat.MATFeaturizer()
  >>> out = feat.featurize("CCC")
  
  Note
  ----
  This class requires RDKit to be installed.
class_docstr_tok: ["This","class","is","a","featurizer","for","the","Molecule","Attention","Transformer","[","1","]","_",".","The","returned","value","is","a","numpy","array","which","consists","of","molecular","graph","descriptions",":","-","Node","Features","-","Adjacency","Matrix","-","Distance","Matrix","References","--","--","--","--","-","..","[","1","]","Lukasz","Maziarka","et","al",".","``","Molecule","Attention","Transformer","`","<","https",":","\/\/arxiv.org\/abs\/2002.08264",">","`","``","Examples","--","--","--","--",">",">",">","import","deepchem","as","dc",">",">",">","feat","=","dc.feat.MATFeaturizer","(",")",">",">",">","out","=","feat.featurize","(","``","CCC","''",")","Note","--","--","This","class","requires","RDKit","to","be","installed","."]
docstr: Deepchem already contains an atom_features function, however we are defining a new one here due to the need to handle features specific to MAT.
  Since we need new features like Atom GetNeighbors and IsInRing, and the number of features required for MAT is a fraction of what the Deepchem atom_features function computes, we can speed up computation by defining a custom function.
  
  Parameters
  ----------
  atom: RDKitAtom
      RDKit Atom object.
  
  Returns
  ----------
  ndarray
      Numpy array containing atom features.
docstr_tok: ["Deepchem","already","contains","an","atom_features","function",",","however","we","are","defining","a","new","one","here","due","to","the","need","to","handle","features","specific","to","MAT",".","Since","we","need","new","features","like","Atom","GetNeighbors","and","IsInRing",",","and","the","number","of","features","required","for","MAT","is","a","fraction","of","what","the","Deepchem","atom_features","function","computes",",","we","can","speed","up","computation","by","defining","a","custom","function",".","Parameters","--","--","--","--","--","atom",":","RDKitAtom","RDKit","Atom","object",".","Returns","--","--","--","--","--","ndarray","Numpy","array","containing","atom","features","."]
code: def atom_features(self, atom: RDKitAtom) -> np.ndarray:
      """Deepchem already contains an atom_features function, however we are defining a new one here due to the need to handle features specific to MAT.
      Since we need new features like Atom GetNeighbors and IsInRing, and the number of features required for MAT is a fraction of what the Deepchem atom_features function computes, we can speed up computation by defining a custom function.
  
      Parameters
      ----------
      atom: RDKitAtom
          RDKit Atom object.
  
      Returns
      ----------
      ndarray
          Numpy array containing atom features.
  
      """
      attrib = []
      attrib += one_hot_encode(
          atom.GetAtomicNum(), [5, 6, 7, 8, 9, 15, 16, 17, 35, 53, 999]
      )
      attrib += one_hot_encode(
          len(atom.GetNeighbors()), [0, 1, 2, 3, 4, 5]
      )
      attrib += one_hot_encode(atom.GetTotalNumHs(), [0, 1, 2, 3, 4])
  
      attrib += one_hot_encode(
          atom.GetFormalCharge(), [-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5]
      )
  
      attrib.append(atom.IsInRing())
      attrib.append(atom.GetIsAromatic())
  
      return np.array(attrib, dtype=np.float32)
  
file_path: deepchem/deepchem/feat/molecule_featurizers/mat_featurizer.py
imports: from deepchem.feat.base_classes import MolecularFeaturizer
  from deepchem.utils.molecule_feature_utils import one_hot_encode
  from deepchem.utils.typing import RDKitMol, RDKitAtom
  import numpy
  from typing import Tuple, Any
  from dataclasses import dataclass
label_desc: Use image node_id 3 for calling the MATFeaturizer obj's underlying member method code with example usage: obj.atom_features(atom) and returns: np