Пример #1
0
    def test_pbz1(self, setup):
        bz = BandStructure(setup.s1, [[0] * 3, [.5] * 3], 300)
        assert len(bz) == 300

        bz2 = BandStructure(setup.s1, [[0] * 2, [.5] * 2], 300, ['A', 'C'])
        assert len(bz) == 300

        bz3 = BandStructure(setup.s1, [[0] * 2, [.5] * 2], [150] * 2)
        assert len(bz) == 300
        bz.lineartick()
        bz.lineark()
        bz.lineark(True)
Пример #2
0
def finite_bands(dev, pot, SF):
    H = Hamiltonian(dev)

    R = np.array([1.4, 1.44, 3.33, 3.37]) * SF
    t = (0, 3.16, 0, 0.39)

    H.construct([R, t])

    energies = pot.pot_func(dev.xyz)

    for i in dev.iter():

        H[i, i] = energies[i]

    #band = BandStructure(H, [[-np.pi / 2.46, 0, 0], [np.pi / 2.46, 0, 0]],
    #    400, [r'$-\pi$',r'$\pi$'])

    band = BandStructure(
        H, [[0, 0, 0], [0, 0.5, 0], [1 / 3, 2 / 3, 0], [0, 0, 0]], 400,
        [r'$\Gamma$', r'$M$', r'$K$', r'$\Gamma$'])

    bnds = band.asarray().eigh()

    lk, kt, kl = band.lineark(True)

    fig = plt.figure()
    ax = fig.add_subplot(111)

    for bnd in bnds.T:

        ax.plot(lk, bnd)

    plt.xticks(kt, kl)
    plt.xlim(0, lk[-1])
    #plt.ylim([0, 0.055])
    plt.ylim([-3, 3])
    #ax.set_ylim(-.1,.1)

    plt.show()