Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sunqm committed Oct 16, 2023
1 parent e548e9f commit b0bd69d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pyscf/pbc/scf/test/test_hf.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,11 @@ def test_rhf_0d(self):
[0, (1.0, 1.0)],
[0, (1.2, 1.0)]]})
mol = cell.to_mol()
mf = scf.RHF(mol).run()
mf = mol.RHF().run()
eref = mf.kernel()

mf = cell.RHF()
mf.with_df = df.AFTDF(cell)
mf.with_df = pdf.AFTDF(cell)
e1 = mf.kernel()
self.assertAlmostEqual(eref, -4.165713858819728, 8)
self.assertAlmostEqual(e1, eref, 4)
Expand All @@ -295,12 +295,12 @@ def test_rhf_0d(self):
cell.a = numpy.eye(3)
cell.dimension = 0
cell.build()
mf = pbcscf.RHF(cell)
mf.with_df = df.AFTDF(cell)
mf = pscf.RHF(cell)
mf.with_df = pdf.AFTDF(cell)
mf.run()

mol = cell.to_mol()
mf1 = scf.RHF(mol).run()
mf1 = mol.RHF().run()
self.assertAlmostEqual(mf1.e_tot, -5.66198034773817, 8)
self.assertAlmostEqual(mf1.e_tot, mf.e_tot, 4)

Expand Down
1 change: 1 addition & 0 deletions pyscf/scf/test/test_addons.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ def test_rohf_smearing(self):
myhf_s = addons.smearing_(myhf_s, sigma=0.01, method='fermi', fix_spin=True)
myhf_s.sigma = 0.1
myhf_s.fix_spin = False
myhf_s.conv_tol = 1e-7
myhf_s.kernel()
self.assertAlmostEqual(myhf_s.e_tot, -243.086989253, 5)
self.assertAlmostEqual(myhf_s.entropy, 17.11431, 4)
Expand Down

0 comments on commit b0bd69d

Please sign in to comment.