Example #1
0
    def test_iter_sd(self):
        """CCSD iterations."""
        ampl, e2 = kernel(self.eris, equations_sd, ("t1", "t2"))

        testing.assert_allclose(e2, self.ccsd.e_corr)
        testing.assert_allclose(ampl["t1"], self.ccsd.t1, atol=1e-8)
        testing.assert_allclose(ampl["t2"], self.ccsd.t2, atol=1e-8)
Example #2
0
    def test_iter_s(self):
        """CCS iterations."""
        ampl, e1 = kernel(self.eris, equations_s, ("t1", ))

        testing.assert_allclose(e1, 0, atol=1e-8)
        # TODO: atol=1e-8 does not work
        testing.assert_allclose(ampl["t1"], 0, atol=1e-6)
Example #3
0
 def test_iter_s(self):
     """CCS iterations."""
     ampl, e1 = kernel(self.eris, equations_s, ("t1", ), tolerance=1e-6)
     # TODO: MRCC energy is way off expected
     testing.assert_allclose(self.mf.e_tot + e1,
                             -74.841686696943,
                             atol=1e-4)
Example #4
0
    def test_iter_sdt(self):
        """CCSDT iterations (there are no triple excitations for a 2-electron system)."""
        ampl, e3 = kernel(self.eris, equations_sdt, ("t1", "t2", "t3"))

        testing.assert_allclose(e3, self.ccsd.e_corr, atol=1e-8)
        testing.assert_allclose(ampl["t1"], self.ccsd.t1, atol=1e-8)
        testing.assert_allclose(ampl["t2"], self.ccsd.t2, atol=1e-8)
        testing.assert_allclose(ampl["t3"], 0, atol=1e-8)
Example #5
0
 def test_iter_sdt(self):
     """CCSDT iterations."""
     ampl, e3 = kernel(self.eris,
                       equations_sdt, ("t1", "t2", "t3"),
                       tolerance=1e-6)
     testing.assert_allclose(self.mf.e_tot + e3,
                             -76.189327633478,
                             atol=1e-4)
Example #6
0
 def test_iter_sd(self):
     """CCSD iterations."""
     ampl, e2 = kernel(self.eris,
                       equations_sd, ("t1", "t2"),
                       tolerance=1e-6)
     testing.assert_allclose(self.mf.e_tot + e2,
                             -76.185805898396,
                             atol=1e-4)