class_docstr: Featurizer for GROVER Model
  
  The Grover Featurizer is used to compute features suitable for grover model.
  It accepts an rdkit molecule of type `rdkit.Chem.rdchem.Mol` or a SMILES string
  as input and computes the following sets of features:
      1. a molecular graph from the input molecule
      2. functional groups which are used **only** during pretraining
      3. additional features which can **only** be used during finetuning
  
  Parameters
  ----------
  additional_featurizer: dc.feat.Featurizer
      Given a molecular dataset, it is possible to extract additional molecular features in order
  to train and finetune from the existing pretrained model. The `additional_featurizer` can
  be used to generate additional features for the molecule.
  
  References
  ---------
  .. [1] Rong, Yu, et al. "Self-supervised graph transformer on large-scale
      molecular data." NeurIPS, 2020
  
  Examples
  --------
  >>> import deepchem as dc
  >>> from deepchem.feat import GroverFeaturizer
  >>> feat = GroverFeaturizer(features_generator = dc.feat.CircularFingerprint())
  >>> out = feat.featurize('CCC')
  
  Note
  ----
  This class requires RDKit to be installed.
code: def _get_atom_features(self, atom, mol):
      from deepchem.feat.molecule_featurizers.dmpnn_featurizer import (
          atom_features,
      )
  
      features = atom_features(atom)
      atom_idx = atom.GetIdx()
  
      hydrogen_donor = Chem.MolFromSmarts(
          "[$([N;!H0;v3,v4&+1]),$([O,S;H1;+0]),n&H1&+0]"
      )
      hydrogen_acceptor = Chem.MolFromSmarts(
          "[$([O,S;H1;v2;!$(*-*=[O,N,P,S])]),$([O,S;H0;v2]),$([O,S;-]),$([N;v3;!$(N-*=[O,N,P,S])]),"
          "n&H0&+0,$([o,s;+0;!$([o,s]:n);!$([o,s]:c:n)])]"
      )
      acidic = Chem.MolFromSmarts("[$([C,S](=[O,S,P])-[O;H1,-1])]")
      basic = Chem.MolFromSmarts(
          "[#7;+,$([N;H2&+0][$([C,a]);!$([C,a](=O))]),$([N;H1&+0]([$([C,a]);!$([C,a](=O))])[$([C,a]);"
          "!$([C,a](=O))]),$([N;H0&+0]([C;!$(C(=O))])([C;!$(C(=O))])[C;!$(C(=O))])]"
      )
  
      hydrogen_donor_match = sum(
          mol.GetSubstructMatches(hydrogen_donor), ()
      )
      hydrogen_acceptor_match = sum(
          mol.GetSubstructMatches(hydrogen_acceptor), ()
      )
      acidic_match = sum(mol.GetSubstructMatches(acidic), ())
      basic_match = sum(mol.GetSubstructMatches(basic), ())
      ring_info = mol.GetRingInfo()
      features = (
          features
          + one_hot_encode(
              atom.GetImplicitValence(),
              [0, 1, 2, 3, 4, 5, 6],
              include_unknown_set=True,
          )
          + [atom_idx in hydrogen_acceptor_match]
          + [atom_idx in hydrogen_donor_match]
          + [atom_idx in acidic_match]
          + [atom_idx in basic_match]
          + [
              ring_info.IsAtomInRingOfSize(atom_idx, 3),
              ring_info.IsAtomInRingOfSize(atom_idx, 4),
              ring_info.IsAtomInRingOfSize(atom_idx, 5),
              ring_info.IsAtomInRingOfSize(atom_idx, 6),
              ring_info.IsAtomInRingOfSize(atom_idx, 7),
              ring_info.IsAtomInRingOfSize(atom_idx, 8),
          ]
      )
      return features
  
file_path: deepchem/deepchem/feat/molecule_featurizers/grover_featurizer.py
imports: from typing import Optional, List
  import numpy
  from deepchem.feat.graph_data import GraphData
  from deepchem.feat.molecule_featurizers import RDKitDescriptors
  from deepchem.feat.base_classes import MolecularFeaturizer
  from deepchem.utils.molecule_feature_utils import one_hot_encode
  from deepchem.utils.typing import RDKitMol
  from rdkit import Chem
label_desc: Use image node_id 2 for calling the GroverFeaturizer obj's underlying member method code with example usage: obj._get_atom_features(atom, mol) and returns: features