Ejemplo n.º 1
0
def test_not_implemented():
    class Test:
        pass

    t = Test()
    with pytest.raises(NotImplementedError):
        sisl.plot(t)
Ejemplo n.º 2
0
def test_orbital_radial():
    r = np.linspace(0, 10, 1000)
    f = np.exp(- r)
    o = sisl.SphericalOrbital(2, (r, f))
    sisl.plot(o)

    fig = plt.figure()
    sisl.plot(o, axes=fig.gca())
    plt.close('all')
Ejemplo n.º 3
0
def test_geometry_2d():
    g = sisl.geom.graphene()
    sisl.plot(g, axis=[0, 1])
    sisl.plot(g, axis=[0, 2])
    sisl.plot(g, axis=[1, 2])

    ax = plt.subplot(111)
    sisl.plot(g, axis=[1, 2], axes=ax)
    plt.close('all')
Ejemplo n.º 4
0
def test_supercell_2d():
    g = sisl.geom.graphene()
    sisl.plot(g.sc, axis=[0, 1])
    sisl.plot(g.sc, axis=[0, 2])
    sisl.plot(g.sc, axis=[1, 2])

    ax = plt.subplot(111)
    sisl.plot(g.sc, axis=[1, 2], axes=ax)
    plt.close('all')
Ejemplo n.º 5
0
def test_geometry_2d_atom_indices():
    g = sisl.geom.graphene()
    sisl.plot(g, axis=[0, 1])
    sisl.plot(g, axis=[0, 2])
    sisl.plot(g, axis=[1, 2])

    ax = plt.subplot(111)
    sisl.plot(g, axis=[1, 2], axes=ax, atom_indices=True)
    plt.close('all')
Ejemplo n.º 6
0
def test_orbital_harmonics():
    r = np.linspace(0, 10, 1000)
    f = np.exp(-r)
    o = sisl.SphericalOrbital(2, (r, f))
    sisl.plot(o, harmonics=True)
    plt.close('all')
Ejemplo n.º 7
0
def test_geometry_3d_atom_indices():
    g = sisl.geom.graphene()
    sisl.plot(g, atom_indices=True)
    plt.close('all')
Ejemplo n.º 8
0
def test_geometry_3d():
    g = sisl.geom.graphene()
    sisl.plot(g)
    plt.close('all')
Ejemplo n.º 9
0
def test_supercell_3d():
    g = sisl.geom.graphene()
    sisl.plot(g.sc)
    plt.close('all')
Ejemplo n.º 10
0
def test_not_implemented():
    class Test(object):
        pass
    t = Test()
    sisl.plot(t)