Beispiel #1
0
    def build(self, cell=None):
        if cell == None: cell = self.cell

        self.coords = gen_uniform_grids(self.cell, self.gs)
        self.weights = np.empty(self.coords.shape[0])
        self.weights[:] = cell.vol/self.weights.shape[0]

        return self.coords, self.weights
Beispiel #2
0
    def build(self, cell=None, with_non0tab=False):
        if cell == None: cell = self.cell

        self.coords = gen_uniform_grids(self.cell, self.gs)
        self.weights = np.empty(self.coords.shape[0])
        self.weights[:] = cell.vol / self.weights.shape[0]

        if with_non0tab:
            self.non0tab = self.make_mask(cell, self.coords)
        return self.coords, self.weights
Beispiel #3
0
        mf.__dict__.update(lib.chkfile.load(chkfile_fname, 'scf'))
    else:
        mf.kernel()
    # end if

    # grid density for molecular orbital
    mydgs = 16
    dgs = np.array([mydgs] * 3)
    moR_fname = 'gs%d_' % mydgs + moR_fname
    # run or load moR
    if os.path.isfile(moR_fname):
        moR = np.loadtxt(moR_fname)
    else:
        from pyscf.pbc.gto.cell import gen_uniform_grids
        from pyscf.pbc.dft.numint import eval_ao
        coords = gen_uniform_grids(cell, gs=dgs)
        aoR = eval_ao(cell, coords)
        moR = np.dot(aoR, mf.mo_coeff)
        np.savetxt(moR_fname, moR)
    # end if

    mo_to_plot = [0, 1, 3, 4]
    from qharv.inspect import volumetric
    from skimage import measure
    for iorb in mo_to_plot:

        val = moR[:, iorb].reshape(2 * dgs + 1)
        fval = volumetric.spline_volumetric(val)
        grid = volumetric.axes_func_on_grid3d(axes, fval, grid_shape)

        myup = default_up