def test_LiH(self): bfs = basisset(lih,'cc-pvdz') hamiltonian=rhf(bfs, twoe_factory=libint_twoe_integrals) iterator = SCFIterator(hamiltonian) iterator.converge() self.assertTrue(iterator.converged) nvirt = len(bfs)-lih.nocc() emp2 = mp2(hamiltonian, iterator.orbs, iterator.orbe, lih.nocc(), nvirt) self.assertAlmostEqual(emp2, -0.023948620832, 5)
def test_LiH(self): bfs = basisset(lih,'cc-pvdz') hamiltonian = rhf(bfs, twoe_factory=libint_twoe_integrals) iterator = SCFIterator(hamiltonian) iterator.converge() self.assertTrue(iterator.converged) nvirt = len(bfs)-lih.nocc() eccsd = ccsd(hamiltonian, iterator.orbs, iterator.orbe, lih.nocc(), nvirt) self.assertAlmostEqual(eccsd, -0.032399770519793, 7)