Skip to content

Commit

Permalink
Set small_rho_cutoff in DM21 tests to match pyscf 2.0 behaviour.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 480303500
  • Loading branch information
jsspencer authored and diegolascasas committed Oct 12, 2022
1 parent a8dab39 commit a748a7c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def test_rks(self, functional, expected_energy):
mol.build()

mf = dft.RKS(mol)
mf.small_rho_cutoff = 1.e-20
mf._numint = ni
mf.run()
self.assertAlmostEqual(mf.e_tot, expected_energy, delta=2.e-4)
Expand Down Expand Up @@ -94,6 +95,7 @@ def test_uks(self, functional, expected_energy):
mol.build()

mf = dft.UKS(mol)
mf.small_rho_cutoff = 1.e-20
mf._numint = ni
mf.run()
self.assertAlmostEqual(mf.e_tot, expected_energy, delta=2.e-4)
Expand All @@ -108,6 +110,7 @@ def test_exported_model(self):

ni = neural_numint.NeuralNumInt(neural_numint.Functional.DM21)
mf = dft.UKS(mol)
mf.small_rho_cutoff = 1.e-20
mf._numint = ni
mf.run()

Expand Down

0 comments on commit a748a7c

Please sign in to comment.