Exemple #1
0
    def test_tdhf_gamma_point(self):
        mf = RHF(cell).run()
        td_model = tdscf.TDHF(mf)
        td_model.kernel()
        e1 = td_model.e

        kmf = KRHF(cell, cell.make_kpts([1, 1, 1])).run()
        td_model = tdscf.KTDHF(kmf)
        td_model.kernel()
        e2 = td_model.e
        self.assertAlmostEqual(abs(e1-e2).max(), 0, 6)
        self.assertAlmostEqual(abs(e1 - 1.0301736485136344).max(), 0, 6)
Exemple #2
0
    def test_tdhf_gamma_point(self):
        mf = RHF(cell).run()
        td_model = tdscf.TDHF(mf)
        td_model.conv_tol = 1e-4
        td_model.kernel()
        e1 = td_model.e

        kmf = KRHF(cell, cell.make_kpts([1, 1, 1])).run()
        td_model = tdscf.KTDHF(kmf)
        td_model.conv_tol = 1e-4
        td_model.kernel()
        e2 = td_model.e
        self.assertAlmostEqual(abs(e1 - e2).max(), 0, 4)
        self.assertAlmostEqual(lib.finger(e1), 1.1580752883710259, 5)
Exemple #3
0
    def test_tdhf_gamma_point(self):
        mf = RHF(cell).run()
        mf.exxdiv = None
        td_model = tdscf.TDHF(mf)
        td_model.conv_tol = 1e-4
        td_model.kernel()
        e1 = td_model.e

        kmf = KRHF(cell, cell.make_kpts([1, 1, 1])).run()
        kmf.exxdiv = None
        td_model = tdscf.KTDHF(kmf)
        td_model.conv_tol = 1e-4
        td_model.kernel()
        e2 = td_model.e
        self.assertAlmostEqual(abs(e1 - e2).max(), 0, 4)