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: Returns a tensor that contains the coordinates of the neighboring
  lattices.
  
  Parameters
  ----------
  rcut: float
      The threshold of the distance from the main cell to be included
      in the neighbor.
  exclude_zeros: bool (default: False)
      If True, then it will exclude the vector that are all zeros.
  
  Returns
  -------
  ls: torch.Tensor
      Tensor with size `(nb, ndim)` containing the coordinates of the
      neighboring cells.
docstr_tok: ["Returns","a","tensor","that","contains","the","coordinates","of","the","neighboring","lattices",".","Parameters","--","--","--","--","--","rcut",":","float","The","threshold","of","the","distance","from","the","main","cell","to","be","included","in","the","neighbor",".","exclude_zeros",":","bool","(","default",":","False",")","If","True",",","then","it","will","exclude","the","vector","that","are","all","zeros",".","Returns","--","--","--","-","ls",":","torch.Tensor","Tensor","with","size","`","(","nb",",","ndim",")","`","containing","the","coordinates","of","the","neighboring","cells","."]
code: def get_lattice_ls(
      self, rcut: float, exclude_zeros: bool = False
  ) -> torch.Tensor:
      """
      Returns a tensor that contains the coordinates of the neighboring
      lattices.
  
      Parameters
      ----------
      rcut: float
          The threshold of the distance from the main cell to be included
          in the neighbor.
      exclude_zeros: bool (default: False)
          If True, then it will exclude the vector that are all zeros.
  
      Returns
      -------
      ls: torch.Tensor
          Tensor with size `(nb, ndim)` containing the coordinates of the
          neighboring cells.
  
      """
      a = self.lattice_vectors()
      return self._generate_lattice_vectors(
          a, rcut, exclude_zeros=exclude_zeros
      )
  
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 6 for calling the Lattice obj's underlying member method code with example usage: obj.get_lattice_ls(rcut, exclude_zeros) and returns: self