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 coordinate in reciprocal space of the
  neighboring Brillouin zones.
  
  Parameters
  ----------
  gcut: float
      Cut off for generating the G-points.
  exclude_zeros: bool (default: False)
      If True, then it will exclude the vector that are all zeros.
  
  Returns
  -------
  gvgrids: torch.Tensor
      Tensor with size `(ng, ndim)` containing the G-coordinates of the
      Brillouin zones.
  weights: torch.Tensor
      Tensor with size `(ng)` representing the weights of the G-points.
docstr_tok: ["Returns","a","tensor","that","contains","the","coordinate","in","reciprocal","space","of","the","neighboring","Brillouin","zones",".","Parameters","--","--","--","--","--","gcut",":","float","Cut","off","for","generating","the","G-points",".","exclude_zeros",":","bool","(","default",":","False",")","If","True",",","then","it","will","exclude","the","vector","that","are","all","zeros",".","Returns","--","--","--","-","gvgrids",":","torch.Tensor","Tensor","with","size","`","(","ng",",","ndim",")","`","containing","the","G-coordinates","of","the","Brillouin","zones",".","weights",":","torch.Tensor","Tensor","with","size","`","(","ng",")","`","representing","the","weights","of","the","G-points","."]
code: def get_gvgrids(
      self, gcut: float, exclude_zeros: bool = False
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      """
      Returns a tensor that contains the coordinate in reciprocal space of the
      neighboring Brillouin zones.
  
      Parameters
      ----------
      gcut: float
          Cut off for generating the G-points.
      exclude_zeros: bool (default: False)
          If True, then it will exclude the vector that are all zeros.
  
      Returns
      -------
      gvgrids: torch.Tensor
          Tensor with size `(ng, ndim)` containing the G-coordinates of the
          Brillouin zones.
      weights: torch.Tensor
          Tensor with size `(ng)` representing the weights of the G-points.
  
      """
      b = self.recip_vectors()
      gvgrids = self._generate_lattice_vectors(
          b, gcut, exclude_zeros=exclude_zeros
      )
  
      # 1 / cell.vol == det(b) / (2 pi)^3
      weights = torch.zeros(
          gvgrids.shape[0], dtype=self.dtype, device=self.device
      )
      weights = weights + torch.abs(torch.det(b)) / (2 * np.pi) ** 3
      return gvgrids, weights
  
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 7 for calling the Lattice obj's underlying member method code with example usage: obj.get_gvgrids(gcut, exclude_zeros) and returns: gvgrids,  weights