From a50ea1d2c737db3dc7997a2311945596e9cb44d2 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Mon, 5 Feb 2024 18:30:56 +0100 Subject: [PATCH] Adjust benchmark tests to query for melting point --- test_benchmarks/atomistics/structure/test_atoms.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test_benchmarks/atomistics/structure/test_atoms.py b/test_benchmarks/atomistics/structure/test_atoms.py index 4dd99d956..3034ab62c 100644 --- a/test_benchmarks/atomistics/structure/test_atoms.py +++ b/test_benchmarks/atomistics/structure/test_atoms.py @@ -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)