Esempio n. 1
0
def test_tocuboid_complex():
    sc = SuperCell([1, 1, 1, 60, 60, 60])
    s = str(sc.cell)
    c1 = sc.toCuboid()
    assert np.allclose(sc.cell, c1._v)
    c2 = sc.toCuboid(True)
    assert not np.allclose(np.diagonal(c1._v), np.diagonal(c2._v))
Esempio n. 2
0
def test_tocuboid_simple():
    sc = SuperCell([1, 1, 1, 90, 90, 90])
    c1 = sc.toCuboid()
    assert np.allclose(sc.cell, c1._v)
    c2 = sc.toCuboid(True)
    assert np.allclose(c1._v, c2._v)