class_docstr: Lattice is an object that describe the periodicity of the lattice.
  Note that this object does not know about atoms.
  For the integrated object between the lattice and atoms, please see Sol
  
  Examples
  --------
  >>> import torch
  >>> from deepchem.utils.dft_utils import Lattice
  >>> a = torch.tensor([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]])
  >>> lattice = Lattice(a)
  >>> lattice.lattice_vectors()
  tensor([[1., 0., 0.],
          [0., 1., 0.],
          [0., 0., 1.]])
  >>> lattice.recip_vectors()
  tensor([[6.2832, 0.0000, 0.0000],
          [0.0000, 6.2832, 0.0000],
          [0.0000, 0.0000, 6.2832]])
  >>> lattice.volume() # volume of the unit cell
  tensor(1.)
  >>> lattice.get_lattice_ls(1.0) # get the neighboring lattice vectors
  tensor([[ 0.,  0., -1.],
          [ 0., -1.,  0.],
          [-1.,  0.,  0.],
          [ 0.,  0.,  0.],
          [ 1.,  0.,  0.],
          [ 0.,  1.,  0.],
          [ 0.,  0.,  1.]])
  >>> lattice.get_gvgrids(6.0) # get the neighboring G-vectors
  (tensor([[ 0.0000,  0.0000, -6.2832],
          [ 0.0000, -6.2832,  0.0000],
          [-6.2832,  0.0000,  0.0000],
          [ 0.0000,  0.0000,  0.0000],
          [ 6.2832,  0.0000,  0.0000],
          [ 0.0000,  6.2832,  0.0000],
          [ 0.0000,  0.0000,  6.2832]]), tensor([1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000]))
  >>> lattice.estimate_ewald_eta(1e-5) # estimate the ewald's sum eta
  1.8
class_docstr_tok: ["Lattice","is","an","object","that","describe","the","periodicity","of","the","lattice",".","Note","that","this","object","does","not","know","about","atoms",".","For","the","integrated","object","between","the","lattice","and","atoms",",","please","see","Sol","Examples","--","--","--","--",">",">",">","import","torch",">",">",">","from","deepchem.utils.dft_utils","import","Lattice",">",">",">","a","=","torch.tensor","(","[","[","1.",",","0.",",","0",".","]",",","[","0.",",","1.",",","0",".","]",",","[","0.",",","0.",",","1",".","]","]",")",">",">",">","lattice","=","Lattice","(","a",")",">",">",">","lattice.lattice_vectors","(",")","tensor","(","[","[","1.",",","0.",",","0",".","]",",","[","0.",",","1.",",","0",".","]",",","[","0.",",","0.",",","1",".","]","]",")",">",">",">","lattice.recip_vectors","(",")","tensor","(","[","[","6.2832",",","0.0000",",","0.0000","]",",","[","0.0000",",","6.2832",",","0.0000","]",",","[","0.0000",",","0.0000",",","6.2832","]","]",")",">",">",">","lattice.volume","(",")","#","volume","of","the","unit","cell","tensor","(","1",".",")",">",">",">","lattice.get_lattice_ls","(","1.0",")","#","get","the","neighboring","lattice","vectors","tensor","(","[","[","0.",",","0.",",","-1",".","]",",","[","0.",",","-1.",",","0",".","]",",","[","-1.",",","0.",",","0",".","]",",","[","0.",",","0.",",","0",".","]",",","[","1.",",","0.",",","0",".","]",",","[","0.",",","1.",",","0",".","]",",","[","0.",",","0.",",","1",".","]","]",")",">",">",">","lattice.get_gvgrids","(","6.0",")","#","get","the","neighboring","G-vectors","(","tensor","(","[","[","0.0000",",","0.0000",",","-6.2832","]",",","[","0.0000",",","-6.2832",",","0.0000","]",",","[","-6.2832",",","0.0000",",","0.0000","]",",","[","0.0000",",","0.0000",",","0.0000","]",",","[","6.2832",",","0.0000",",","0.0000","]",",","[","0.0000",",","6.2832",",","0.0000","]",",","[","0.0000",",","0.0000",",","6.2832","]","]",")",",","tensor","(","[","1.0000",",","1.0000",",","1.0000",",","1.0000",",","1.0000",",","1.0000",",","1.0000","]",")",")",">",">",">","lattice.estimate_ewald_eta","(","1e-5",")","#","estimate","the","ewald","'s","sum","eta","1.8"]
docstr: Initialize the lattice object.
  
  2D or 1D repetition are not implemented yet
  
  Parameters
  ----------
  a: torch.Tensor
      The lattice vectors with shape (ndim, ndim) with ndim == 3
docstr_tok: ["Initialize","the","lattice","object",".","2D","or","1D","repetition","are","not","implemented","yet","Parameters","--","--","--","--","--","a",":","torch.Tensor","The","lattice","vectors","with","shape","(","ndim",",","ndim",")","with","ndim","==","3"]
code: def __init__(self, a: torch.Tensor):
      """Initialize the lattice object.
  
      2D or 1D repetition are not implemented yet
  
      Parameters
      ----------
      a: torch.Tensor
          The lattice vectors with shape (ndim, ndim) with ndim == 3
  
      """
      assert a.ndim == 2
      assert a.shape[0] == 3
      assert a.shape[-1] == 3
      self.ndim = a.shape[0]
      self.a = a
      self.device = a.device
      self.dtype = a.dtype
  
file_path: deepchem/deepchem/utils/dft_utils/hamilton/intor/lattice.py
imports: from typing import Tuple
  import torch
  import numpy
  from scipy.special import erfcinv
label_desc: Use image node_id 1 to create a new Lattice object from inherited base classes: object with example: obj = Lattice(a)