class_docstr: Calculates the 2-D Surface graph features in 6 different permutations-
  
  Based on the implementation of Lattice Graph Convolution Neural
  Network (LCNN). This method produces the Atom wise features ( One Hot Encoding)
  and Adjacent neighbour in the specified order of permutations. Neighbors are
  determined by first extracting a site local environment from the primitive cell,
  and perform graph matching and distance matching to find neighbors.
  First, the template of the Primitive cell needs to be defined along with periodic
  boundary conditions and active and spectator site details. structure(Data Point
  i.e different configuration of adsorbate atoms) is passed for featurization.
  
  This particular featurization produces a regular-graph (equal number of Neighbors)
  along with its permutation in 6 symmetric axis. This transformation can be
  applied when orderering of neighboring of nodes around a site play an important role
  in the propert predictions. Due to consideration of local neighbor environment,
  this current implementation would be fruitful in finding neighbors for calculating
  formation energy of adbsorption tasks where the local. Adsorption turns out to be important
  in many applications such as catalyst and semiconductor design.
  
  The permuted neighbors are calculated using the Primitive cells i.e periodic cells
  in all the data points are built via lattice transformation of the primitive cell.
  
  `Primitive cell Format:`
  
  1. Pymatgen structure object with site_properties key value
      - "SiteTypes" mentioning if it is a active site "A1" or spectator
          site "S1".
  2. ns , the number of spectator types elements. For "S1" its 1.
  3. na , the number of active types elements. For "A1" its 1.
  4. aos, the different species of active elements "A1".
  5. pbc, the periodic boundary conditions.
  
  `Data point Structure Format(Configuration of Atoms):`
  
  1. Pymatgen structure object with site_properties with following key value.
      - "SiteTypes", mentioning if it is a active site "A1" or spectator
          site "S1".
      - "oss", different occupational sites. For spectator sites make it -1.
  
  It is highly recommended that cells of data are directly redefined from
  the primitive cell, specifically, the relative coordinates between sites
  are consistent so that the lattice is non-deviated.
  
  References
  ----------
  .. [1] Jonathan Lym and Geun Ho Gu, J. Phys. Chem. C 2019, 123, 18951−18959
  
  Examples
  --------
  >>> import deepchem as dc
  >>> from pymatgen.core import Structure
  >>> import numpy as np
  >>> PRIMITIVE_CELL = {
  ...   "lattice": [[2.818528, 0.0, 0.0],
  ...               [-1.409264, 2.440917, 0.0],
  ...               [0.0, 0.0, 25.508255]],
  ...   "coords": [[0.66667, 0.33333, 0.090221],
  ...              [0.33333, 0.66667, 0.18043936],
  ...              [0.0, 0.0, 0.27065772],
  ...              [0.66667, 0.33333, 0.36087608],
  ...              [0.33333, 0.66667, 0.45109444],
  ...              [0.0, 0.0, 0.49656991]],
  ...   "species": ['H', 'H', 'H', 'H', 'H', 'He'],
  ...   "site_properties": {'SiteTypes': ['S1', 'S1', 'S1', 'S1', 'S1', 'A1']}
  ... }
  >>> PRIMITIVE_CELL_INF0 = {
  ...    "cutoff": np.around(6.00),
  ...    "structure": Structure(**PRIMITIVE_CELL),
  ...    "aos": ['1', '0', '2'],
  ...    "pbc": [True, True, False],
  ...    "ns": 1,
  ...    "na": 1
  ... }
  >>> DATA_POINT = {
  ...   "lattice": [[1.409264, -2.440917, 0.0],
  ...               [4.227792, 2.440917, 0.0],
  ...               [0.0, 0.0, 23.17559]],
  ...   "coords": [[0.0, 0.0, 0.099299],
  ...              [0.0, 0.33333, 0.198598],
  ...              [0.5, 0.16667, 0.297897],
  ...              [0.0, 0.0, 0.397196],
  ...              [0.0, 0.33333, 0.496495],
  ...              [0.5, 0.5, 0.099299],
  ...              [0.5, 0.83333, 0.198598],
  ...              [0.0, 0.66667, 0.297897],
  ...              [0.5, 0.5, 0.397196],
  ...              [0.5, 0.83333, 0.496495],
  ...              [0.0, 0.66667, 0.54654766],
  ...              [0.5, 0.16667, 0.54654766]],
  ...   "species": ['H', 'H', 'H', 'H', 'H', 'H',
  ...               'H', 'H', 'H', 'H', 'He', 'He'],
  ...   "site_properties": {
  ...     "SiteTypes": ['S1', 'S1', 'S1', 'S1', 'S1',
  ...                   'S1', 'S1', 'S1', 'S1', 'S1',
  ...                   'A1', 'A1'],
  ...     "oss": ['-1', '-1', '-1', '-1', '-1', '-1',
  ...             '-1', '-1', '-1', '-1', '0', '2']
  ...                   }
  ... }
  >>> featuriser = dc.feat.LCNNFeaturizer(**PRIMITIVE_CELL_INF0)
  >>> print(type(featuriser._featurize(Structure(**DATA_POINT))))
  <class 'deepchem.feat.graph_data.GraphData'>
  
  Notes
  -----
  This Class requires pymatgen , networkx , scipy installed.
class_docstr_tok: ["Calculates","the","2-D","Surface","graph","features","in","6","different","permutations-","Based","on","the","implementation","of","Lattice","Graph","Convolution","Neural","Network","(","LCNN",")",".","This","method","produces","the","Atom","wise","features","(","One","Hot","Encoding",")","and","Adjacent","neighbour","in","the","specified","order","of","permutations",".","Neighbors","are","determined","by","first","extracting","a","site","local","environment","from","the","primitive","cell",",","and","perform","graph","matching","and","distance","matching","to","find","neighbors",".","First",",","the","template","of","the","Primitive","cell","needs","to","be","defined","along","with","periodic","boundary","conditions","and","active","and","spectator","site","details",".","structure","(","Data","Point","i.e","different","configuration","of","adsorbate","atoms",")","is","passed","for","featurization",".","This","particular","featurization","produces","a","regular-graph","(","equal","number","of","Neighbors",")","along","with","its","permutation","in","6","symmetric","axis",".","This","transformation","can","be","applied","when","orderering","of","neighboring","of","nodes","around","a","site","play","an","important","role","in","the","propert","predictions",".","Due","to","consideration","of","local","neighbor","environment",",","this","current","implementation","would","be","fruitful","in","finding","neighbors","for","calculating","formation","energy","of","adbsorption","tasks","where","the","local",".","Adsorption","turns","out","to","be","important","in","many","applications","such","as","catalyst","and","semiconductor","design",".","The","permuted","neighbors","are","calculated","using","the","Primitive","cells","i.e","periodic","cells","in","all","the","data","points","are","built","via","lattice","transformation","of","the","primitive","cell",".","`","Primitive","cell","Format",":","`","1",".","Pymatgen","structure","object","with","site_properties","key","value","-","``","SiteTypes","''","mentioning","if","it","is","a","active","site","``","A1","''","or","spectator","site","``","S1","''",".","2.","ns",",","the","number","of","spectator","types","elements",".","For","``","S1","''","its","1",".","3.","na",",","the","number","of","active","types","elements",".","For","``","A1","''","its","1",".","4.","aos",",","the","different","species","of","active","elements","``","A1","''",".","5.","pbc",",","the","periodic","boundary","conditions",".","`","Data","point","Structure","Format","(","Configuration","of","Atoms",")",":","`","1",".","Pymatgen","structure","object","with","site_properties","with","following","key","value",".","-","``","SiteTypes","''",",","mentioning","if","it","is","a","active","site","``","A1","''","or","spectator","site","``","S1","''",".","-","``","oss","''",",","different","occupational","sites",".","For","spectator","sites","make","it","-1",".","It","is","highly","recommended","that","cells","of","data","are","directly","redefined","from","the","primitive","cell",",","specifically",",","the","relative","coordinates","between","sites","are","consistent","so","that","the","lattice","is","non-deviated",".","References","--","--","--","--","--","..","[","1","]","Jonathan","Lym","and","Geun","Ho","Gu",",","J.","Phys",".","Chem",".","C","2019",",","123",",","18951\u221218959","Examples","--","--","--","--",">",">",">","import","deepchem","as","dc",">",">",">","from","pymatgen.core","import","Structure",">",">",">","import","numpy","as","np",">",">",">","PRIMITIVE_CELL","=","{","...","``","lattice","''",":","[","[","2.818528",",","0.0",",","0.0","]",",","...","[","-1.409264",",","2.440917",",","0.0","]",",","...","[","0.0",",","0.0",",","25.508255","]","]",",","...","``","coords","''",":","[","[","0.66667",",","0.33333",",","0.090221","]",",","...","[","0.33333",",","0.66667",",","0.18043936","]",",","...","[","0.0",",","0.0",",","0.27065772","]",",","...","[","0.66667",",","0.33333",",","0.36087608","]",",","...","[","0.33333",",","0.66667",",","0.45109444","]",",","...","[","0.0",",","0.0",",","0.49656991","]","]",",","...","``","species","''",":","[","'","H","'",",","'","H","'",",","'","H","'",",","'","H","'",",","'","H","'",",","'He","'","]",",","...","``","site_properties","''",":","{","'SiteTypes","'",":","[","'S1","'",",","'S1","'",",","'S1","'",",","'S1","'",",","'S1","'",",","'A1","'","]","}","...","}",">",">",">","PRIMITIVE_CELL_INF0","=","{","...","``","cutoff","''",":","np.around","(","6.00",")",",","...","``","structure","''",":","Structure","(","*","*","PRIMITIVE_CELL",")",",","...","``","aos","''",":","[","'","1","'",",","'","0","'",",","'","2","'","]",",","...","``","pbc","''",":","[","True",",","True",",","False","]",",","...","``","ns","''",":","1",",","...","``","na","''",":","1","...","}",">",">",">","DATA_POINT","=","{","...","``","lattice","''",":","[","[","1.409264",",","-2.440917",",","0.0","]",",","...","[","4.227792",",","2.440917",",","0.0","]",",","...","[","0.0",",","0.0",",","23.17559","]","]",",","...","``","coords","''",":","[","[","0.0",",","0.0",",","0.099299","]",",","...","[","0.0",",","0.33333",",","0.198598","]",",","...","[","0.5",",","0.16667",",","0.297897","]",",","...","[","0.0",",","0.0",",","0.397196","]",",","...","[","0.0",",","0.33333",",","0.496495","]",",","...","[","0.5",",","0.5",",","0.099299","]",",","...","[","0.5",",","0.83333",",","0.198598","]",",","...","[","0.0",",","0.66667",",","0.297897","]",",","...","[","0.5",",","0.5",",","0.397196","]",",","...","[","0.5",",","0.83333",",","0.496495","]",",","...","[","0.0",",","0.66667",",","0.54654766","]",",","...","[","0.5",",","0.16667",",","0.54654766","]","]",",","...","``","species","''",":","[","'","H","'",",","'","H","'",",","'","H","'",",","'","H","'",",","'","H","'",",","'","H","'",",","...","'","H","'",",","'","H","'",",","'","H","'",",","'","H","'",",","'He","'",",","'He","'","]",",","...","``","site_properties","''",":","{","...","``","SiteTypes","''",":","[","'S1","'",",","'S1","'",",","'S1","'",",","'S1","'",",","'S1","'",",","...","'S1","'",",","'S1","'",",","'S1","'",",","'S1","'",",","'S1","'",",","...","'A1","'",",","'A1","'","]",",","...","``","oss","''",":","[","'-1","'",",","'-1","'",",","'-1","'",",","'-1","'",",","'-1","'",",","'-1","'",",","...","'-1","'",",","'-1","'",",","'-1","'",",","'-1","'",",","'","0","'",",","'","2","'","]","...","}","...","}",">",">",">","featuriser","=","dc.feat.LCNNFeaturizer","(","*","*","PRIMITIVE_CELL_INF0",")",">",">",">","print","(","type","(","featuriser._featurize","(","Structure","(","*","*","DATA_POINT",")",")",")",")","<","class","'deepchem.feat.graph_data.GraphData","'",">","Notes","--","--","-","This","Class","requires","pymatgen",",","networkx",",","scipy","installed","."]
docstr: Parameters
  ----------
  datapoint: : PymatgenStructure
      Pymatgen Structure object of the surface configuration. It also requires
      site_properties attribute with "Sitetypes"(Active or spectator site) and
      "oss"(Species of Active site from the list of self.aos and "-1" for
      spectator sites).
  
  Returns
  -------
  graph: GraphData
      Node features, All edges for each node in diffrent permutations
docstr_tok: ["Parameters","--","--","--","--","--","datapoint",":",":","PymatgenStructure","Pymatgen","Structure","object","of","the","surface","configuration",".","It","also","requires","site_properties","attribute","with","``","Sitetypes","''","(","Active","or","spectator","site",")","and","``","oss","''","(","Species","of","Active","site","from","the","list","of","self.aos","and","``","-1","''","for","spectator","sites",")",".","Returns","--","--","--","-","graph",":","GraphData","Node","features",",","All","edges","for","each","node","in","diffrent","permutations"]
code: def _featurize(
      self, datapoint: PymatgenStructure, **kwargs
  ) -> GraphData:
      """
      Parameters
      ----------
      datapoint: : PymatgenStructure
          Pymatgen Structure object of the surface configuration. It also requires
          site_properties attribute with "Sitetypes"(Active or spectator site) and
          "oss"(Species of Active site from the list of self.aos and "-1" for
          spectator sites).
  
      Returns
      -------
      graph: GraphData
          Node features, All edges for each node in diffrent permutations
      """
      if "structure" in kwargs and datapoint is None:
          datapoint = kwargs.get("structure")
          raise DeprecationWarning(
              'Structure is being phased out as a parameter, please pass "datapoint" instead.'
          )
  
      xSites, xNSs = self.setup_env.read_datum(datapoint)
      config_size = xNSs.shape
      v = np.arange(0, len(xSites)).repeat(
          config_size[2] * config_size[3]
      )
      u = xNSs.flatten()
      graph = GraphData(
          node_features=xSites, edge_index=np.array([u, v])
      )
      return graph
  
imports: import numpy
  import logging
  from deepchem.feat import MaterialStructureFeaturizer
  from collections import defaultdict
  from typing import List, Dict, Tuple, DefaultDict, Any
  from deepchem.utils.typing import PymatgenStructure
  from deepchem.feat.graph_data import GraphData
  from scipy.spatial.distance import pdist, squareform, cdist
  from scipy.spatial.transform import Rotation
label_desc: Use image node_id 2 for calling the LCNNFeaturizer obj's underlying member method code with example usage: obj._featurize(datapoint) and returns: graph