示例#1
0
def test_not_implemented():
    class Test:
        pass

    t = Test()
    with pytest.raises(NotImplementedError):
        sisl.plot(t)
示例#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')
示例#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')
示例#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')
示例#5
0
文件: test_plot.py 项目: sjumzw/sisl
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')
示例#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')
示例#7
0
def test_geometry_3d_atom_indices():
    g = sisl.geom.graphene()
    sisl.plot(g, atom_indices=True)
    plt.close('all')
示例#8
0
def test_geometry_3d():
    g = sisl.geom.graphene()
    sisl.plot(g)
    plt.close('all')
示例#9
0
def test_supercell_3d():
    g = sisl.geom.graphene()
    sisl.plot(g.sc)
    plt.close('all')
示例#10
0
def test_not_implemented():
    class Test(object):
        pass
    t = Test()
    sisl.plot(t)