Exemplo n.º 1
0
def test_distances_periodic():
    coords = np.array([[0.0, 0.0, 0.0], [0.0, 0.9, 0.0], [0.0, 0.2, 0.0]])
    coords = np.random.random((1000, 3))
    periodic = np.array([1.0, 1.0, 1.0])

    cutoff = 0.1

    # Consistency checks
    dist_simple = distance_matrix(coords, coords, periodic=periodic)

    dist_dask = distance_matrix(da.from_array(coords, chunks=100),
                                da.from_array(coords, chunks=100),
                                da.from_array(periodic, chunks=3))
    assert np.allclose(dist_dask, dist_simple)
Exemplo n.º 2
0
def test_distances_periodic():
    coords = np.array([[0.0, 0.0, 0.0],
                       [0.0, 0.9, 0.0],
                       [0.0, 0.2, 0.0]])
    coords = np.random.random((1000, 3))
    periodic = np.array([1.0, 1.0, 1.0])

    cutoff = 0.1

    # Consistency checks
    dist_simple = distance_matrix(coords, coords, periodic=periodic)
    
    dist_dask = distance_matrix(da.from_array(coords, chunks=100), 
                                da.from_array(coords, chunks=100),
                                da.from_array(periodic, chunks=3))
    assert np.allclose(dist_dask, dist_simple)
Exemplo n.º 3
0
def test_distances_periodic():
    coords = np.array([[0.0, 0.0, 0.0], [0.0, 0.9, 0.0], [0.0, 0.2, 0.0]])
    coords = np.random.random((1000, 3))
    periodic = np.array([1.0, 1.0, 1.0])

    cutoff = 0.1

    # Consistency checks
    dist_simple = distance_matrix(coords, coords, periodic=periodic)
Exemplo n.º 4
0
def test_distances_periodic():
    coords = np.array([[0.0, 0.0, 0.0],
                       [0.0, 0.9, 0.0],
                       [0.0, 0.2, 0.0]])
    coords = np.random.random((1000, 3))
    periodic = np.array([1.0, 1.0, 1.0])

    cutoff = 0.1

    # Consistency checks
    dist_simple = distance_matrix(coords, coords, periodic=periodic)