def test_h2(self): bfs = basisset(h2,'6-31g**') solver=rhf(h2,bfs) solver.converge() nvirt = len(bfs)-h2.nocc() emp2 = mp2(solver.i2,solver.orbs,solver.orbe,h2.nocc(),len(bfs)-h2.nocc()) self.assertAlmostEqual(emp2,-0.02632654197486595) return
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() emp2 = mp2(hamiltonian, iterator.orbs, iterator.orbe, h2.nocc(), nvirt) self.assertAlmostEqual(emp2, -0.026304104341, 6)
def test_h2(self): bfs = basisset(h2, '6-31g**') solver = rhf(h2, bfs) solver.converge() nvirt = len(bfs) - h2.nocc() emp2 = mp2(solver.i2, solver.orbs, solver.orbe, h2.nocc(), len(bfs) - h2.nocc()) self.assertAlmostEqual(emp2, -0.02632654197486595) return
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)