def __create_supercell_hamiltonian(self, nnfile, height, length): unitcells = length * 2 ham = Hamiltonian.from_nth_nn_list(nnfile) ham3 = ham.create_supercell_hamiltonian( [[i, j, 0] for j in range(height) for i in range(unitcells)], [[unitcells, 0, 0], [0, height, 0], [0, 0, 1]]) #ham4 = ham3.create_modified_hamiltonian( # ham3.drop_dimension_from_cell_list(1)) return ham3
def __create_supercell_hamiltonian(self, nnfile, height, length): unitcells=length*2 ham = Hamiltonian.from_nth_nn_list(nnfile) ham3 = ham.create_supercell_hamiltonian( [[i, j, 0] for j in range(height) for i in range(unitcells)], [[unitcells, 0, 0], [0, height, 0], [0, 0, 1]]) #ham4 = ham3.create_modified_hamiltonian( # ham3.drop_dimension_from_cell_list(1)) return ham3
def __create_hamiltonian(self, nnfile, height, length, rib_ham=True): """ Creates a graphene rectangle Hamiltonian from a nearest neighbour parameter file. nnfile: path to a nearest-neighbour parameter file. height: height of the rectangle in 4-atom unitcells (nr of atoms = 4*height*length) length: length of the rectangle (nr of stripes) Return: ham: Hamiltonian of the graphene unitcell. ham5: Hamiltonian of the graphene rectangle. if ham5 is not needed, to speed up the code use rib_ham=False """ unitcells = height ham = Hamiltonian.from_nth_nn_list(nnfile) ham2 = ham.create_supercell_hamiltonian( [[0, 0, 0], [1, 0, 0]], [[1, -1, 0], [1, 1, 0], [0, 0, 1]]) if rib_ham: ham3 = ham2.create_supercell_hamiltonian( [[0, i, 0] for i in range(unitcells)], [[1, 0, 0], [0, unitcells, 0], [0, 0, 1]]) ham4 = ham3.create_modified_hamiltonian( ham3.drop_dimension_from_cell_list(1)) ham5 = ham4.create_supercell_hamiltonian( [[i, 0, 0] for i in range(length)], [[length, 0, 0], [0, 1, 0], [0, 0, 1]]) return ham, ham2, ham5 else: return ham, ham2, ham2
def __create_hamiltonian(self, nnfile, height, length, rib_ham=True): """ Creates a graphene rectangle Hamiltonian from a nearest neighbour parameter file. nnfile: path to a nearest-neighbour parameter file. height: height of the rectangle in 4-atom unitcells (nr of atoms = 4*height*length) length: length of the rectangle (nr of stripes) Return: ham: Hamiltonian of the graphene unitcell. ham5: Hamiltonian of the graphene rectangle. if ham5 is not needed, to speed up the code use rib_ham=False """ unitcells=height ham = Hamiltonian.from_nth_nn_list(nnfile) ham2 = ham.create_supercell_hamiltonian( [[0, 0, 0], [1, 0, 0]], [[1, -1, 0], [1, 1, 0], [0, 0, 1]]) if rib_ham: ham3 = ham2.create_supercell_hamiltonian( [[0, i, 0] for i in range(unitcells)], [[1, 0, 0], [0, unitcells, 0], [0, 0, 1]]) ham4 = ham3.create_modified_hamiltonian( ham3.drop_dimension_from_cell_list(1)) ham5 = ham4.create_supercell_hamiltonian([[i, 0, 0] for i in range( length)], [[length, 0, 0], [0, 1, 0], [0, 0, 1]]) return ham, ham2, ham5 else: return ham, ham2, ham2