Skip to content

Commit

Permalink
add the small mol data
Browse files Browse the repository at this point in the history
  • Loading branch information
puzhichen committed Jan 22, 2025
1 parent 1bd9332 commit 3795787
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions gpu4pyscf/tests/test_benchmark_tddft.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ def run_rb3lyp_tda(atom, basis, with_df, with_solvent, disp=None):
def test_df_rb3lyp_tddft(benchmark):
e = benchmark(run_rb3lyp_tddft, small_mol, 'def2-tzvpp', True, False)
print('testing df rb3lyp tddft')
assert np.isclose(np.linalg.norm(e), 684.9998712035579, atol=1e-7, rtol=1e-16)
assert np.allclose([0.1652341, 0.19442237, 0.21143863, 0.21809428, 0.22871117], e)
@pytest.mark.benchmark(warmup=True, warmup_iterations=2, min_rounds=3)
def test_df_rb3lyp_tda(benchmark):
e = benchmark(run_rb3lyp_tda, small_mol, 'def2-tzvpp', True, False)
print('testing df rb3lyp tda')
assert np.isclose(np.linalg.norm(e), 684.9998712035579, atol=1e-7, rtol=1e-16)
assert np.allclose([0.16602878, 0.2008427, 0.21245292, 0.22157353, 0.2294365], e)


################
Expand All @@ -104,12 +104,12 @@ def test_df_rb3lyp_tda(benchmark):
def test_rb3lyp_tddft(benchmark):
e = benchmark(run_rb3lyp_tddft, small_mol, 'def2-tzvpp', False, False)
print('testing rb3lyp tddft')
assert np.isclose(np.linalg.norm(e), 684.999735850967, atol=1e-7, rtol=1e-16)
assert np.allclose([0.16523407, 0.19442038, 0.21143666, 0.21809283, 0.22870855], e)
@pytest.mark.benchmark(warmup=True, warmup_iterations=2, min_rounds=3)
def test_rb3lyp_tda(benchmark):
e = benchmark(run_rb3lyp_tda, small_mol, 'def2-tzvpp', False, False)
print('testing rb3lyp tda')
assert np.isclose(np.linalg.norm(e), 684.999735850967, atol=1e-7, rtol=1e-16)
assert np.allclose([0.16602873, 0.20084131, 0.21245116, 0.22157196, 0.2294339 ], e)


####################
Expand All @@ -119,23 +119,23 @@ def test_rb3lyp_tda(benchmark):
def test_df_rb3lyp_tddft_medium(benchmark):
e = benchmark(run_rb3lyp_tddft, medium_mol, 'def2-tzvpp', True, False)
print('testing df rb3lyp tddft medium')
assert np.isclose(np.linalg.norm(e), 684.9998712035579, atol=1e-7, rtol=1e-16)
assert np.allclose([0.1652341, 0.19442237, 0.21143863, 0.21809428, 0.22871117], e)
@pytest.mark.benchmark(warmup=True, warmup_iterations=2, min_rounds=3)
def test_df_rb3lyp_tda_medium(benchmark):
e = benchmark(run_rb3lyp_tda, medium_mol, 'def2-tzvpp', True, False)
print('testing df rb3lyp tda medium')
assert np.isclose(np.linalg.norm(e), 684.9998712035579, atol=1e-7, rtol=1e-16)
assert np.allclose([0.1652341, 0.19442237, 0.21143863, 0.21809428, 0.22871117], e)

@pytest.mark.benchmark(warmup=True, warmup_iterations=2, min_rounds=3)
def test_rb3lyp_tddft_medium(benchmark):
e = benchmark(run_rb3lyp_tddft, medium_mol, 'def2-tzvpp', False, False)
print('testing rb3lyp tddft medium')
assert np.isclose(np.linalg.norm(e), 684.999735850967, atol=1e-7, rtol=1e-16)
assert np.allclose([0.1652341, 0.19442237, 0.21143863, 0.21809428, 0.22871117], e)
@pytest.mark.benchmark(warmup=True, warmup_iterations=2, min_rounds=3)
def test_rb3lyp_tda_medium(benchmark):
e = benchmark(run_rb3lyp_tda, medium_mol, 'def2-tzvpp', False, False)
print('testing rb3lyp tda medium')
assert np.isclose(np.linalg.norm(e), 684.999735850967, atol=1e-7, rtol=1e-16)
assert np.allclose([0.1652341, 0.19442237, 0.21143863, 0.21809428, 0.22871117], e)



Expand All @@ -146,11 +146,11 @@ def test_rb3lyp_tda_medium(benchmark):
def test_df_rb3lyp_631gs_tddft(benchmark):
e = benchmark(run_rb3lyp_tddft, small_mol, '6-31gs', True, False)
print('testing df rb3lyp 631gs tddft')
assert np.isclose(np.linalg.norm(e), 684.6646008642876, atol=1e-7, rtol=1e-16)
assert np.allclose([0.16324444, 0.19561619, 0.20816938, 0.21759079, 0.22805259], e)
@pytest.mark.benchmark(warmup=True, warmup_iterations=2, min_rounds=3)
def test_df_rb3lyp_631gs_tda(benchmark):
g = benchmark(run_rb3lyp_tda, small_mol, '6-31gs', True, False)
e = benchmark(run_rb3lyp_tda, small_mol, '6-31gs', True, False)
print('testing df rb3lyp 631gs tda')
assert np.isclose(np.linalg.norm(g), 0.17530687343398219, atol=1e-5, rtol=1e-16)
assert np.allclose([0.16397102, 0.20123098, 0.20907196, 0.22170831, 0.22844169], e)


0 comments on commit 3795787

Please sign in to comment.