Skip to content

Commit

Permalink
Adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sunqm committed Jun 21, 2024
1 parent 58ab5b6 commit 84a6160
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pyscf/hessian/test/test_uks.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ def test_finite_diff_b3lyp_hess(self):
mf.conv_tol = 1e-14
mf.xc = 'b3lyp5'
e0 = mf.kernel()
mf.conv_tol_cpscf = 1e-9
hess = mf.Hessian().kernel()
self.assertAlmostEqual(lib.fp(hess), -0.8208641727673912, 6)
self.assertAlmostEqual(lib.fp(hess), -0.8208641727673912, 5)

g_scanner = mf.nuc_grad_method().as_scanner()
pmol = mol.copy()
Expand Down
4 changes: 2 additions & 2 deletions pyscf/lib/test/test_linalg_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,15 @@ def test_krylov_multiple_roots(self):
ref = numpy.linalg.solve(numpy.eye(n) + a, b.T).T

aop = lambda x: x.dot(a.T)
c = linalg_helper.krylov(aop, b)
c = linalg_helper.krylov(aop, b, lindep=1e-14)
self.assertAlmostEqual(abs(ref - c).max(), 0, 7)

a = numpy.random.rand(n,n) * .1 + numpy.random.rand(n,n) * .1j
b = numpy.random.rand(4, n) + numpy.random.rand(4, n) * .5j
ref = numpy.linalg.solve(numpy.eye(n) + a, b.T).T

aop = lambda x: x.dot(a.T)
c = linalg_helper.krylov(aop, b)
c = linalg_helper.krylov(aop, b, lindep=1e-14)
self.assertAlmostEqual(abs(ref - c).max(), 0, 7)

def test_dgeev(self):
Expand Down

0 comments on commit 84a6160

Please sign in to comment.