Skip to content

Commit 59c0717

Browse files
committed
wb97x
1 parent fbb1a2f commit 59c0717

File tree

1 file changed

+19
-20
lines changed

1 file changed

+19
-20
lines changed

pyscf/dispersion/tests/test_d4.py

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def test_d4_unknown_xc():
2525

2626
def test_d4_energy():
2727
mol = pyscf.M(atom='H 0 0 0; H 0 0 1')
28-
model = DFTD4Dispersion(mol, xc='WB97X')
28+
model = DFTD4Dispersion(mol, xc='WB97X-2008')
2929
out = model.get_dispersion()
3030
assert abs(out['energy'] - -2.21334459527e-05) < 1e-10
3131

@@ -39,7 +39,7 @@ def test_d4_gradients():
3939

4040
def test_d4_with_pbc():
4141
mol = pyscf.M(atom='H 0 0 0; H 0 0 1', a=np.eye(3)*2)
42-
model = DFTD4Dispersion(mol, xc='WB97X')
42+
model = DFTD4Dispersion(mol, xc='WB97X-2008')
4343
out = model.get_dispersion()
4444
assert abs(out['energy'] - -0.002715970438476524) < 1e-10
4545

@@ -48,22 +48,22 @@ def test_d4s_energy():
4848
'''
4949
mol = pyscf.M(
5050
atom="""
51-
Na -1.855282634 3.586705153 -2.417637293
52-
H 4.401780235 0.023388444 -4.954577493
53-
O -2.987060334 4.762520654 1.270433015
54-
H 0.799808860 1.411034556 -5.046553216
55-
F -4.206474694 1.842757675 4.550380848
56-
H -3.543561218 -3.188356651 1.462400217
57-
H 2.700321601 1.068184525 -1.732346503
58-
O 3.731140888 -2.070015433 2.231609376
59-
N -1.753068192 0.359514171 1.053234061
60-
H 5.417557885 -1.578818300 1.753940027
61-
H -2.234628682 -2.138565050 4.109222857
62-
Cl 1.015658662 -3.219521545 -3.360509630
63-
B 2.421192557 0.266264350 -3.918624743
64-
B -3.025260988 2.536678890 2.316649847
65-
N -2.004389486 -2.292351369 2.197828073
66-
Al 1.122265541 -1.369420070 0.484550554
51+
Na -1.855282634 3.586705153 -2.417637293
52+
H 4.401780235 0.023388444 -4.954577493
53+
O -2.987060334 4.762520654 1.270433015
54+
H 0.799808860 1.411034556 -5.046553216
55+
F -4.206474694 1.842757675 4.550380848
56+
H -3.543561218 -3.188356651 1.462400217
57+
H 2.700321601 1.068184525 -1.732346503
58+
O 3.731140888 -2.070015433 2.231609376
59+
N -1.753068192 0.359514171 1.053234061
60+
H 5.417557885 -1.578818300 1.753940027
61+
H -2.234628682 -2.138565050 4.109222857
62+
Cl 1.015658662 -3.219521545 -3.360509630
63+
B 2.421192557 0.266264350 -3.918624743
64+
B -3.025260988 2.536678890 2.316649847
65+
N -2.004389486 -2.292351369 2.197828073
66+
Al 1.122265541 -1.369420070 0.484550554
6767
"""
6868
)
6969
model = DFTD4Dispersion(mol, xc="TPSS", version="d4s")
@@ -95,7 +95,7 @@ def test_d4s_gradient():
9595
spin=1
9696
)
9797
ref = np.array(
98-
[
98+
[
9999
[-1.04361222e-04, -1.65054791e-04, -1.36662175e-04],
100100
[-1.41500522e-03, +1.89282651e-04, +2.16639105e-04],
101101
[-1.18067839e-04, +4.50543787e-04, +1.50087553e-03],
@@ -118,4 +118,3 @@ def test_d4s_gradient():
118118
model = DFTD4Dispersion(mol, xc="BLYP", version="d4s")
119119
out = model.get_dispersion()
120120
assert np.linalg.norm(out['energy'] - ref) < 1.0e-7
121-

0 commit comments

Comments
 (0)