Skip to content

Commit

Permalink
init commit for test_cgr_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
arthur-lin1027 committed May 30, 2024
1 parent 1a88f68 commit 2109c86
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tests/test_cgr_cache.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import numpy as np
from ase import Atoms
from time import perf_counter


a = 3
b = c = 1

def generate_frame(l1, l2, l3):
n_tot = l1 * l2 * l3
positions = np.asarray(
[[i, j, 3 * k] for i in range(l1) for j in range(l2) for k in range(l3)]
)

frame = Atoms(positions=positions, numbers=[0] * n_tot)
frame.arrays["quaternions"] = np.array([[1, 0, 0, 0]] * n_tot)
frame.arrays[r"c_diameter\[1\]"] = a * np.ones(n_tot)
frame.arrays[r"c_diameter\[2\]"] = b * np.ones(n_tot)
frame.arrays[r"c_diameter\[3\]"] = c * np.ones(n_tot)

frame.arrays[r"c_diameter[1]"] = a * np.ones(n_tot)
frame.arrays[r"c_diameter[2]"] = b * np.ones(n_tot)
frame.arrays[r"c_diameter[3]"] = c * np.ones(n_tot)

return [frame]


class TestCGRCache:

def test_cgr(self):
pass

0 comments on commit 2109c86

Please sign in to comment.