Skip to content

Commit

Permalink
disable wb97x-d3, wb97x-d
Browse files Browse the repository at this point in the history
  • Loading branch information
wxj6000 committed Mar 11, 2024
1 parent 3657f67 commit e69beaf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions pyscf/dft/dft_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,14 @@ def parse_dft(dft_method):
xc = dft_method
disp = None

# special cases
# special cases:
# - wb97x-d is not supported yet
# - wb97*-d3bj is wb97*-v with d3bj
# - wb97x-d3 is not supported yet
# - 3c method is not supported yet

if method_lower == 'wb97x-d':
raise NotImplementedError('wb97x-d is not supported')
raise NotImplementedError('wb97x-d is not supported yet.')

if method_lower == 'wb97m-d3bj':
return 'wb97m-v', False, ('wb97m', 'd3bj', False)
Expand All @@ -49,8 +54,9 @@ def parse_dft(dft_method):
return 'wb97x-v', False, ('wb97x', 'd3bj', False)

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

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

Expand Down
2 changes: 1 addition & 1 deletion pyscf/dft/test/test_h2o.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ def test_dispersion(self):
mf.xc = 'B3LYP'
mf.disp = 'd3bj'
mf.run(xc='B3LYP')
self.assertAlmostEqual(mf.e_tot, -76.38945547396322, 9)
self.assertAlmostEqual(mf.e_tot, -76.38552043811778, 9)

def test_reset(self):
mf = dft.RKS(h2o).newton()
Expand Down

0 comments on commit e69beaf

Please sign in to comment.