def test_dRPA(self): td = rks.dRPA(mf_lda) td._scf.xc = '' es = td.kernel(nstates=5)[0] self.assertAlmostEqual(lib.fp(es[:3]), 0.32727702719009616, 6) ref = [10.00343861, 10.00343861, 15.62586305, 30.69238874, 30.69238874] self.assertAlmostEqual(abs(es * 27.2114 - ref).max(), 0, 6)
def dRPA(mf): if isinstance(mf, scf.uhf.UHF): return uks.dRPA(mf) else: return rks.dRPA(mf)
def test_dRPA(self): td = rks.dRPA(mf_lda) td._scf.xc = '' es = td.kernel(nstates=3)[0] self.assertAlmostEqual(lib.fp(es), 0.32727702719009616, 6)