Skip to content

Commit

Permalink
skip dftd3 for py3.12 & skip wb97x-d3
Browse files Browse the repository at this point in the history
  • Loading branch information
wxj6000 committed Mar 13, 2024
1 parent e69beaf commit fb77fd8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pyscf/dft/dft_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def parse_dft(dft_method):

# J. Chem. Theory Comput. 2013, 9, 1, 263–272
if method_lower in ['wb97x-d3']:
return NotADirectoryError('wb97x-d3 is not supported yet.')
raise NotImplementedError('wb97x-d3 is not supported yet.')

if method_lower.endswith('-3c'):
raise NotImplementedError('*-3c methods are not supported yet.')
Expand Down
8 changes: 1 addition & 7 deletions pyscf/dft/test/test_h2o.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ def test_nr_uks_vv10_high_cost(self):
method.nlcgrids.atom_grid = {"H": (40, 110), "O": (40, 110),}
self.assertAlmostEqual(method.scf(), -76.352381513158718, 8)

@unittest.skipIf('dftd3' not in sys.modules, "requires the dftd3 library")
def test_dft_parser(self):
from pyscf.scf import dispersion
method = dft.RKS(h2o, xc='wb97m-d3bj')
Expand All @@ -510,13 +511,6 @@ def test_dft_parser(self):
fn_facs = method._numint.libxc.parse_xc(method.xc)
assert fn_facs[1][0][0] == 531

method = dft.RKS(h2o, xc='wb97x-d3')
e_disp = dispersion.get_dispersion(method)
self.assertAlmostEqual(e_disp, -1.2566116169235249e-06, 9)
assert method._numint.libxc.is_nlc(method.xc) == False
fn_facs = method._numint.libxc.parse_xc(method.xc)
assert fn_facs[1][0][0] == 399

method = dft.RKS(h2o, xc='wb97x-d3bj')
e_disp = dispersion.get_dispersion(method)
self.assertAlmostEqual(e_disp, -0.0005697890844546384, 9)
Expand Down

0 comments on commit fb77fd8

Please sign in to comment.