class_docstr: Calculate structure graph features for crystals.
  
  Based on the implementation in Crystal Graph Convolutional
  Neural Networks (CGCNN). The method constructs a crystal graph
  representation including atom features and bond features (neighbor
  distances). Neighbors are determined by searching in a sphere around
  atoms in the unit cell. A Gaussian filter is applied to neighbor distances.
  All units are in angstrom.
  
  This featurizer requires the optional dependency pymatgen. It may
  be useful when 3D coordinates are available and when using graph
  network models and crystal graph convolutional networks.
  
  See [1]_ for more details.
  
  References
  ----------
  .. [1] T. Xie and J. C. Grossman, "Crystal graph convolutional
      neural networks for an accurate and interpretable prediction
      of material properties", Phys. Rev. Lett. 120, 2018,
      https://arxiv.org/abs/1710.10324
  
  Examples
  --------
  >>> import deepchem as dc
  >>> import pymatgen as mg
  >>> featurizer = dc.feat.CGCNNFeaturizer()
  >>> lattice = mg.core.Lattice.cubic(4.2)
  >>> structure = mg.core.Structure(lattice, ["Cs", "Cl"], [[0, 0, 0], [0.5, 0.5, 0.5]])
  >>> features = featurizer.featurize([structure])
  >>> feature = features[0]
  >>> print(type(feature))
  <class 'deepchem.feat.graph_data.GraphData'>
  
  Note
  ----
  This class requires Pymatgen to be installed.
class_docstr_tok: ["Calculate","structure","graph","features","for","crystals",".","Based","on","the","implementation","in","Crystal","Graph","Convolutional","Neural","Networks","(","CGCNN",")",".","The","method","constructs","a","crystal","graph","representation","including","atom","features","and","bond","features","(","neighbor","distances",")",".","Neighbors","are","determined","by","searching","in","a","sphere","around","atoms","in","the","unit","cell",".","A","Gaussian","filter","is","applied","to","neighbor","distances",".","All","units","are","in","angstrom",".","This","featurizer","requires","the","optional","dependency","pymatgen",".","It","may","be","useful","when","3D","coordinates","are","available","and","when","using","graph","network","models","and","crystal","graph","convolutional","networks",".","See","[","1","]","_","for","more","details",".","References","--","--","--","--","--","..","[","1","]","T.","Xie","and","J.","C.","Grossman",",","``","Crystal","graph","convolutional","neural","networks","for","an","accurate","and","interpretable","prediction","of","material","properties","''",",","Phys",".","Rev",".","Lett",".","120",",","2018",",","https",":","\/\/arxiv.org\/abs\/1710.10324","Examples","--","--","--","--",">",">",">","import","deepchem","as","dc",">",">",">","import","pymatgen","as","mg",">",">",">","featurizer","=","dc.feat.CGCNNFeaturizer","(",")",">",">",">","lattice","=","mg.core.Lattice.cubic","(","4.2",")",">",">",">","structure","=","mg.core.Structure","(","lattice",",","[","``","Cs","''",",","``","Cl","''","]",",","[","[","0",",","0",",","0","]",",","[","0.5",",","0.5",",","0.5","]","]",")",">",">",">","features","=","featurizer.featurize","(","[","structure","]",")",">",">",">","feature","=","features","[","0","]",">",">",">","print","(","type","(","feature",")",")","<","class","'deepchem.feat.graph_data.GraphData","'",">","Note","--","--","This","class","requires","Pymatgen","to","be","installed","."]
docstr: Apply Gaussian filter to an array of interatomic distances.
  
  Parameters
  ----------
  distances : np.ndarray
      A numpy array of the shape `(num_edges, )`.
  
  Returns
  -------
  expanded_distances: np.ndarray
      Expanded distance tensor after Gaussian filtering.
      The shape is `(num_edges, filter_length)`. The `filter_length` is
      (self.radius / self.step) + 1.
docstr_tok: ["Apply","Gaussian","filter","to","an","array","of","interatomic","distances",".","Parameters","--","--","--","--","--","distances",":","np.ndarray","A","numpy","array","of","the","shape","`","(","num_edges",",",")","`",".","Returns","--","--","--","-","expanded_distances",":","np.ndarray","Expanded","distance","tensor","after","Gaussian","filtering",".","The","shape","is","`","(","num_edges",",","filter_length",")","`",".","The","`","filter_length","`","is","(","self.radius","\/","self.step",")","+","1","."]
code: def _gaussian_filter(self, distances: np.ndarray) -> np.ndarray:
      """
      Apply Gaussian filter to an array of interatomic distances.
  
      Parameters
      ----------
      distances : np.ndarray
          A numpy array of the shape `(num_edges, )`.
  
      Returns
      -------
      expanded_distances: np.ndarray
          Expanded distance tensor after Gaussian filtering.
          The shape is `(num_edges, filter_length)`. The `filter_length` is
          (self.radius / self.step) + 1.
      """
  
      filt = np.arange(0, self.radius + self.step, self.step)
  
      # Increase dimension of distance tensor and apply filter
      expanded_distances = np.exp(
          -((distances[..., np.newaxis] - filt) ** 2) / self.step**2
      )
  
      return expanded_distances
  
file_path: deepchem/deepchem/feat/material_featurizers/cgcnn_featurizer.py
imports: import os
  import json
  import logging
  import numpy
  from typing import Tuple
  from urllib.error import URLError
  from deepchem.utils.data_utils import download_url, get_data_dir
  from deepchem.utils.typing import PymatgenStructure
  from deepchem.feat import MaterialStructureFeaturizer
  from deepchem.feat.graph_data import GraphData
label_desc: Use image node_id 5 for calling the CGCNNFeaturizer obj's underlying member method code with example usage: obj._gaussian_filter(distances) and returns: expanded_distances