class_docstr: Abstract class for calculating a set of features for an
  inorganic crystal structure.
  
  The defining feature of a `MaterialStructureFeaturizer` is that it
  operates on 3D crystal structures with periodic boundary conditions.
  Inorganic crystal structures are represented by Pymatgen structure
  objects. Featurizers for inorganic crystal structures that are subclasses of
  this class should plan to process input which comes as pymatgen
  structure objects.
  
  This class is abstract and cannot be invoked directly. You'll
  likely only interact with this class if you're a developer. Child
  classes need to implement the _featurize method for calculating
  features for a single crystal structure.
  
  Note
  ----
  Some subclasses of this class will require pymatgen and matminer to be
  installed.
class_docstr_tok: ["Abstract","class","for","calculating","a","set","of","features","for","an","inorganic","crystal","structure",".","The","defining","feature","of","a","`","MaterialStructureFeaturizer","`","is","that","it","operates","on","3D","crystal","structures","with","periodic","boundary","conditions",".","Inorganic","crystal","structures","are","represented","by","Pymatgen","structure","objects",".","Featurizers","for","inorganic","crystal","structures","that","are","subclasses","of","this","class","should","plan","to","process","input","which","comes","as","pymatgen","structure","objects",".","This","class","is","abstract","and","can","not","be","invoked","directly",".","You'll","likely","only","interact","with","this","class","if","you","'re","a","developer",".","Child","classes","need","to","implement","the","_featurize","method","for","calculating","features","for","a","single","crystal","structure",".","Note","--","--","Some","subclasses","of","this","class","will","require","pymatgen","and","matminer","to","be","installed","."]
docstr: Calculate features for crystal structures.
  
  Parameters
  ----------
  datapoints: Iterable[Union[Dict, pymatgen.core.Structure]]
      Iterable sequence of pymatgen structure dictionaries
      or pymatgen.core.Structure. Please confirm the dictionary representations
      of pymatgen.core.Structure from https://pymatgen.org/pymatgen.core.structure.html.
  log_every_n: int, default 1000
      Logging messages reported every `log_every_n` samples.
  
  Returns
  -------
  features: np.ndarray
      A numpy array containing a featurized representation of
      `datapoints`.
docstr_tok: ["Calculate","features","for","crystal","structures",".","Parameters","--","--","--","--","--","datapoints",":","Iterable","[","Union","[","Dict",",","pymatgen.core.Structure","]","]","Iterable","sequence","of","pymatgen","structure","dictionaries","or","pymatgen.core.Structure",".","Please","confirm","the","dictionary","representations","of","pymatgen.core.Structure","from","https",":","\/\/pymatgen.org\/pymatgen.core.structure.html",".","log_every_n",":","int",",","default","1000","Logging","messages","reported","every","`","log_every_n","`","samples",".","Returns","--","--","--","-","features",":","np.ndarray","A","numpy","array","containing","a","featurized","representation","of","`","datapoints","`","."]
code: def featurize(
      self,
      datapoints: Optional[
          Iterable[Union[Dict[str, Any], PymatgenStructure]]
      ] = None,
      log_every_n: int = 1000,
      **kwargs,
  ) -> np.ndarray:
      """Calculate features for crystal structures.
  
      Parameters
      ----------
      datapoints: Iterable[Union[Dict, pymatgen.core.Structure]]
          Iterable sequence of pymatgen structure dictionaries
          or pymatgen.core.Structure. Please confirm the dictionary representations
          of pymatgen.core.Structure from https://pymatgen.org/pymatgen.core.structure.html.
      log_every_n: int, default 1000
          Logging messages reported every `log_every_n` samples.
  
      Returns
      -------
      features: np.ndarray
          A numpy array containing a featurized representation of
          `datapoints`.
      """
      try:
          from pymatgen.core import Structure
      except ModuleNotFoundError:
          raise ImportError(
              "This class requires pymatgen to be installed."
          )
  
      if "structures" in kwargs:
          datapoints = kwargs.get("structures")
          raise DeprecationWarning(
              'Structures is being phased out as a parameter, please pass "datapoints" instead.'
          )
  
      if not isinstance(datapoints, Iterable):
          datapoints = [
              cast(Union[Dict[str, Any], PymatgenStructure], datapoints)
          ]
  
      datapoints = list(datapoints)
      features = []
      for idx, structure in enumerate(datapoints):
          if idx % log_every_n == 0:
              logger.info("Featurizing datapoint %i" % idx)
          try:
              if isinstance(structure, Dict):
                  structure = Structure.from_dict(structure)
              features.append(self._featurize(structure, **kwargs))
          except:
              logger.warning(
                  "Failed to featurize datapoint %i. Appending empty array"
                  % idx
              )
              features.append(np.array([]))
  
      return np.asarray(features)
  
imports: import inspect
  import logging
  import numpy
  from typing import Any, Dict, Iterable, Optional, Tuple, Union, cast
  from deepchem.utils import get_print_threshold
  from deepchem.utils.typing import PymatgenStructure
label_desc: Use image node_id 1 for calling the MaterialStructureFeaturizer obj's underlying member method code with example usage: obj.featurize(datapoints, log_every_n) and returns: np