class_docstr: Lattice Convolutional Neural Network (LCNN).
  Here is a simple example of code that uses the LCNNModel with
  Platinum 2d Adsorption dataset.
  
  This model takes arbitrary configurations of Molecules on an adsorbate and predicts
  their formation energy. These formation energies are found using DFT calculations and
  LCNNModel is to automate that process. This model defines a crystal graph using the
  distance between atoms. The crystal graph is an undirected regular graph (equal neighbours)
  and different permutations of the neighbours are pre-computed using the LCNNFeaturizer.
  On each node for each permutation, the neighbour nodes are concatenated which are further operated.
  This model has only a node representation. Please confirm the detail algorithms from [1]_.
  
  Examples
  --------
  >>>
  >> import deepchem as dc
  >> from pymatgen.core import Structure
  >> import numpy as np
  >> from deepchem.feat import LCNNFeaturizer
  >> from deepchem.molnet import load_Platinum_Adsorption
  >> 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
  .. }
  >> tasks, datasets, transformers = load_Platinum_Adsorption(
  ..    featurizer= LCNNFeaturizer( **PRIMITIVE_CELL_INF0)
  .. )
  >> train, val, test = datasets
  >> model = LCNNModel(mode='regression',
  ..                   batch_size=8,
  ..                   learning_rate=0.001)
  >> model = LCNN()
  >> out = model(lcnn_feat)
  >> model.fit(train, nb_epoch=10)
  
  
  References
  ----------
  .. [1] Jonathan Lym and Geun Ho Gu, J. Phys. Chem. C 2019, 123, 18951−18959.
  
  Notes
  -----
  This class requires DGL and PyTorch to be installed.
docstr: This class accepts all the keyword arguments from TorchModel.
  
  Parameters
  ----------
  
  n_occupancy: int, default 3
      number of possible occupancy.
  n_neighbor_sites_list: int, default 19
      Number of neighbors of each site.
  n_permutation: int, default 6
      Diffrent permutations taken along diffrent directions.
  n_task: int, default 1
      Number of tasks.
  dropout_rate: float, default 0.4
      p value for dropout between 0.0 to 1.0
  nconv: int, default 2
      number of convolutions performed.
  n_feature: int, default 44
      number of feature for each site.
  sitewise_n_feature: int, default 25
      number of features for atoms for site-wise activation.
  kwargs: Dict
      This class accepts all the keyword arguments from TorchModel.
docstr_tok: ["This","class","accepts","all","the","keyword","arguments","from","TorchModel",".","Parameters","--","--","--","--","--","n_occupancy",":","int",",","default","3","number","of","possible","occupancy",".","n_neighbor_sites_list",":","int",",","default","19","Number","of","neighbors","of","each","site",".","n_permutation",":","int",",","default","6","Diffrent","permutations","taken","along","diffrent","directions",".","n_task",":","int",",","default","1","Number","of","tasks",".","dropout_rate",":","float",",","default","0.4","p","value","for","dropout","between","0.0","to","1.0","nconv",":","int",",","default","2","number","of","convolutions","performed",".","n_feature",":","int",",","default","44","number","of","feature","for","each","site",".","sitewise_n_feature",":","int",",","default","25","number","of","features","for","atoms","for","site-wise","activation",".","kwargs",":","Dict","This","class","accepts","all","the","keyword","arguments","from","TorchModel","."]
code: def __init__(
      self,
      n_occupancy: int = 3,
      n_neighbor_sites_list: int = 19,
      n_permutation_list: int = 6,
      n_task: int = 1,
      dropout_rate: float = 0.4,
      n_conv: int = 2,
      n_features: int = 44,
      sitewise_n_feature: int = 25,
      **kwargs,
  ):
      """
      This class accepts all the keyword arguments from TorchModel.
  
      Parameters
      ----------
  
      n_occupancy: int, default 3
          number of possible occupancy.
      n_neighbor_sites_list: int, default 19
          Number of neighbors of each site.
      n_permutation: int, default 6
          Diffrent permutations taken along diffrent directions.
      n_task: int, default 1
          Number of tasks.
      dropout_rate: float, default 0.4
          p value for dropout between 0.0 to 1.0
      nconv: int, default 2
          number of convolutions performed.
      n_feature: int, default 44
          number of feature for each site.
      sitewise_n_feature: int, default 25
          number of features for atoms for site-wise activation.
      kwargs: Dict
          This class accepts all the keyword arguments from TorchModel.
      """
  
      def init_weights(m):
          if isinstance(m, nn.Linear):
              torch.nn.init.xavier_uniform_(m.weight)
  
      model = LCNN(
          n_occupancy,
          n_neighbor_sites_list,
          n_permutation_list,
          n_task,
          dropout_rate,
          n_conv,
          n_features,
          sitewise_n_feature,
      )
      model.apply(init_weights)
      loss = L2Loss()
      output_types = ["prediction"]
      super(LCNNModel, self).__init__(
          model, loss=loss, output_types=output_types, **kwargs
      )
  
imports: import torch
  import torch.nn
  from deepchem.models.torch_models.torch_model import TorchModel
  from deepchem.models.losses import L2Loss
label_desc: Use image node_id 1 to create a new LCNNModel object from inherited base classes: TorchModel with example: obj = LCNNModel(n_occupancy, n_neighbor_sites_list, n_permutation_list, n_task, dropout_rate, n_conv, n_features, sitewise_n_feature)