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 bandstructure, prefix = bandcalc.get_unit_prefix( bandcalc.calc_bandstructure(path, hamiltonian)) sorted_bandstructure = np.sort(bandstructure) fig, ax = plt.subplots(nrows=7, ncols=2, figsize=(7, 20)) for i in range(7): ## Calculate the wannier function R = 1 / 3 * (moire_lattice[5] + moire_lattice[3] + moire_lattice[6]).astype(np.float32) r = 5 * bandcalc.generate_monkhorst_pack_set(m, 80) wannier_function = bandcalc.calc_wannier_function_gpu(hamiltonian, k_points, rec_moire_lattice, r, R,
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 mu = bc.calc_mu_of_n_boson(bandstructure, k_points, temperature)(np.log10(n)) res.append(mu) print(f"{angle:.2f}°") res = np.array(res) print(res) np.save(f"mu_meV_{system_str}_{filling}_filling_{temperature}K.npy", res)