Example #1
0
def KTDHF(mf):
    from pyscf.pbc import scf
    if getattr(mf, 'xc', None):
        raise RuntimeError('TDHF does not support DFT object %s' % mf)
    if isinstance(mf, scf.uhf.UHF):
        return kuhf.TDHF(mf)
    else:
        return krhf.TDHF(mf)
Example #2
0
def KTDHF(mf):
    from pyscf.pbc import scf
    if isinstance(mf, scf.hf.KohnShamDFT):
        raise RuntimeError('TDHF does not support DFT object %s' % mf)
    if isinstance(mf, scf.uhf.UHF):
        return kuhf.TDHF(mf)
    else:
        return krhf.TDHF(mf)
Example #3
0
def KTDDFT(mf):
    from pyscf.pbc import scf
    if isinstance(mf, scf.uhf.UHF):
        if isinstance(mf, scf.hf.KohnShamDFT):
            return kuks.tddft(mf)
        else:
            return kuhf.TDHF(mf)
    else:
        if isinstance(mf, scf.hf.KohnShamDFT):
            return krks.tddft(mf)
        else:
            return krhf.TDHF(mf)
Example #4
0
def KTDDFT(mf):
    from pyscf.pbc import scf
    if isinstance(mf, scf.uhf.UHF):
        if getattr(mf, 'xc', None):
            return kuks.tddft(mf)
        else:
            return kuhf.TDHF(mf)
    else:
        if getattr(mf, 'xc', None):
            return krks.tddft(mf)
        else:
            return krhf.TDHF(mf)
Example #5
0
def KTDDFT(mf):
    from pyscf.pbc import scf
    if isinstance(mf, scf.uhf.UHF):
        if getattr(mf, 'xc', None):
            if mf._numint.libxc.is_hybrid_xc(mf.xc):
                return kuks.TDDFT(mf)
            else:
                return kuks.TDDFTNoHybrid(mf)
        else:
            return kuhf.TDHF(mf)
    else:
        if getattr(mf, 'xc', None):
            if mf._numint.libxc.is_hybrid_xc(mf.xc):
                return krks.TDDFT(mf)
            else:
                return krks.TDDFTNoHybrid(mf)
        else:
            return krhf.TDHF(mf)