From c2cd2acc2a64b2a8dcd3e5d578993a0236e38a08 Mon Sep 17 00:00:00 2001 From: Qiming Sun Date: Tue, 10 Oct 2023 16:35:35 -0700 Subject: [PATCH] Restore tests --- pyscf/pbc/tdscf/test/test_rks.py | 14 +++++++------- pyscf/pbc/tdscf/test/test_uks.py | 6 ++---- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/pyscf/pbc/tdscf/test/test_rks.py b/pyscf/pbc/tdscf/test/test_rks.py index cf97ea6dbb..674649e208 100644 --- a/pyscf/pbc/tdscf/test/test_rks.py +++ b/pyscf/pbc/tdscf/test/test_rks.py @@ -58,15 +58,15 @@ def kernel(self, TD, ref, **kwargs): self.assertAlmostEqual(abs(td.e[:self.nstates_test] * unitev - ref).max(), 0, 4) def test_tda_singlet(self): - ref = [9.33545109, 9.33545109] + ref = [9.2625251659, 9.2625251659] self.kernel('TDA', ref) def test_tda_triplet(self): - ref = [5.14726236, 5.14726236] + ref = [4.8364248190, 4.8364248190] self.kernel('TDA', ref, singlet=False) def test_tddft_singlet(self): - ref = [8.87735129, 8.87735129] + ref = [8.8773512896, 8.8773512896] self.kernel('TDDFT', ref) def test_tddft_triplet(self): @@ -226,19 +226,19 @@ def kernel(self, TD, ref, **kwargs): self.assertAlmostEqual(abs(td.e[:self.nstates_test] * unitev - ref).max(), 0, 4) def test_tda_singlet(self): - ref = [9.62238067, 9.62238067] + ref = [9.6202884134, 9.6202884134] self.kernel('TDA', ref) def test_tda_triplet(self): - ref = [5.39995144, 5.39995144] + ref = [5.1659937745, 5.1659937745] self.kernel('TDA', ref, singlet=False) def test_tddft_singlet(self): - ref = [9.260114, 9.260114] + ref = [9.2585491075, 9.2585491075] self.kernel('TDDFT', ref) def test_tddft_triplet(self): - ref = [4.68905023, 4.8143958 ] + ref = [4.5570089807, 4.5570089807] self.kernel('TDDFT', ref, singlet=False) diff --git a/pyscf/pbc/tdscf/test/test_uks.py b/pyscf/pbc/tdscf/test/test_uks.py index ff844dc682..19caa353d4 100644 --- a/pyscf/pbc/tdscf/test/test_uks.py +++ b/pyscf/pbc/tdscf/test/test_uks.py @@ -56,11 +56,10 @@ def tearDownClass(cls): def kernel(self, TD, ref, **kwargs): td = getattr(self.mf, TD)().set(nstates=self.nstates, **kwargs).run() - print(td.e[:self.nstates_test] * unitev) self.assertAlmostEqual(abs(td.e[:self.nstates_test] * unitev - ref).max(), 0, 4) def test_tda(self): - ref = [4.77090949, 4.77090949] + ref = [4.8137763755, 4.8137763755] self.kernel('TDA', ref) def test_tdhf(self): @@ -159,11 +158,10 @@ def tearDownClass(cls): def kernel(self, TD, ref, **kwargs): td = getattr(self.mf, TD)().set(nstates=self.nstates, **kwargs).run() - print(td.e[:self.nstates_test] * unitev) self.assertAlmostEqual(abs(td.e[:self.nstates_test] * unitev - ref).max(), 0, 4) def test_tda(self): - ref = [5.10697989, 5.10697989] + ref = [5.1435121896, 5.1435121896] self.kernel('TDA', ref) def test_tdhf(self):