Skip to content

Commit fb77fd8

Browse files
committed
skip dftd3 for py3.12 & skip wb97x-d3
1 parent e69beaf commit fb77fd8

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

pyscf/dft/dft_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def parse_dft(dft_method):
5555

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

6060
if method_lower.endswith('-3c'):
6161
raise NotImplementedError('*-3c methods are not supported yet.')

pyscf/dft/test/test_h2o.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ def test_nr_uks_vv10_high_cost(self):
501501
method.nlcgrids.atom_grid = {"H": (40, 110), "O": (40, 110),}
502502
self.assertAlmostEqual(method.scf(), -76.352381513158718, 8)
503503

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

513-
method = dft.RKS(h2o, xc='wb97x-d3')
514-
e_disp = dispersion.get_dispersion(method)
515-
self.assertAlmostEqual(e_disp, -1.2566116169235249e-06, 9)
516-
assert method._numint.libxc.is_nlc(method.xc) == False
517-
fn_facs = method._numint.libxc.parse_xc(method.xc)
518-
assert fn_facs[1][0][0] == 399
519-
520514
method = dft.RKS(h2o, xc='wb97x-d3bj')
521515
e_disp = dispersion.get_dispersion(method)
522516
self.assertAlmostEqual(e_disp, -0.0005697890844546384, 9)

0 commit comments

Comments
 (0)