@@ -25,7 +25,7 @@ def test_d4_unknown_xc():
25
25
26
26
def test_d4_energy ():
27
27
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 ' )
29
29
out = model .get_dispersion ()
30
30
assert abs (out ['energy' ] - - 2.21334459527e-05 ) < 1e-10
31
31
@@ -39,7 +39,7 @@ def test_d4_gradients():
39
39
40
40
def test_d4_with_pbc ():
41
41
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 ' )
43
43
out = model .get_dispersion ()
44
44
assert abs (out ['energy' ] - - 0.002715970438476524 ) < 1e-10
45
45
@@ -48,22 +48,22 @@ def test_d4s_energy():
48
48
'''
49
49
mol = pyscf .M (
50
50
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
67
67
"""
68
68
)
69
69
model = DFTD4Dispersion (mol , xc = "TPSS" , version = "d4s" )
@@ -95,7 +95,7 @@ def test_d4s_gradient():
95
95
spin = 1
96
96
)
97
97
ref = np .array (
98
- [
98
+ [
99
99
[- 1.04361222e-04 , - 1.65054791e-04 , - 1.36662175e-04 ],
100
100
[- 1.41500522e-03 , + 1.89282651e-04 , + 2.16639105e-04 ],
101
101
[- 1.18067839e-04 , + 4.50543787e-04 , + 1.50087553e-03 ],
@@ -118,4 +118,3 @@ def test_d4s_gradient():
118
118
model = DFTD4Dispersion (mol , xc = "BLYP" , version = "d4s" )
119
119
out = model .get_dispersion ()
120
120
assert np .linalg .norm (out ['energy' ] - ref ) < 1.0e-7
121
-
0 commit comments