Skip to content

Commit

Permalink
Adjust benchmark tests to query for melting point
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Feb 5, 2024
1 parent 2a528c3 commit a50ea1d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test_benchmarks/atomistics/structure/test_atoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ def test_cached_speed(self):
element.cache_clear()
PeriodicTable._get_periodic_table_df.cache_clear()
t1[i] = time.perf_counter()
Atoms(symbols="Al", positions=pos, cell=cell)
Atoms(symbols="Al", positions=pos, cell=cell).species[0].melting_point
t2[i] = time.perf_counter()
Atoms(symbols="Al", positions=pos, cell=cell)
Atoms(symbols="Al", positions=pos, cell=cell).species[0].melting_point
t3[i] = time.perf_counter()
Atoms(symbols="Cu", positions=pos, cell=cell)
Atoms(symbols="Cu", positions=pos, cell=cell).species[0].melting_point
t4[i] = time.perf_counter()
Atoms(symbols="CuAl", positions=[[0., 0., 0.], [0.5, 0.5, 0.5]], cell=cell)
Atoms(symbols="CuAl", positions=[[0., 0., 0.], [0.5, 0.5, 0.5]], cell=cell).species[0].melting_point
t5[i] = time.perf_counter()
Atoms(symbols="MgO", positions=[[0., 0., 0.], [0.5, 0.5, 0.5]], cell=cell)
Atoms(symbols="MgO", positions=[[0., 0., 0.], [0.5, 0.5, 0.5]], cell=cell).species[0].melting_point
t6[i] = time.perf_counter()
Atoms(symbols="AlMgO", positions=[[0., 0., 0.], [0.5, 0.5, 0.5], [0.5, 0.5, 0.]], cell=cell)
Atoms(symbols="AlMgO", positions=[[0., 0., 0.], [0.5, 0.5, 0.5], [0.5, 0.5, 0.]], cell=cell).species[0].melting_point
t7[i] = time.perf_counter()
dt21 = np.mean(t2 - t1)
dt32 = np.mean(t3 - t2)
Expand Down

0 comments on commit a50ea1d

Please sign in to comment.