def main(): # Initialize PAOFLOW, indicating the name of the QE save directory. # outputdir is named 'output' by default # smearing is 'gauss' by default paoflow = PAOFLOW.PAOFLOW(savedir='silicon.save', outputdir='output', smearing='gauss', npool=1, verbose=True) paoflow.read_atomic_proj_QE() paoflow.projectability() paoflow.pao_hamiltonian() # Calculate eigenvalues on the default ibrav=2 path paoflow.bands(ibrav=2, nk=2000) # Dimension of the grid is doubled by default # e.g. 12x12x12 -> 24x24x24 paoflow.interpolated_hamiltonian() # Calculate eigenvalues on the entire BZ grid paoflow.pao_eigh() paoflow.gradient_and_momenta() paoflow.adaptive_smearing() paoflow.dos(emin=-12., emax=2.2, ne=1000) paoflow.transport(emin=-12., emax=2.2) paoflow.finish_execution()
def main(): label = 'sym' outdir = 'output_%s' % label savedir = 'silicon_%s.save' % label # Initialize PAOFLOW, indicating the name of the QE save directory. paoflow = PAOFLOW.PAOFLOW(savedir=savedir, outputdir=outdir, smearing='gauss', npool=1, verbose=True) paoflow.projectability() paoflow.pao_hamiltonian() # Calculate eigenvalues on the default ibrav=2 path paoflow.bands(ibrav=2, nk=2000) # Dimension of the grid is doubled by default # e.g. 12x12x12 -> 24x24x24 paoflow.interpolated_hamiltonian() # Calculate eigenvalues on the entire BZ grid paoflow.pao_eigh() paoflow.gradient_and_momenta() # Dump PAOFLOW data for future runs. paoflow.restart_dump(fname_prefix='paoflow_dump') paoflow.finish_execution()
def main(): paoflow = PAOFLOW.PAOFLOW(savedir='MoP2.save', verbose=False, outputdir="./output") paoflow.read_atomic_proj_QE() paoflow.projectability(pthr=0.95) paoflow.pao_hamiltonian(symmetrize=True, thresh=1.e-10, max_iter=64) paoflow.z2_pack() paoflow.find_weyl_points(search_grid=[8, 8, 8]) paoflow.finish_execution()
def main(): model = {'label':'simple_cubic', 't':1.0} paoflow = PAOFLOW.PAOFLOW(model=model, outputdir='./simple_cubic', verbose=True) path = 'G-X-M-G-R' special_points = {'G':[0.0, 0.0, 0.0],'X':[0.0, 0.5, 0.0],'M':[0.5, 0.5, 0.0],'R':[0.5,0.5,0.5]} paoflow.bands(ibrav=1, nk=100, band_path=path, high_sym_points=special_points) paoflow.finish_execution()
def main(): paoflow = PAOFLOW.PAOFLOW(savedir='pt.save', smearing='m-p') paoflow.projectability() paoflow.pao_hamiltonian() paoflow.interpolated_hamiltonian() paoflow.pao_eigh() paoflow.gradient_and_momenta() paoflow.adaptive_smearing() paoflow.dos(emin=-8., emax=4., delta=.2) paoflow.transport(emin=-8., emax=4., t_tensor=[[0, 0]]) paoflow.dielectric_tensor(metal=True, emin=.5, emax=10., d_tensor=[[0, 0]]) paoflow.finish_execution()
def main(): paoflow = PAOFLOW.PAOFLOW(savedir='al.save') paoflow.projectability(pthr=.97) paoflow.pao_hamiltonian() paoflow.interpolated_hamiltonian() paoflow.pao_eigh() paoflow.gradient_and_momenta() paoflow.adaptive_smearing() paoflow.dos(do_pdos=False, delta=.1, emin=-12., emax=3.) paoflow.transport(emin=-12., emax=3., t_tensor=[[0, 0]]) paoflow.dielectric_tensor(metal=True, emin=.05, emax=6., d_tensor=[[0, 0]]) paoflow.finish_execution()
def main(): paoflow = PAOFLOW.PAOFLOW(savedir='al.save', verbose=True) paoflow.read_atomic_proj_QE() paoflow.projectability(pthr=.97) paoflow.pao_hamiltonian() paoflow.interpolated_hamiltonian() paoflow.pao_eigh() paoflow.gradient_and_momenta() paoflow.adaptive_smearing() paoflow.dos(do_pdos=False, delta=.1, emin=-12., emax=3.) paoflow.transport(emin=-12., emax=3.) paoflow.finish_execution()
def main(): paoflow = PAOFLOW.PAOFLOW(savedir='pt.save', smearing='m-p') paoflow.read_atomic_proj_QE() paoflow.projectability() paoflow.pao_hamiltonian() paoflow.bands(ibrav=2) paoflow.interpolated_hamiltonian() paoflow.pao_eigh() paoflow.gradient_and_momenta() paoflow.adaptive_smearing() paoflow.dos(emin=-8., emax=4., delta=.2) paoflow.transport(emin=-8., emax=4.) paoflow.finish_execution()
def main(): paoflow = PAOFLOW.PAOFLOW(savedir='./fe.save') paoflow.projectability(pthr=0.95) paoflow.pao_hamiltonian() paoflow.bands(ibrav=3, nk=2000) paoflow.topology(spol=2, ipol=1, jpol=2, eff_mass=True, Berry=True) paoflow.interpolated_hamiltonian() paoflow.pao_eigh() paoflow.gradient_and_momenta() paoflow.adaptive_smearing() paoflow.dos(do_pdos=False) paoflow.anomalous_Hall(do_ac=True, emin=-8., emax=4., a_tensor=np.array([[0,1]])) paoflow.finish_execution()
def main(): # Initialize PAOFLOW as a 'restart' run paoflow = PAOFLOW.PAOFLOW(restart=True) # Load the dumped data using the same file prefix paoflow.restart_load(fname_prefix='paoflow_dump') # Continue calculations paoflow.adaptive_smearing() paoflow.dos(emin=-12., emax=2.2, ne=1000) paoflow.transport(emin=-12., emax=2.2, t_tensor=[[0, 0]]) paoflow.dielectric_tensor(emax=6., d_tensor=[[0, 0]]) paoflow.finish_execution()
def main(): paoflow = PAOFLOW.PAOFLOW(savedir='al.save', npool=8) paoflow.projectability(pthr=.97) paoflow.pao_hamiltonian(non_ortho=True) paoflow.add_external_fields() paoflow.bands(ibrav=2, nk=2000) paoflow.interpolated_hamiltonian() paoflow.pao_eigh() paoflow.gradient_and_momenta() paoflow.adaptive_smearing() paoflow.dos(do_pdos=False, emin=-12., emax=3.) paoflow.transport(emin=-12., emax=3., t_tensor=[[0, 0]]) paoflow.dielectric_tensor(metal=True, emin=.05, emax=6., d_tensor=[[0, 0]]) paoflow.finish_execution()
def main(): paoflow = PAOFLOW.PAOFLOW(savedir='pt.save') paoflow.read_atomic_proj_QE() paoflow.projectability() paoflow.pao_hamiltonian() paoflow.bands(ibrav=2, nk=2000) paoflow.topology(Berry=True, eff_mass=True, spin_Hall=True, spol=2, ipol=0, jpol=1) paoflow.interpolated_hamiltonian() paoflow.pao_eigh() paoflow.gradient_and_momenta() paoflow.adaptive_smearing() paoflow.dos(do_pdos=False, emin=-8., emax=4.) paoflow.spin_Hall(emin=-8., emax=4., s_tensor=[[0,1,2]]) paoflow.finish_execution()
def main(): paoflow = PAOFLOW.PAOFLOW(savedir='silicon.save', smearing='gauss', npool=1, verbose=True) paoflow.projectability() paoflow.pao_hamiltonian() paoflow.bands(ibrav=2, nk=2000) paoflow.interpolated_hamiltonian() paoflow.pao_eigh() paoflow.gradient_and_momenta() paoflow.adaptive_smearing() paoflow.dos(emin=-12., emax=2.2) paoflow.transport(emin=-12., emax=2.2, t_tensor=[[0, 0]]) paoflow.dielectric_tensor(emax=6., d_tensor=[[0, 0]]) paoflow.finish_execution()
def main(): paoflow = PAOFLOW.PAOFLOW(savedir='./pt.save') arry, attr = paoflow.data_controller.data_dicts() paoflow.read_atomic_proj_QE() paoflow.projectability() paoflow.pao_hamiltonian() paoflow.adhoc_spin_orbit( phi=0.0, theta=0.0, naw=np.array([9]), # number of orbitals for each atom lambda_p=np.array([0.0]), # p orbitals SOC strengh for each atom lambda_d=np.array([0.5534]), # d orbitals SOC strengh for each atom orb_pseudo=['spd']) # type of pseudo potential for each atom path = 'gG-X-W-K-gG-L-U-W-L-K|U-X' special_points = { 'gG': (0.0, 0.0, 0.0), 'K': (0.375, 0.375, 0.750), 'L': (0.5, 0.5, 0.5), 'U': (0.625, 0.250, 0.625), 'W': (0.5, 0.25, 0.75), 'X': (0.5, 0.0, 0.5) } paoflow.bands(ibrav=2, nk=1000, band_path=path, high_sym_points=special_points) paoflow.topology(Berry=True, eff_mass=True, spin_Hall=True, spol=2, ipol=0, jpol=1) paoflow.interpolated_hamiltonian() paoflow.pao_eigh() paoflow.gradient_and_momenta() paoflow.adaptive_smearing() paoflow.dos(do_pdos=False, emin=-8., emax=4.) paoflow.spin_Hall(emin=-8., emax=4., s_tensor=[[0, 1, 2]]) paoflow.finish_execution()
def main(): model = {'label': 'Kane_Mele', 't': 1.0, 'soc_par': 0.1, 'alat': 1.0} paoflow = PAOFLOW.PAOFLOW(model=model, outputdir='./kane_mele', verbose=True) path = 'G-M-K-G' special_points = { 'G': [0.0, 0.0, 0.0], 'K': [2.0 / 3.0, 1.0 / 3.0, 0.0], 'M': [1.0 / 2.0, 0.0 / 2.0, 0.0] } paoflow.bands(ibrav=4, nk=100, band_path=path, high_sym_points=special_points) paoflow.finish_execution()
def main(): model = {'label': 'graphene', 't': 2.7} paoflow = PAOFLOW.PAOFLOW(model=model, outputdir='./graphene', verbose=True) path = 'G-M-K-G' special_points = { 'G': [0.0, 0.0, 0.0], 'K': [2.0 / 3.0, 1.0 / 3.0, 0.0], 'M': [1.0 / 2.0, 0.0 / 2.0, 0.0] } paoflow.bands(ibrav=4, nk=100, band_path=path, high_sym_points=special_points) paoflow.finish_execution()
def main(): paoflow = PAOFLOW.PAOFLOW(savedir='alp.save') paoflow.projectability() paoflow.pao_hamiltonian() correction_Hubbard = np.zeros(32, dtype=float) correction_Hubbard[1:4] = .1 correction_Hubbard[17:20] = 2.31 paoflow.add_external_fields(HubbardU=correction_Hubbard) paoflow.bands(ibrav=2, nk=2000) paoflow.interpolated_hamiltonian(nfft1=24, nfft2=24, nfft3=24) paoflow.pao_eigh() paoflow.gradient_and_momenta() paoflow.adaptive_smearing() paoflow.dos(do_pdos=False, emin=-8., emax=5., delta=.1) paoflow.transport(emin=-8., emax=5., t_tensor=[[0, 0]]) paoflow.dielectric_tensor(emax=6., d_tensor=[[0, 0]]) paoflow.finish_execution()
def main(): paoflow = PAOFLOW.PAOFLOW(savedir='SnTe.save', npool=4, verbose=1) paoflow.read_atomic_proj_QE() paoflow.projectability(pthr=0.90) # Smearing is specified in QE for convergence, force PAOFLOW to treat it as an insulator paoflow.pao_hamiltonian(insulator=True) # Define high symmetry points and the path comprised of such points # '-' defines a continuous transition to the next high symmetry point # '|' defines a discontinuous break in from one high symmetry point to the next path = 'G-X-S-Y-G' special_points = { 'G': [0.0, 0.0, 0.0], 'S': [0.5, 0.5, 0.0], 'X': [0.5, 0.0, 0.0], 'Y': [0.0, 0.5, 0.0] } paoflow.bands(ibrav=8, nk=1000, band_path=path, high_sym_points=special_points) paoflow.interpolated_hamiltonian(nfft1=140, nfft2=140, nfft3=1) paoflow.pao_eigh() paoflow.spin_operator() paoflow.fermi_surface(fermi_up=0.0, fermi_dw=-1.) paoflow.spin_texture(fermi_up=0.0, fermi_dw=-1.) paoflow.gradient_and_momenta() paoflow.adaptive_smearing() paoflow.spin_Hall(twoD=True, emin=-3.5, emax=1.5, s_tensor=[[0, 1, 2], [1, 0, 2]]) paoflow.finish_execution()
def main(): # Start PAOFLOW, interpolate Hamiltonian, compute gradient an momenta paoflow = PAOFLOW.PAOFLOW(savedir='GaAs.save', smearing=None, npool=1, verbose=True) arrays,attr = paoflow.data_controller.data_dicts() paoflow.read_atomic_proj_QE() paoflow.projectability() paoflow.pao_hamiltonian() paoflow.interpolated_hamiltonian(nfft1=40, nfft2=40, nfft3=40) paoflow.pao_eigh() paoflow.gradient_and_momenta() # Compute the chemical potential at specified doping concentration for various temperatures doping = -3.5e17 paoflow.doping(tmin=380, tmax=812, nt=28, emin=-36, emax=2, ne=5000, doping_conc=doping) # Define the functional form for our 'custom' TauModel me = 9.10938e-31 # Electron Mass ev2j = 1.60217662e-19 # Electron Charge def acoustic_model ( temp, eigs, params ): # Formula from Fiorentini paper on Mg3Sb2, DOI: 10.1088/1361-648X/aaf364 from scipy.constants import hbar temp *= ev2j E = eigs * ev2j # Eigenvalues in J v = 5.2e3 # Velocity in m/s rho = 5.31e3 # Mass density kg/m^3 ms = .7 * me #effective mass tensor in kg D_ac = 7 * ev2j # Acoustic deformation potential in J return (2*ms)**1.5*(D_ac**2)*np.sqrt(E)*temp/(2*np.pi*rho*(hbar**2*v)**2) # Create the TauModel object acoustic_tau = TauModel(function=acoustic_model) # Load the temperatures and corresponding chemical potentials fname = 'doping_n%s.dat'%np.abs(doping) temp = np.loadtxt('output/%s'%fname, usecols=(0,)) mu = np.loadtxt('output/%s'%fname, usecols=(1,)) # Define the desired scattering channels, 1 user-defined and 3 built-in. channels = [acoustic_tau, 'polar_optical', 'impurity', 'polar_acoustic'] # Define quantities required for each built-in TauModel tau_params = {'doping_conc':-3.5e17, 'D_ac':7., 'rho':5.31e3, 'a':5.653e-10, 'nI':3.5e17, 'eps_inf':11.6, 'eps_0':13.5, 'v':5.2e3, 'Zi':1, 'hwlo':[0.03536], 'D_op':3e10, 'Zf':6, 'piezo':0.16, 'ms':0.7} # Compute the transport properties for each temperature and chemical potential rho = [] for t,m in zip(temp,mu): if paoflow.rank == 0: print('\nTemp, Mu: %f, %f'%(t,m)) # Update the Fermi energy in the parameters for scattering models tau_params['Ef'] = abs(m) paoflow.transport(tmin=t, tmax=t, nt=1, emin=m, emax=m, ne=1, scattering_channels=channels, tau_dict=tau_params, save_tensors=True, write_to_file=False) # Average the diagonal componenets of sigma sigma = np.sum([sig for sig in np.diag(arrays['sigma'][:,:,0])])/3 rho.append(1e2/sigma) # Write the sigmas if paoflow.rank == 0: with open('output/rho_rta_n3.5e17.dat' ,'w') as rho_file: for i,t in enumerate(temp): rho_file.write('%8.2f %9.5e\n'%(t,rho[i])) paoflow.finish_execution()
def main(): model = {'label': 'graphene2', 't': -1.0, 'delta': -0.2} paoflow = PAOFLOW.PAOFLOW(model=model, outputdir='./graphene2', verbose=True) arry, attr = paoflow.data_controller.data_dicts() path = 'G-M-K-G' special_points = { 'G': [0.0, 0.0, 0.0], 'K': [2.0 / 3.0, 1.0 / 3.0, 0.0], 'M': [1.0 / 2.0, 0.0 / 2.0, 0.0] } paoflow.bands(ibrav=0, nk=401, band_path=path, high_sym_points=special_points) kcenter = np.array([1.0 / 3.0, 2.0 / 3.0, 0.0]) kradius = 0.05 paoflow.berry_phase(kspace_method='circle', nk1=51, kradius=kradius, kcenter=kcenter, sub=[0], closed=True, method='berry', fname='circle_berry_phase_0') circle_phase_0 = attr['berry_phase'] paoflow.berry_phase(kspace_method='circle', nk1=51, kradius=kradius, kcenter=kcenter, sub=[1], closed=True, method='berry', fname='circle_berry_phase_1') circle_phase_1 = attr['berry_phase'] paoflow.berry_phase(kspace_method='circle', nk1=51, kradius=kradius, kcenter=kcenter, sub=[0, 1], closed=True, method='berry', fname='circle_berry_phase_01') circle_phase_01 = attr['berry_phase'] print() print("Berry phase along circle with radius: ", kradius) print(" centered at k-point: ", kcenter) print(" for band 0 equals : ", circle_phase_0) print(" for band 1 equals : ", circle_phase_1) print(" for both bands equals: ", circle_phase_01) print() klength = 0.1 paoflow.berry_phase( kspace_method='square', nk1=51, nk2=51, kxlim=[kcenter[0] - klength / 2, kcenter[0] + klength / 2], kylim=[kcenter[1] - klength / 2, kcenter[1] + klength / 2], sub=[0], method='berry', fname='square_berry_phase_0') square_flux_0 = attr['berry_flux'] paoflow.berry_phase( kspace_method='square', nk1=51, nk2=51, kxlim=[kcenter[0] - klength / 2, kcenter[0] + klength / 2], kylim=[kcenter[1] - klength / 2, kcenter[1] + klength / 2], sub=[1], method='berry', fname='square_berry_phase_1') square_flux_1 = attr['berry_flux'] paoflow.berry_phase( kspace_method='square', nk1=51, nk2=51, kxlim=[kcenter[0] - klength / 2, kcenter[0] + klength / 2], kylim=[kcenter[1] - klength / 2, kcenter[1] + klength / 2], sub=[0, 1], method='berry', fname='square_berry_phase_01') square_flux_01 = attr['berry_flux'] print() print("Berry flux on square patch with length: ", klength) print(" centered at k-point: ", kcenter) print(" for band 0 equals : ", square_flux_0) print(" for band 1 equals : ", square_flux_1) print(" for both bands equals: ", square_flux_01) print() nk1 = 51 nk2 = 51 berry = np.genfromtxt('graphene2/square_berry_phase_0.dat') berry = berry.reshape((nk1, nk2, 3), order='F') kgrid = np.genfromtxt('graphene2/square_berry_phase_0_kgrid_corners.dat') kgrid = kgrid.reshape((nk1 + 1, nk2 + 1, 2), order='F') fig, ax = plt.subplots(figsize=(5, 5)) ax.pcolormesh(kgrid[:, :, 0], kgrid[:, :, 1], berry[:, :, 2], shading='flat', rasterized=True, cmap='viridis_r') ax.set_xlabel(r'$k_x$', fontsize=18) ax.set_ylabel(r'$k_y$', fontsize=18) fig.tight_layout() fig.savefig('graphene2/berry_phase_k.pdf', bbox_inches='tight') paoflow.finish_execution()
def main(): argc = len(argv) arg1 = ('./' if argc < 2 else argv[1]) arg2 = ('inputfile.xml' if argc < 3 else argv[2]) arg3 = argv[3] # Start PAOFLOW with an inputfile in the current directory # # PAOFLOW will us data attributes read from # inputfile.xml for the following calculations paoflow = PAOFLOW.PAOFLOW(acbn0=arg3, workpath=arg1, inputfile=arg2, verbose=True, outputdir="") # Get dictionary containers with the # attributes and arrays read from inputfiles arry, attr = paoflow.data_controller.data_dicts() paoflow.projectability() paoflow.pao_hamiltonian(expand_wedge=attr['expand_wedge'], thresh=attr['symm_thresh'], symmetrize=attr['symmetrize'], max_iter=attr['symm_max_iter']) if attr['write2file']: paoflow.write2file() paoflow.add_external_fields() if attr['writez2pack']: paoflow.z2_pack(fname='z2pack_hamiltonian.dat') if attr['do_bands'] or attr['band_topology']: paoflow.bands(ibrav=int(attr["ibrav"])) if attr['spintexture'] or attr['spin_Hall']: paoflow.spin_operator(spin_orbit=attr['do_spin_orbit']) if attr['band_topology'] and not attr['onedim']: paoflow.topology() elif attr['onedim']: print('1D Band topology not supported with the PAOFLOW class') if attr['double_grid']: paoflow.interpolated_hamiltonian(nfft1=attr['nfft1'], nfft2=attr['nfft2'], nfft3=attr['nfft3']) paoflow.pao_eigh() if attr['fermisurf']: paoflow.fermi_surface() if attr['spintexture']: paoflow.spin_texture() paoflow.gradient_and_momenta(band_curvature=attr["carrier_conc"]) if attr['smearing'] is not None: paoflow.adaptive_smearing() if attr['do_dos'] or attr['do_pdos']: paoflow.dos(do_dos=attr['do_dos'], do_pdos=attr['do_pdos'], emin=attr['emin'], emax=attr['emax']) if attr['spin_Hall']: paoflow.spin_Hall(do_ac=attr['ac_cond_spin'], emin=attr['eminSH'], emax=attr['emaxSH'], s_tensor=arry['s_tensor']) if attr['Berry']: paoflow.anomalous_Hall(do_ac=attr['ac_cond_Berry'], emin=attr['eminAH'], emax=attr['emaxSH'], a_tensor=arry['a_tensor']) if attr['Boltzmann']: paoflow.transport(tmin=attr['tmin'], tmax=attr['tmax'], tstep=attr['tstep'], emin=attr['emin'], emax=attr['emax'], ne=attr['ne'], t_tensor=arry['t_tensor'], carrier_conc=attr["carrier_conc"]) if attr['epsilon']: paoflow.dielectric_tensor(metal=attr['metal'], emin=attr['epsmin'], emax=attr['epsmax'], ne=attr['ne'], d_tensor=arry['d_tensor']) # Print the total execution time and request # desired quantites for further processing paoflow.finish_execution()