############################# # Constants a = lattice_constants["MoS2"] * 1e9 angle = 1 # 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]) # Real space lattice vectors a = bandcalc.generate_reciprocal_lattice_basis(b) # Reciprocal moire lattice vectors rec_m = b - bandcalc.rotate_lattice(b, angle) # Real space moire lattice vectors m = bandcalc.generate_reciprocal_lattice_basis(rec_m) # Moire potential coefficients V = 12.4 * 1e-3 * np.exp(1j * 81.5 * np.pi / 180) # in eV Vj = np.array([V if i % 2 else np.conjugate(V) for i in range(1, 7)]) # Reciprocal moire lattice vectors G = bandcalc.generate_twisted_lattice_by_shell(b, b, angle, 1) GT = G[0, 1:] GB = G[1, 1:] GM = GT - GB # Sort the reciprocal moire vectors by angle to get the phase right
if V is None or mass is None: print("Error: Some constants for this physical system are unknown") sys.exit(1) temperature = config["general"].getfloat("temperature") filling = config["general"].getfloat("filling") system_str = f"{material_system.replace('/', '_')}_{stacking}_stacking_{particle_type}" with open(f"bandcalc/examples/hubbard/wannier_pickle/moire_vector_lengths_{system_str}.pickle", "rb") as f: m_lens = pickle.load(f) res = [] for angle in np.linspace(1, 3, num=10): # Reciprocal moire basis vectors 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)