Esempio n. 1
0
    def test_dTDA(self):
        td = rks.dTDA(mf_lda)
        td._scf.xc = ''
        es = td.kernel(nstates=3)[0]
        self.assertAlmostEqual(lib.fp(es), 0.3237948650800024, 6)

        td = rks.dTDA(mf_lda)
        es = td.kernel(nstates=3)[0]
        self.assertAlmostEqual(lib.fp(es), 0.3237948650800024, 6)
Esempio n. 2
0
    def test_dTDA(self):
        td = rks.dTDA(mf_lda)
        td._scf.xc = ''
        es = td.kernel(nstates=3)[0]
        self.assertAlmostEqual(lib.fp(es), 0.3237948650800024, 6)

        td = rks.dTDA(mf_lda)
        es = td.kernel(nstates=5)[0]
        self.assertAlmostEqual(lib.fp(es[:3]), 0.3237948650800024, 6)
        ref = [10.05245288, 10.05245288, 16.03497655, 30.7120363,  30.7120363 ]
        self.assertAlmostEqual(abs(es * 27.2114 - ref).max(), 0, 6)
Esempio n. 3
0
def dTDA(mf):
    if isinstance(mf, scf.uhf.UHF):
        return uks.dTDA(mf)
    else:
        return rks.dTDA(mf)