pymatgen_diffusion/neb/full_path_mapper.py
def _setup_grids(self):
        """Populate the internal varialbes used for defining the grid points in the charge density analysis"""

        # set up the grid
        aa = np.linspace(0, 1, len(self.base_aeccar.get_axis_grid(0)), endpoint=False)
        bb = np.linspace(0, 1, len(self.base_aeccar.get_axis_grid(1)), endpoint=False)
        cc = np.linspace(0, 1, len(self.base_aeccar.get_axis_grid(2)), endpoint=False)
        # move the grid points to the center
        aa, bb, dd = map(_shift_grid, [aa, bb, cc])

        # mesh grid for each unit cell
        AA, BB, CC = np.meshgrid(aa, bb, cc, indexing="ij")

        # should be using a mesh grid of 5x5x5 (using 3x3x3 misses some fringe cases)
        # but using 3x3x3 is much faster and only crops the cyliners in some rare case
        # if you keep the tube_radius small then this is not a big deal
        IMA, IMB, IMC = np.meshgrid([-1, 0, 1], [-1, 0, 1], [-1, 0, 1], indexing="ij")

        # store these
        self._uc_grid_shape = AA.shape
        self._fcoords = np.vstack([AA.flatten(), BB.flatten(), CC.flatten()]).T
        self._images = np.vstack([IMA.flatten(), IMB.flatten(), IMC.flatten()]).T
Populate the internal varialbes used for defining the grid points in the charge density analysis
Populate the internal varialbes used for defining the grid points in the charge density analysis
Populate the internal varialbes used for defining the grid points in the charge density analysis
def _setup_grids(self):
        aa = np.linspace(0, 1, len(self.base_aeccar.get_axis_grid(0)), endpoint=False)
        bb = np.linspace(0, 1, len(self.base_aeccar.get_axis_grid(1)), endpoint=False)
        cc = np.linspace(0, 1, len(self.base_aeccar.get_axis_grid(2)), endpoint=False)
        aa, bb, dd = map(_shift_grid, [aa, bb, cc])
        AA, BB, CC = np.meshgrid(aa, bb, cc, indexing="ij")
        IMA, IMB, IMC = np.meshgrid([-1, 0, 1], [-1, 0, 1], [-1, 0, 1], indexing="ij")
        self._uc_grid_shape = AA.shape
        self._fcoords = np.vstack([AA.flatten(), BB.flatten(), CC.flatten()]).T
        self._images = np.vstack([IMA.flatten(), IMB.flatten(), IMC.flatten()]).T
def _setup_grids ( self ) : aa = np . linspace ( 0 , 1 , len ( self . base_aeccar . get_axis_grid ( 0 ) ) , endpoint = False ) bb = np . linspace ( 0 , 1 , len ( self . base_aeccar . get_axis_grid ( 1 ) ) , endpoint = False ) cc = np . linspace ( 0 , 1 , len ( self . base_aeccar . get_axis_grid ( 2 ) ) , endpoint = False ) aa , bb , dd = map ( _shift_grid , [ aa , bb , cc ] ) AA , BB , CC = np . meshgrid ( aa , bb , cc , indexing = "ij" ) IMA , IMB , IMC = np . meshgrid ( [ - 1 , 0 , 1 ] , [ - 1 , 0 , 1 ] , [ - 1 , 0 , 1 ] , indexing = "ij" ) self . _uc_grid_shape = AA . shape self . _fcoords = np . vstack ( [ AA . flatten ( ) , BB . flatten ( ) , CC . flatten ( ) ] ) . T self . _images = np . vstack ( [ IMA . flatten ( ) , IMB . flatten ( ) , IMC . flatten ( ) ] ) . T
Populate the internal varialbes used for defining the grid points in the charge density analysis
Populate the internal varialbes used for defining the grid points in the charge density analysis
"""Populate the internal varialbes used for defining the grid points in the charge density analysis""" # set up the grid # move the grid points to the center # mesh grid for each unit cell # should be using a mesh grid of 5x5x5 (using 3x3x3 misses some fringe cases) # but using 3x3x3 is much faster and only crops the cyliners in some rare case # if you keep the tube_radius small then this is not a big deal # store these
self