Beispiel #1
0
def TDA(mf):
    if isinstance(mf, scf.uhf.UHF):
        mf = scf.addons.convert_to_uhf(mf)
        if getattr(mf, 'xc', None):
            return uks.TDA(mf)
        else:
            return uhf.TDA(mf)
    else:
        mf = scf.addons.convert_to_rhf(mf)
        if getattr(mf, 'xc', None):
            return rks.TDA(mf)
        else:
            return rhf.TDA(mf)
Beispiel #2
0
def TDA(mf):
    if isinstance(mf, scf.uhf.UHF):
        mf = scf.addons.convert_to_uhf(mf)
        if isinstance(mf, dft.rks.KohnShamDFT):
            return uks.TDA(mf)
        else:
            return uhf.TDA(mf)
    else:
        mf = scf.addons.convert_to_rhf(mf)
        if isinstance(mf, dft.rks.KohnShamDFT):
            return rks.TDA(mf)
        else:
            return rhf.TDA(mf)