Initial version

This commit is contained in:
sebastiankloth
2022-04-20 14:08:38 +02:00
commit 68b8e1a305
48 changed files with 5133 additions and 0 deletions

14
test/test_pbc.py Normal file
View File

@ -0,0 +1,14 @@
from pytest import approx
from mdevaluate import pbc
import numpy as np
def test_pbc_diff():
x = np.random.rand(10, 3)
y = np.random.rand(10, 3)
box = np.ones((3,))
assert (pbc.pbc_diff(x, x, box) == approx(0))
dxy = (pbc.pbc_diff(x, y, box)**2).sum(axis=1)**0.5
assert (dxy <= 0.75**0.5).all()