def test_CH4(self): bfs = basisset(ch4,'cc-pvdz') hamiltonian = rhf(bfs, twoe_factory=libint_twoe_integrals) iterator = SCFIterator(hamiltonian) iterator.converge() self.assertTrue(iterator.converged) nvirt = len(bfs)-ch4.nocc() eccsd = ccsd(hamiltonian, iterator.orbs, iterator.orbe, ch4.nocc(), nvirt) self.assertAlmostEqual(eccsd, -0.189626419684193, 7)
def test_H2(self): bfs = basisset(h2,'cc-pvdz') hamiltonian = rhf(bfs, twoe_factory=libint_twoe_integrals) iterator = SCFIterator(hamiltonian) iterator.converge() self.assertTrue(iterator.converged) nvirt = len(bfs)-h2.nocc() eccsd = ccsd(hamiltonian, iterator.orbs, iterator.orbe, h2.nocc(), nvirt) self.assertAlmostEqual(eccsd, -0.034544318453406, 8)
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)