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)
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)