num_a2 = 512 num_moments = 12000 # make config object which caries info about # - the number of decomposition parts [nx, ny], # - lengths of structure [lx, ly] # - boundary conditions, setting True as periodic boundary conditions, and False elsewise, # - info if the exported hopping and onsite data should be complex, # - info of the precision of the exported hopping and onsite data, 0 - float, 1 - double, and 2 - long double. configuration = kite.Configuration(divisions=[nx, ny], length=[num_a1, num_a2], boundaries=[True, True], is_complex=False, precision=0, spectrum_range=[e_min, e_max]) calculation = kite.Calculation(configuration) calculation.dos(num_points=5000, num_moments=num_moments, num_random=1, num_disorder=1) # export the lattice from the lattice object, config and calculation object and the name of the file # the disorder is optional. If there is disorder in the lattice for now it should be given separately kite.config_system(complete_lattice, configuration, calculation, filename='dos_' + name[:-4] + '_{}_moments.h5'.format(num_moments))
# load a honeycomb lattice and structural disorder nx = ny = 1 lx = 512 ly = 512 # make config object which caries info about # - the number of decomposition parts [nx, ny], # - lengths of structure [lx, ly] # - boundary conditions, setting True as periodic boundary conditions, and False elsewise, # - info if the exported hopping and onsite data should be complex, # - info of the precision of the exported hopping and onsite data, 0 - float, 1 - double, and 2 - long double. # - scaling, if None it's automatic, if present select spectrum_bound=[e_min, e_max] configuration = kite.Configuration(divisions=[nx, ny], length=[lx, ly], boundaries=[True, True], is_complex=False, precision=1) # require the calculation of dos num_moments = 512 calculation = kite.Calculation(configuration) calculation.dos(num_points=1000, num_moments=num_moments, num_random=5, num_disorder=1) # configure the *.h5 file kite.config_system(lattice, configuration, calculation, filename='vacancies.h5', disorder_structural=disorder_structural)
disorder_strength_and * int(use_disorder == True), disorder_strength * int(use_disorder == True), k, sigma, lx) if os.path.isdir(dirname): shutil.rmtree(dirname) os.mkdir(dirname) os.chdir(dirname) # configure the *.h5 file name = 'gaussian_wavepacket.h5' if use_disorder: kite.config_system( lattice, configuration, calculation, filename=name, disorder=disorder, disorder_structural=[struc_disorder_one, struc_disorder_two]) else: kite.config_system(lattice, configuration, calculation, filename=name) pb.utils.tic() # measure the time # # I have an alias for KITEx in zsh, useful for having everything in one script sp = subprocess.Popen( ['/usr/bin/bash', '-i', '-c', 'KITEwavepacketLeib {}'.format(name)]) sp.communicate() pb.utils.toc('Time for time evolution ')
# - scaling, if None it's automatic, if present select spectrum_bound=[e_min, e_max] configuration = kite.Configuration(divisions=[nx, ny], length=[l1, l2], boundaries=[True, True], is_complex=False, precision=1, spectrum_range=[-10, 10]) # require the calculation of DOS num_moments = 1000 calculation = kite.Calculation(configuration) calculation.dos(num_moments=num_moments, num_random=1, num_disorder=1, num_points=1000) # make modification object which caries info about # for a quick check, let's make a Pybinding model and check the DOS model = pb.Model(lattice, pb.rectangle(100, 100), pb.translational_symmetry(a1=50, a2=50)) # if you would like to specify Disorder, use other function that takes of converting KITE to Pybinding disorder objects # model = kite.make_pybinding_model(lattice) # dos = pb.kpm(model).calc_dos(np.linspace(-4, 4, 2000), broadening=1e-2, num_random=1) # dos.plot() # plt.show() # configure the *.h5 file kite.config_system(lattice, configuration, calculation, filename='tblg_{:.3f}.h5'.format(angle))
([1, +1], 'A', 'A', t_nn), ([1, +1], 'B', 'B', t_nn), ([1, -2], 'A', 'A', t_nn), ([1, -2], 'B', 'B', t_nn), ) lat.min_neighbors = 2 return lat lattice = graphene(nearest_neighbors=3) lx = int(sys.argv[1]) ly = int(sys.argv[2]) domain_decompose_1 = int(sys.argv[3]) domain_decompose_2 = int(sys.argv[4]) num_moments = int(sys.argv[5]) emin, emax = -3.01 * np.abs(t) - 6 * t_nn, 3.01 * np.abs(t) + 6 * t_nn configuration = kite.Configuration(divisions=[domain_decompose_1, domain_decompose_2], length=[lx, ly], boundaries=[True, True], is_complex=False, precision=1, spectrum_range=[emin, emax]) calculation = kite.Calculation(configuration) calculation.dos(num_points=1000, num_moments=num_moments, num_random=1, num_disorder=1) name = 'dos_gr_nnn.h5' kite.config_system(lattice, configuration, calculation, filename=name)
lattice = graphene_initial() divX = 1 divY = 1 sizeX = 256 sizeY = 256 NumMoments = 512 energy_scale = 3.1 configuration = kite.Configuration( divisions=[divX, divY], length=[sizeX, sizeY], boundaries=[True, True], is_complex=False, precision=0, spectrum_range=[-energy_scale, energy_scale]) calculation = kite.Calculation(configuration) calculation.conductivity_optical(num_points=256, num_moments=NumMoments, num_random=1, num_disorder=1, direction="xx", temperature=0.01) kite.config_system(lattice, configuration, calculation, filename="graphene_condopt.h5")
# make a graphene lattice lattice = graphene() disorder = kite.Disorder(lattice) #disorder.add_disorder('A', 'Uniform', +0.0, 0.5) #disorder_struc = kite.StructuralDisorder(lattice, position=[1, 1]) #disorder_struc.add_vacancy('A') # number of decomposition parts in each direction of matrix. # This divides the lattice into various sections, each of which is calculated in parallel nx = 1 ny = 1 nz = 2 # number of unit cells in each direction. lx = ly = lz = 128 # make config object which caries info about # - the number of decomposition parts [nx, ny], # - lengths of structure [lx, ly] # - boundary conditions, setting True as periodic boundary conditions, and False elsewise, # - info if the exported hopping and onsite data should be complex, # - info of the precision of the exported hopping and onsite data, 0 - float, 1 - double, and 2 - long double. # - scaling, if None it's automatic, if present select spectrum_bound=[e_min, e_max] configuration = kite.Configuration(divisions=[nx, ny, nz], length=[lx, ly, lz], boundaries=[True, True, True], is_complex=False, precision=1) # require the calculation of DOS calculation = kite.Calculation(configuration) calculation.dos(num_points=1000, num_moments=128, num_random=1, num_disorder=1) # configure the *.h5 file kite.config_system(lattice, configuration, calculation, filename='example_initial.h5')
# - boundary conditions, setting True as periodic boundary conditions, and False elsewise, # - info if the exported hopping and onsite data should be complex, # - info of the precision of the exported hopping and onsite data, 0 - float, 1 - double, and 2 - long double. # - scaling, if None it's automatic, if present select spectrum_bound=[e_min, e_max] configuration = kite.Configuration(divisions=[nx, ny], length=[lx, ly], boundaries=[True, True], is_complex=True, precision=0) calculation = kite.Calculation(configuration) # require the calculation of DOS and conductivity_dc calculation.dos(num_points=1000, num_moments=512, num_random=10, num_disorder=1) calculation.conductivity_dc(num_points=1000, num_moments=256, num_random=50, num_disorder=1, direction='xy', temperature=100) # configure the *.h5 file kite.config_system(lattice, configuration, calculation, filename='haldane.h5', disorder=disorder) # ATTENTION: to generate the conductivity data file for a desired window of Fermi energies, please use #./KITE-tools h5_file.h --CondDC -F Emin Emax NumPoints #See ./KITE-tools --help for more options
a1 = np.array([1, 0]) a2 = np.array([0, 1]) lat = pb.Lattice( a1=a1, a2=a2 ) lat.add_sublattices( ('A', [0, 0], onsite[0]) ) lat.add_hoppings( ([1, 0], 'A', 'A', - 1), ([0, 1], 'A', 'A', - 1) ) return lat lattice = square_lattice() nx = ny = 2 lx = ly = 256 configuration = kite.Configuration(divisions=[nx, ny], length=[lx, ly], boundaries=[True, True], is_complex=True, precision=1, spectrum_range=[-4.1,4.1]) calculation = kite.Calculation(configuration) mod = kite.Modification(magnetic_field = 40) calculation.conductivity_dc(num_points=1000, num_moments=32, num_random=1, direction='xy', temperature=0.01) kite.config_system(lattice, configuration, calculation, modification=mod, filename='config.h5')
# configuration = kite.Configuration(divisions=[nx, ny], length=[lx, ly], boundaries=[True, True], is_complex=True, precision=1) calculation = kite.Calculation(configuration) # DC conductivity calculation.conductivity_dc(num_points=6000, num_moments=2048, num_random=1, num_disorder=1, direction='xy', temperature=1) # Optical conductivity calculation.conductivity_optical(num_points=200, num_moments=2048, num_random=1, num_disorder=1, direction='xx') # configure the *.h5 file kite.config_system(lattice, configuration, calculation, filename='qahe_disorder.h5', disorder=disorder)
# inside the main cell ([0, 0], 'A', 'B', t), # between neighboring cells ([-1, 0], 'A', 'B', t), ([0, -1], 'A', 'B', t), ([-1, -1], 'A', 'B', t)) return lat # load a square lattice lattice = checkboard_lattice((-0.1, 0.1)) # number of decomposition parts in each direction of matrix. This divides the lattice into various sections, # each of which is calculated in parallel nx = ny = 2 # number of unit cells in each direction. lx = ly = 512 configuration = kite.Configuration(divisions=[nx, ny], length=[lx, ly], boundaries=[True, True], is_complex=False, precision=1) # require the calculation of DOS calculation = kite.Calculation(configuration) calculation.dos(num_points=1000, num_moments=512, num_random=5, num_disorder=1) # configure the *.h5 file kite.config_system(lattice, configuration, calculation, filename='checkboard_lattice.h5')
# make config object which caries info about # - the number of decomposition parts [nx, ny], # - lengths of structure [lx, ly] # - boundary conditions, setting True as periodic boundary conditions, and False elsewise, # - info if the exported hopping and onsite data should be complex, # - info of the precision of the exported hopping and onsite data, 0 - float, 1 - double, and 2 - long double. # - scaling, if None it's automatic, if present select spectrum_bound=[e_min, e_max] configuration = kite.Configuration(divisions=[nx, ny], length=[lx, ly], boundaries=[True, True], is_complex=False, precision=1) # manual scaling # configuration = kite.Configuration(divisions=[nx, ny], length=[lx, ly], boundaries=[True, True], # is_complex=False, precision=1, spectrum_range=[-10, 10]) # require the calculation of DOS calculation = kite.Calculation(configuration) calculation.dos(num_points=10000, num_moments=2048, num_random=1, num_disorder=1) # configure the *.h5 file kite.config_system(lattice, configuration, calculation, filename='mixed_disorder.h5', disorder=disorder, disorder_structural=disorder_struc)
lx = ly = 512 # make config object which caries info about # - the number of decomposition parts [nx, ny], # - lengths of structure [lx, ly] # - boundary conditions, setting True as periodic boundary conditions, and False elsewise, # - info if the exported hopping and onsite data should be complex, # - info of the precision of the exported hopping and onsite data, 0 - float, 1 - double, and 2 - long double. # - scaling, if None it's automatic, if present select spectrum_bound=[e_min, e_max] configuration = kite.Configuration(divisions=[nx, ny], length=[lx, ly], boundaries=[True, True], is_complex=False, precision=1) # require the calculation of DOS and conductivity_optical calculation = kite.Calculation(configuration) calculation.dos(num_points=4096, num_moments=512, num_random=10, num_disorder=1) calculation.conductivity_optical(num_points=1024, num_disorder=1, num_random=5, num_moments=256, direction='xx') # configure the *.h5 file kite.config_system(lattice, configuration, calculation, filename='optcond_gaussian_disorder.h5', disorder=disorder)
lat.add_hoppings(([0, 0], 'A', 'B', -t), ([-1, 0], 'A', 'B', -t), ([-1, 1], 'A', 'B', -t)) return lat # make a graphene lattice lattice = graphene([0, 0]) # number of decomposition parts in each direction of matrix. # This divides the lattice into various sections, each of which is calculated in parallel nx = ny = 1 # number of unit cells in each direction. lx = ly = 512 # make config object which caries info about # - the number of decomposition parts [nx, ny], # - lengths of structure [lx, ly] # - boundary conditions, setting True as periodic boundary conditions, and False elsewise, # - info if the exported hopping and onsite data should be complex, # - info of the precision of the exported hopping and onsite data, 0 - float, 1 - double, and 2 - long double. # - scaling, if None it's automatic, if present select spectrum_bound=[e_min, e_max] configuration = kite.Configuration(divisions=[nx, ny], length=[lx, ly], boundaries=[True, True], is_complex=False, precision=1) # require the calculation of DOS calculation = kite.Calculation(configuration) calculation.dos(num_points=1000, num_moments=512, num_random=1, num_disorder=1) # configure the *.h5 file kite.config_system(lattice, configuration, calculation, filename='graphene.h5')
# Add hoppings lat.add_hoppings(([1, 0], 'A', 'A', -1), ([0, 1], 'A', 'A', -1)) return lat # load a square lattice lattice = square_lattice() # number of decomposition parts in each direction of matrix. This divides the lattice into various sections, # each of which is calculated in parallel nx = ny = 1 # number of unit cells in each direction. lx = ly = 256 configuration = kite.Configuration(divisions=[nx, ny], length=[lx, ly], boundaries=[True, True], is_complex=False, precision=1, spectrum_range=[-4.2, 4.2]) # require the calculation of DOS calculation = kite.Calculation(configuration) calculation.dos(num_points=1024, num_moments=1024, num_random=1, num_disorder=1) # configure the *.h5 file kite.config_system(lattice, configuration, calculation, filename='square_lattice.h5')
LIM = 10 nx = ny = 4 lx = ly = int(sys.argv[1]) weights = [ float(sys.argv[4]), float(sys.argv[5]), float(sys.argv[6]), float(sys.argv[7]), float(sys.argv[8]), float(sys.argv[9]), float(sys.argv[10]), float(sys.argv[11]) ] configuration = kite.Configuration(divisions=[nx, ny], length=[lx, ly], boundaries=[True, True], is_complex=True, precision=1, spectrum_range=[-LIM, LIM]) calculation_arpes = kite.Calculation(configuration) calculation_arpes.arpes(k_vector=k_path, num_moments=moments, weight=weights, num_disorder=1) kite.config_system(lattice, configuration, calculation_arpes, filename='config.h5', disorder=disorder)
# number of decomposition parts in each direction of matrix. # This divides the lattice into various sections, each of which is calculated in parallel nx = ny = 1 # number of unit cells in each direction. lx = ly = 512 # make config object which caries info about # - the number of decomposition parts [nx, ny], # - lengths of structure [lx, ly] # - boundary conditions, setting True as periodic boundary conditions, and False elsewise, # - info if the exported hopping and onsite data should be complex, # - info of the precision of the exported hopping and onsite data, 0 - float, 1 - double, and 2 - long double. # - scaling, if None it's automatic, if present select spectrum_bound=[e_min, e_max] configuration = kite.Configuration(divisions=[nx, ny], length=[lx, ly], boundaries=[True, True], is_complex=False, precision=1) # define grid num_points = 15 energy = [(1.0 / num_points * i) * 3.5 for i in range(num_points)] # require the calculation of singleshot_conductivity_dc calculation = kite.Calculation(configuration) calculation.singleshot_conductivity_dc(energy=energy, num_moments=512, num_random=2, num_disorder=1, direction='yy', eta=0.02) # configure the *.h5 file kite.config_system(lattice, configuration, calculation, filename='phyy.h5')
b1, b2 = lattice.reciprocal_vectors() Gamma = [0, 0] R = b1[0:2] + b2[0:2] M = b1[0:2] K = [0.23 * np.pi, 0] points = [K, K] k_path = pb.results.make_path(*points) weights = 1.0 SCALE = 4.02 + W / 2.0 configuration = kite.Configuration(divisions=[nx, ny], length=[lx, ly], boundaries=[True, True], is_complex=True, precision=1, spectrum_range=[-SCALE, SCALE]) calculation = kite.Calculation(configuration) # calculation.singleshot_conductivity_dc(energy=energy, num_moments=N, num_random=1, num_disorder=1, direction='yy', eta=scattering) # calculation.dos(num_points=1000, num_moments=N, num_random=1, num_disorder=1) calculation.arpes(k_vector=k_path, num_moments=N, weight=weights, num_disorder=1) kite.config_system(lattice, configuration, calculation, filename=name, disorder=disorder)
# - info if the exported hopping and onsite data should be complex, # - info of the precision of the exported hopping and onsite data, 0 - float, 1 - double, and 2 - long double. configuration = kite.Configuration(divisions=[nx, ny], length=[lx, ly], boundaries=[True, True], is_complex=True, precision=1, spectrum_range=[-10, 10]) # require the calculation of LDOS calculation = kite.Calculation(configuration) # configure the *.h5 file calculation.dos(num_points=1000, num_moments=512, num_random=5, num_disorder=1) kite.config_system(lattice, configuration, calculation, filename='Adatoms.h5', disorder_structural=disorded_structural) # make calculation object which caries info about # - the name of the function # DOS - denstity of states == 1, # CondXX - conductivity in xx direction == 2, # CondXY - conductivity in xy direction == 3, # OptCond - optical conductivity == 4 # SpinCond - spin conductivity == 5 # - number of moments for the calculation, # - number of different random vector realisations, # - number of disorder realisations. # make modification object which caries info about (TODO: Other modifications can be added here)
# Add sublattices lat.add_sublattices( # name, position, and onsite potential ('A', [0, 0], onsite[0]) ) # Add hoppings lat.add_hoppings( ([1, 0], 'A', 'A', - 1), ([0, 1], 'A', 'A', - 1) ) return lat # load a square lattice lattice = square_lattice([0]) # number of decomposition parts in each direction of matrix. This divides the lattice into various sections, # each of which is calculated in parallel nx = ny = 2 # number of unit cells in each direction. lx = 256 ly = 256 configuration = kite.Configuration(divisions=[nx, ny], length=[lx, ly], boundaries=[True, True], is_complex=False, precision=1, spectrum_range=[-4.1,4.1]) calculation_ldos = kite.Calculation(configuration) calculation_ldos.ldos(energy=np.linspace(-1, 1, 100), num_moments=32, num_disorder=1, position=[4,3], sublattice='A') kite.config_system(lattice, configuration, calculation_ldos, filename='config.h5')
lat.add_hoppings(([1, 0], 'A', 'A', -1), ([0, 1], 'A', 'A', -1)) return lat lattice = square_lattice() nx = ny = 1 lx = ly = 256 configuration = kite.Configuration(divisions=[nx, ny], length=[lx, ly], boundaries=[True, True], is_complex=True, precision=1, spectrum_range=[-4.1, 4.1]) calculation = kite.Calculation(configuration) mod = kite.Modification(magnetic_field=40) calculation.dos(num_points=4096, num_moments=512, num_random=1, num_disorder=1) calculation.conductivity_dc(num_points=1000, num_moments=1024, num_random=1, direction='xy', temperature=0.01) kite.config_system(lattice, configuration, calculation, modification=mod, filename='square_condDC.h5')