class_docstr: RDKit descriptors.
  
  This class computes a list of chemical descriptors like
  molecular weight, number of valence electrons, maximum and
  minimum partial charge, etc using RDKit.
  
  This class can also compute normalized descriptors, if required.
  (The implementation for normalization is based on `RDKit2DNormalized()` method
  in 'descriptastorus' library.)
  
  When the `is_normalized` option is set as True, descriptor values are normalized across the sample
  by fitting a cumulative density function. CDFs were used as opposed to simpler scaling algorithms
  mainly because CDFs have the useful property that 'each value has the same meaning: the percentage
  of the population observed below the raw feature value.'
  
  Warning: Currently, the normalizing cdf parameters are not available for BCUT2D descriptors.
  (BCUT2D_MWHI, BCUT2D_MWLOW, BCUT2D_CHGHI, BCUT2D_CHGLO, BCUT2D_LOGPHI, BCUT2D_LOGPLOW, BCUT2D_MRHI, BCUT2D_MRLOW)
  
  Note
  ----
  This class requires RDKit to be installed.
  
  Examples
  --------
  >>> import deepchem as dc
  >>> smiles = ['CC(=O)OC1=CC=CC=C1C(=O)O']
  >>> featurizer = dc.feat.RDKitDescriptors()
  >>> features = featurizer.featurize(smiles)
  >>> type(features[0])
  <class 'numpy.ndarray'>
  >>> features[0].shape
  (210,)
class_docstr_tok: ["RDKit","descriptors",".","This","class","computes","a","list","of","chemical","descriptors","like","molecular","weight",",","number","of","valence","electrons",",","maximum","and","minimum","partial","charge",",","etc","using","RDKit",".","This","class","can","also","compute","normalized","descriptors",",","if","required",".","(","The","implementation","for","normalization","is","based","on","`","RDKit2DNormalized","(",")","`","method","in","'descriptastorus","'","library",".",")","When","the","`","is_normalized","`","option","is","set","as","True",",","descriptor","values","are","normalized","across","the","sample","by","fitting","a","cumulative","density","function",".","CDFs","were","used","as","opposed","to","simpler","scaling","algorithms","mainly","because","CDFs","have","the","useful","property","that","'each","value","has","the","same","meaning",":","the","percentage","of","the","population","observed","below","the","raw","feature","value",".","'","Warning",":","Currently",",","the","normalizing","cdf","parameters","are","not","available","for","BCUT2D","descriptors",".","(","BCUT2D_MWHI",",","BCUT2D_MWLOW",",","BCUT2D_CHGHI",",","BCUT2D_CHGLO",",","BCUT2D_LOGPHI",",","BCUT2D_LOGPLOW",",","BCUT2D_MRHI",",","BCUT2D_MRLOW",")","Note","--","--","This","class","requires","RDKit","to","be","installed",".","Examples","--","--","--","--",">",">",">","import","deepchem","as","dc",">",">",">","smiles","=","[","'CC","(","=O",")","OC1=CC=CC=C1C","(","=O",")","O","'","]",">",">",">","featurizer","=","dc.feat.RDKitDescriptors","(",")",">",">",">","features","=","featurizer.featurize","(","smiles",")",">",">",">","type","(","features","[","0","]",")","<","class","'numpy.ndarray","'",">",">",">",">","features","[","0","]",".shape","(","210",",",")"]
docstr: Calculate RDKit descriptors.
  
  Parameters
  ----------
  datapoint: RDKitMol
      RDKit Mol object
  
  Returns
  -------
  np.ndarray
      1D array of RDKit descriptors for `mol`.
      The length is `len(self.descriptors)`.
docstr_tok: ["Calculate","RDKit","descriptors",".","Parameters","--","--","--","--","--","datapoint",":","RDKitMol","RDKit","Mol","object","Returns","--","--","--","-","np.ndarray","1D","array","of","RDKit","descriptors","for","`","mol","`",".","The","length","is","`","len","(","self.descriptors",")","`","."]
code: def _featurize(self, datapoint: RDKitMol, **kwargs) -> np.ndarray:
      """
      Calculate RDKit descriptors.
  
      Parameters
      ----------
      datapoint: RDKitMol
          RDKit Mol object
  
      Returns
      -------
      np.ndarray
          1D array of RDKit descriptors for `mol`.
          The length is `len(self.descriptors)`.
  
      """
      features = []
      for desc_name, function in self.reqd_properties.items():
          if desc_name == "Ipc" and self.ipc_avg:
              feature = function(datapoint, avg=True)
          else:
              feature = function(datapoint)
  
          if self.is_normalized:
              # get cdf(feature) for that descriptor
              feature = self.normalized_desc[desc_name](feature)
  
          features.append(feature)
  
      np_features = np.asarray(features)
      if self.labels_only:
          np.putmask(np_features, np_features != 0, 1)
      return np_features
  
file_path: deepchem/deepchem/feat/molecule_featurizers/rdkit_descriptors.py
imports: from typing import List, Sequence, Union, Callable, Dict
  import numpy
  import scipy.stats
  from scipy.stats import rv_continuous
  import logging
  from deepchem.utils.typing import RDKitMol
  from deepchem.feat.base_classes import MolecularFeaturizer
  from deepchem.utils.rdkit_utils import DescriptorsNormalizationParameters
label_desc: Use image node_id 2 for calling the RDKitDescriptors obj's underlying member method code with example usage: obj._featurize(datapoint) and returns: np_features