@@ -30,6 +30,9 @@ def setup_test_environment(tmp_path):
30
30
def test_neb_ts_hess_irc_mace (setup_test_environment ):
31
31
reactant , product = setup_test_environment
32
32
calc_kwargs = {}
33
+ run_neb_kwargs = {
34
+ 'max_steps' : 2 ,
35
+ }
33
36
34
37
# Setup logging
35
38
logging .basicConfig (level = logging .INFO )
@@ -38,7 +41,13 @@ def test_neb_ts_hess_irc_mace(setup_test_environment):
38
41
settings = get_settings ()
39
42
settings .CHECK_CONVERGENCE = False
40
43
41
- jobs = neb_ts_hess_irc_mace (reactant , product , calc_kwargs , logger )
44
+ jobs = neb_ts_hess_irc_mace (
45
+ reactant ,
46
+ product ,
47
+ run_neb_kwargs ,
48
+ calc_kwargs ,
49
+ logger ,
50
+ )
42
51
43
52
# Assertions
44
53
assert len (jobs ) == 4
@@ -47,26 +56,26 @@ def test_neb_ts_hess_irc_mace(setup_test_environment):
47
56
print (jobs [0 ]['relax_reactant' ]['results' ]['forces' ][0 , 1 ])
48
57
print (jobs [0 ]['relax_product' ]['results' ]['energy' ])
49
58
print (jobs [0 ]['relax_product' ]['results' ]['forces' ][0 , 1 ])
50
- print (jobs [0 ]['neb_results' ]['highest_e_atoms' ].get_potential_energy ())
59
+ # print(jobs[0]['neb_results']['highest_e_atoms'].get_potential_energy())
51
60
print (jobs [1 ]['trajectory_results' ][- 1 ]['energy' ])
52
61
print (jobs [2 ]['trajectory_results' ][- 1 ]['energy' ])
53
62
print (jobs [3 ]['trajectory_results' ][- 1 ]['energy' ])
54
63
55
64
# Assertions
56
- assert jobs [0 ]['relax_reactant' ]['results' ]['energy' ] == pytest .approx (- 68.26889038085938 , 1e-6 )
57
- assert jobs [0 ]['relax_reactant' ]['results' ]['forces' ][0 , 1 ] == pytest .approx (0.0006616527098231 , 1e-2 )
65
+ assert jobs [0 ]['relax_reactant' ]['results' ]['energy' ] == pytest .approx (- 7400.1083984375 , 1e-6 )
66
+ assert jobs [0 ]['relax_reactant' ]['results' ]['forces' ][0 , 1 ] == pytest .approx (0.00045277923 , 1e-6 )
58
67
59
- assert jobs [0 ]['relax_product' ]['results' ]['energy' ] == pytest .approx (- 63.780540466308594 , 1e-6 )
60
- assert jobs [0 ]['relax_product' ]['results' ]['forces' ][0 , 1 ] == pytest .approx (- 0.0018400131957605481 , 1e-2 )
68
+ assert jobs [0 ]['relax_product' ]['results' ]['energy' ] == pytest .approx (- 7395.8291015625 , 1e-6 )
69
+ assert jobs [0 ]['relax_product' ]['results' ]['forces' ][0 , 1 ] == pytest .approx (- 0.0027254373 , 1e-6 )
61
70
62
71
# neb output
63
- assert jobs [0 ]['neb_results' ]['highest_e_atoms' ].get_potential_energy () == pytest .approx (- 61.5327682495 , 1e-6 )
72
+ assert jobs [0 ]['neb_results' ]['highest_e_atoms' ].positions [ 0 , 1 ] == pytest .approx (1.353789792701 , 1e-6 )
64
73
65
74
# transition state optimization output
66
- assert jobs [1 ]['trajectory_results' ][- 1 ]['energy' ] == pytest .approx (- 63.742549896240234 , 1e-6 )
75
+ assert jobs [1 ]['trajectory_results' ][- 1 ]['energy' ] == pytest .approx (- 7395.622784804016 , 1e-6 )
67
76
68
77
# IRC forward output
69
- assert jobs [2 ]['trajectory_results' ][- 1 ]['energy' ] == pytest .approx (- 67.372802734375 , 1e-6 )
78
+ assert jobs [2 ]['trajectory_results' ][- 1 ]['energy' ] == pytest .approx (- 7395.80938084513 , 1e-6 )
70
79
71
80
# IRC reverse output
72
- assert jobs [3 ]['trajectory_results' ][- 1 ]['energy' ] == pytest .approx (- 67.37286376953125 , 1e-6 )
81
+ assert jobs [3 ]['trajectory_results' ][- 1 ]['energy' ] == pytest .approx (- 7395.787710101755 , 1e-6 )
0 commit comments