def __init__(self, mol): pyscf.scf.hf.RHF.__init__(self, mol) self._ecoul = 0 self._exc = 0 self.xc = 'LDA,VWN' self.grids = gen_grid.Grids(mol) self._numint = numint._NumInt() self._keys = self._keys.union(['xc', 'grids'])
def __init__(self, mol): pyscf.scf.uhf_symm.UHF.__init__(self, mol) self._ecoul = 0 self._exc = 0 self.xc = "LDA,VWN" self.grids = gen_grid.Grids(mol) self._numint = numint._NumInt() self._keys = self._keys.union(["xc", "grids"])
def _dft_common_init_(mf): mf.xc = 'LDA,VWN' mf.grids = gen_grid.Grids(mf.mol) mf.small_rho_cutoff = 1e-7 # Use rho to filter grids ################################################## # don't modify the following attributes, they are not input options mf._numint = numint._NumInt() mf._keys = mf._keys.union(['xc', 'grids', 'small_rho_cutoff'])
def __init__(self, mol): pyscf.scf.hf.RHF.__init__(self, mol) self.xc = 'LDA,VWN' self.grids = gen_grid.Grids(mol) ################################################## # don't modify the following attributes, they are not input options self._ecoul = 0 self._exc = 0 self._numint = numint._NumInt() self._keys = self._keys.union(['xc', 'grids'])
def _dft_common_init_(mf): mf.xc = 'LDA,VWN' mf.grids = gen_grid.Grids(mf.mol) mf.small_rho_cutoff = 1e-7 # Use rho to filter grids ################################################## # don't modify the following attributes, they are not input options mf._ecoul = 0 mf._exc = 0 mf._numint = numint._NumInt() mf._keys = mf._keys.union(['xc', 'grids', 'small_rho_cutoff'])
# example, PBE0 is not supported by the default XC library (libxc) in the TDDFT # calculation. Changing to xcfun library for TDDFT can solve this problem # mf._numint.libxc = dft.xcfun td = tddft.TDDFT(mf) print(td.kernel()[0] * 27.2114) # # Overwriting the relevant attributes of the ground state mf object, # the TDDFT calculations can be run with different XC, grids. # mf.xc = 'lda,vwn' mf.grids.set(level=2).kernel(with_non0tab=True) td = tddft.TDDFT(mf) print(td.kernel()[0] * 27.2114) # # Overwriting the ground state SCF object is unsafe. A better solution is to # create a new fake SCF object to hold different XC, grids parameters. # from pyscf.dft import numint mf = dft.RKS(mol).run(xc='pbe0') mf1 = copy.copy(mf) mf1.xc = 'lda,vwn' mf1.grids = dft.Grids(mol) mf1.grids.level = 2 mf1._numint = numint._NumInt() mf1._numint.libxc = dft.xcfun td = tddft.TDDFT(mf1) print(td.kernel()[0] * 27.2114)