Exemplo n.º 1
0
m = bandcalc.generate_reciprocal_lattice_basis(rec_m)

# Real space moire lattice vectors
moire_lattice = bandcalc.generate_lattice_by_shell(m, shells)

if potential == "MoS2":
    # Moire potential coefficients
    V = 6.6 * 1e-3 * np.exp(-1j * 94 * np.pi / 180)  # in eV
    Vj = np.array([V if i % 2 else np.conjugate(V) for i in range(1, 7)])
    potential_matrix = bandcalc.calc_potential_matrix_from_coeffs(
        rec_moire_lattice, Vj)
elif potential == "off":
    potential_matrix = bandcalc.calc_potential_matrix(rec_moire_lattice)

## Calculate eigenstates for every k point in the MBZ
k_points = bandcalc.generate_monkhorst_pack_set(rec_m, 30).astype(np.float32)
hamiltonian = bandcalc.calc_hamiltonian(rec_moire_lattice, potential_matrix,
                                        mass)

## Calculate MBZ and choose some K-points for the k-path
vor_m = Voronoi(rec_moire_lattice)
sorted_vertices = np.array(
    sorted(vor_m.vertices, key=lambda x: np.abs(x.view(complex))))[:6]
sorted_vertices = np.array(
    sorted(sorted_vertices, key=lambda x: np.angle(x.view(complex))))
points = np.array([[0, 0], sorted_vertices[0], sorted_vertices[1],
                   sorted_vertices[3]])
k_names = [r"$\gamma$", r"$\kappa'$", r"$\kappa''$", r"$\kappa$"]
path = bandcalc.generate_k_path(points, N)

## Calculate bandstructure
Exemplo n.º 2
0
    rec_m = b1-bc.rotate_lattice(b2, angle)

    # Complete reciprocal moire lattice
    rec_moire_lattice = bc.generate_lattice_by_shell(rec_m, shells)

    # Real space moire basis vectors
    m = bc.generate_reciprocal_lattice_basis(rec_m)

    # Real space moire lattice vectors
    moire_lattice = bc.generate_lattice_by_shell(m, 2)

    # Moire potential coefficients
    Vj = np.array([V if i%2 else np.conjugate(V) for i in range(1, 7)])
    potential_matrix = bc.calc_potential_matrix_from_coeffs(rec_moire_lattice, Vj)

    k_points = bc.generate_monkhorst_pack_set(rec_m, 40)

    ## Calculate the band structure
    # The bandstructure is slightly different from the bandstructure in the
    # original paper, but that is most likely just a small difference in
    # some parameters, like the lattice constants
    hamiltonian = bc.calc_hamiltonian(rec_moire_lattice, potential_matrix, mass)
    bandstructure = np.sort(
            np.real(
                bc.calc_bandstructure(k_points, hamiltonian)
            )
        )*1e3 # in meV

    cell_area = bc.get_volume_element_regular_grid(moire_lattice)
    n = filling/cell_area
    
Exemplo n.º 3
0
    m_len = np.abs(m[0].view(complex)[0])

    # Calculate first shell reciprocal moire vectors
    G = bc.generate_twisted_lattice_by_shell(b1, b2, angle, 1)
    GT = G[0]
    GB = G[1]
    GM = GT-GB
    GM = np.array(sorted(GM, key=lambda x: np.abs(x.view(complex))))[1:]
    GM = np.array(sorted(GM, key=lambda x: np.angle(x.view(complex))))

    # Moire potential coefficients
    Vj = np.array([V if i%2 else np.conjugate(V) for i in range(1, 7)])
    potential_matrix = bc.calc_potential_matrix_from_coeffs(rec_moire_lattice, Vj)

    ## Calculate eigenstates for every k point in the MBZ
    k_points = bc.generate_monkhorst_pack_set(rec_m, 30).astype(np.float32)
    hamiltonian = bc.calc_hamiltonian(rec_moire_lattice, potential_matrix, mass)

    # Wannier functions should be centered around potential minima
    potential_shift = bc.calc_moire_potential_minimum_position(GM, np.abs(V), np.angle(V))
    print(f"Potential shift: {potential_shift}")

    R0 = potential_shift
    R1 = m[0]+potential_shift
    R2 = 2*m[0]+potential_shift

    ## Calculate the wannier function
    x_min, x_max, n_x = -2*m_len, 2*m_len, 100
    y_min, y_max, n_y = -2*m_len, 2*m_len, 100

    x, y = make_xy(x_min, x_max, n_x, y_min, y_max, n_y)
Exemplo n.º 4
0
GM = np.array(sorted(GM, key=lambda x: np.abs(x.view(complex))))[1:]
GM = np.array(sorted(GM, key=lambda x: np.angle(x.view(complex))))

# Real space grid
size = np.linspace(-10, 10, 100)
grid = np.meshgrid(size, size)

# Reciprocal space grid
size_r = np.linspace(-3, 3, 100)
grid_r = np.meshgrid(size_r, size_r)

# Real space moire potential
moire_potential = bandcalc.calc_moire_potential_on_grid(grid, GM, Vj)

# Reciprocal space moire potential
mp_moire = bandcalc.generate_monkhorst_pack_set(m, 100)
moire_potential_pointwise = bandcalc.calc_moire_potential(mp_moire, GM, Vj)
rec_moire_potential = bandcalc.calc_moire_potential_reciprocal_on_grid(
        mp_moire, grid_r, moire_potential_pointwise)

# Results
fig, axs = plt.subplots(nrows=2, ncols=2)

contour = bandcalc.plot_moire_potential(axs[0,0], grid, np.real(moire_potential), alpha=0.4)
moire_lattice = bandcalc.generate_lattice_by_shell(m, 2)
bandcalc.plot_lattice(axs[0,0], moire_lattice, "ko")
vor_m = Voronoi(moire_lattice)
voronoi_plot_2d(vor_m, axs[0,0], show_points=False, show_vertices=False)
bandcalc.plot_lattice(axs[0,0], mp_moire, "b,", alpha=0.4)

rec_moire_lattice = bandcalc.generate_lattice_by_shell(rec_m, 3)
Exemplo n.º 5
0
import matplotlib.pyplot as plt
from scipy.spatial import Voronoi, voronoi_plot_2d  #pylint: disable=E0611

import bandcalc

# Constants
a = 1
N = 1000

# Reciprocal lattice vectors
b1 = np.array([2 * np.pi / (np.sqrt(3) * a), 2 * np.pi / a])
b2 = np.array([2 * np.pi / (np.sqrt(3) * a), -2 * np.pi / a])
b = np.vstack([b1, b2])
lattice = bandcalc.generate_lattice_by_shell(b, 1)

# Monkhorst-Pack lattice
mp_lattice = bandcalc.generate_monkhorst_pack_set(b, 10)

# Results
fig, ax = plt.subplots()

vor = Voronoi(lattice)
voronoi_plot_2d(vor, ax, show_points=False, show_vertices=False)
bandcalc.plot_lattice(ax, lattice, "ko", alpha=0.3)
bandcalc.plot_lattice(ax, mp_lattice, "k.")

ax.set_xlim([lattice[:, 0].min() - 2, lattice[:, 0].max() + 2])
ax.set_ylim([lattice[:, 1].min() - 2, lattice[:, 1].max() + 2])

plt.show()